hl-core 0.0.10-beta.5 → 0.0.10-beta.51

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/README.md +0 -2
  2. package/api/base.api.ts +345 -137
  3. package/api/interceptors.ts +3 -5
  4. package/components/Dialog/Dialog.vue +5 -1
  5. package/components/Dialog/FamilyDialog.vue +15 -4
  6. package/components/Form/DigitalDocument.vue +52 -0
  7. package/components/Form/FormSource.vue +30 -0
  8. package/components/Form/ManagerAttachment.vue +60 -11
  9. package/components/Form/ProductConditionsBlock.vue +12 -6
  10. package/components/Input/Datepicker.vue +5 -0
  11. package/components/Input/FileInput.vue +1 -1
  12. package/components/Input/FormInput.vue +5 -0
  13. package/components/Input/OtpInput.vue +25 -0
  14. package/components/Input/RoundedInput.vue +2 -0
  15. package/components/Input/RoundedSelect.vue +2 -0
  16. package/components/Input/TextAreaField.vue +71 -0
  17. package/components/Menu/MenuNav.vue +1 -1
  18. package/components/Pages/Anketa.vue +207 -176
  19. package/components/Pages/ContragentForm.vue +1 -1
  20. package/components/Pages/Documents.vue +452 -64
  21. package/components/Pages/MemberForm.vue +416 -180
  22. package/components/Pages/ProductConditions.vue +1021 -243
  23. package/components/Panel/PanelHandler.vue +297 -124
  24. package/components/Utilities/Chip.vue +1 -1
  25. package/components/Utilities/JsonViewer.vue +1 -2
  26. package/composables/classes.ts +124 -20
  27. package/composables/constants.ts +46 -1
  28. package/composables/index.ts +336 -8
  29. package/composables/styles.ts +8 -24
  30. package/configs/pwa.ts +1 -7
  31. package/layouts/clear.vue +1 -1
  32. package/layouts/default.vue +1 -1
  33. package/layouts/full.vue +1 -1
  34. package/locales/ru.json +90 -19
  35. package/nuxt.config.ts +10 -12
  36. package/package.json +12 -12
  37. package/plugins/head.ts +7 -1
  38. package/store/data.store.ts +966 -575
  39. package/store/member.store.ts +17 -6
  40. package/store/rules.ts +23 -3
  41. package/types/enum.ts +42 -2
  42. package/types/index.ts +111 -56
@@ -1,181 +1,209 @@
1
1
  <template>
2
- <base-fade-transition>
3
- <section v-if="firstQuestionList && firstQuestionList.length && (isFirstPanelOnRight ? true : !firstPanel) && !secondPanel" class="flex flex-col shrink grow max-h-[90vh]">
4
- <base-form-section v-if="$dataStore.isUnderwriter()" class="mx-[10px]">
5
- <base-rounded-select v-model="filterType" class="w-[200px]" :items="filterItems" :label="$dataStore.t('labels.filter')" hide-details />
6
- </base-form-section>
7
- <section :class="[$styles.blueBgLight, $styles.rounded]" class="mx-[10px] my-[14px] p-4 flex flex-col gap-4">
8
- <base-form-toggle
9
- v-model="answerToAll"
10
- :title="$dataStore.t('questionnaireType.answerAllNo')"
11
- :disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
12
- :has-border="false"
13
- @clicked="handleToggler"
2
+ <section v-if="firstQuestionList && firstQuestionList.length && (isFirstPanelOnRight ? true : !firstPanel) && !secondPanel" class="flex flex-col shrink grow max-h-[85svh]">
3
+ <base-form-section v-if="$dataStore.isUnderwriter()" class="mx-[10px]">
4
+ <base-rounded-select v-model="filterType" class="w-[200px]" :items="filterItems" :label="$dataStore.t('labels.filter')" hide-details />
5
+ </base-form-section>
6
+ <section :class="[$styles.blueBgLight, $styles.rounded]" class="mx-[10px] my-[14px] p-4 flex flex-col gap-4">
7
+ <base-form-toggle
8
+ v-model="answerToAll"
9
+ :title="$dataStore.t('questionnaireType.answerAllNo')"
10
+ :disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
11
+ :has-border="false"
12
+ @clicked="handleToggler"
13
+ />
14
+ </section>
15
+ <v-form ref="vForm" class="grow shrink overflow-y-scroll" @submit="submitForm">
16
+ <section
17
+ v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'N').length"
18
+ :class="[$styles.blueBgLight, $styles.rounded]"
19
+ class="mx-[10px] p-4 flex flex-col gap-4"
20
+ >
21
+ <base-form-input
22
+ v-for="(question, index) in firstQuestionList.filter(i => i.first.definedAnswers === 'N')"
23
+ :key="index"
24
+ v-model="question.first.answerText"
25
+ :label="question.first.name"
26
+ :maska="$maska.threeDigit"
27
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
28
+ :rules="$rules.required"
14
29
  />
15
30
  </section>
16
- <v-form ref="vForm" class="grow shrink overflow-y-scroll" @submit="submitForm">
17
- <section
18
- v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'N').length"
19
- :class="[$styles.blueBgLight, $styles.rounded]"
20
- class="mx-[10px] p-4 flex flex-col gap-4"
21
- >
22
- <base-form-input
23
- v-for="(question, index) in firstQuestionList.filter(i => i.first.definedAnswers === 'N')"
24
- :key="index"
25
- v-model="question.first.answerText"
26
- :label="question.first.name"
27
- :maska="$maska.threeDigit"
28
- :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
29
- :rules="$rules.required"
30
- />
31
- </section>
32
- <section
33
- v-if="firstQuestions.filter(i => i.first.definedAnswers === 'Y').length"
34
- :class="[$styles.blueBgLight, $styles.rounded]"
35
- class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
31
+ <section
32
+ v-if="surveyType === 'critical' && ($dataStore.isBaiterek || $dataStore.isBolashak || $dataStore.isLiferenta)"
33
+ :class="[$styles.blueBgLight, $styles.rounded]"
34
+ class="mx-[10px] p-4 flex flex-col gap-4"
35
+ >
36
+ <base-form-text-section>
37
+ <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between">
38
+ 1. Келесі аурулармен бұрын ауырдыңыз ба немесе қазіргі кезде ауырып жүрсіз бе?/Болели ли Вы когда-нибудь или болеете в настоящий момент следующими заболеваниями?
39
+ </span>
40
+ </base-form-text-section>
41
+ </section>
42
+ <section
43
+ v-if="firstQuestions.filter(i => i.first.definedAnswers === 'Y').length"
44
+ :class="[$styles.blueBgLight, $styles.rounded]"
45
+ class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
46
+ >
47
+ <base-form-text-section
48
+ v-for="(question, index) in firstQuestions.filter(i => i.first.definedAnswers === 'Y')"
49
+ :key="index"
50
+ :class="[currentQuestion?.first.id === question.first.id && $dataStore.rightPanel.open ? $styles.greenBorder : '']"
36
51
  >
37
- <base-form-text-section
38
- v-for="(question, index) in firstQuestions.filter(i => i.first.definedAnswers === 'Y')"
39
- :key="index"
40
- :class="[currentQuestion?.first.id === question.first.id && $dataStore.rightPanel.open ? $styles.greenBorder : '']"
41
- >
52
+ <base-animation>
53
+ <div
54
+ v-if="question.first.answerName?.includes('Да') && question.second"
55
+ :class="[$styles.greenBg, $styles.whiteText, $styles.textSimple]"
56
+ class="rounded-t-lg pl-6 py-1 cursor-pointer"
57
+ @click="openFirstPanel(question)"
58
+ >
59
+ {{ $dataStore.t('questionnaireType.pleaseAnswer', { text: question.second.length }) }}
60
+ </div>
61
+ </base-animation>
62
+ <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between">
63
+ {{ question.first.name }}
42
64
  <base-animation>
43
- <div
44
- v-if="question.first.answerName === 'Да' && question.second"
45
- :class="[$styles.greenBg, $styles.whiteText, $styles.textSimple]"
46
- class="rounded-t-lg pl-6 py-1 cursor-pointer"
65
+ <i
66
+ v-if="question.first.answerName?.includes('Да') && question.second && question.second.length"
67
+ class="mdi mdi-chevron-right text-2xl cursor-pointer"
47
68
  @click="openFirstPanel(question)"
48
- >
49
- {{ $dataStore.t('questionnaireType.pleaseAnswer', { text: question.second.length }) }}
50
- </div>
69
+ ></i>
51
70
  </base-animation>
52
- <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between">
53
- {{ question.first.name }}
54
- <base-animation>
55
- <i
56
- v-if="question.first.answerName === 'Да' && question.second && question.second.length"
57
- class="mdi mdi-chevron-right text-2xl cursor-pointer"
58
- @click="openFirstPanel(question)"
59
- ></i>
60
- </base-animation>
61
- </span>
62
- <div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$styles.textSimple]">
63
- <v-radio-group
64
- v-model="question.first.answerName"
65
- class="anketa-radio"
66
- :true-icon="`mdi-radiobox-marked ${$styles.greenText}`"
67
- false-icon="mdi-radiobox-blank text-[#636363]"
68
- :rules="$rules.required"
69
- :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
70
- inline
71
- >
72
- <v-radio label="Да" value="Да" />
73
- <v-radio label="Нет" value="Нет" />
74
- </v-radio-group>
75
- </div>
76
- </base-form-text-section>
77
- </section>
78
- <section
79
- v-if="firstQuestions.filter(i => i.first.definedAnswers === 'D').length"
80
- :class="[$styles.blueBgLight, $styles.rounded]"
81
- class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
71
+ </span>
72
+ <div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$styles.textSimple]">
73
+ <v-radio-group
74
+ v-model="question.first.answerName"
75
+ class="anketa-radio"
76
+ :true-icon="`mdi-radiobox-marked ${$styles.greenText}`"
77
+ false-icon="mdi-radiobox-blank text-[#636363]"
78
+ :rules="$rules.required"
79
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
80
+ inline
81
+ >
82
+ <v-radio label="Иә/Да" value="Иә/Да" :value-comparator="(a: any, b: any) => String(a).includes('Да')" />
83
+ <v-radio label="Жоқ/Нет" value="Жоқ/Нет" :value-comparator="(a: any, b: any) => String(a).includes('Нет')" />
84
+ </v-radio-group>
85
+ </div>
86
+ </base-form-text-section>
87
+ </section>
88
+ <section
89
+ v-if="firstQuestions.filter(i => i.first.definedAnswers === 'D').length"
90
+ :class="[$styles.blueBgLight, $styles.rounded]"
91
+ class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
92
+ >
93
+ <base-form-text-section
94
+ v-for="(question, index) in firstQuestions.filter(i => i.first.definedAnswers === 'D')"
95
+ :key="index"
96
+ :class="[currentQuestion?.first.id === question.first.id && $dataStore.rightPanel.open ? $styles.greenBorder : '']"
82
97
  >
83
- <base-form-text-section
84
- v-for="(question, index) in firstQuestions.filter(i => i.first.definedAnswers === 'D')"
85
- :key="index"
86
- :class="[currentQuestion?.first.id === question.first.id && $dataStore.rightPanel.open ? $styles.greenBorder : '']"
87
- >
88
- <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between"> {{ question.first.name }} </span>
89
- <div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$styles.textSimple]">
90
- <v-radio-group
91
- v-model="question.first.answerName"
92
- class="anketa-radio"
93
- :true-icon="`mdi-radiobox-marked ${$styles.greenText}`"
94
- false-icon="mdi-radiobox-blank text-[#636363]"
95
- :rules="$rules.required"
96
- :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
97
- inline
98
- >
99
- <v-radio label="Да" value="Да" />
100
- <v-radio label="Нет" value="Нет" />
101
- </v-radio-group>
98
+ <base-animation>
99
+ <div
100
+ v-if="question.first.answerName?.includes('Да') && question.second"
101
+ :class="[$styles.greenBg, $styles.whiteText, $styles.textSimple]"
102
+ class="rounded-t-lg pl-6 py-1 cursor-pointer"
103
+ @click="openFirstPanel(question)"
104
+ >
105
+ {{ $dataStore.t('questionnaireType.pleaseAnswer', { text: question.second.length }) }}
102
106
  </div>
107
+ </base-animation>
108
+ <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between">
109
+ {{ question.first.name }}
103
110
  <base-animation>
104
- <div v-if="question.first.answerName === 'Да'" :class="[$styles.whiteText, $styles.textSimple]">
105
- <base-form-input
106
- v-model="question.first.answerText"
107
- :label="$dataStore.t('labels.inDetails')"
108
- :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
109
- :rules="$rules.required"
110
- />
111
- </div>
111
+ <i
112
+ v-if="question.first.answerName?.includes('Да') && question.second && question.second.length"
113
+ class="mdi mdi-chevron-right text-2xl cursor-pointer"
114
+ @click="openFirstPanel(question)"
115
+ ></i>
112
116
  </base-animation>
113
- </base-form-text-section>
114
- </section>
115
- </v-form>
116
- <div class="px-[14px]">
117
- <base-btn
118
- class="my-[14px] self-center"
119
- :loading="isButtonLoading"
120
- :disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
121
- @click="submitForm"
122
- :text="$dataStore.t('buttons.save')"
123
- />
124
- </div>
125
- </section>
126
- <base-btn
127
- v-if="currentQuestion && currentQuestion.second && currentQuestion.second.length && isFirstPanelOnRight ? false : firstPanel"
128
- class="!absolute z-10 self-center w-[96%] bottom-0"
129
- :text="$dataStore.t('buttons.save')"
130
- @click="submitSecondaryForm"
131
- />
132
- <section
133
- ref="firstPanelSection"
134
- v-if="currentQuestion && currentQuestion.second && isFirstPanelOnRight ? false : firstPanel"
135
- class="flex flex-col px-[10px] pb-[14px]"
136
- :class="[$styles.scrollPage]"
137
- >
138
- <v-form
139
- v-if="currentQuestion"
140
- :class="[$styles.blueBgLight, $styles.rounded]"
141
- class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
142
- ref="vSecondaryForm"
143
- @submit="submitSecondaryForm"
144
- >
145
- <base-form-text-section v-for="question in currentQuestion.second" :title="question.name" :key="question.name">
146
- <div v-if="question.definedAnswers === 'N'">
147
- <base-form-input
148
- v-if="question.answerType === 'T' || question.answerType === 'N'"
149
- v-model="question.answerText"
150
- class="border-t-[1px] border-t-[#F3F6FC]"
151
- :placeholder="$dataStore.t('labels.inputText')"
117
+ </span>
118
+ <div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$styles.textSimple]">
119
+ <v-radio-group
120
+ v-model="question.first.answerName"
121
+ class="anketa-radio"
122
+ :true-icon="`mdi-radiobox-marked ${$styles.greenText}`"
123
+ false-icon="mdi-radiobox-blank text-[#636363]"
124
+ :rules="$rules.required"
152
125
  :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
153
- :rules="isSecondRequired ? $rules.required : []"
154
- />
155
- <base-form-input
156
- v-if="question.answerType === 'D'"
157
- v-model="question.answerText"
158
- class="border-t-[1px] border-t-[#F3F6FC]"
159
- :placeholder="$dataStore.t('form.date')"
160
- :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
161
- :rules="isSecondRequired ? $rules.date : []"
162
- :maska="$maska.date"
163
- append-inner-icon="mdi mdi-calendar-blank-outline"
164
- />
126
+ inline
127
+ >
128
+ <v-radio label="Иә/Да" value="Иә/Да" :value-comparator="(a: any, b: any) => String(a).includes('Да')" />
129
+ <v-radio label="Жоқ/Нет" value="Жоқ/Нет" :value-comparator="(a: any, b: any) => String(a).includes('Нет')" />
130
+ </v-radio-group>
165
131
  </div>
166
- <base-panel-input
167
- v-else
168
- :class="[$styles.textTitle, $styles.greenText]"
169
- :value="question.answerName ? question.answerName : 'Выбрать вариант ответа'"
170
- :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
171
- :clearable="false"
172
- :error-messages="isSecondRequired ? (question.answerName ? [] : ['Выбрать вариант ответа']) : []"
173
- @click="openSecondPanel(question)"
174
- ></base-panel-input>
132
+ <base-animation>
133
+ <div v-if="question.first.answerName?.includes('Да')" :class="[$styles.whiteText, $styles.textSimple]">
134
+ <base-form-input
135
+ v-model="question.first.answerText"
136
+ :label="$dataStore.t('labels.inDetails')"
137
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
138
+ :rules="$rules.required"
139
+ />
140
+ </div>
141
+ </base-animation>
175
142
  </base-form-text-section>
176
- </v-form>
177
- </section>
178
- </base-fade-transition>
143
+ </section>
144
+ </v-form>
145
+ <div class="px-[14px]">
146
+ <base-btn
147
+ class="my-[14px] self-center"
148
+ :loading="isButtonLoading"
149
+ :disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
150
+ @click="submitForm"
151
+ :text="$dataStore.t('buttons.save')"
152
+ />
153
+ </div>
154
+ </section>
155
+ <base-btn
156
+ v-if="currentQuestion && currentQuestion.second && currentQuestion.second.length && isFirstPanelOnRight ? false : firstPanel"
157
+ class="!absolute z-10 self-center w-[96%] bottom-0"
158
+ :text="$dataStore.t('buttons.save')"
159
+ @click="submitSecondaryForm"
160
+ />
161
+ <section
162
+ ref="firstPanelSection"
163
+ v-if="currentQuestion && currentQuestion.second && isFirstPanelOnRight ? false : firstPanel"
164
+ class="flex flex-col px-[10px] pb-[14px]"
165
+ :class="[$styles.scrollPage]"
166
+ >
167
+ <v-form
168
+ v-if="currentQuestion"
169
+ :class="[$styles.blueBgLight, $styles.rounded]"
170
+ class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
171
+ ref="vSecondaryForm"
172
+ @submit="submitSecondaryForm"
173
+ >
174
+ <base-form-text-section v-for="question in currentQuestion.second" :title="question.name" :key="question.name">
175
+ <div v-if="question.definedAnswers === 'N'">
176
+ <base-form-input
177
+ v-if="question.answerType === 'T' || question.answerType === 'N'"
178
+ v-model="question.answerText"
179
+ class="border-t-[1px] border-t-[#F3F6FC]"
180
+ :placeholder="$dataStore.t('labels.inputText')"
181
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
182
+ :rules="isSecondRequired ? $rules.required : []"
183
+ />
184
+ <base-form-input
185
+ v-if="question.answerType === 'D'"
186
+ v-model="question.answerText"
187
+ class="border-t-[1px] border-t-[#F3F6FC]"
188
+ :placeholder="$dataStore.t('form.date')"
189
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
190
+ :rules="isSecondRequired ? $rules.date : []"
191
+ :maska="$maska.date"
192
+ append-inner-icon="mdi mdi-calendar-blank-outline"
193
+ />
194
+ </div>
195
+ <base-panel-input
196
+ v-else
197
+ :class="[$styles.textTitle, $styles.greenText]"
198
+ :value="question.answerName ? question.answerName : 'Выбрать вариант ответа'"
199
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
200
+ :clearable="false"
201
+ :error-messages="isSecondRequired ? (question.answerName ? [] : ['Выбрать вариант ответа']) : []"
202
+ @click="openSecondPanel(question)"
203
+ ></base-panel-input>
204
+ </base-form-text-section>
205
+ </v-form>
206
+ </section>
179
207
  <Teleport v-if="secondPanel" to="#right-panel-actions">
180
208
  <div :class="[$styles.scrollPage]" class="flex flex-col items-center">
181
209
  <base-rounded-input v-model="searchQuery" :label="$dataStore.t('labels.search')" class="w-full p-2" :hide-details="true" />
@@ -234,7 +262,7 @@
234
262
  </v-form>
235
263
  </div>
236
264
  </Teleport>
237
- <base-scroll-buttons v-if="firstQuestionList && firstQuestionList.length" @up="scrollForm('up')" @down="scrollForm('down')" />
265
+ <base-scroll-buttons v-if="firstQuestionList && firstQuestionList.length" class="bottom-[20%]" @up="scrollForm('up')" @down="scrollForm('down')" />
238
266
  </template>
239
267
 
240
268
  <script lang="ts">
@@ -254,11 +282,11 @@ export default defineComponent({
254
282
  const answerToAll = ref<boolean>(false);
255
283
  const firstPanel = ref<boolean>(false);
256
284
  const secondPanel = ref<boolean>(false);
257
- const filterType = ref<'Да' | 'Нет' | null>(null);
285
+ const filterType = ref<'Иә/Да' | 'Жоқ/Нет' | null>(null);
258
286
  const filterItems = [
259
287
  { title: 'Все', value: null },
260
- { title: 'Только «Да»', value: 'Да' },
261
- { title: 'Только «Нет»', value: 'Нет' },
288
+ { title: 'Только «Да»', value: 'Иә/Да' },
289
+ { title: 'Только «Нет»', value: 'Жоқ/Нет' },
262
290
  ];
263
291
  const surveyType = ref<'health' | 'critical'>('tab' in route.query && route.query.tab === 'criticalBase' ? 'critical' : 'health');
264
292
  const whichSurvey = computed(() =>
@@ -275,11 +303,13 @@ export default defineComponent({
275
303
  const currentSecond = ref<AnketaSecond>();
276
304
  const isPanelLoading = ref<boolean>(false);
277
305
  const searchQuery = ref<string>('');
278
- const isFirstPanelOnRight = dataStore.isUnderwriter() && !useEnv().isProduction;
306
+ const isFirstPanelOnRight = dataStore.isUnderwriter();
279
307
 
280
308
  const whichMember = computed(() => ('member' in route.query && !!route.query.member ? (route.query.member as 'insured' | 'policyholder') : 'insured'));
281
309
  const isSecondRequired = computed(() => dataStore.controls.isSecondAnketaRequired);
282
- const firstQuestions = computed(() => (filterType.value !== null ? firstQuestionList.value.filter(i => i.first.answerName === filterType.value) : firstQuestionList.value));
310
+ const firstQuestions = computed(() =>
311
+ filterType.value !== null ? firstQuestionList.value.filter(i => i.first.answerName?.includes(filterType.value === 'Иә/Да' ? 'Да' : 'Нет')) : firstQuestionList.value,
312
+ );
283
313
  const scrollForm = (direction: 'up' | 'down') => {
284
314
  const scrollObject = { top: direction === 'up' ? 0 : screen.height * 10, behavior: 'smooth' };
285
315
  if (firstPanel.value) {
@@ -424,17 +454,17 @@ export default defineComponent({
424
454
  if (firstQuestionList.value) {
425
455
  if (answerToAll.value) {
426
456
  firstQuestionList.value.forEach((question: AnketaBody, index: number) => {
427
- if (question.first.answerType === 'T') {
428
- firstQuestionList.value![index].first.answerName = 'Нет' as AnswerName;
457
+ if (question.first.answerType === 'T' || question.first.answerType === 'D') {
458
+ firstQuestionList.value![index].first.answerName = 'Жоқ/Нет' as AnswerName;
429
459
  }
430
460
  });
431
461
  for (const question of firstQuestionList.value) {
432
462
  const index = firstQuestionList.value.indexOf(question);
433
- await getDefinedAnswerId(question.first.id, 'Нет', index);
463
+ await getDefinedAnswerId(question.first.id, 'Жоқ/Нет', index);
434
464
  }
435
465
  } else {
436
466
  firstQuestionList.value.forEach((question: AnketaBody, index: number) => {
437
- if (question.first.answerType === 'T') {
467
+ if (question.first.answerType === 'T' || question.first.answerType === 'D') {
438
468
  firstQuestionList.value![index].first.answerName = null;
439
469
  }
440
470
  });
@@ -456,7 +486,7 @@ export default defineComponent({
456
486
  );
457
487
  firstQuestionList.value = formStore[whichSurvey.value]!.body;
458
488
  formStore[whichSurvey.value]!.type = surveyType.value;
459
- const negativeAnswer = firstQuestionList.value.every(i => i.first.answerName === 'Нет');
489
+ const negativeAnswer = firstQuestionList.value.every(i => i.first.answerName?.includes('Нет'));
460
490
  if (negativeAnswer) {
461
491
  answerToAll.value = true;
462
492
  }
@@ -490,7 +520,7 @@ export default defineComponent({
490
520
  () => firstQuestionList.value,
491
521
  value => {
492
522
  if (value) {
493
- const hasPositiveAnswer = value.some(i => (i.first.definedAnswers === 'Y' || i.first.definedAnswers === 'D') && i.first.answerName !== 'Нет');
523
+ const hasPositiveAnswer = value.some(i => (i.first.definedAnswers === 'Y' || i.first.definedAnswers === 'D') && !i.first.answerName?.includes('Нет'));
494
524
  answerToAll.value = !hasPositiveAnswer;
495
525
  }
496
526
  },
@@ -512,6 +542,7 @@ export default defineComponent({
512
542
  firstPanel,
513
543
  filterType,
514
544
  filterItems,
545
+ surveyType,
515
546
  secondPanel,
516
547
  currentQuestion,
517
548
  currentSecond,
@@ -124,7 +124,7 @@
124
124
  <base-form-input v-model.trim="member.registrationStreet" :rules="$rules.required" :label="$dataStore.t('form.Street')" :readonly="disabled" :clearable="!disabled" />
125
125
  <base-form-input
126
126
  v-model.trim="member.registrationNumberHouse"
127
- :rules="$rules.required"
127
+ :rules="[...$rules.required, $rules.lengthLimit(member.registrationNumberHouse, 10)]"
128
128
  :label="$dataStore.t('form.NumberHouse')"
129
129
  :readonly="disabled"
130
130
  :clearable="!disabled"