hl-core 0.0.10-beta.7 → 0.0.10-beta.70

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 (49) hide show
  1. package/README.md +0 -2
  2. package/api/base.api.ts +425 -134
  3. package/api/interceptors.ts +162 -62
  4. package/components/Dialog/Dialog.vue +5 -1
  5. package/components/Dialog/DigitalDocumentsDialog.vue +129 -0
  6. package/components/Dialog/FamilyDialog.vue +15 -4
  7. package/components/Form/DigitalDocument.vue +52 -0
  8. package/components/Form/FormSource.vue +30 -0
  9. package/components/Form/ManagerAttachment.vue +85 -11
  10. package/components/Form/ProductConditionsBlock.vue +12 -6
  11. package/components/Input/Datepicker.vue +5 -0
  12. package/components/Input/FileInput.vue +1 -1
  13. package/components/Input/FormInput.vue +7 -0
  14. package/components/Input/OtpInput.vue +25 -0
  15. package/components/Input/RoundedInput.vue +2 -0
  16. package/components/Input/RoundedSelect.vue +2 -0
  17. package/components/Input/TextAreaField.vue +71 -0
  18. package/components/Input/TextHint.vue +13 -0
  19. package/components/Layout/SettingsPanel.vue +2 -1
  20. package/components/Menu/MenuNav.vue +2 -1
  21. package/components/Pages/Anketa.vue +207 -176
  22. package/components/Pages/Auth.vue +10 -3
  23. package/components/Pages/ContragentForm.vue +24 -18
  24. package/components/Pages/Documents.vue +488 -66
  25. package/components/Pages/MemberForm.vue +1009 -268
  26. package/components/Pages/ProductConditions.vue +1424 -273
  27. package/components/Panel/PanelHandler.vue +329 -126
  28. package/components/Utilities/Chip.vue +1 -1
  29. package/components/Utilities/JsonViewer.vue +1 -2
  30. package/composables/classes.ts +136 -20
  31. package/composables/constants.ts +168 -1
  32. package/composables/index.ts +467 -9
  33. package/composables/styles.ts +8 -24
  34. package/configs/i18n.ts +2 -0
  35. package/configs/pwa.ts +1 -7
  36. package/layouts/clear.vue +1 -1
  37. package/layouts/default.vue +2 -2
  38. package/layouts/full.vue +1 -1
  39. package/locales/kz.json +1239 -0
  40. package/locales/ru.json +133 -21
  41. package/nuxt.config.ts +8 -6
  42. package/package.json +14 -13
  43. package/plugins/head.ts +7 -1
  44. package/plugins/helperFunctionsPlugins.ts +1 -0
  45. package/store/data.store.ts +1080 -552
  46. package/store/member.store.ts +19 -8
  47. package/store/rules.ts +75 -8
  48. package/types/enum.ts +52 -2
  49. package/types/index.ts +143 -6
@@ -55,6 +55,18 @@
55
55
  append-inner-icon="mdi mdi-chevron-right"
56
56
  @append="openPanel('AgentData', $dataStore.t('form.agent'))"
57
57
  />
58
+ <base-panel-input
59
+ v-if="isExecutorShown"
60
+ class="pl-1 pt-1"
61
+ v-model="formStore.ExecutorGPH"
62
+ :value="formStore.ExecutorGPH?.nameRu"
63
+ :readonly="isExecutorReadonly"
64
+ :clearable="!isExecutorReadonly"
65
+ :label="$dataStore.t('form.executor')"
66
+ :rules="$rules.objectRequired"
67
+ append-inner-icon="mdi mdi-chevron-right"
68
+ @append="openPanel('ExecutorGPH', $dataStore.t('form.executor'))"
69
+ />
58
70
  </v-form>
59
71
  </v-expansion-panel-text>
60
72
  </v-expansion-panel>
@@ -71,7 +83,7 @@
71
83
  />
72
84
  <div v-if="isPanelLoading === false" class="w-full">
73
85
  <div v-if="currentDictName === 'AgentData'" class="w-full flex flex-col gap-2 p-2">
74
- <div v-for="(agent, index) of $dataStore[currentDictName]" :key="index">
86
+ <div v-for="(agent, index) of agentDataFiltered" :key="index">
75
87
  <div
76
88
  class="flex justify-between p-4 items-center cursor-pointer"
77
89
  :class="[$styles.rounded, $styles.blueBgLight, $styles.blueBgLightHover]"
@@ -90,7 +102,10 @@
90
102
  </div>
91
103
  </div>
92
104
  </div>
93
- <div v-if="currentDictName === 'ManagerPolicy' || currentDictName === 'RegionPolicy' || currentDictName === 'SaleChanellPolicy'" class="w-full flex flex-col gap-2 p-2">
105
+ <div
106
+ v-if="currentDictName === 'ManagerPolicy' || currentDictName === 'RegionPolicy' || currentDictName === 'SaleChanellPolicy' || currentDictName === 'ExecutorGPH'"
107
+ class="w-full flex flex-col gap-2 p-2"
108
+ >
94
109
  <div v-for="(item, index) in $dataStore[currentDictName].filter(i => (i.nameRu as string).toLowerCase().includes(searchQuery.toLowerCase()))" :key="index">
95
110
  <base-panel-select-item :key="index" :text="item.nameRu ?? ''" :selected="item.ids === (panelValue as Value).ids" @click="pickPanelValue(item)" />
96
111
  </div>
@@ -120,7 +135,7 @@ export default defineComponent({
120
135
  },
121
136
  },
122
137
  setup(props) {
123
- type ManagerAttachmentFiels = 'SaleChanellPolicy' | 'RegionPolicy' | 'ManagerPolicy' | 'AgentData';
138
+ type ManagerAttachmentFiels = 'SaleChanellPolicy' | 'RegionPolicy' | 'ManagerPolicy' | 'AgentData' | 'ExecutorGPH';
124
139
  type FieldTypes = Value | AgentData;
125
140
  const route = useRoute();
126
141
  const dataStore = useDataStore();
@@ -139,37 +154,88 @@ export default defineComponent({
139
154
  (route.params.taskId !== '0' && (!dataStore.isProcessEditable(formStore.applicationData.statusCode) || !dataStore.isTask())),
140
155
  );
141
156
  const isSaleChanellReadonly = computed(() => {
142
- if (dataStore.isGons) return isReadonly.value && dataStore.isServiceManager();
157
+ if (!isReadonly.value) {
158
+ if (dataStore.isTravelAgent()) return true;
159
+ if (dataStore.isGons) {
160
+ return !dataStore.isServiceManager() &&
161
+ !dataStore.isChiefManagerNSZH() &&
162
+ !dataStore.isChiefSalesManager() &&
163
+ !dataStore.isSalesManager() &&
164
+ !dataStore.isManager();
165
+ }
166
+ }
143
167
  return isReadonly.value;
144
168
  });
145
169
  const isRegionReadonly = computed(() => {
146
- if (dataStore.isGons) return isReadonly.value && (dataStore.isServiceManager() || dataStore.isAgent());
170
+ if (!isReadonly.value) {
171
+ if (dataStore.isTravelAgent()) return true;
172
+ if (dataStore.isGons) {
173
+ return !dataStore.isServiceManager() &&
174
+ !dataStore.isAgent() &&
175
+ !dataStore.isChiefManagerNSZH() &&
176
+ !dataStore.isChiefSalesManager() &&
177
+ !dataStore.isSalesManager() &&
178
+ !dataStore.isManager();
179
+ }
180
+ }
147
181
  return isReadonly.value;
148
182
  });
149
183
  const isManagerReadonly = computed(() => {
150
- if (dataStore.isGons) return isReadonly.value && dataStore.isServiceManager();
184
+ if (!isReadonly.value) {
185
+ if (dataStore.isTravelAgent()) return true;
186
+ if (dataStore.isGons) {
187
+ return !dataStore.isServiceManager() &&
188
+ !dataStore.isChiefManagerNSZH() &&
189
+ !dataStore.isChiefSalesManager() &&
190
+ !dataStore.isSalesManager() &&
191
+ !dataStore.isManager();
192
+ }
193
+ }
151
194
  return isReadonly.value;
152
195
  });
153
196
  const isAgentReadonly = computed(() => {
154
- if (dataStore.isGons || dataStore.isPension) return isReadonly.value && dataStore.isServiceManager();
197
+ if (!isReadonly.value) {
198
+ if (dataStore.isTravelAgent()) return true;
199
+ if (dataStore.isPension) return true;
200
+ if (dataStore.isGons) {
201
+ return !dataStore.isServiceManager() &&
202
+ !dataStore.isChiefManagerNSZH() &&
203
+ !dataStore.isChiefSalesManager() &&
204
+ !dataStore.isSalesManager() &&
205
+ !dataStore.isManager();
206
+ }
207
+ }
208
+ return isReadonly.value;
209
+ });
210
+ const isExecutorReadonly = computed(() => {
211
+ if (!isReadonly.value) {
212
+ if (dataStore.isPension) return dataStore.isExecutor() || !dataStore.isInitiator();
213
+ }
155
214
  return isReadonly.value;
156
215
  });
157
216
  const isSaleChanellShown = computed(() => {
158
- if (dataStore.isGons) return dataStore.isServiceManager();
217
+ if (dataStore.isGons) return !dataStore.isAgent();
159
218
  return true;
160
219
  });
161
220
  const isRegionShown = computed(() => {
162
- if (dataStore.isGons) return dataStore.isServiceManager() || dataStore.isAgent();
163
221
  return true;
164
222
  });
165
223
  const isManagerShown = computed(() => {
166
- if (dataStore.isGons) return dataStore.isServiceManager();
224
+ if (dataStore.isGons) return !dataStore.isAgent();
167
225
  return true;
168
226
  });
169
227
  const isAgentShown = computed(() => {
170
- if (dataStore.isGons || dataStore.isPension) return dataStore.isServiceManager();
228
+ if (dataStore.isGons) return !dataStore.isAgent();
171
229
  return true;
172
230
  });
231
+ const agentDataFiltered = computed(() => {
232
+ if (formStore.RegionPolicy?.nameRu && searchQuery.value === 'Без агента') {
233
+ return dataStore.AgentData.filter(i => String(i.officeId) === String(formStore.RegionPolicy.ids));
234
+ } else {
235
+ return dataStore.AgentData;
236
+ }
237
+ });
238
+ const isExecutorShown = dataStore.isPension;
173
239
  const openPanel = async (currentDict: ManagerAttachmentFiels, title: string) => {
174
240
  searchQuery.value = '';
175
241
  if (dataStore.isTask() && !props.disabled) {
@@ -182,6 +248,10 @@ export default defineComponent({
182
248
  isPanelLoading.value = true;
183
249
  await dataStore.filterManagerByRegion(formStore.RegionPolicy.ids as string);
184
250
  }
251
+ if (currentDict === 'ExecutorGPH' && formStore.RegionPolicy.ids) {
252
+ isPanelLoading.value = true;
253
+ await dataStore.filterExecutorByRegion(formStore.RegionPolicy.ids as string);
254
+ }
185
255
 
186
256
  isPanelOpen.value = true;
187
257
  panelValue.value = formStore[currentDict];
@@ -266,10 +336,14 @@ export default defineComponent({
266
336
  isRegionReadonly,
267
337
  isManagerReadonly,
268
338
  isAgentReadonly,
339
+ isExecutorReadonly,
269
340
  isSaleChanellShown,
270
341
  isRegionShown,
271
342
  isManagerShown,
272
343
  isAgentShown,
344
+ isExecutorShown,
345
+ agentDataFiltered,
346
+
273
347
  // Functions
274
348
  openPanel,
275
349
  searchAgent,
@@ -75,12 +75,18 @@ export default defineComponent({
75
75
  const dataStore = useDataStore();
76
76
  const formStore = useFormStore();
77
77
 
78
- const amount = computed(() =>
79
- formStore.productConditionsForm && formStore.productConditionsForm.requestedSumInsured ? formStore.productConditionsForm.requestedSumInsured : null,
80
- );
81
- const premium = computed(() =>
82
- formStore.productConditionsForm && formStore.productConditionsForm.insurancePremiumPerMonth ? formStore.productConditionsForm.insurancePremiumPerMonth : null,
83
- );
78
+ const amount = computed(() => {
79
+ if (dataStore.isGons && formStore.productConditionsForm && formStore.productConditionsForm.currency.code === 'USD') {
80
+ return formStore.productConditionsForm.requestedSumInsuredInDollar;
81
+ }
82
+ return formStore.productConditionsForm && formStore.productConditionsForm.requestedSumInsured ? formStore.productConditionsForm.requestedSumInsured : null;
83
+ });
84
+ const premium = computed(() => {
85
+ if (dataStore.isGons && formStore.productConditionsForm && formStore.productConditionsForm.currency.code === 'USD') {
86
+ return formStore.productConditionsForm.insurancePremiumPerMonthInDollar;
87
+ }
88
+ return formStore.productConditionsForm && formStore.productConditionsForm.insurancePremiumPerMonth ? formStore.productConditionsForm.insurancePremiumPerMonth : null;
89
+ });
84
90
  const policyNumber = computed(() => (formStore.applicationData && formStore.applicationData.policyAppDto ? formStore.applicationData.policyAppDto.policyNumber : null));
85
91
  const contractDate = computed(() =>
86
92
  formStore.applicationData && formStore.applicationData.policyAppDto && formStore.applicationData.policyAppDto.contractDate
@@ -13,6 +13,7 @@
13
13
  :enable-time-picker="false"
14
14
  :six-weeks="true"
15
15
  :min-date="minDate"
16
+ :max-date="maxDate"
16
17
  cancel-text="Отменить"
17
18
  select-text="Выбрать"
18
19
  >
@@ -43,6 +44,10 @@ export default defineComponent({
43
44
  type: Date,
44
45
  required: false,
45
46
  },
47
+ maxDate: {
48
+ type: Date,
49
+ required: false,
50
+ },
46
51
  },
47
52
  });
48
53
  </script>
@@ -8,7 +8,7 @@
8
8
  variant="solo"
9
9
  show-size
10
10
  multiple
11
- accept=".pdf,.doc,.docx,.jpeg,.jpg,.jpg,.xlsx,.xls"
11
+ accept=".pdf,.doc,.docx,.jpeg,.jpg,.jpg,.xlsx,.xls,.xlsm"
12
12
  truncate-length="15"
13
13
  clear-icon="mdi mdi-close"
14
14
  :label="label"
@@ -39,6 +39,9 @@
39
39
  v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') && !props.readonly"
40
40
  :model-value="modelValue"
41
41
  :min-date="minDate"
42
+ :max-date="maxDate"
43
+ :min="minDate"
44
+ :max="maxDate"
42
45
  @update:modelValue="$emit('update:modelValue', $event)"
43
46
  />
44
47
  </template>
@@ -120,6 +123,10 @@ export default defineComponent({
120
123
  type: Date,
121
124
  default: undefined,
122
125
  },
126
+ maxDate: {
127
+ type: Date,
128
+ default: undefined,
129
+ },
123
130
  prependIcon: {
124
131
  type: String,
125
132
  },
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <v-otp-input v-model="modelValue" class="base-otp-input" base-color="#A0B3D8" color="#FFF" />
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+ const modelValue = defineModel<string>();
7
+ </script>
8
+
9
+ <style>
10
+ .base-otp-input .v-otp-input__field {
11
+ font-size: 16px;
12
+ }
13
+ .base-otp-input .v-field {
14
+ width: 50px;
15
+ height: 60px;
16
+ border-radius: 8px;
17
+ }
18
+ .base-otp-input .v-otp-input__content {
19
+ gap: 24px;
20
+ }
21
+ .base-otp-input .v-otp-input__divider {
22
+ margin: 0 4px;
23
+ color: #b8b8b8;
24
+ }
25
+ </style>
@@ -138,6 +138,8 @@ export default defineComponent({
138
138
  border: 1px solid #dadada;
139
139
  box-shadow: none;
140
140
  font-size: 14px;
141
+ padding-top: 6px;
142
+ padding-bottom: 4px;
141
143
  }
142
144
  .rounded-input .v-field--error {
143
145
  border-color: #ff5449;
@@ -150,6 +150,8 @@ export default defineComponent({
150
150
  border: 1px solid #dadada;
151
151
  box-shadow: none;
152
152
  font-size: 14px;
153
+ padding-top: 6px;
154
+ padding-bottom: 4px;
153
155
  }
154
156
  .rounded-select .v-field--error {
155
157
  border-color: #ff5449;
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <v-textarea
3
+ class="form-input"
4
+ :label="label"
5
+ :model-value="modelValue"
6
+ :disabled="disabled"
7
+ :variant="variant"
8
+ :readonly="props.readonly"
9
+ :color="color"
10
+ :rows="rows"
11
+ @update:modelValue="$emit('update:modelValue', $event)"
12
+ auto-grow
13
+ ></v-textarea>
14
+ </template>
15
+
16
+ <script lang="ts">
17
+ import type { InputVariants } from '../../types';
18
+
19
+ export default defineComponent({
20
+ props: {
21
+ modelValue: {
22
+ required: false,
23
+ },
24
+ label: {
25
+ type: String,
26
+ default: '',
27
+ },
28
+ disabled: {
29
+ type: Boolean,
30
+ default: false,
31
+ },
32
+ variant: {
33
+ type: String as PropType<InputVariants>,
34
+ default: 'solo',
35
+ },
36
+ readonly: {
37
+ type: Boolean,
38
+ default: false,
39
+ },
40
+ color: {
41
+ type: String,
42
+ default: '#009c73',
43
+ },
44
+ rows: {
45
+ type: Number,
46
+ default: 5,
47
+ },
48
+ },
49
+ emits: ['update:modelValue'],
50
+
51
+ setup(props, { emit }) {
52
+ return {
53
+ props,
54
+ };
55
+ },
56
+ });
57
+ </script>
58
+
59
+ <style>
60
+ .form-input input:focus {
61
+ border: none !important;
62
+ outline: none !important;
63
+ }
64
+ .form-input .v-field {
65
+ box-shadow: none;
66
+ font-size: 14px;
67
+ }
68
+ .form-input .v-label.v-field-label {
69
+ top: 20px;
70
+ }
71
+ </style>
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <p class="p-1 px-2 text-[10px]" :class="[$styles.greyText]">{{ text }}</p>
3
+ </template>
4
+ <script>
5
+ export default {
6
+ props: {
7
+ text: {
8
+ type: String,
9
+ required: true,
10
+ },
11
+ },
12
+ };
13
+ </script>
@@ -62,11 +62,12 @@
62
62
  <script lang="ts" setup>
63
63
  import { changeBridge } from '#imports';
64
64
 
65
- import pkg from '../../package.json';
65
+ import packageJson from '../../package.json';
66
66
  const dialogSignOut = ref(false);
67
67
  const dataStore = useDataStore();
68
68
  const router = useRouter();
69
69
  const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION ?? '');
70
+ const pkg = packageJson as { version: string };
70
71
 
71
72
  const handleFontSize = (action: 'increase' | 'decrease') => {
72
73
  if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
@@ -15,7 +15,7 @@
15
15
  @onMore="$emit('onMore')"
16
16
  />
17
17
  <slot key="slot-content" name="content"></slot>
18
- <section key="main" :class="[$styles.flexColNav]">
18
+ <section key="main" class="max-h-[90dvh] overflow-y-scroll" :class="[$styles.flexColNav]">
19
19
  <slot name="start"></slot>
20
20
  <base-fade-transition>
21
21
  <div v-if="$dataStore.menuItems && $dataStore.menuItems.length" class="flex flex-col gap-[10px]">
@@ -38,6 +38,7 @@
38
38
  <div v-if="$dataStore.buttons && $dataStore.buttons.length" class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[10%] w-full pr-4">
39
39
  <div v-for="(item, index) of $dataStore.buttons" :key="index">
40
40
  <transition enter-active-class="animate__animated animate__fadeIn animate__faster" leave-active-class="animate__animated animate__fadeOut animate__faster">
41
+ <!-- @vue-ignore -->
41
42
  <base-btn
42
43
  v-if="$dataStore.filters.show(item)"
43
44
  :text="item.title!"