@coopenomics/desktop 2025.5.14 → 2025.6.14
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/.env-example +4 -0
- package/extensions/participant/install.ts +37 -25
- package/extensions/soviet/install.ts +23 -20
- package/package.json +7 -5
- package/src/app/App.vue +1 -0
- package/src/app/providers/routes/index.ts +12 -0
- package/src/app/styles/app.scss +1 -1
- package/src/app/styles/style.css +11 -0
- package/src/css/quasar.variables.scss +1 -1
- package/src/entities/Desktop/model/store.ts +68 -0
- package/src/entities/Desktop/model/types.ts +7 -0
- package/src/entities/Document/model/types.ts +1 -1
- package/src/entities/Meet/api/index.ts +2 -28
- package/src/entities/Meet/model/store.ts +7 -22
- package/src/entities/Wallet/api/index.ts +3 -3
- package/src/env.d.ts +1 -0
- package/src/features/Meet/CloseMeetWithDecision/model/index.ts +119 -17
- package/src/features/Meet/CreateMeet/model/index.ts +51 -9
- package/src/features/Meet/CreateMeet/ui/CreateMeet.vue +37 -6
- package/src/features/Meet/CreateMeet/ui/CreateMeetForm.vue +87 -65
- package/src/features/Meet/GenerateSovietDecision/model/index.ts +14 -4
- package/src/features/Meet/RestartMeet/model/index.ts +121 -3
- package/src/features/Meet/RestartMeet/ui/RestartMeet.vue +4 -6
- package/src/features/Meet/RestartMeet/ui/RestartMeetForm.vue +64 -28
- package/src/features/Meet/SignNotification/index.ts +2 -0
- package/src/features/Meet/SignNotification/model/index.ts +137 -0
- package/src/features/Meet/SignNotification/ui/SignNotificationButton.vue +61 -0
- package/src/features/Meet/SignNotification/ui/index.ts +1 -0
- package/src/features/Meet/VoteOnMeet/model/composable.ts +180 -0
- package/src/features/Meet/VoteOnMeet/model/index.ts +2 -17
- package/src/features/Meet/VoteOnMeet/model/types.ts +4 -0
- package/src/features/Meet/index.ts +6 -0
- package/src/features/User/LoginRedirect/ui/LoginRedirectPage.vue +15 -0
- package/src/features/User/LoginRedirect/ui/index.ts +1 -0
- package/src/features/User/LoginUser/ui/LoginForm/LoginForm.vue +38 -1
- package/src/features/User/LoginWithRedirect/ui/LoginRedirectForm/LoginRedirectForm.vue +0 -0
- package/src/pages/Cooperative/ListOfMeets/ui/ListOfMeetsPage.vue +22 -46
- package/src/pages/Cooperative/MeetDetails/ui/MeetDetailsPage.vue +84 -28
- package/src/pages/PermissionDenied/PermissionDenied.vue +1 -1
- package/src/processes/init-app/index.ts +12 -5
- package/src/processes/navigation-guard-setup/index.ts +37 -5
- package/src/processes/process-decisions/index.ts +7 -6
- package/src/shared/config/Environment.ts +10 -2
- package/src/shared/lib/composables/index.ts +1 -0
- package/src/shared/lib/composables/useMeetStatus.ts +96 -0
- package/src/shared/lib/consts/index.ts +1 -0
- package/src/shared/lib/consts/meet-statuses.ts +114 -0
- package/src/shared/lib/document/model/entity.ts +4 -2
- package/src/shared/lib/types/certificate/index.ts +6 -0
- package/src/shared/lib/types/document/index.ts +1 -1
- package/src/shared/lib/types/workspace.ts +24 -0
- package/src/shared/lib/utils/dates/index.ts +5 -0
- package/src/shared/lib/utils/dates/moment.ts +43 -2
- package/src/shared/lib/utils/dates/timezone.ts +75 -0
- package/src/shared/lib/utils/getNameFromCertificate.ts +108 -0
- package/src/shared/lib/utils/index.ts +1 -0
- package/src/shared/lib/utils/parseLinks.ts +10 -0
- package/src/shared/ui/AgendaNumberAvatar/AgendaNumberAvatar.vue +12 -0
- package/src/shared/ui/AgendaNumberAvatar/index.ts +1 -0
- package/src/shared/ui/BaseDocument/BaseDocument.vue +37 -8
- package/src/shared/ui/ExpandableDocument/ExpandableDocument.vue +49 -0
- package/src/shared/ui/ExpandableDocument/index.ts +1 -0
- package/src/shared/ui/MeetInfoCard/index.ts +1 -0
- package/src/shared/ui/MeetInfoCard/ui/MeetInfoCard.vue +62 -0
- package/src/shared/ui/MeetStatusBanner/index.ts +1 -0
- package/src/shared/ui/MeetStatusBanner/ui/MeetStatusBanner.vue +94 -0
- package/src/shared/ui/index.ts +1 -0
- package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/DocumentsTable.vue +3 -3
- package/src/widgets/Cooperative/Orders/ListOfOrders/ui/ListOfOrdersWidget.vue +2 -2
- package/src/widgets/Cooperative/Payments/ListOfPayments/ui/ListOfPaymentsWidget.vue +2 -2
- package/src/widgets/Desktop/WorkspaceMenu/WorkspaceMenu.vue +74 -82
- package/src/widgets/Header/CommonHeader/CooperativeSettingsHeader.vue +1 -1
- package/src/widgets/Header/CommonHeader/ExtstoreHeader.vue +1 -1
- package/src/widgets/Header/CommonHeader/MainHeader.vue +6 -0
- package/src/widgets/Header/CommonHeader/UserSettingsHeader.vue +1 -1
- package/src/widgets/Meets/MeetCardsList/index.ts +1 -0
- package/src/widgets/Meets/MeetCardsList/ui/MeetCardsList.vue +55 -0
- package/src/widgets/Meets/MeetDetailsActions/MeetDetailsActions.vue +33 -15
- package/src/widgets/Meets/MeetDetailsAgenda/MeetDetailsAgenda.vue +34 -15
- package/src/widgets/Meets/MeetDetailsInfo/MeetDetailsInfo.vue +27 -0
- package/src/widgets/Meets/MeetDetailsInfo/index.ts +1 -0
- package/src/widgets/Meets/MeetDetailsResults/MeetDetailsResults.vue +129 -0
- package/src/widgets/Meets/MeetDetailsResults/index.ts +1 -0
- package/src/widgets/Meets/MeetDetailsVoting/MeetDetailsVoting.vue +221 -62
- package/src/widgets/Meets/MeetQuorumIndicator/MeetQuorumIndicator.vue +0 -0
- package/src/widgets/Meets/MeetQuorumIndicator/index.ts +1 -0
- package/src/widgets/Meets/MeetQuorumIndicator/ui/MeetQuorumIndicator.vue +35 -0
- package/src/widgets/Meets/MeetsTable/ui/MeetsTable.vue +56 -65
- package/src/widgets/NotificationCenter/NotificationCenter.vue +90 -0
- package/src/widgets/NotificationCenter/index.ts +1 -0
- package/src/widgets/Participants/ui/ParticipantsTable.vue +1 -1
- package/src/widgets/Questions/ui/QuestionsTable/QuestionsTable.vue +22 -10
- package/src/widgets/Questions/ui/VotingButtons/VotingButtons.vue +59 -14
- package/src/widgets/Registrator/AlreadyRegistered/AlreadyRegistered.vue +1 -1
- package/src/widgets/User/PaymentMethods/ui/PaymentMethods.vue +0 -1
- package/src-ssr/middlewares/injectEnv.ts +5 -1
- package/src/features/Meet/GenerateAgenda/index.ts +0 -1
- package/src/features/Meet/GenerateAgenda/model/index.ts +0 -18
- package/src/features/Meet/GenerateBallot/index.ts +0 -1
- package/src/features/Meet/GenerateBallot/model/index.ts +0 -18
- package/src/features/Meet/GenerateNotification/index.ts +0 -1
- package/src/features/Meet/GenerateNotification/model/index.ts +0 -18
- package/src/features/Meet/MeetDetailsManagement/index.ts +0 -1
- package/src/features/Meet/MeetDetailsManagement/model/index.ts +0 -121
- package/src/pages/Cooperative/ListOfMeets/model/index.ts +0 -1
- package/src/pages/Cooperative/ListOfMeets/model/model.ts +0 -117
- package/src/widgets/Meets/MeetDetailsActions/model.ts +0 -46
- package/src/widgets/Meets/MeetDetailsHeader/MeetDetailsHeader.vue +0 -40
- package/src/widgets/Meets/MeetDetailsHeader/index.ts +0 -1
- package/src/widgets/Meets/MeetDetailsVoting/model.ts +0 -117
- package/src/widgets/Meets/MeetInfoCard/ui/MeetInfoCard.vue +0 -38
- package/src/widgets/Meets/MeetInfoCard/ui/index.ts +0 -1
- /package/src/{widgets/Meets/MeetInfoCard → features/User/LoginRedirect}/index.ts +0 -0
package/.env-example
CHANGED
@@ -6,3 +6,7 @@ CURRENCY=RUB
|
|
6
6
|
COOP_SHORT_NAME=Локальный Кооператив
|
7
7
|
SITE_DESCRIPTION=кооперативная экономика для сообществ и бизнеса
|
8
8
|
SITE_IMAGE=https://ia.media-imdb.com/images/rock.jpg
|
9
|
+
TIMEZONE=Europe/Moscow
|
10
|
+
NOVU_APP_ID=BTaPV0bRL0dz
|
11
|
+
NOVU_BACKEND_URL=https://novu.coopenomics.world/api
|
12
|
+
NOVU_SOCKET_URL=https://novu.coopenomics.world/ws
|
@@ -4,15 +4,18 @@ import { WalletPage } from 'src/pages/User/WalletPage'
|
|
4
4
|
import { ConnectionAgreementPage } from 'src/pages/Union/ConnectionAgreement'
|
5
5
|
import { UserPaymentMethodsPage } from 'src/pages/User/PaymentMethodsPage'
|
6
6
|
import { ContactsPage } from 'src/pages/Contacts'
|
7
|
-
|
8
|
-
|
7
|
+
import { ListOfMeetsPage } from 'src/pages/Cooperative/ListOfMeets'
|
8
|
+
import { MeetDetailsPage } from 'src/pages/Cooperative/MeetDetails'
|
9
9
|
import { UserDocumentsPage } from 'src/pages/User/DocumentsPage'
|
10
10
|
import { UserPaymentsPage } from 'src/pages/User/PaymentsPage'
|
11
11
|
import { agreementsBase } from 'src/shared/lib/consts/workspaces'
|
12
|
+
import type { IWorkspaceConfig } from 'src/shared/lib/types/workspace'
|
12
13
|
|
13
|
-
export default async function () {
|
14
|
+
export default async function (): Promise<IWorkspaceConfig> {
|
14
15
|
return {
|
15
16
|
workspace: 'participant',
|
17
|
+
title: 'Стол пайщика',
|
18
|
+
defaultRoute: 'profile', // Маршрут по умолчанию для рабочего стола пайщика
|
16
19
|
routes: [
|
17
20
|
{
|
18
21
|
meta: {
|
@@ -40,7 +43,8 @@ export default async function () {
|
|
40
43
|
title: 'Мой Кошелёк',
|
41
44
|
icon: 'fa-solid fa-wallet',
|
42
45
|
roles: [],
|
43
|
-
agreements: agreementsBase
|
46
|
+
agreements: agreementsBase,
|
47
|
+
requiresAuth: true
|
44
48
|
},
|
45
49
|
path: 'wallet',
|
46
50
|
name: 'wallet',
|
@@ -53,6 +57,7 @@ export default async function () {
|
|
53
57
|
icon: 'fas fa-link',
|
54
58
|
roles: ['user'],
|
55
59
|
conditions: 'isCoop === true && coopname === "voskhod"',
|
60
|
+
requiresAuth: true
|
56
61
|
},
|
57
62
|
path: '/:coopname/connect',
|
58
63
|
name: 'connect',
|
@@ -62,7 +67,8 @@ export default async function () {
|
|
62
67
|
meta: {
|
63
68
|
title: 'Мои Реквизиты',
|
64
69
|
icon: 'fas fa-link',
|
65
|
-
roles: ['user', 'member', 'chairman']
|
70
|
+
roles: ['user', 'member', 'chairman'],
|
71
|
+
requiresAuth: true
|
66
72
|
},
|
67
73
|
path: '/:coopname/connect',
|
68
74
|
name: 'payment-methods',
|
@@ -73,6 +79,7 @@ export default async function () {
|
|
73
79
|
title: 'Мои Документы',
|
74
80
|
icon: 'fa-solid fa-file-invoice',
|
75
81
|
roles: ['user', 'member', 'chairman'],
|
82
|
+
requiresAuth: true
|
76
83
|
},
|
77
84
|
path: 'documents',
|
78
85
|
name: 'user-documents',
|
@@ -83,31 +90,36 @@ export default async function () {
|
|
83
90
|
title: 'Мои Платежи',
|
84
91
|
icon: 'fa-solid fa-money-bill-transfer',
|
85
92
|
roles: ['user', 'member', 'chairman'],
|
93
|
+
requiresAuth: true
|
86
94
|
},
|
87
95
|
path: 'payments',
|
88
96
|
name: 'user-payments',
|
89
97
|
component: markRaw(UserPaymentsPage),
|
90
98
|
},
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
99
|
+
{
|
100
|
+
meta: {
|
101
|
+
title: 'Мои Собрания',
|
102
|
+
icon: 'fa-solid fa-users-between-lines',
|
103
|
+
roles: ['user', 'member', 'chairman'],
|
104
|
+
requiresAuth: true
|
105
|
+
},
|
106
|
+
path: 'meets',
|
107
|
+
name: 'user-meets',
|
108
|
+
component: markRaw(ListOfMeetsPage),
|
109
|
+
children: [
|
110
|
+
{
|
111
|
+
path: ':hash',
|
112
|
+
name: 'user-meet-details',
|
113
|
+
component: markRaw(MeetDetailsPage),
|
114
|
+
meta: {
|
115
|
+
title: 'Детали собрания',
|
116
|
+
icon: 'fa-solid fa-users-between-lines',
|
117
|
+
roles: ['user', 'member', 'chairman'],
|
118
|
+
requiresAuth: true
|
119
|
+
}
|
120
|
+
},
|
121
|
+
],
|
122
|
+
},
|
111
123
|
{
|
112
124
|
path: '/:coopname/contacts',
|
113
125
|
name: 'contacts',
|
@@ -3,12 +3,15 @@ import { ListOfAgendaQuestions } from 'src/pages/Cooperative/ListOfAgenda'
|
|
3
3
|
import { ListOfParticipantsPage } from 'src/pages/Cooperative/ListOfParticipants'
|
4
4
|
import { ListOfDocumentsPage } from 'src/pages/Cooperative/ListOfDocuments'
|
5
5
|
import { PaymentsPage } from 'src/pages/Cooperative/Payments'
|
6
|
-
|
7
|
-
|
6
|
+
import { ListOfMeetsPage } from 'src/pages/Cooperative/ListOfMeets'
|
7
|
+
import { MeetDetailsPage } from 'src/pages/Cooperative/MeetDetails'
|
8
|
+
import type { IWorkspaceConfig } from 'src/shared/lib/types/workspace'
|
8
9
|
|
9
|
-
export default async function () {
|
10
|
+
export default async function (): Promise<IWorkspaceConfig> {
|
10
11
|
return {
|
11
12
|
workspace: 'soviet',
|
13
|
+
title: 'Стол совета',
|
14
|
+
defaultRoute: 'agenda', // Маршрут по умолчанию для рабочего стола совета
|
12
15
|
routes: [
|
13
16
|
{
|
14
17
|
meta: {
|
@@ -59,23 +62,23 @@ export default async function () {
|
|
59
62
|
roles: ['chairman', 'member'],
|
60
63
|
},
|
61
64
|
},
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
65
|
+
{
|
66
|
+
path: 'meets',
|
67
|
+
name: 'meets',
|
68
|
+
component: markRaw(ListOfMeetsPage),
|
69
|
+
meta: {
|
70
|
+
title: 'Собрания',
|
71
|
+
icon: 'fa-solid fa-users-between-lines',
|
72
|
+
roles: ['chairman', 'member'],
|
73
|
+
},
|
74
|
+
children: [
|
75
|
+
{
|
76
|
+
path: ':hash',
|
77
|
+
name: 'meet-details',
|
78
|
+
component: markRaw(MeetDetailsPage),
|
79
|
+
},
|
80
|
+
],
|
81
|
+
},
|
79
82
|
]
|
80
83
|
}
|
81
84
|
]
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@coopenomics/desktop",
|
3
|
-
"version": "2025.
|
3
|
+
"version": "2025.6.14",
|
4
4
|
"description": "A Desktop Project",
|
5
5
|
"productName": "Desktop App",
|
6
6
|
"author": "Alex Ant <dacom.dark.sun@gmail.com>",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"start": "node -r ./alias-resolver.js dist/ssr/index.js"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@coopenomics/controller": "2025.
|
28
|
-
"@coopenomics/sdk": "2025.
|
27
|
+
"@coopenomics/controller": "2025.6.14",
|
28
|
+
"@coopenomics/sdk": "2025.6.14",
|
29
29
|
"@dicebear/collection": "^9.0.1",
|
30
30
|
"@dicebear/core": "^9.0.1",
|
31
31
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
@@ -34,6 +34,7 @@
|
|
34
34
|
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
35
35
|
"@fortawesome/vue-fontawesome": "^3.0.8",
|
36
36
|
"@headlessui/vue": "^1.7.22",
|
37
|
+
"@novu/js": "^3.5.0",
|
37
38
|
"@openreplay/tracker": "^14.0.9",
|
38
39
|
"@openreplay/tracker-assist": "^9.0.1",
|
39
40
|
"@productdevbook/chatwoot": "^1.5.0",
|
@@ -49,7 +50,7 @@
|
|
49
50
|
"@wharfkit/wallet-plugin-privatekey": "^1.1.0",
|
50
51
|
"axios": "^1.2.1",
|
51
52
|
"compression": "^1.7.4",
|
52
|
-
"cooptypes": "2025.
|
53
|
+
"cooptypes": "2025.6.14",
|
53
54
|
"dompurify": "^3.1.7",
|
54
55
|
"dotenv": "^16.4.5",
|
55
56
|
"email-regex": "^5.0.0",
|
@@ -59,6 +60,7 @@
|
|
59
60
|
"idb": "^8.0.0",
|
60
61
|
"isomorphic-ws": "^5.0.0",
|
61
62
|
"lodash": "^4.17.21",
|
63
|
+
"moment-timezone": "^0.5.45",
|
62
64
|
"moment-with-locales-es6": "^1.0.1",
|
63
65
|
"pinia": "^2.0.11",
|
64
66
|
"pinia-plugin-persistedstate": "^3.2.1",
|
@@ -101,5 +103,5 @@
|
|
101
103
|
"npm": ">= 6.13.4",
|
102
104
|
"yarn": ">= 1.21.1"
|
103
105
|
},
|
104
|
-
"gitHead": "
|
106
|
+
"gitHead": "1c376c003ab7d30e5fa11e13152795ac4823885a"
|
105
107
|
}
|
package/src/app/App.vue
CHANGED
@@ -15,6 +15,7 @@ div(v-if="isLoaded").breable-text
|
|
15
15
|
import { SelectBranchOverlay } from 'src/features/Branch/SelectBranch'
|
16
16
|
import { useSystemStore } from 'src/entities/System/model'
|
17
17
|
import { useDesktopHealthWatcherProcess } from 'src/processes/watch-desktop-health'
|
18
|
+
import 'src/shared/ui/CardStyles/index.scss';
|
18
19
|
|
19
20
|
const { info } = useSystemStore()
|
20
21
|
const route = useRoute()
|
@@ -18,6 +18,7 @@ import { ExtensionsShowcase } from 'src/pages/ExtensionStore/ExtensionsShowcase'
|
|
18
18
|
import { ExtensionPage } from 'src/pages/ExtensionStore/ExtensionPage';
|
19
19
|
import { MemberBranchList } from 'src/pages/Cooperative/MemberBranchList';
|
20
20
|
import { ExtensionStoreBase } from 'src/pages/ExtensionStore/BaseRoute';
|
21
|
+
import { LoginRedirectPage } from 'src/features/User/LoginRedirect'
|
21
22
|
|
22
23
|
|
23
24
|
const baseRoutes = [
|
@@ -71,6 +72,17 @@ const baseRoutes = [
|
|
71
72
|
component: SignUpPage,
|
72
73
|
children: [],
|
73
74
|
},
|
75
|
+
{
|
76
|
+
path: ':coopname/auth/login-redirect',
|
77
|
+
name: 'login-redirect',
|
78
|
+
component: LoginRedirectPage,
|
79
|
+
meta: {
|
80
|
+
layout: 'default',
|
81
|
+
title: 'Вход для доступа к содержимому',
|
82
|
+
icon: 'fa-solid fa-lock',
|
83
|
+
roles: []
|
84
|
+
},
|
85
|
+
},
|
74
86
|
{
|
75
87
|
path: 'settings/cooperative',
|
76
88
|
name: 'cooperative-settings',
|
package/src/app/styles/app.scss
CHANGED
package/src/app/styles/style.css
CHANGED
@@ -390,3 +390,14 @@ pre {
|
|
390
390
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
391
391
|
}
|
392
392
|
}
|
393
|
+
|
394
|
+
/* Глобальный стиль ссылок для светлой и тёмной темы */
|
395
|
+
a {
|
396
|
+
color: #1c64f2;
|
397
|
+
text-decoration: underline;
|
398
|
+
transition: color 0.2s;
|
399
|
+
}
|
400
|
+
.body--dark a,
|
401
|
+
.q-dark a {
|
402
|
+
color: #90caf9;
|
403
|
+
}
|
@@ -3,6 +3,8 @@ import { computed, ref } from 'vue'
|
|
3
3
|
import { RouteRecordRaw, type RouteMeta, type Router } from 'vue-router'
|
4
4
|
import type { IHealthResponse, IBackNavigationButton, IDesktopWithNavigation } from './types'
|
5
5
|
import { api } from '../api'
|
6
|
+
import { useCurrentUserStore } from 'src/entities/User/model'
|
7
|
+
import { useSystemStore } from 'src/entities/System/model'
|
6
8
|
|
7
9
|
interface WorkspaceMenuItem {
|
8
10
|
workspaceName: string
|
@@ -13,6 +15,7 @@ interface WorkspaceMenuItem {
|
|
13
15
|
}
|
14
16
|
|
15
17
|
const namespace = 'desktops'
|
18
|
+
const STORAGE_KEY_WORKSPACE = 'monocoop-active-workspace'
|
16
19
|
|
17
20
|
export const useDesktopStore = defineStore(namespace, () => {
|
18
21
|
const currentDesktop = ref<IDesktopWithNavigation>()
|
@@ -75,8 +78,37 @@ export const useDesktopStore = defineStore(namespace, () => {
|
|
75
78
|
|
76
79
|
// Храним название активного workspace
|
77
80
|
const activeWorkspaceName = ref<string | null>(null);
|
81
|
+
|
78
82
|
function selectWorkspace(name: string) {
|
79
83
|
activeWorkspaceName.value = name;
|
84
|
+
// Сохраняем выбранный рабочий стол в localStorage
|
85
|
+
localStorage.setItem(STORAGE_KEY_WORKSPACE, name);
|
86
|
+
}
|
87
|
+
|
88
|
+
// Функция для определения и выбора дефолтного рабочего стола
|
89
|
+
function selectDefaultWorkspace() {
|
90
|
+
// Проверяем, был ли ранее сохранен рабочий стол
|
91
|
+
const savedWorkspace = localStorage.getItem(STORAGE_KEY_WORKSPACE);
|
92
|
+
|
93
|
+
if (savedWorkspace && currentDesktop.value?.workspaces.some(ws => ws.name === savedWorkspace)) {
|
94
|
+
selectWorkspace(savedWorkspace);
|
95
|
+
return;
|
96
|
+
}
|
97
|
+
|
98
|
+
// Если нет сохраненного рабочего стола, определяем по правам пользователя
|
99
|
+
const userStore = useCurrentUserStore();
|
100
|
+
|
101
|
+
if (userStore.isMember || userStore.isChairman) {
|
102
|
+
// Для членов совета или председателя устанавливаем soviet
|
103
|
+
const hasSoviet = currentDesktop.value?.workspaces.some(ws => ws.name === 'soviet');
|
104
|
+
if (hasSoviet) {
|
105
|
+
selectWorkspace('soviet');
|
106
|
+
return;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
// В остальных случаях устанавливаем participant
|
111
|
+
selectWorkspace('participant');
|
80
112
|
}
|
81
113
|
|
82
114
|
const activeSecondLevelRoutes = computed((): RouteRecordRaw[] => {
|
@@ -120,6 +152,40 @@ export const useDesktopStore = defineStore(namespace, () => {
|
|
120
152
|
|
121
153
|
const backNavigationButton = computed(() => currentDesktop.value?.backNavigationButton)
|
122
154
|
|
155
|
+
// Новый метод: перейти на маршрут по умолчанию для текущего рабочего стола
|
156
|
+
function goToDefaultPage(router: Router): void {
|
157
|
+
const { info } = useSystemStore()
|
158
|
+
|
159
|
+
if (!currentDesktop.value || !activeWorkspaceName.value) return
|
160
|
+
|
161
|
+
// Найти текущий рабочий стол
|
162
|
+
const currentWorkspace = currentDesktop.value.workspaces.find(
|
163
|
+
ws => ws.name === activeWorkspaceName.value
|
164
|
+
)
|
165
|
+
|
166
|
+
if (!currentWorkspace) return
|
167
|
+
|
168
|
+
// Проверяем наличие defaultRoute
|
169
|
+
if ((currentWorkspace as any).defaultRoute) {
|
170
|
+
// Если есть defaultRoute, переходим на него
|
171
|
+
router.push({
|
172
|
+
name: (currentWorkspace as any).defaultRoute,
|
173
|
+
params: { coopname: info.coopname }
|
174
|
+
})
|
175
|
+
return
|
176
|
+
}
|
177
|
+
|
178
|
+
// Если нет defaultRoute, ищем первый маршрут в детях основного маршрута
|
179
|
+
const ws = workspaceMenus.value.find(menu => menu.workspaceName === activeWorkspaceName.value)
|
180
|
+
if (ws && ws.mainRoute && ws.mainRoute.children && ws.mainRoute.children.length > 0) {
|
181
|
+
const firstChild = ws.mainRoute.children[0]
|
182
|
+
router.push({
|
183
|
+
name: firstChild.name as string,
|
184
|
+
params: { coopname: info.coopname }
|
185
|
+
})
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
123
189
|
return {
|
124
190
|
currentDesktop,
|
125
191
|
health,
|
@@ -130,9 +196,11 @@ export const useDesktopStore = defineStore(namespace, () => {
|
|
130
196
|
workspaceMenus,
|
131
197
|
activeWorkspaceName,
|
132
198
|
selectWorkspace,
|
199
|
+
selectDefaultWorkspace,
|
133
200
|
activeSecondLevelRoutes,
|
134
201
|
registerWorkspaceMenus,
|
135
202
|
removeWorkspace,
|
203
|
+
goToDefaultPage,
|
136
204
|
// Новые методы
|
137
205
|
setBackNavigationButton,
|
138
206
|
removeBackNavigationButton,
|
@@ -1,6 +1,13 @@
|
|
1
1
|
import type { Queries } from '@coopenomics/sdk';
|
2
2
|
|
3
3
|
export type IDesktop = Queries.Desktop.GetDesktop.IOutput[typeof Queries.Desktop.GetDesktop.name]
|
4
|
+
|
5
|
+
export interface IWorkspace {
|
6
|
+
name: string;
|
7
|
+
title: string;
|
8
|
+
defaultRoute?: string; // Маршрут по умолчанию для этого рабочего стола
|
9
|
+
}
|
10
|
+
|
4
11
|
export interface ILegacyDesktop {
|
5
12
|
name: string;
|
6
13
|
hash: string;
|
@@ -4,7 +4,7 @@ export type IDocumentPackageAggregate = Zeus.ModelTypes['DocumentPackageAggregat
|
|
4
4
|
export type IDocumentAggregate = Zeus.ModelTypes['DocumentAggregate'];
|
5
5
|
export type ZGetDocumentsResult = Queries.Documents.GetDocuments.IOutput[typeof Queries.Documents.GetDocuments.name];
|
6
6
|
export type IGetDocuments = Queries.Documents.GetDocuments.IInput['data']
|
7
|
-
|
7
|
+
export type ISignedDocument2 = Zeus.ModelTypes['SignedDigitalDocument']
|
8
8
|
// Информация о пагинации
|
9
9
|
export interface IPagination {
|
10
10
|
totalCount: number;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { client } from 'src/shared/api/client';
|
2
|
-
import { Queries
|
3
|
-
import type { IGetMeetsInput, IGetMeetInput
|
2
|
+
import { Queries } from '@coopenomics/sdk';
|
3
|
+
import type { IGetMeetsInput, IGetMeetInput } from '../types';
|
4
4
|
|
5
5
|
async function loadMeets(data: IGetMeetsInput) {
|
6
6
|
const { [Queries.Meet.GetMeets.name]: output } = await client.Query(
|
@@ -26,33 +26,7 @@ async function loadMeet(data: IGetMeetInput) {
|
|
26
26
|
return output;
|
27
27
|
}
|
28
28
|
|
29
|
-
async function closeMeet(data: ICloseMeetInput) {
|
30
|
-
const { [Mutations.Meet.SignByPresiderOnAnnualGeneralMeet.name]: output } = await client.Mutation(
|
31
|
-
Mutations.Meet.SignByPresiderOnAnnualGeneralMeet.mutation,
|
32
|
-
{
|
33
|
-
variables: {
|
34
|
-
data
|
35
|
-
}
|
36
|
-
}
|
37
|
-
);
|
38
|
-
return output;
|
39
|
-
}
|
40
|
-
|
41
|
-
async function restartMeet(data: IRestartMeetInput) {
|
42
|
-
const { [Mutations.Meet.RestartAnnualGeneralMeet.name]: output } = await client.Mutation(
|
43
|
-
Mutations.Meet.RestartAnnualGeneralMeet.mutation,
|
44
|
-
{
|
45
|
-
variables: {
|
46
|
-
data
|
47
|
-
}
|
48
|
-
}
|
49
|
-
);
|
50
|
-
return output;
|
51
|
-
}
|
52
|
-
|
53
29
|
export const api = {
|
54
30
|
loadMeets,
|
55
31
|
loadMeet,
|
56
|
-
closeMeet,
|
57
|
-
restartMeet
|
58
32
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { defineStore } from 'pinia'
|
2
2
|
import { ref, Ref } from 'vue'
|
3
3
|
import { api } from '../api'
|
4
|
-
import type { IMeet, IGetMeetsInput, IGetMeetInput
|
4
|
+
import type { IMeet, IGetMeetsInput, IGetMeetInput } from '../types';
|
5
5
|
|
6
6
|
const namespace = 'meetStore';
|
7
7
|
|
@@ -11,8 +11,7 @@ interface IMeetStore {
|
|
11
11
|
loading: Ref<boolean>
|
12
12
|
loadMeets: (data: IGetMeetsInput) => Promise<IMeet[]>;
|
13
13
|
loadMeet: (data: IGetMeetInput) => Promise<IMeet>;
|
14
|
-
|
15
|
-
restartMeet: (data: IRestartMeetInput) => Promise<IMeet>;
|
14
|
+
setCurrentMeet: (meet: IMeet) => void;
|
16
15
|
}
|
17
16
|
|
18
17
|
export const useMeetStore = defineStore(namespace, (): IMeetStore => {
|
@@ -24,7 +23,7 @@ export const useMeetStore = defineStore(namespace, (): IMeetStore => {
|
|
24
23
|
loading.value = true
|
25
24
|
try {
|
26
25
|
const result = await api.loadMeets(data);
|
27
|
-
meets.value = result;
|
26
|
+
meets.value = result.slice().sort((a, b) => new Date(b.processing?.meet.created_at as string).getTime() - new Date(a.processing?.meet.created_at as string).getTime());
|
28
27
|
return result;
|
29
28
|
} finally {
|
30
29
|
loading.value = false
|
@@ -36,28 +35,15 @@ export const useMeetStore = defineStore(namespace, (): IMeetStore => {
|
|
36
35
|
try {
|
37
36
|
const result = await api.loadMeet(data);
|
38
37
|
currentMeet.value = result;
|
38
|
+
console.log('result: ',result)
|
39
39
|
return result;
|
40
40
|
} finally {
|
41
41
|
loading.value = false
|
42
42
|
}
|
43
43
|
};
|
44
44
|
|
45
|
-
const
|
46
|
-
|
47
|
-
try {
|
48
|
-
return await api.closeMeet(data);
|
49
|
-
} finally {
|
50
|
-
loading.value = false
|
51
|
-
}
|
52
|
-
};
|
53
|
-
|
54
|
-
const restartMeet = async (data: IRestartMeetInput) => {
|
55
|
-
loading.value = true
|
56
|
-
try {
|
57
|
-
return await api.restartMeet(data);
|
58
|
-
} finally {
|
59
|
-
loading.value = false
|
60
|
-
}
|
45
|
+
const setCurrentMeet = (meet: IMeet) => {
|
46
|
+
currentMeet.value = meet;
|
61
47
|
};
|
62
48
|
|
63
49
|
return {
|
@@ -66,7 +52,6 @@ export const useMeetStore = defineStore(namespace, (): IMeetStore => {
|
|
66
52
|
loading,
|
67
53
|
loadMeets,
|
68
54
|
loadMeet,
|
69
|
-
|
70
|
-
restartMeet
|
55
|
+
setCurrentMeet,
|
71
56
|
}
|
72
57
|
})
|
@@ -147,8 +147,8 @@ async function loadMethods(params: IGetPaymentMethods): Promise<IPaymentMethodDa
|
|
147
147
|
}
|
148
148
|
|
149
149
|
async function loadUserAgreements(coopname: string, username: string): Promise<SovietContract.Tables.Agreements.IAgreement[]> {
|
150
|
-
|
151
|
-
await fetchTable(
|
150
|
+
|
151
|
+
const result = await fetchTable(
|
152
152
|
SovietContract.contractName.production,
|
153
153
|
coopname,
|
154
154
|
SovietContract.Tables.Agreements.tableName,
|
@@ -157,8 +157,8 @@ async function loadUserAgreements(coopname: string, username: string): Promise<S
|
|
157
157
|
LimitsList.None,
|
158
158
|
'secondary'
|
159
159
|
)
|
160
|
-
) as SovietContract.Tables.Agreements.IAgreement[];
|
161
160
|
|
161
|
+
return result as SovietContract.Tables.Agreements.IAgreement[];
|
162
162
|
}
|
163
163
|
|
164
164
|
|