hl-core 0.0.8-beta.18 → 0.0.8-beta.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/api/index.ts +0 -1
- package/components/Layout/SettingsPanel.vue +14 -0
- package/components/Menu/MenuNav.vue +13 -6
- package/components/Pages/ProductConditions.vue +26 -2
- package/composables/classes.ts +2 -0
- package/layouts/default.vue +1 -1
- package/locales/en.json +4 -0
- package/locales/kz.json +4 -0
- package/locales/ru.json +4 -0
- package/package.json +1 -1
- package/pages/Token.vue +48 -0
package/api/index.ts
CHANGED
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
<v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')"></v-text-field>
|
|
10
10
|
<i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
|
|
11
11
|
></base-panel-item>
|
|
12
|
+
<base-panel-item v-if="$dataStore.isEFO" @click="changeBridge('lka')" class="cursor-pointer">
|
|
13
|
+
{{ $t('labels.lkaLong') }}
|
|
14
|
+
<i class="mdi mdi-card-account-details-outline text-2xl text-[#A0B3D8]"></i
|
|
15
|
+
></base-panel-item>
|
|
16
|
+
<base-panel-item v-if="$dataStore.isLKA" @click="changeBridge('efo')" class="cursor-pointer">
|
|
17
|
+
{{ $t('labels.efoLong') }}
|
|
18
|
+
<i class="mdi mdi-web text-2xl text-[#A0B3D8]"></i
|
|
19
|
+
></base-panel-item>
|
|
12
20
|
<base-panel-item
|
|
13
21
|
v-for="panelItem of dataStore.settings.items.filter(i => $dataStore.filters.show(i))"
|
|
14
22
|
:key="panelItem.title!"
|
|
@@ -45,4 +53,10 @@ const logoutUser = async () => {
|
|
|
45
53
|
dialog.value = false;
|
|
46
54
|
await dataStore.logoutUser();
|
|
47
55
|
};
|
|
56
|
+
|
|
57
|
+
const changeBridge = async (toBridge: 'efo' | 'lka') => {
|
|
58
|
+
const bridgeUrl = import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string;
|
|
59
|
+
if (!bridgeUrl) return;
|
|
60
|
+
window.open(`${bridgeUrl}/#/Token?token=${dataStore.accessToken}`, '_blank');
|
|
61
|
+
};
|
|
48
62
|
</script>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:has-back="hasBack"
|
|
7
7
|
:back-icon="backIcon"
|
|
8
8
|
:has-more="hasMore"
|
|
9
|
-
:hide-more-on-lg="
|
|
9
|
+
:hide-more-on-lg="hideOnLg"
|
|
10
10
|
:more-icon="moreIcon"
|
|
11
11
|
@onBack="$emit('onBack')"
|
|
12
12
|
@onMore="$emit('onMore')"
|
|
@@ -77,10 +77,6 @@ export default defineComponent({
|
|
|
77
77
|
type: Boolean,
|
|
78
78
|
default: false,
|
|
79
79
|
},
|
|
80
|
-
hideMoreOnLg: {
|
|
81
|
-
type: Boolean,
|
|
82
|
-
default: false,
|
|
83
|
-
},
|
|
84
80
|
moreIcon: {
|
|
85
81
|
type: String,
|
|
86
82
|
default: 'mdi-cog-outline',
|
|
@@ -110,7 +106,18 @@ export default defineComponent({
|
|
|
110
106
|
}
|
|
111
107
|
};
|
|
112
108
|
|
|
113
|
-
|
|
109
|
+
const hideOnLg = computed(() => {
|
|
110
|
+
switch (router.currentRoute.value.name) {
|
|
111
|
+
case 'Insurance-Product':
|
|
112
|
+
case 'Menu':
|
|
113
|
+
case 'History':
|
|
114
|
+
return false;
|
|
115
|
+
default:
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
return { pickItem, openTab, hideOnLg };
|
|
114
121
|
},
|
|
115
122
|
});
|
|
116
123
|
</script>
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
:rules="$dataStore.rules.recalculationAdditive"
|
|
42
42
|
></base-form-input>
|
|
43
43
|
<base-form-input
|
|
44
|
+
v-if="hasAdbMultiply"
|
|
44
45
|
v-model="productConditionsForm.adbMultiply"
|
|
45
46
|
:maska="$maska.numbers"
|
|
46
47
|
:clearable="isRecalculationDisabled === false"
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
:rules="$dataStore.rules.recalculationMultiply"
|
|
50
51
|
></base-form-input>
|
|
51
52
|
<base-form-input
|
|
53
|
+
v-if="hasAdbAdditive"
|
|
52
54
|
v-model="productConditionsForm.adbAdditive"
|
|
53
55
|
:maska="$maska.numbers"
|
|
54
56
|
:clearable="isRecalculationDisabled === false"
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
>
|
|
75
77
|
</base-form-input>
|
|
76
78
|
<base-panel-input
|
|
79
|
+
v-if="hasRiskGroup"
|
|
77
80
|
v-model="productConditionsForm.riskGroup"
|
|
78
81
|
:value="productConditionsForm.riskGroup.nameRu"
|
|
79
82
|
:label="$t('productConditionsForm.riskGroup')"
|
|
@@ -325,6 +328,24 @@ export default defineComponent({
|
|
|
325
328
|
}
|
|
326
329
|
return false;
|
|
327
330
|
});
|
|
331
|
+
const hasAdbMultiply = computed(() => {
|
|
332
|
+
if (dataStore.isGons) {
|
|
333
|
+
return false;
|
|
334
|
+
}
|
|
335
|
+
return true;
|
|
336
|
+
});
|
|
337
|
+
const hasAdbAdditive = computed(() => {
|
|
338
|
+
if (dataStore.isGons) {
|
|
339
|
+
return false;
|
|
340
|
+
}
|
|
341
|
+
return true;
|
|
342
|
+
});
|
|
343
|
+
const hasRiskGroup = computed(() => {
|
|
344
|
+
if (dataStore.isGons) {
|
|
345
|
+
return false;
|
|
346
|
+
}
|
|
347
|
+
return true;
|
|
348
|
+
});
|
|
328
349
|
const coverPeriodRule = computed(() => {
|
|
329
350
|
const baseCondition = dataStore.rules.required.concat(dataStore.rules.numbers);
|
|
330
351
|
if (dataStore.isGons) {
|
|
@@ -337,9 +358,9 @@ export default defineComponent({
|
|
|
337
358
|
});
|
|
338
359
|
const currencySymbolsAddTerm = computed(() => {
|
|
339
360
|
if (dataStore.isKazyna) {
|
|
340
|
-
return constants.currencySymbols.usd
|
|
361
|
+
return constants.currencySymbols.usd;
|
|
341
362
|
}
|
|
342
|
-
return constants.currencySymbols.kzt
|
|
363
|
+
return constants.currencySymbols.kzt;
|
|
343
364
|
});
|
|
344
365
|
|
|
345
366
|
const toStatement = async () => {
|
|
@@ -671,6 +692,9 @@ export default defineComponent({
|
|
|
671
692
|
hasRequestedSumInsuredInDollar,
|
|
672
693
|
hasInsurancePremiumPerMonthInDollar,
|
|
673
694
|
hasCurrency,
|
|
695
|
+
hasAdbMultiply,
|
|
696
|
+
hasAdbAdditive,
|
|
697
|
+
hasRiskGroup,
|
|
674
698
|
hasCalculated,
|
|
675
699
|
currencySymbolsAddTerm,
|
|
676
700
|
|
package/composables/classes.ts
CHANGED
|
@@ -837,6 +837,7 @@ export class DataStoreClass {
|
|
|
837
837
|
hasBack: boolean;
|
|
838
838
|
loading: boolean;
|
|
839
839
|
backIcon: string;
|
|
840
|
+
moreIcon: string;
|
|
840
841
|
onBack: any;
|
|
841
842
|
onLink: any;
|
|
842
843
|
selectedItem: MenuItem;
|
|
@@ -967,6 +968,7 @@ export class DataStoreClass {
|
|
|
967
968
|
hasBack: false,
|
|
968
969
|
loading: false,
|
|
969
970
|
backIcon: 'mdi-arrow-left',
|
|
971
|
+
moreIcon: 'mdi-dots-vertical',
|
|
970
972
|
onBack: {},
|
|
971
973
|
onLink: {},
|
|
972
974
|
selectedItem: new MenuItem(),
|
package/layouts/default.vue
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
:title="$dataStore.menu.title ?? 'Страховые продукты'"
|
|
9
9
|
:has-back="$dataStore.menu.hasBack ?? false"
|
|
10
10
|
:back-icon="$dataStore.menu.backIcon ?? 'mdi-arrow-left'"
|
|
11
|
+
:more-icon="$dataStore.menu.moreIcon ?? 'mdi-cog-outline'"
|
|
11
12
|
:has-more="'hasMore' in $route.meta && $route.meta.hasMore ? !!$route.meta.hasMore : false"
|
|
12
|
-
:hide-more-on-lg="true"
|
|
13
13
|
:class="{
|
|
14
14
|
// @ts-ignore
|
|
15
15
|
'!hidden': !$display().lgAndUp.value && !!$dataStore.menu.selectedItem.title,
|
package/locales/en.json
CHANGED
package/locales/kz.json
CHANGED
|
@@ -362,6 +362,10 @@
|
|
|
362
362
|
"new": "Подать заявление"
|
|
363
363
|
},
|
|
364
364
|
"labels": {
|
|
365
|
+
"efoLong": "Единое фронтальное окно",
|
|
366
|
+
"efo": "ЕФО",
|
|
367
|
+
"lkaLong": "Личный кабинет Агента",
|
|
368
|
+
"lka": "ЛКА",
|
|
365
369
|
"photo": "Фото",
|
|
366
370
|
"attachPhoto": "Вложить фото",
|
|
367
371
|
"form": "Форма",
|
package/locales/ru.json
CHANGED
|
@@ -362,6 +362,10 @@
|
|
|
362
362
|
"new": "Подать заявление"
|
|
363
363
|
},
|
|
364
364
|
"labels": {
|
|
365
|
+
"efoLong": "Единое фронтальное окно",
|
|
366
|
+
"efo": "ЕФО",
|
|
367
|
+
"lkaLong": "Личный кабинет Агента",
|
|
368
|
+
"lka": "ЛКА",
|
|
365
369
|
"photo": "Фото",
|
|
366
370
|
"attachPhoto": "Вложить фото",
|
|
367
371
|
"form": "Форма",
|
package/package.json
CHANGED
package/pages/Token.vue
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div></div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
export default defineComponent({
|
|
7
|
+
setup() {
|
|
8
|
+
definePageMeta({
|
|
9
|
+
layout: 'clear',
|
|
10
|
+
});
|
|
11
|
+
const route = useRoute();
|
|
12
|
+
const router = useRouter();
|
|
13
|
+
const dataStore = useDataStore();
|
|
14
|
+
|
|
15
|
+
const getMainPageRoute = () => {
|
|
16
|
+
if (dataStore.isEFO) {
|
|
17
|
+
return 'Insurance-Product';
|
|
18
|
+
}
|
|
19
|
+
if (dataStore.isLKA) {
|
|
20
|
+
return 'Menu';
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
onMounted(async () => {
|
|
25
|
+
if (!dataStore.isBridge) {
|
|
26
|
+
dataStore.sendToParent(constants.postActions.Error401, 401);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const mainRoute = getMainPageRoute();
|
|
30
|
+
if (mainRoute && route.query && 'token' in route.query) {
|
|
31
|
+
const token = route.query.token as string;
|
|
32
|
+
if (isValidToken(token)) {
|
|
33
|
+
localStorage.setItem('accessToken', token);
|
|
34
|
+
dataStore.accessToken = token;
|
|
35
|
+
dataStore.getUserRoles();
|
|
36
|
+
}
|
|
37
|
+
const routeQuery = route.query;
|
|
38
|
+
delete routeQuery.token;
|
|
39
|
+
await router.push({ name: mainRoute, query: Object.keys(routeQuery).length === 0 ? undefined : routeQuery });
|
|
40
|
+
} else {
|
|
41
|
+
await router.push({ name: 'Auth' });
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return {};
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
</script>
|