@coopenomics/desktop 2.2.7 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +5 -5
- package/src/desktops/Chairman/model/index.ts +0 -23
- package/src/desktops/Member/model/index.ts +0 -23
- package/src/desktops/Setup/model/index.ts +0 -23
- package/src/entities/Wallet/model/stores.ts +25 -27
- package/src/entities/Wallet/ui/index.ts +0 -1
- package/src/widgets/User/CoopCard/ui/CoopCard.vue +36 -2
- package/src/entities/Wallet/ui/WalletBalance/WalletBalance.vue +0 -35
- package/src/entities/Wallet/ui/WalletBalance/index.ts +0 -1
- package/src/pages/User/IdentityPage/index.ts +0 -1
- package/src/pages/User/IdentityPage/ui/IdentityPage.vue +0 -15
- package/src/pages/User/IdentityPage/ui/index.ts +0 -1
- package/src/pages/User/WalletPage/index.ts +0 -1
- package/src/pages/User/WalletPage/ui/WalletPage.vue +0 -14
- package/src/pages/User/WalletPage/ui/index.ts +0 -1
- package/src/widgets/User/PersonalCard/index.ts +0 -1
- package/src/widgets/User/PersonalCard/ui/PersonalCard.vue +0 -109
- package/src/widgets/User/PersonalCard/ui/UserQR.vue +0 -5
- package/src/widgets/User/PersonalCard/ui/index.ts +0 -2
- package/src/widgets/User/WalletCard/index.ts +0 -1
- package/src/widgets/User/WalletCard/ui/WalletCard.vue +0 -26
- package/src/widgets/User/WalletCard/ui/index.ts +0 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.2.8](https://github.com/coopenomics/monocoop/compare/v2.2.7...v2.2.8) (2025-02-10)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @coopenomics/desktop
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
6
14
|
## [2.2.7](https://github.com/coopenomics/monocoop/compare/v2.2.6...v2.2.7) (2025-02-07)
|
7
15
|
|
8
16
|
**Note:** Version bump only for package @coopenomics/desktop
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@coopenomics/desktop",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.8",
|
4
4
|
"description": "A Desktop Project",
|
5
5
|
"productName": "Desktop App",
|
6
6
|
"author": "Alex Ant <dacom.dark.sun@gmail.com>",
|
@@ -20,8 +20,8 @@
|
|
20
20
|
"prepublishOnly": "npm run build:lib"
|
21
21
|
},
|
22
22
|
"dependencies": {
|
23
|
-
"@coopenomics/controller": "2.2.
|
24
|
-
"@coopenomics/sdk": "2.2.
|
23
|
+
"@coopenomics/controller": "2.2.8",
|
24
|
+
"@coopenomics/sdk": "2.2.8",
|
25
25
|
"@dicebear/collection": "^9.0.1",
|
26
26
|
"@dicebear/core": "^9.0.1",
|
27
27
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"@wharfkit/wallet-plugin-privatekey": "^1.1.0",
|
46
46
|
"axios": "^1.2.1",
|
47
47
|
"compression": "^1.7.4",
|
48
|
-
"cooptypes": "2.2.
|
48
|
+
"cooptypes": "2.2.8",
|
49
49
|
"dompurify": "^3.1.7",
|
50
50
|
"dotenv": "^16.4.5",
|
51
51
|
"email-regex": "^5.0.0",
|
@@ -94,5 +94,5 @@
|
|
94
94
|
"npm": ">= 6.13.4",
|
95
95
|
"yarn": ">= 1.21.1"
|
96
96
|
},
|
97
|
-
"gitHead": "
|
97
|
+
"gitHead": "973590281c916620f866b9e39253c6b5bf85f9d4"
|
98
98
|
}
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import { UserIdentityPage } from 'src/pages/User/IdentityPage';
|
2
1
|
import { UserPaymentMethodsPage } from 'src/pages/User/PaymentMethodsPage';
|
3
|
-
import { UserWalletPage } from 'src/pages/User/WalletPage';
|
4
2
|
import { markRaw } from 'vue';
|
5
3
|
|
6
4
|
export const manifest = {
|
@@ -18,27 +16,6 @@ export const manifest = {
|
|
18
16
|
path: '/:coopname/user',
|
19
17
|
name: 'home',
|
20
18
|
children: [{
|
21
|
-
meta: {
|
22
|
-
title: 'Удостоверение',
|
23
|
-
icon: '',
|
24
|
-
roles: [],
|
25
|
-
},
|
26
|
-
path: 'identity',
|
27
|
-
name: 'user-identity',
|
28
|
-
component: markRaw(UserIdentityPage),
|
29
|
-
children: [],
|
30
|
-
},{
|
31
|
-
meta: {
|
32
|
-
title: 'Кошелёк',
|
33
|
-
icon: '',
|
34
|
-
roles: [],
|
35
|
-
},
|
36
|
-
path: 'wallet',
|
37
|
-
name: 'user-wallet',
|
38
|
-
component: markRaw(UserWalletPage),
|
39
|
-
children: [],
|
40
|
-
},
|
41
|
-
{
|
42
19
|
meta: {
|
43
20
|
title: 'Реквизиты',
|
44
21
|
icon: '',
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import { UserIdentityPage } from 'src/pages/User/IdentityPage';
|
2
1
|
import { UserPaymentMethodsPage } from 'src/pages/User/PaymentMethodsPage';
|
3
|
-
import { UserWalletPage } from 'src/pages/User/WalletPage';
|
4
2
|
import { markRaw } from 'vue';
|
5
3
|
|
6
4
|
export const manifest = {
|
@@ -18,27 +16,6 @@ export const manifest = {
|
|
18
16
|
path: '/:coopname/user',
|
19
17
|
name: 'home',
|
20
18
|
children: [{
|
21
|
-
meta: {
|
22
|
-
title: 'Удостоверение',
|
23
|
-
icon: '',
|
24
|
-
roles: [],
|
25
|
-
},
|
26
|
-
path: 'identity',
|
27
|
-
name: 'user-identity',
|
28
|
-
component: markRaw(UserIdentityPage),
|
29
|
-
children: [],
|
30
|
-
},{
|
31
|
-
meta: {
|
32
|
-
title: 'Кошелёк',
|
33
|
-
icon: '',
|
34
|
-
roles: [],
|
35
|
-
},
|
36
|
-
path: 'wallet',
|
37
|
-
name: 'user-wallet',
|
38
|
-
component: markRaw(UserWalletPage),
|
39
|
-
children: [],
|
40
|
-
},
|
41
|
-
{
|
42
19
|
meta: {
|
43
20
|
title: 'Реквизиты',
|
44
21
|
icon: '',
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import { UserIdentityPage } from 'src/pages/User/IdentityPage';
|
2
1
|
import { UserPaymentMethodsPage } from 'src/pages/User/PaymentMethodsPage';
|
3
|
-
import { UserWalletPage } from 'src/pages/User/WalletPage';
|
4
2
|
import { markRaw } from 'vue';
|
5
3
|
|
6
4
|
export const manifest = {
|
@@ -18,27 +16,6 @@ export const manifest = {
|
|
18
16
|
path: '/:coopname/user',
|
19
17
|
name: 'home',
|
20
18
|
children: [{
|
21
|
-
meta: {
|
22
|
-
title: 'Удостоверение',
|
23
|
-
icon: '',
|
24
|
-
roles: [],
|
25
|
-
},
|
26
|
-
path: 'identity',
|
27
|
-
name: 'user-identity',
|
28
|
-
component: markRaw(UserIdentityPage),
|
29
|
-
children: [],
|
30
|
-
},{
|
31
|
-
meta: {
|
32
|
-
title: 'Кошелёк',
|
33
|
-
icon: '',
|
34
|
-
roles: [],
|
35
|
-
},
|
36
|
-
path: 'wallet',
|
37
|
-
name: 'user-wallet',
|
38
|
-
component: markRaw(UserWalletPage),
|
39
|
-
children: [],
|
40
|
-
},
|
41
|
-
{
|
42
19
|
meta: {
|
43
20
|
title: 'Реквизиты',
|
44
21
|
icon: '',
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { defineStore } from 'pinia';
|
2
2
|
import { api } from '../api';
|
3
3
|
import {
|
4
|
-
IWalletData,
|
5
4
|
IDepositData,
|
6
5
|
IWithdrawData,
|
7
6
|
ExtendedProgramWalletData,
|
@@ -13,14 +12,13 @@ import { ILoadUserWallet } from './types';
|
|
13
12
|
import { ICreateDeposit } from 'src/shared/lib/types/payments';
|
14
13
|
import { Ref, ref } from 'vue';
|
15
14
|
import { sendPOST } from 'src/shared/api';
|
16
|
-
import { CURRENCY } from 'src/shared/config';
|
17
15
|
import type { SovietContract } from 'cooptypes';
|
18
16
|
|
19
17
|
const namespace = 'wallet';
|
20
18
|
|
21
19
|
interface IWalletStore {
|
22
20
|
/* доменный интерфейс кошелька пользователя */
|
23
|
-
wallet: Ref<IWalletData>;
|
21
|
+
// wallet: Ref<IWalletData>;
|
24
22
|
program_wallets: Ref<ExtendedProgramWalletData[]>;
|
25
23
|
deposits: Ref<IDepositData[]>;
|
26
24
|
withdraws: Ref<IWithdrawData[]>;
|
@@ -35,14 +33,14 @@ interface IWalletStore {
|
|
35
33
|
}
|
36
34
|
|
37
35
|
export const useWalletStore = defineStore(namespace, (): IWalletStore => {
|
38
|
-
const wallet = ref<IWalletData>({
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
});
|
36
|
+
// const wallet = ref<IWalletData>({
|
37
|
+
// username: '',
|
38
|
+
// coopname: '',
|
39
|
+
// available: `0.0000 ${CURRENCY}`,
|
40
|
+
// blocked: `0.0000 ${CURRENCY}`,
|
41
|
+
// minimum: `0.0000 ${CURRENCY}`,
|
42
|
+
// initial: `0.0000 ${CURRENCY}`,
|
43
|
+
// });
|
46
44
|
|
47
45
|
const deposits = ref<IDepositData[]>([]);
|
48
46
|
const withdraws = ref<IWithdrawData[]>([]);
|
@@ -53,18 +51,18 @@ export const useWalletStore = defineStore(namespace, (): IWalletStore => {
|
|
53
51
|
|
54
52
|
const loadUserWalet = async (params: ILoadUserWallet) => {
|
55
53
|
|
56
|
-
const createEmptyWallet = (): IWalletData => ({
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
});
|
54
|
+
// const createEmptyWallet = (): IWalletData => ({
|
55
|
+
// username: '',
|
56
|
+
// coopname: '',
|
57
|
+
// available: `0.0000 ${CURRENCY}`,
|
58
|
+
// blocked: `0.0000 ${CURRENCY}`,
|
59
|
+
// minimum: `0.0000 ${CURRENCY}`,
|
60
|
+
// initial: `0.0000 ${CURRENCY}`,
|
61
|
+
// });
|
64
62
|
|
65
63
|
try {
|
66
64
|
const data = await Promise.all([
|
67
|
-
api.loadSingleUserWalletData(params),
|
65
|
+
// api.loadSingleUserWalletData(params),
|
68
66
|
api.loadUserDepositsData(params),
|
69
67
|
api.loadUserWithdrawsData(params),
|
70
68
|
api.loadUserProgramWalletsData(params),
|
@@ -72,12 +70,12 @@ export const useWalletStore = defineStore(namespace, (): IWalletStore => {
|
|
72
70
|
api.loadUserAgreements(params.coopname, params.username)
|
73
71
|
]);
|
74
72
|
|
75
|
-
wallet.value = data[0] ?? createEmptyWallet();
|
76
|
-
deposits.value = data[
|
77
|
-
withdraws.value = data[
|
78
|
-
program_wallets.value = data[
|
79
|
-
methods.value = data[
|
80
|
-
agreements.value = data[
|
73
|
+
// wallet.value = data[0] ?? createEmptyWallet();
|
74
|
+
deposits.value = data[0] ?? [];
|
75
|
+
withdraws.value = data[1] ?? [];
|
76
|
+
program_wallets.value = data[2] ?? [];
|
77
|
+
methods.value = data[3] ?? [];
|
78
|
+
agreements.value = data[4] ?? [];
|
81
79
|
|
82
80
|
} catch (e: any) {
|
83
81
|
console.log(e);
|
@@ -95,7 +93,7 @@ export const useWalletStore = defineStore(namespace, (): IWalletStore => {
|
|
95
93
|
};
|
96
94
|
|
97
95
|
return {
|
98
|
-
wallet,
|
96
|
+
// wallet,
|
99
97
|
program_wallets,
|
100
98
|
deposits,
|
101
99
|
withdraws,
|
@@ -15,7 +15,38 @@ div.q-pa-md
|
|
15
15
|
DepositButton.col-6.border-left-radius-buttons
|
16
16
|
WithdrawButton.col-6.border-right-radius-buttons
|
17
17
|
|
18
|
-
|
18
|
+
div.col-md-4.col-xs-12
|
19
|
+
|
20
|
+
|
21
|
+
q-list(flat).q-gutter-sm
|
22
|
+
q-item
|
23
|
+
q-item-section
|
24
|
+
q-item-label(caption) Имя аккаунта
|
25
|
+
q-item-label(style="font-size: 20px;").text-bold {{ currentUser.username }}
|
26
|
+
|
27
|
+
//- q-item
|
28
|
+
//- q-item-section
|
29
|
+
//- q-item-label(caption) Паевый счёт
|
30
|
+
//- q-item-label(style="font-size: 20px;").text-bold {{ walletStore.wallet.available }}
|
31
|
+
|
32
|
+
q-item
|
33
|
+
q-item-section
|
34
|
+
q-item-label(caption) Минимальный паевый счёт
|
35
|
+
q-item-label(style="font-size: 20px;").text-bold {{ currentUser.participantAccount?.minimum_amount }}
|
36
|
+
|
37
|
+
//- q-item
|
38
|
+
//- q-item-section
|
39
|
+
//- q-item-label(caption) Заблокировано в целевых программах
|
40
|
+
//- q-item-label(style="font-size: 20px;").text-bold {{ walletStore.wallet.blocked }}
|
41
|
+
|
42
|
+
|
43
|
+
q-item(v-for="program_wallet of walletStore.program_wallets" :key="program_wallet.id")
|
44
|
+
q-item-section
|
45
|
+
q-item-label(caption) {{ program_wallet.program_details.title }}
|
46
|
+
|
47
|
+
q-item-label(style="font-size: 20px;").text-bold {{program_wallet.available}}
|
48
|
+
|
49
|
+
|
19
50
|
|
20
51
|
|
21
52
|
//- div.col-md-6.col-xs-12.q-mt-lg
|
@@ -24,10 +55,12 @@ div.q-pa-md
|
|
24
55
|
</template>
|
25
56
|
|
26
57
|
<script lang="ts" setup>
|
27
|
-
|
58
|
+
|
28
59
|
import { DepositButton } from 'src/features/Wallet/DepositToWallet'
|
29
60
|
import { WithdrawButton } from 'src/features/Wallet/WithdrawFromWallet'
|
30
61
|
import { AutoAvatar } from 'src/shared/ui/AutoAvatar';
|
62
|
+
import { useWalletStore } from 'src/entities/Wallet';
|
63
|
+
const walletStore = useWalletStore()
|
31
64
|
|
32
65
|
import { useCurrentUserStore } from 'src/entities/User'
|
33
66
|
import type { IEntrepreneurData, IIndividualData, IOrganizationData } from 'src/shared/lib/types/user/IUserData';
|
@@ -38,6 +71,7 @@ const userType = computed(() => currentUser.userAccount?.type)
|
|
38
71
|
|
39
72
|
const isIP = computed(() => currentUser.userAccount?.type === 'entrepreneur')
|
40
73
|
|
74
|
+
|
41
75
|
const role = computed(() => {
|
42
76
|
if (currentUser.userAccount?.role === 'user')
|
43
77
|
return 'Пайщик'
|
@@ -1,35 +0,0 @@
|
|
1
|
-
<script setup lang="ts">
|
2
|
-
import { useWalletStore } from '../../model'
|
3
|
-
const walletStore = useWalletStore()
|
4
|
-
</script>
|
5
|
-
|
6
|
-
<template lang="pug">
|
7
|
-
q-list(flat).q-gutter-sm
|
8
|
-
q-item
|
9
|
-
q-item-section
|
10
|
-
q-item-label(caption) Имя аккаунта
|
11
|
-
q-item-label(style="font-size: 20px;").text-bold {{ walletStore.wallet.username }}
|
12
|
-
|
13
|
-
q-item
|
14
|
-
q-item-section
|
15
|
-
q-item-label(caption) Паевый счёт
|
16
|
-
q-item-label(style="font-size: 20px;").text-bold {{ walletStore.wallet.available }}
|
17
|
-
|
18
|
-
q-item
|
19
|
-
q-item-section
|
20
|
-
q-item-label(caption) Минимальный паевый счёт
|
21
|
-
q-item-label(style="font-size: 20px;").text-bold {{ walletStore.wallet.minimum }}
|
22
|
-
|
23
|
-
q-item
|
24
|
-
q-item-section
|
25
|
-
q-item-label(caption) Заблокировано в целевых программах
|
26
|
-
q-item-label(style="font-size: 20px;").text-bold {{ walletStore.wallet.blocked }}
|
27
|
-
|
28
|
-
|
29
|
-
q-item(v-for="program_wallet of walletStore.program_wallets" :key="program_wallet.id")
|
30
|
-
q-item-section
|
31
|
-
q-item-label(caption) {{ program_wallet.program_details.title }}
|
32
|
-
|
33
|
-
q-item-label(style="font-size: 20px;").text-bold {{program_wallet.available}}
|
34
|
-
|
35
|
-
</template>
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default as WalletBalance } from './WalletBalance.vue'
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './ui'
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
PersonalCard(:username="username")
|
3
|
-
|
4
|
-
</template>
|
5
|
-
<script lang="ts" setup>
|
6
|
-
import { PersonalCard } from 'src/widgets/User/PersonalCard/ui'
|
7
|
-
|
8
|
-
import { computed } from 'vue';
|
9
|
-
import { useCurrentUserStore } from 'src/entities/User';
|
10
|
-
|
11
|
-
const currentUser = useCurrentUserStore()
|
12
|
-
|
13
|
-
const username = computed(() => currentUser.username)
|
14
|
-
|
15
|
-
</script>
|
@@ -1 +0,0 @@
|
|
1
|
-
export {default as UserIdentityPage} from './IdentityPage.vue'
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './ui'
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
WalletCard(:username="username")
|
3
|
-
</template>
|
4
|
-
<script lang="ts" setup>
|
5
|
-
import { WalletCard } from 'src/widgets/User/WalletCard'
|
6
|
-
|
7
|
-
import { computed } from 'vue';
|
8
|
-
import { useCurrentUserStore } from 'src/entities/User';
|
9
|
-
|
10
|
-
const currentUser = useCurrentUserStore()
|
11
|
-
|
12
|
-
const username = computed(() => currentUser.username)
|
13
|
-
|
14
|
-
</script>
|
@@ -1 +0,0 @@
|
|
1
|
-
export {default as UserWalletPage} from './WalletPage.vue'
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './ui'
|
@@ -1,109 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
div(v-if="currentUser?.username" flat bordered).q-pa-md
|
3
|
-
div.row
|
4
|
-
div.col-md-4.col-xs-12
|
5
|
-
div(style="flex-grow: 1; display: flex; justify-content: center;")
|
6
|
-
//- UserQR
|
7
|
-
|
8
|
-
AutoAvatar(style="width: 125px;" :username="currentUser.username").q-pa-sm.q-pt-lg
|
9
|
-
|
10
|
-
div.col-md-8.col-xs-12
|
11
|
-
div
|
12
|
-
div
|
13
|
-
q-item
|
14
|
-
q-item-section
|
15
|
-
q-item-label(caption) Пайщик
|
16
|
-
q-item-label {{ displayName }}
|
17
|
-
|
18
|
-
|
19
|
-
q-item
|
20
|
-
q-item-section
|
21
|
-
q-item-label(caption) Зарегистрирован как
|
22
|
-
q-item-label(v-if="userType === 'individual'") физическое лицо
|
23
|
-
q-item-label(v-if="userType === 'entrepreneur'") индивидуальный предприниматель
|
24
|
-
q-item-label(v-if="userType === 'organization'") юридическое лицо
|
25
|
-
|
26
|
-
q-item
|
27
|
-
q-item-section
|
28
|
-
q-item-label(caption) Имя аккаунта
|
29
|
-
q-item-label {{ currentUser.username }}
|
30
|
-
|
31
|
-
q-item(v-if="userType === 'individual' && individualProfile")
|
32
|
-
q-item-section
|
33
|
-
q-item-label(caption) Дата рождения
|
34
|
-
q-item-label {{ individualProfile.birthdate }}
|
35
|
-
|
36
|
-
q-item(v-if="userType === 'organization' && organizationProfile")
|
37
|
-
q-item-section
|
38
|
-
q-item-label(caption) ИНН / ОГРН
|
39
|
-
q-item-label {{ inn_ogrn }}
|
40
|
-
|
41
|
-
q-item(v-if="userProfile")
|
42
|
-
q-item-section
|
43
|
-
q-item-label(caption) Телефон
|
44
|
-
q-item-label {{ userProfile.phone }}
|
45
|
-
|
46
|
-
q-item(v-if="userProfile")
|
47
|
-
q-item-section
|
48
|
-
q-item-label(caption) Почта
|
49
|
-
q-item-label {{ userProfile.email }}
|
50
|
-
|
51
|
-
</template>
|
52
|
-
|
53
|
-
<script lang="ts" setup>
|
54
|
-
import { AutoAvatar } from 'src/shared/ui/AutoAvatar';
|
55
|
-
import { useCurrentUserStore } from 'src/entities/User'
|
56
|
-
import type { IEntrepreneurData, IIndividualData, IOrganizationData } from 'src/shared/lib/types/user/IUserData';
|
57
|
-
import { computed } from 'vue';
|
58
|
-
const currentUser = useCurrentUserStore()
|
59
|
-
|
60
|
-
const userType = computed(() => currentUser.userAccount?.type)
|
61
|
-
|
62
|
-
const individualProfile = computed(() => {
|
63
|
-
if (userType.value === 'individual') {
|
64
|
-
return currentUser.userAccount?.private_data as IIndividualData
|
65
|
-
}
|
66
|
-
return null
|
67
|
-
})
|
68
|
-
|
69
|
-
const entrepreneurProfile = computed(() => {
|
70
|
-
if (userType.value === 'entrepreneur') {
|
71
|
-
return currentUser.userAccount?.private_data as IEntrepreneurData
|
72
|
-
}
|
73
|
-
return null
|
74
|
-
})
|
75
|
-
|
76
|
-
const organizationProfile = computed(() => {
|
77
|
-
if (userType.value === 'organization') {
|
78
|
-
return currentUser.userAccount?.private_data as IOrganizationData
|
79
|
-
}
|
80
|
-
return null
|
81
|
-
})
|
82
|
-
|
83
|
-
const userProfile = computed(() => {
|
84
|
-
if (userType.value === 'individual' || userType.value === 'entrepreneur') {
|
85
|
-
return individualProfile?.value || entrepreneurProfile?.value
|
86
|
-
}
|
87
|
-
return organizationProfile?.value
|
88
|
-
})
|
89
|
-
|
90
|
-
const displayName = computed(() => {
|
91
|
-
if (userType.value === 'individual') {
|
92
|
-
return `${individualProfile.value?.last_name} ${individualProfile.value?.first_name} ${individualProfile.value?.middle_name}`
|
93
|
-
} else if (userType.value === 'entrepreneur') {
|
94
|
-
return `${entrepreneurProfile.value?.last_name} ${entrepreneurProfile.value?.first_name} ${entrepreneurProfile.value?.middle_name}`
|
95
|
-
} else {
|
96
|
-
return organizationProfile.value?.short_name
|
97
|
-
}
|
98
|
-
})
|
99
|
-
|
100
|
-
const inn_ogrn = computed(() => {
|
101
|
-
if (organizationProfile.value)
|
102
|
-
return `${organizationProfile.value.details.inn} / ${organizationProfile.value.details.ogrn}`
|
103
|
-
else return ''
|
104
|
-
})
|
105
|
-
|
106
|
-
</script>
|
107
|
-
<style>
|
108
|
-
|
109
|
-
</style>
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './ui'
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
div.q-pa-md
|
3
|
-
div.flex
|
4
|
-
DepositButton.q-ma-sm
|
5
|
-
WithdrawButton.q-ma-sm
|
6
|
-
|
7
|
-
div.row.justify-between.q-mt-lg
|
8
|
-
div.col-md-4.col-xs-12
|
9
|
-
WalletBalance
|
10
|
-
div.col-md-4.col-xs-12.q-mt-lg
|
11
|
-
|
12
|
-
</template>
|
13
|
-
|
14
|
-
<script lang="ts" setup>
|
15
|
-
import { WalletBalance } from 'src/entities/Wallet/ui'
|
16
|
-
import { DepositButton } from 'src/features/Wallet/DepositToWallet'
|
17
|
-
import { WithdrawButton } from 'src/features/Wallet/WithdrawFromWallet'
|
18
|
-
|
19
|
-
defineProps({
|
20
|
-
username: {
|
21
|
-
type: String,
|
22
|
-
required: true,
|
23
|
-
},
|
24
|
-
})
|
25
|
-
|
26
|
-
</script>
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default as WalletCard } from './WalletCard.vue'
|