@coopenomics/desktop 2025.6.14 → 2025.6.24
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/package.json +7 -7
- package/src/entities/Branch/api/index.ts +1 -2
- package/src/entities/Branch/model/types.ts +2 -1
- package/src/entities/Session/model/store.ts +1 -1
- package/src/features/Branch/CreateBranch/ui/CreateBranchButton.vue +85 -33
- package/src/features/Branch/DeleteBranch/api/index.ts +15 -0
- package/src/features/Branch/DeleteBranch/index.ts +1 -0
- package/src/features/Branch/DeleteBranch/model/index.ts +44 -0
- package/src/features/Branch/DeleteBranch/ui/DeleteBranchButton.vue +56 -0
- package/src/features/Cooperative/UpdateBoard/index.ts +1 -0
- package/src/features/Cooperative/UpdateBoard/ui/AddMemberDialog.vue +59 -0
- package/src/features/Cooperative/UpdateBoard/ui/index.ts +1 -0
- package/src/features/Installer/ui/RequestKeyForm/RequestKeyForm.vue +1 -1
- package/src/features/Installer/ui/SetSovietForm/SetSovietForm.vue +1 -1
- package/src/features/Meet/CreateMeet/model/index.ts +4 -2
- package/src/features/Meet/CreateMeet/ui/CreateMeet.vue +8 -0
- package/src/features/Meet/CreateMeet/ui/CreateMeetForm.vue +164 -76
- package/src/features/Meet/GenerateSovietDecision/model/index.ts +1 -1
- package/src/features/Meet/RestartMeet/model/index.ts +16 -3
- package/src/features/Meet/RestartMeet/ui/RestartMeetForm.vue +135 -73
- package/src/features/PaymentMethod/AddPaymentMethod/ui/AddPaymentButton.vue +1 -1
- package/src/features/PaymentMethod/DeletePaymentMethod/ui/DeletePaymentMethodButton.vue +1 -1
- package/src/features/Request/AcceptRequest/ui/AcceptButton.vue +1 -1
- package/src/features/Request/CancelRequest/ui/CancelButton.vue +1 -1
- package/src/features/Request/CompleteOnRequest/ui/CompleteOnRequestButton.vue +1 -1
- package/src/features/Request/ConfirmRecieveOnRequest/ui/ConfirmRecieveOnRequest.vue +1 -1
- package/src/features/Request/ConfirmSupplyOnRequest/ui/ConfirmSupplyOnRequestButton.vue +1 -1
- package/src/features/Request/CreateChildOrder/ui/CreateChildOrderButton/CreateChildOrderButton.vue +1 -1
- package/src/features/Request/CreateParentOffer/ui/CreateParentOfferForm/CreateParentOfferForm.vue +1 -1
- package/src/features/Request/DeliverOnRequest/ui/DeliverOnRequestButton.vue +1 -1
- package/src/features/Request/DisputeOnRequest/ui/DisputeOnRequestButton.vue +1 -1
- package/src/features/Request/PublishRequest/ui/PublishRequestButton.vue +1 -1
- package/src/features/Request/RecieveOnRequest/ui/RecieveOnRequestButton.vue +1 -1
- package/src/features/Request/SupplyOnRequest/ui/SupplyOnRequestButton.vue +1 -1
- package/src/features/Request/UnpublishRequest/ui/UnpublishRequestButton.vue +1 -1
- package/src/features/Union/AddCooperative/ui/AddCooperativeForm.vue +1 -1
- package/src/features/User/LoginUser/ui/LoginForm/LoginForm.vue +1 -1
- package/src/features/Wallet/DepositToWallet/ui/DepositButton/DepositButton.vue +1 -1
- package/src/features/Wallet/WithdrawFromWallet/ui/withdrawButton.vue +1 -1
- package/src/pages/Cooperative/ListOfMeets/ui/ListOfMeetsPage.vue +1 -1
- package/src/pages/Cooperative/MemberBranchList/ui/MemberBranchListPage.vue +3 -0
- package/src/pages/Registrator/SignUp/GenerateAccount.vue +1 -1
- package/src/pages/Registrator/SignUp/ReadStatement.vue +1 -1
- package/src/pages/Registrator/SignUp/SignUp.vue +0 -2
- package/src/pages/Union/ListOfCooperatives/ui/UnionPageListOfCooperatives.vue +2 -2
- package/src/processes/navigation-guard-setup/index.ts +31 -31
- package/src/processes/process-decisions/index.ts +6 -1
- package/src/processes/select-branch/index.ts +11 -4
- package/src/shared/api/errors.ts +2 -1
- package/src/shared/ui/UserSearchSelector/UserSearchSelector.vue +328 -0
- package/src/shared/ui/UserSearchSelector/composables/useUserSearch.ts +70 -0
- package/src/shared/ui/UserSearchSelector/index.ts +3 -0
- package/src/shared/ui/UserSearchSelector/model/types.ts +17 -0
- package/src/shared/ui/index.ts +1 -0
- package/src/widgets/Cooperative/Funds/ui/AccumulationFunds.vue +3 -3
- package/src/widgets/Cooperative/Funds/ui/AddAccumulationFund.vue +1 -1
- package/src/widgets/Cooperative/Funds/ui/AddExpenseFund.vue +1 -1
- package/src/widgets/Cooperative/Funds/ui/ExpenseFunds.vue +3 -3
- package/src/widgets/Cooperative/Members/ui/Members.vue +167 -135
- package/src/widgets/Registrator/LostKey/ui/LostKey.vue +1 -1
- package/src/widgets/Registrator/ResetKey/ui/ResetKey.vue +1 -1
@@ -56,6 +56,8 @@ div
|
|
56
56
|
EditableIndividualCard(:participantData="props.row.trustee" :readonly="true").q-mt-sm
|
57
57
|
div.text-wrap
|
58
58
|
p.text-grey для замены председателя участка - измените его имя аккаунта в карточке участка на аккаунт одного из пайщиков.
|
59
|
+
div.q-mt-md.flex.justify-center
|
60
|
+
DeleteBranchButton(:branch="props.row")
|
59
61
|
</template>
|
60
62
|
|
61
63
|
<script lang="ts" setup>
|
@@ -63,6 +65,7 @@ import { computed, ref } from 'vue';
|
|
63
65
|
import { useBranchStore } from 'src/entities/Branch/model';
|
64
66
|
import { useEditableTableRows } from 'src/shared/lib/composables/useEditableTableRows';
|
65
67
|
import { CreateBranchButton } from 'src/features/Branch/CreateBranch';
|
68
|
+
import { DeleteBranchButton } from 'src/features/Branch/DeleteBranch';
|
66
69
|
import { getNameFromUserData } from 'src/shared/lib/utils/getNameFromUserData';
|
67
70
|
import { BranchCard } from 'src/widgets/BranchCard';
|
68
71
|
import { EditableIndividualCard } from 'src/shared/ui/EditableIndividualCard';
|
@@ -91,8 +91,6 @@ watch(
|
|
91
91
|
() => {
|
92
92
|
if (store.step >= steps.GenerateAccount && store.step < steps.WaitingRegistration) {
|
93
93
|
useInitWalletProcess().run()
|
94
|
-
// currentUser.loadProfile(username.value, info.coopname)
|
95
|
-
// wallet.loadUserWallet({coopname: info.coopname, username: username.value})
|
96
94
|
}
|
97
95
|
}
|
98
96
|
)
|
@@ -99,7 +99,7 @@
|
|
99
99
|
loadCooperatives()
|
100
100
|
SuccessAlert('Кооператив активирован')
|
101
101
|
} catch(e: any) {
|
102
|
-
FailAlert(e
|
102
|
+
FailAlert(e)
|
103
103
|
}
|
104
104
|
}
|
105
105
|
|
@@ -111,7 +111,7 @@
|
|
111
111
|
loadCooperatives()
|
112
112
|
SuccessAlert('Кооператив заблокирован')
|
113
113
|
} catch(e: any) {
|
114
|
-
FailAlert(e
|
114
|
+
FailAlert(e)
|
115
115
|
}
|
116
116
|
}
|
117
117
|
|
@@ -1,36 +1,36 @@
|
|
1
|
-
import { Router } from 'vue-router'
|
2
|
-
import { useSessionStore } from 'src/entities/Session'
|
3
|
-
import { useCurrentUserStore } from 'src/entities/User'
|
4
|
-
import { useDesktopStore } from 'src/entities/Desktop/model'
|
5
|
-
import { useSystemStore } from 'src/entities/System/model'
|
6
|
-
import { LocalStorage } from 'quasar'
|
1
|
+
import { Router } from 'vue-router';
|
2
|
+
import { useSessionStore } from 'src/entities/Session';
|
3
|
+
import { useCurrentUserStore } from 'src/entities/User';
|
4
|
+
import { useDesktopStore } from 'src/entities/Desktop/model';
|
5
|
+
import { useSystemStore } from 'src/entities/System/model';
|
6
|
+
import { LocalStorage } from 'quasar';
|
7
7
|
|
8
8
|
function hasAccess(to, userAccount) {
|
9
|
-
if (!to.meta?.roles || to.meta?.roles.length === 0) return true
|
10
|
-
return userAccount && to.meta?.roles.includes(userAccount.role)
|
9
|
+
if (!to.meta?.roles || to.meta?.roles.length === 0) return true;
|
10
|
+
return userAccount && to.meta?.roles.includes(userAccount.role);
|
11
11
|
}
|
12
12
|
|
13
13
|
// Функция для получения URL для редиректа
|
14
14
|
function getRedirectUrl(router: Router, to: any): string {
|
15
15
|
if (process.env.CLIENT) {
|
16
|
-
return router.resolve(to).href
|
16
|
+
return router.resolve(to).href;
|
17
17
|
}
|
18
|
-
return ''
|
18
|
+
return '';
|
19
19
|
}
|
20
20
|
|
21
21
|
export function setupNavigationGuard(router: Router) {
|
22
|
-
const desktops = useDesktopStore()
|
23
|
-
const session = useSessionStore()
|
24
|
-
const currentUser = useCurrentUserStore()
|
25
|
-
const { info } = useSystemStore()
|
22
|
+
const desktops = useDesktopStore();
|
23
|
+
const session = useSessionStore();
|
24
|
+
const currentUser = useCurrentUserStore();
|
25
|
+
const { info } = useSystemStore();
|
26
26
|
|
27
27
|
router.beforeEach(async (to, from, next) => {
|
28
|
-
await desktops.healthCheck()
|
28
|
+
await desktops.healthCheck();
|
29
29
|
|
30
30
|
// если требуется установка
|
31
31
|
if (desktops.health?.status === 'install' && to.name !== 'install') {
|
32
|
-
next({ name: 'install', params: { coopname: info.coopname } })
|
33
|
-
return
|
32
|
+
next({ name: 'install', params: { coopname: info.coopname } });
|
33
|
+
return;
|
34
34
|
}
|
35
35
|
|
36
36
|
// редирект с index
|
@@ -39,18 +39,18 @@ export function setupNavigationGuard(router: Router) {
|
|
39
39
|
if (session.isAuth && currentUser.isRegistrationComplete) {
|
40
40
|
// Если рабочий стол не выбран - выбираем по правам пользователя
|
41
41
|
if (!desktops.activeWorkspaceName) {
|
42
|
-
desktops.selectDefaultWorkspace()
|
42
|
+
desktops.selectDefaultWorkspace();
|
43
43
|
}
|
44
44
|
|
45
45
|
// Переходим на маршрут по умолчанию для выбранного рабочего стола
|
46
|
-
desktops.goToDefaultPage(router)
|
47
|
-
|
48
|
-
return
|
46
|
+
desktops.goToDefaultPage(router);
|
47
|
+
|
48
|
+
return;
|
49
49
|
} else {
|
50
50
|
// Если пользователь не авторизован, используем nonAuthorizedHome
|
51
|
-
const homePage = desktops.currentDesktop?.nonAuthorizedHome
|
52
|
-
next({ name: homePage, params: { coopname: info.coopname } })
|
53
|
-
return
|
51
|
+
const homePage = desktops.currentDesktop?.nonAuthorizedHome;
|
52
|
+
next({ name: homePage, params: { coopname: info.coopname } });
|
53
|
+
return;
|
54
54
|
}
|
55
55
|
}
|
56
56
|
|
@@ -59,19 +59,19 @@ export function setupNavigationGuard(router: Router) {
|
|
59
59
|
// Сохраняем целевой URL для редиректа после входа
|
60
60
|
if (process.env.CLIENT) {
|
61
61
|
// Получаем URL для редиректа
|
62
|
-
const redirectUrl = getRedirectUrl(router, to)
|
63
|
-
LocalStorage.set('redirectAfterLogin', redirectUrl)
|
62
|
+
const redirectUrl = getRedirectUrl(router, to);
|
63
|
+
LocalStorage.set('redirectAfterLogin', redirectUrl);
|
64
64
|
}
|
65
65
|
// Перенаправляем на страницу входа
|
66
|
-
next({ name: 'login-redirect', params: { coopname: info.coopname } })
|
67
|
-
return
|
66
|
+
next({ name: 'login-redirect', params: { coopname: info.coopname } });
|
67
|
+
return;
|
68
68
|
}
|
69
69
|
|
70
70
|
// проверка по ролям
|
71
71
|
if (hasAccess(to, currentUser.userAccount)) {
|
72
|
-
next()
|
72
|
+
next();
|
73
73
|
} else {
|
74
|
-
next({ name: 'permissionDenied' })
|
74
|
+
next({ name: 'permissionDenied' });
|
75
75
|
}
|
76
|
-
})
|
76
|
+
});
|
77
77
|
}
|
@@ -135,10 +135,15 @@ export function useDecisionProcessor() {
|
|
135
135
|
}
|
136
136
|
else if (registry_id === Cooperative.Registry.AnnualGeneralMeetingSovietDecision.registry_id) {
|
137
137
|
const { generateSovietDecisionOnAnnualMeet } = useGenerateSovietDecisionOnAnnualMeet()
|
138
|
+
const unparsedDocumentMeta = row.table.statement.meta == '' ? '{}' : row.table.statement.meta
|
139
|
+
const parsedDocumentMeta = JSON.parse(unparsedDocumentMeta) as Cooperative.Registry.AnnualGeneralMeetingAgenda.Action
|
140
|
+
const is_repeated = parsedDocumentMeta.is_repeated || false
|
141
|
+
|
138
142
|
document = await generateSovietDecisionOnAnnualMeet({
|
139
143
|
username: username,
|
140
144
|
decision_id: decision_id,
|
141
|
-
meet_hash: row.table.hash as string
|
145
|
+
meet_hash: row.table.hash as string,
|
146
|
+
is_repeated
|
142
147
|
})
|
143
148
|
}
|
144
149
|
else {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { computed, ref } from 'vue'
|
1
|
+
import { computed, ref, watch } from 'vue'
|
2
2
|
import { useSelectBranch } from 'src/features/Branch/SelectBranch'
|
3
3
|
import { useSystemStore } from 'src/entities/System/model'
|
4
4
|
import { useSessionStore } from 'src/entities/Session'
|
@@ -24,9 +24,16 @@ export function useSelectBranchProcess() {
|
|
24
24
|
|
25
25
|
const branches = computed(() => branchStore.publicBranches)
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
// Вотчер на авторизацию
|
28
|
+
watch(
|
29
|
+
() => session.isAuth,
|
30
|
+
(isAuth, wasAuth) => {
|
31
|
+
if (isAuth && !wasAuth) {
|
32
|
+
branchStore.loadPublicBranches({ coopname: system.info.coopname })
|
33
|
+
}
|
34
|
+
},
|
35
|
+
{ immediate: true }
|
36
|
+
)
|
30
37
|
|
31
38
|
const next = async () => {
|
32
39
|
isLoading.value = true
|
package/src/shared/api/errors.ts
CHANGED
@@ -15,13 +15,14 @@ export function createBlockchainGetError(name: string) {
|
|
15
15
|
|
16
16
|
export function handleException(e: unknown): void {
|
17
17
|
if (e instanceof Error) {
|
18
|
-
FailAlert(e
|
18
|
+
FailAlert(e);
|
19
19
|
} else {
|
20
20
|
FailAlert('Произошла неизвестная ошибка');
|
21
21
|
}
|
22
22
|
}
|
23
23
|
|
24
24
|
export function extractGraphQLErrorMessages(error: unknown): string {
|
25
|
+
if (typeof error === 'string') return error;
|
25
26
|
if (!error || typeof error !== 'object') return 'Unknown error';
|
26
27
|
|
27
28
|
// Проверяем, если ошибка уже является массивом
|