@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.
Files changed (42) hide show
  1. package/package.json +5 -5
  2. package/src/entities/Session/model/store.ts +1 -1
  3. package/src/features/Installer/ui/RequestKeyForm/RequestKeyForm.vue +1 -1
  4. package/src/features/Installer/ui/SetSovietForm/SetSovietForm.vue +1 -1
  5. package/src/features/Meet/CreateMeet/model/index.ts +4 -2
  6. package/src/features/Meet/CreateMeet/ui/CreateMeet.vue +8 -0
  7. package/src/features/Meet/CreateMeet/ui/CreateMeetForm.vue +48 -4
  8. package/src/features/Meet/GenerateSovietDecision/model/index.ts +1 -1
  9. package/src/features/Meet/RestartMeet/model/index.ts +16 -3
  10. package/src/features/PaymentMethod/AddPaymentMethod/ui/AddPaymentButton.vue +1 -1
  11. package/src/features/PaymentMethod/DeletePaymentMethod/ui/DeletePaymentMethodButton.vue +1 -1
  12. package/src/features/Request/AcceptRequest/ui/AcceptButton.vue +1 -1
  13. package/src/features/Request/CancelRequest/ui/CancelButton.vue +1 -1
  14. package/src/features/Request/CompleteOnRequest/ui/CompleteOnRequestButton.vue +1 -1
  15. package/src/features/Request/ConfirmRecieveOnRequest/ui/ConfirmRecieveOnRequest.vue +1 -1
  16. package/src/features/Request/ConfirmSupplyOnRequest/ui/ConfirmSupplyOnRequestButton.vue +1 -1
  17. package/src/features/Request/CreateChildOrder/ui/CreateChildOrderButton/CreateChildOrderButton.vue +1 -1
  18. package/src/features/Request/CreateParentOffer/ui/CreateParentOfferForm/CreateParentOfferForm.vue +1 -1
  19. package/src/features/Request/DeliverOnRequest/ui/DeliverOnRequestButton.vue +1 -1
  20. package/src/features/Request/DisputeOnRequest/ui/DisputeOnRequestButton.vue +1 -1
  21. package/src/features/Request/PublishRequest/ui/PublishRequestButton.vue +1 -1
  22. package/src/features/Request/RecieveOnRequest/ui/RecieveOnRequestButton.vue +1 -1
  23. package/src/features/Request/SupplyOnRequest/ui/SupplyOnRequestButton.vue +1 -1
  24. package/src/features/Request/UnpublishRequest/ui/UnpublishRequestButton.vue +1 -1
  25. package/src/features/Union/AddCooperative/ui/AddCooperativeForm.vue +1 -1
  26. package/src/features/User/LoginUser/ui/LoginForm/LoginForm.vue +1 -1
  27. package/src/features/Wallet/DepositToWallet/ui/DepositButton/DepositButton.vue +1 -1
  28. package/src/features/Wallet/WithdrawFromWallet/ui/withdrawButton.vue +1 -1
  29. package/src/pages/Cooperative/ListOfMeets/ui/ListOfMeetsPage.vue +1 -1
  30. package/src/pages/Registrator/SignUp/GenerateAccount.vue +1 -1
  31. package/src/pages/Registrator/SignUp/ReadStatement.vue +1 -1
  32. package/src/pages/Registrator/SignUp/SignUp.vue +0 -2
  33. package/src/pages/Union/ListOfCooperatives/ui/UnionPageListOfCooperatives.vue +2 -2
  34. package/src/processes/process-decisions/index.ts +6 -1
  35. package/src/processes/select-branch/index.ts +11 -4
  36. package/src/shared/api/errors.ts +2 -1
  37. package/src/widgets/Cooperative/Funds/ui/AccumulationFunds.vue +3 -3
  38. package/src/widgets/Cooperative/Funds/ui/AddAccumulationFund.vue +1 -1
  39. package/src/widgets/Cooperative/Funds/ui/AddExpenseFund.vue +1 -1
  40. package/src/widgets/Cooperative/Funds/ui/ExpenseFunds.vue +3 -3
  41. package/src/widgets/Registrator/LostKey/ui/LostKey.vue +1 -1
  42. 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.14",
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.14",
28
- "@coopenomics/sdk": "2025.6.14",
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.14",
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": "1c376c003ab7d30e5fa11e13152795ac4823885a"
106
+ "gitHead": "1bd8f003f744f0a1f0ecde84dc8841763e31f858"
107
107
  }
@@ -77,7 +77,7 @@ export const useSessionStore = defineStore('session', (): ISessionStore => {
77
77
  }
78
78
  } catch (e: any) {
79
79
  console.error(e);
80
- FailAlert(e.message);
80
+ FailAlert(e);
81
81
  close()
82
82
  globalStore.logout()
83
83
  }
@@ -52,7 +52,7 @@ form(@submit.prevent="submit").full-width
52
52
 
53
53
  } catch (e: any) {
54
54
  loading.value = false
55
- FailAlert(e.message)
55
+ FailAlert(e)
56
56
  }
57
57
 
58
58
  }
@@ -59,7 +59,7 @@ const next = async () => {
59
59
 
60
60
  SuccessAlert('Установка произведена успешно')
61
61
  } catch(e: any){
62
- FailAlert(e.message)
62
+ FailAlert(e)
63
63
  loading.value = false
64
64
  }
65
65
 
@@ -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: 'regular', // По умолчанию очередное собрание
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
- defineProps<{
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: 'regular', // По умолчанию очередное собрание
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})
@@ -159,7 +159,7 @@ const handlerSubmit = async (): Promise<void> => {
159
159
  } catch (e: any) {
160
160
  showDialog.value = false
161
161
  isSubmitting.value = false
162
- FailAlert(e.message)
162
+ FailAlert(e)
163
163
  }
164
164
  }
165
165
 
@@ -61,7 +61,7 @@ const handlerSubmit = async (): Promise<void> => {
61
61
  } catch (e: any) {
62
62
  showDialog.value = false
63
63
  isSubmitting.value = false
64
- FailAlert(e.message)
64
+ FailAlert(e)
65
65
  }
66
66
  }
67
67
 
@@ -31,7 +31,7 @@ const accept = async () => {
31
31
 
32
32
  SuccessAlert('Заявка принята')
33
33
  } catch (e: any) {
34
- FailAlert(e.message)
34
+ FailAlert(e)
35
35
  }
36
36
  }
37
37
  </script>
@@ -30,7 +30,7 @@ q-btn(color="red" @click="cancel") отменить поставку
30
30
  } as ICancelRequest)
31
31
  SuccessAlert('Заявка отменена')
32
32
  } catch (e: any) {
33
- FailAlert(e.message)
33
+ FailAlert(e)
34
34
  }
35
35
  }
36
36
  </script>
@@ -31,7 +31,7 @@ q-btn(color="green" @click="complete") завершить поставку
31
31
 
32
32
  SuccessAlert('Подтверждение принято')
33
33
  } catch (e: any) {
34
- FailAlert(e.message)
34
+ FailAlert(e)
35
35
  }
36
36
  }
37
37
  </script>
@@ -31,7 +31,7 @@ q-btn(color="green" @click="confirmRecieve") выдал имущество
31
31
 
32
32
  SuccessAlert('Выдача имущества подтверждена')
33
33
  } catch (e: any) {
34
- FailAlert(e.message)
34
+ FailAlert(e)
35
35
  }
36
36
  }
37
37
  </script>
@@ -32,7 +32,7 @@ q-btn(color="green" @click="supply") Подписать акт передачи
32
32
 
33
33
  SuccessAlert('Имущество принято в кооператив')
34
34
  } catch (e: any) {
35
- FailAlert(e.message)
35
+ FailAlert(e)
36
36
  }
37
37
  }
38
38
  </script>
@@ -50,7 +50,7 @@
50
50
  SuccessAlert('Заказ НЕ создан')
51
51
  router.push({ name: 'marketplace-user-supplies' }) //TODO роутинг
52
52
  } catch (e: any) {
53
- FailAlert(e.message)
53
+ FailAlert(e)
54
54
  }
55
55
  }
56
56
  </script>
@@ -63,7 +63,7 @@ const handlerSubmit = async () => {
63
63
  SuccessAlert('Объявление успешно создано')
64
64
  } catch (e: any) {
65
65
  console.log(e)
66
- FailAlert(e.message)
66
+ FailAlert(e)
67
67
  }
68
68
  }
69
69
  </script>
@@ -32,7 +32,7 @@ q-btn(color="green" @click="delivered") Подтвердить доставку
32
32
 
33
33
  SuccessAlert('Подтверждение принято')
34
34
  } catch (e: any) {
35
- FailAlert(e.message)
35
+ FailAlert(e)
36
36
  }
37
37
  }
38
38
  </script>
@@ -31,7 +31,7 @@ q-btn(color="red" @click="dispute") вернуть по гарантии
31
31
 
32
32
  SuccessAlert('Спор открыт')
33
33
  } catch (e: any) {
34
- FailAlert(e.message)
34
+ FailAlert(e)
35
35
  }
36
36
  }
37
37
  </script>
@@ -30,7 +30,7 @@ q-btn(@click="publish") опубликовать
30
30
  })
31
31
  SuccessAlert('Заявка опубликована')
32
32
  } catch (e: any) {
33
- FailAlert(e.message)
33
+ FailAlert(e)
34
34
  }
35
35
  }
36
36
  </script>
@@ -31,7 +31,7 @@ q-btn(color="green" @click="recieve") получил имущество
31
31
 
32
32
  SuccessAlert('Подтверждение принято')
33
33
  } catch (e: any) {
34
- FailAlert(e.message)
34
+ FailAlert(e)
35
35
  }
36
36
  }
37
37
  </script>
@@ -31,7 +31,7 @@ q-btn(color="green" @click="supply") Подписать акт приёма
31
31
  } as ISupplyOnRequest)
32
32
  SuccessAlert('Ваша подпись принята')
33
33
  } catch (e: any) {
34
- FailAlert(e.message)
34
+ FailAlert(e)
35
35
  }
36
36
  }
37
37
  </script>
@@ -30,7 +30,7 @@ q-btn(@click="unpublish") снять с публикации
30
30
  })
31
31
  SuccessAlert('Заявка снята с публикации')
32
32
  } catch (e: any) {
33
- FailAlert(e.message)
33
+ FailAlert(e)
34
34
  }
35
35
  }
36
36
  </script>
@@ -83,7 +83,7 @@ const addNow = async () => {
83
83
 
84
84
  clear()
85
85
  } catch(e: any){
86
- FailAlert(e.message)
86
+ FailAlert(e)
87
87
  }
88
88
  }
89
89
 
@@ -104,7 +104,7 @@ const submit = async () => {
104
104
  } catch (e: any) {
105
105
  console.error(e)
106
106
  loading.value = false
107
- FailAlert(e.message)
107
+ FailAlert(e)
108
108
  }
109
109
 
110
110
  }
@@ -62,7 +62,7 @@ const handlerSubmit = async (): Promise<void> => {
62
62
  } catch (e: any) {
63
63
  console.log('e.message', e.message)
64
64
  isSubmitting.value = false
65
- FailAlert(e.message)
65
+ FailAlert(e)
66
66
  }
67
67
  }
68
68
 
@@ -42,7 +42,7 @@ const handlerSubmit = async (): Promise<void> => {
42
42
  } catch (e: any) {
43
43
  // console.log('e.message', e.message)
44
44
  isSubmitting.value = false
45
- // FailAlert(e.message)
45
+ // FailAlert(e)
46
46
  }
47
47
  }
48
48
 
@@ -5,7 +5,7 @@ div
5
5
  div.row.justify-center
6
6
  div.col-12
7
7
  div.row.q-pa-md(v-if="canCreateMeet")
8
- CreateMeet
8
+ CreateMeet(:is-chairman="isChairman")
9
9
  MeetCardsList(
10
10
  :meets="meets"
11
11
  :loading="loading"
@@ -77,7 +77,7 @@ const setAccount = async () => {
77
77
  } catch (e: any) {
78
78
  store.goTo('SetUserData')
79
79
  console.error(e)
80
- FailAlert(e.message)
80
+ FailAlert(e)
81
81
  }
82
82
  }
83
83
  </script>
@@ -70,7 +70,7 @@ const loadStatement = async (): Promise<void> => {
70
70
  isLoading.value = false
71
71
  } catch (e: any) {
72
72
  isLoading.value = false
73
- FailAlert(e.message)
73
+ FailAlert(e)
74
74
  }
75
75
  }
76
76
  const back = () => {
@@ -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.message)
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.message)
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
- if (session.isAuth) {
28
- branchStore.loadPublicBranches({ coopname: system.info.coopname })
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
@@ -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.message);
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.message)
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.message)
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.message)
77
+ FailAlert(e)
78
78
  await coop.loadFunds(info.coopname)
79
79
  }
80
80
 
@@ -47,7 +47,7 @@ const addFund = async() => {
47
47
  SuccessAlert('Фонд успешно создан')
48
48
  } catch(e: any){
49
49
  localShowAdd.value = false
50
- FailAlert(e.message)
50
+ FailAlert(e)
51
51
  }
52
52
 
53
53
  }
@@ -45,7 +45,7 @@ const addFund = async() => {
45
45
  SuccessAlert('Фонд успешно создан')
46
46
  } catch(e: any){
47
47
  localShowAdd.value = false
48
- FailAlert(e.message)
48
+ FailAlert(e)
49
49
  }
50
50
 
51
51
  }
@@ -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.message)
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.message)
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.message)
70
+ FailAlert(e)
71
71
  await coop.loadFunds(info.coopname)
72
72
  }
73
73
 
@@ -55,7 +55,7 @@ const submit = async () => {
55
55
  loading.value = false
56
56
  } catch (e: any) {
57
57
  loading.value = false
58
- FailAlert(e.message)
58
+ FailAlert(e)
59
59
  }
60
60
  }
61
61
 
@@ -82,7 +82,7 @@ const finish = async () => {
82
82
 
83
83
  } catch (e: any) {
84
84
  loading.value = false
85
- FailAlert(e.message)
85
+ FailAlert(e)
86
86
  }
87
87
  }
88
88