@coopenomics/desktop 2025.6.14 → 2025.6.19
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 +5 -5
- package/src/entities/Session/model/store.ts +1 -1
- 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 +48 -4
- package/src/features/Meet/GenerateSovietDecision/model/index.ts +1 -1
- package/src/features/Meet/RestartMeet/model/index.ts +16 -3
- 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/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/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/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/Registrator/LostKey/ui/LostKey.vue +1 -1
- package/src/widgets/Registrator/ResetKey/ui/ResetKey.vue +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@coopenomics/desktop",
|
3
|
-
"version": "2025.6.
|
3
|
+
"version": "2025.6.19",
|
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.6.
|
28
|
-
"@coopenomics/sdk": "2025.6.
|
27
|
+
"@coopenomics/controller": "2025.6.19",
|
28
|
+
"@coopenomics/sdk": "2025.6.19",
|
29
29
|
"@dicebear/collection": "^9.0.1",
|
30
30
|
"@dicebear/core": "^9.0.1",
|
31
31
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
@@ -50,7 +50,7 @@
|
|
50
50
|
"@wharfkit/wallet-plugin-privatekey": "^1.1.0",
|
51
51
|
"axios": "^1.2.1",
|
52
52
|
"compression": "^1.7.4",
|
53
|
-
"cooptypes": "2025.6.
|
53
|
+
"cooptypes": "2025.6.19",
|
54
54
|
"dompurify": "^3.1.7",
|
55
55
|
"dotenv": "^16.4.5",
|
56
56
|
"email-regex": "^5.0.0",
|
@@ -103,5 +103,5 @@
|
|
103
103
|
"npm": ">= 6.13.4",
|
104
104
|
"yarn": ">= 1.21.1"
|
105
105
|
},
|
106
|
-
"gitHead": "
|
106
|
+
"gitHead": "1bd8f003f744f0a1f0ecde84dc8841763e31f858"
|
107
107
|
}
|
@@ -18,6 +18,7 @@ export interface ICreateMeetWithAgendaInput {
|
|
18
18
|
open_at: string
|
19
19
|
close_at: string
|
20
20
|
username: string
|
21
|
+
type: 'regular' | 'extra'
|
21
22
|
agenda_points: {
|
22
23
|
title: string
|
23
24
|
context: string
|
@@ -81,11 +82,12 @@ export async function createMeetWithAgenda(data: ICreateMeetWithAgendaInput): Pr
|
|
81
82
|
coopname: data.coopname,
|
82
83
|
username: data.username,
|
83
84
|
meet: {
|
84
|
-
type:
|
85
|
+
type: data.type,
|
85
86
|
open_at_datetime: openAtFormatted,
|
86
87
|
close_at_datetime: closeAtFormatted
|
87
88
|
},
|
88
|
-
questions: questions
|
89
|
+
questions: questions,
|
90
|
+
is_repeated: false
|
89
91
|
})
|
90
92
|
|
91
93
|
|
@@ -5,9 +5,11 @@ div
|
|
5
5
|
label="Создать общее собрание"
|
6
6
|
@click="showCreateMeetDialog = true"
|
7
7
|
)
|
8
|
+
|
8
9
|
CreateMeetForm(
|
9
10
|
v-model="showCreateMeetDialog"
|
10
11
|
:loading="isCreating"
|
12
|
+
:is-chairman="isChairman"
|
11
13
|
@create="handleCreate"
|
12
14
|
)
|
13
15
|
</template>
|
@@ -22,6 +24,11 @@ import { useRoute } from 'vue-router'
|
|
22
24
|
import { Notify } from 'quasar'
|
23
25
|
import { FailAlert } from 'src/shared/api'
|
24
26
|
|
27
|
+
// Определяем пропсы
|
28
|
+
defineProps<{
|
29
|
+
isChairman: boolean
|
30
|
+
}>()
|
31
|
+
|
25
32
|
const route = useRoute()
|
26
33
|
const sessionStore = useSessionStore()
|
27
34
|
const meetStore = useMeetStore()
|
@@ -40,6 +47,7 @@ const handleCreate = async (formData: any) => {
|
|
40
47
|
open_at: formData.open_at,
|
41
48
|
close_at: formData.close_at,
|
42
49
|
username: sessionStore.username,
|
50
|
+
type: formData.type,
|
43
51
|
agenda_points: formData.agenda_points
|
44
52
|
})
|
45
53
|
|
@@ -2,12 +2,23 @@
|
|
2
2
|
q-dialog(:model-value="modelValue" @update:model-value="$emit('update:modelValue', $event)" persistent)
|
3
3
|
q-card(style="min-width: 500px")
|
4
4
|
q-card-section.row.items-center
|
5
|
-
div.text-h6 Создать общее собрание
|
5
|
+
div.text-h6 Создать общее собрание {{ isChairman ? '(Председатель)' : '(Член совета)' }}
|
6
6
|
q-space
|
7
7
|
q-btn(icon="close" flat round dense v-close-popup @click="$emit('update:modelValue', false)")
|
8
8
|
|
9
9
|
q-card-section
|
10
10
|
q-form(@submit="handleSubmit")
|
11
|
+
// Выбор типа собрания
|
12
|
+
q-select(
|
13
|
+
v-model="formData.type"
|
14
|
+
:options="meetTypeOptions"
|
15
|
+
label="Тип собрания"
|
16
|
+
emit-value
|
17
|
+
map-options
|
18
|
+
:rules="[val => !!val || 'Обязательное поле']"
|
19
|
+
dense
|
20
|
+
)
|
21
|
+
|
11
22
|
q-input(
|
12
23
|
v-model="formData.presider"
|
13
24
|
label="Имя аккаунта председателя собрания"
|
@@ -88,18 +99,25 @@ q-dialog(:model-value="modelValue" @update:model-value="$emit('update:modelValue
|
|
88
99
|
</template>
|
89
100
|
|
90
101
|
<script setup lang="ts">
|
91
|
-
import { reactive } from 'vue'
|
102
|
+
import { reactive, computed, onMounted } from 'vue'
|
92
103
|
import { useAgendaPoints } from 'src/shared/hooks/useAgendaPoints'
|
93
104
|
import { getCurrentLocalDateForForm, convertLocalDateToUTC, getTimezoneLabel, getFutureDateForForm } from 'src/shared/lib/utils/dates/timezone'
|
94
105
|
import { env } from 'src/shared/config/Environment'
|
95
106
|
import { useSessionStore } from 'src/entities/Session';
|
96
107
|
import { useSystemStore } from 'src/entities/System/model';
|
97
108
|
|
98
|
-
|
109
|
+
// Определяем пропсы один раз
|
110
|
+
const props = defineProps<{
|
99
111
|
modelValue: boolean,
|
100
|
-
loading?: boolean
|
112
|
+
loading?: boolean,
|
113
|
+
isChairman: boolean
|
101
114
|
}>()
|
102
115
|
|
116
|
+
// Отладочная информация при монтировании
|
117
|
+
onMounted(() => {
|
118
|
+
console.log('CreateMeetForm mounted, isChairman:', props.isChairman)
|
119
|
+
})
|
120
|
+
|
103
121
|
const emit = defineEmits<{
|
104
122
|
(e: 'update:modelValue', value: boolean): void
|
105
123
|
(e: 'create', data: any): void
|
@@ -110,6 +128,30 @@ const timezoneLabel = getTimezoneLabel()
|
|
110
128
|
const session = useSessionStore()
|
111
129
|
const system = useSystemStore()
|
112
130
|
|
131
|
+
// Делаем isChairman доступным в шаблоне напрямую для отладки
|
132
|
+
const isChairman = computed(() => {
|
133
|
+
console.log('Вычисляемое свойство isChairman:', props.isChairman)
|
134
|
+
return props.isChairman
|
135
|
+
})
|
136
|
+
|
137
|
+
// Опции для выбора типа собрания в зависимости от роли
|
138
|
+
const meetTypeOptions = computed(() => {
|
139
|
+
// Выведем отладочную информацию, чтобы увидеть значение флага
|
140
|
+
console.log('isChairman в форме для опций:', props.isChairman)
|
141
|
+
|
142
|
+
// Председатель может выбирать любой тип
|
143
|
+
if (props.isChairman) {
|
144
|
+
return [
|
145
|
+
{ label: 'Очередное собрание', value: 'regular' },
|
146
|
+
{ label: 'Внеочередное собрание', value: 'extra' }
|
147
|
+
]
|
148
|
+
}
|
149
|
+
// Члены совета могут создавать только внеочередное
|
150
|
+
return [
|
151
|
+
{ label: 'Внеочередное собрание', value: 'extra' }
|
152
|
+
]
|
153
|
+
})
|
154
|
+
|
113
155
|
// Форма для создания собрания
|
114
156
|
const formData = reactive(
|
115
157
|
env.NODE_ENV === 'development'
|
@@ -121,6 +163,7 @@ const formData = reactive(
|
|
121
163
|
open_at: getCurrentLocalDateForForm(0.17), // ~10 секунд от текущего времени
|
122
164
|
close_at: getCurrentLocalDateForForm(2), // 2 минуты от текущего времени
|
123
165
|
username: session.username,
|
166
|
+
type: props.isChairman ? 'regular' : 'extra', // Тип по умолчанию в зависимости от роли
|
124
167
|
agenda_points: [
|
125
168
|
{
|
126
169
|
title: 'Тестовый вопрос',
|
@@ -137,6 +180,7 @@ const formData = reactive(
|
|
137
180
|
open_at: getFutureDateForForm(15, 6, 0), // через 15 дней, 6:00
|
138
181
|
close_at: getFutureDateForForm(18, 12, 0), // через 18 дней, 12:00
|
139
182
|
username: session.username,
|
183
|
+
type: props.isChairman ? 'regular' : 'extra', // Тип по умолчанию в зависимости от роли
|
140
184
|
agenda_points: [
|
141
185
|
// пустой массив, либо можно добавить пустой объект для вёрстки
|
142
186
|
],
|
@@ -36,7 +36,7 @@ export function useGenerateSovietDecisionOnAnnualMeet() {
|
|
36
36
|
if (!data.meet_hash) {
|
37
37
|
throw new Error('Необходимо указать хеш собрания (meet_hash)')
|
38
38
|
}
|
39
|
-
|
39
|
+
console.log('data', data)
|
40
40
|
const { [Mutations.Meet.GenerateSovietDecisionOnAnnualMeetDocument.name]: result } = await client.Mutation(
|
41
41
|
Mutations.Meet.GenerateSovietDecisionOnAnnualMeetDocument.mutation,
|
42
42
|
{
|
@@ -27,6 +27,7 @@ export interface IRestartMeetWithProposalInput {
|
|
27
27
|
context: string
|
28
28
|
decision: string
|
29
29
|
}[]
|
30
|
+
type: string
|
30
31
|
}
|
31
32
|
|
32
33
|
/**
|
@@ -81,11 +82,12 @@ export async function restartMeetWithProposal(data: IRestartMeetWithProposalInpu
|
|
81
82
|
coopname: data.coopname,
|
82
83
|
username: data.username,
|
83
84
|
meet: {
|
84
|
-
type:
|
85
|
+
type: data.type,
|
85
86
|
open_at_datetime: openAtFormatted,
|
86
87
|
close_at_datetime: closeAtFormatted
|
87
88
|
},
|
88
|
-
questions: questions
|
89
|
+
questions: questions,
|
90
|
+
is_repeated: true
|
89
91
|
})
|
90
92
|
|
91
93
|
// Подписываем документ
|
@@ -145,13 +147,24 @@ export const useRestartMeet = (
|
|
145
147
|
if (!meetStore.currentMeet) return false
|
146
148
|
processingRef.value = true
|
147
149
|
try {
|
150
|
+
// Выводим полную структуру для отладки
|
151
|
+
console.log('Полные данные о собрании:', meetStore.currentMeet)
|
152
|
+
|
153
|
+
// Получаем тип собрания из текущего объекта meet
|
154
|
+
// По умолчанию используем 'regular' если тип не найден
|
155
|
+
const originalMeetType = (meetStore.currentMeet.processing?.meet.proposal?.document.meta as any).meet.type
|
156
|
+
|
157
|
+
// Выводим для отладки
|
158
|
+
console.log('Тип собрания для перезапуска:', originalMeetType)
|
159
|
+
|
148
160
|
const result = await restartMeetWithProposal({
|
149
161
|
coopname: info.coopname,
|
150
162
|
hash: meetStore.currentMeet.hash,
|
151
163
|
username: sessionStore.username,
|
152
164
|
new_open_at: data.new_open_at,
|
153
165
|
new_close_at: data.new_close_at,
|
154
|
-
agenda_points: data.agenda_points
|
166
|
+
agenda_points: data.agenda_points,
|
167
|
+
type: originalMeetType // Передаем оригинальный тип собрания
|
155
168
|
})
|
156
169
|
|
157
170
|
await meetStore.loadMeet({ coopname: info.coopname, hash: result.processing?.hash as string})
|
@@ -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
|
|
@@ -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
|
// Проверяем, если ошибка уже является массивом
|
@@ -16,7 +16,7 @@ const loadFunds = async () => {
|
|
16
16
|
try {
|
17
17
|
await coop.loadFunds(info.coopname)
|
18
18
|
} catch(e: any){
|
19
|
-
FailAlert(e
|
19
|
+
FailAlert(e)
|
20
20
|
}
|
21
21
|
}
|
22
22
|
|
@@ -48,7 +48,7 @@ const delFund = async(fund: FundContract.Tables.AccumulatedFunds.IAccumulatedFun
|
|
48
48
|
SuccessAlert('Фонд успешно удалён')
|
49
49
|
|
50
50
|
} catch (e: any){
|
51
|
-
FailAlert(e
|
51
|
+
FailAlert(e)
|
52
52
|
}
|
53
53
|
}
|
54
54
|
|
@@ -74,7 +74,7 @@ const saveFund = async (fund: FundContract.Tables.AccumulatedFunds.IAccumulatedF
|
|
74
74
|
|
75
75
|
SuccessAlert('Фонд успешно обновлён')
|
76
76
|
} catch(e: any){
|
77
|
-
FailAlert(e
|
77
|
+
FailAlert(e)
|
78
78
|
await coop.loadFunds(info.coopname)
|
79
79
|
}
|
80
80
|
|
@@ -16,7 +16,7 @@ const loadFunds = async () => {
|
|
16
16
|
try {
|
17
17
|
await coop.loadFunds(info.coopname)
|
18
18
|
} catch(e: any){
|
19
|
-
FailAlert(e
|
19
|
+
FailAlert(e)
|
20
20
|
}
|
21
21
|
}
|
22
22
|
|
@@ -42,7 +42,7 @@ const delFund = async(fund: FundContract.Tables.AccumulatedFunds.IAccumulatedFun
|
|
42
42
|
SuccessAlert('Фонд успешно удалён')
|
43
43
|
|
44
44
|
} catch (e: any){
|
45
|
-
FailAlert(e
|
45
|
+
FailAlert(e)
|
46
46
|
}
|
47
47
|
}
|
48
48
|
|
@@ -67,7 +67,7 @@ const saveFund = async (fund: FundContract.Tables.AccumulatedFunds.IAccumulatedF
|
|
67
67
|
|
68
68
|
SuccessAlert('Фонд успешно обновлён')
|
69
69
|
} catch(e: any){
|
70
|
-
FailAlert(e
|
70
|
+
FailAlert(e)
|
71
71
|
await coop.loadFunds(info.coopname)
|
72
72
|
}
|
73
73
|
|