hl-core 0.0.7-beta.5 → 0.0.7-beta.7

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 CHANGED
@@ -283,6 +283,7 @@ export class ApiClass {
283
283
  return this.axiosCall({
284
284
  method: Methods.GET,
285
285
  url: '/Arm/api/Bpm/ProcessList',
286
+ timeout: 10000,
286
287
  });
287
288
  }
288
289
  }
@@ -19,8 +19,6 @@ export default function (axios: AxiosInstance) {
19
19
  const dataStore = useDataStore();
20
20
  const router = useRouter();
21
21
  if (error.response.status === 401) {
22
- dataStore.$reset();
23
- localStorage.clear();
24
22
  if (dataStore.isEFO) {
25
23
  router.push({ name: 'Auth', query: { error: 401 } });
26
24
  } else {
@@ -28,12 +26,12 @@ export default function (axios: AxiosInstance) {
28
26
  }
29
27
  }
30
28
  if (error.response.status === 500) {
31
- dataStore.$reset();
32
- localStorage.clear();
33
29
  if (router.currentRoute.value.name !== 'Auth') {
34
30
  router.push({ name: '500', query: { stack: error.stack } });
35
31
  }
36
32
  }
33
+ dataStore.$reset();
34
+ localStorage.clear();
37
35
  return Promise.reject(error);
38
36
  },
39
37
  );
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <aside class="w-full hidden lg:flex lg:w-3/4">
2
+ <aside class="w-full lg:flex lg:w-3/4">
3
3
  <slot></slot>
4
4
  </aside>
5
5
  </template>
@@ -1,11 +1,14 @@
1
1
  <template>
2
2
  <base-content class="flex-col" :class="[$libStyles.whiteBg]">
3
3
  <base-header
4
- class="justify-start pl-14"
4
+ class="justify-center lg:pl-14"
5
5
  :has-back="hasBack"
6
6
  :back-icon="backIcon"
7
+ :has-more="hasMore"
8
+ :more-icon="moreIcon"
7
9
  :title="title"
8
10
  @onBack="$emit('onBack')"
11
+ @onMore="$emit('onMore')"
9
12
  ></base-header>
10
13
  <slot></slot>
11
14
  </base-content>
@@ -22,11 +25,19 @@ export default defineComponent({
22
25
  type: String,
23
26
  default: 'mdi-arrow-left',
24
27
  },
28
+ hasMore: {
29
+ type: Boolean,
30
+ default: false,
31
+ },
32
+ moreIcon: {
33
+ type: String,
34
+ default: 'mdi-cog-outline',
35
+ },
25
36
  title: {
26
37
  type: String,
27
38
  default: '',
28
39
  },
29
40
  },
30
- emits: ['onBack'],
41
+ emits: ['onBack', 'onMore'],
31
42
  });
32
43
  </script>
@@ -6,10 +6,17 @@
6
6
  <i
7
7
  v-if="hasBack"
8
8
  @click="$emit('onBack')"
9
- class="absolute left-5 mdi text-lg cursor-pointer"
9
+ class="absolute left-5 mdi text-xl cursor-pointer"
10
10
  :class="[backIcon]"
11
11
  ></i>
12
12
  {{ title }}
13
+ <i
14
+ v-if="hasMore"
15
+ @click="$emit('onMore')"
16
+ class="mdi absolute right-5 text-xl cursor-pointer"
17
+ :class="[moreIcon, hideMoreOnLg ? 'lg:!hidden' : '']"
18
+ >
19
+ </i>
13
20
  </header>
14
21
  </template>
15
22
 
@@ -20,15 +27,36 @@ export default defineComponent({
20
27
  type: Boolean,
21
28
  default: false,
22
29
  },
30
+ hasMore: {
31
+ type: Boolean,
32
+ default: false,
33
+ },
34
+ hideMoreOnLg: {
35
+ type: Boolean,
36
+ default: false,
37
+ },
23
38
  backIcon: {
24
39
  type: String,
25
40
  default: 'mdi-arrow-left',
26
41
  },
42
+ moreIcon: {
43
+ type: String,
44
+ default: 'mdi-cog-outline',
45
+ },
27
46
  title: {
28
47
  type: String,
29
48
  default: '',
30
49
  },
31
50
  },
32
- emits: ['onBack'],
51
+ emits: ['onBack', 'onMore'],
52
+ setup() {
53
+ const dataStore = useDataStore();
54
+
55
+ const onClickOutside = () => {
56
+ dataStore.settings.open = false;
57
+ };
58
+
59
+ return { onClickOutside };
60
+ },
33
61
  });
34
62
  </script>
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <v-navigation-drawer
3
+ v-model="$dataStore.settings.open"
4
+ :temporary="$dataStore.settings.overlay"
5
+ location="right"
6
+ class="sm:!w-[400px] lg:!relative"
7
+ :class="[
8
+ $dataStore.settings.overlay ? 'lg:!hidden' : '',
9
+ $dataStore.settings.open ? '!w-full lg:!w-[420px]' : 'lg:!w-[0px]',
10
+ ]"
11
+ >
12
+ <base-header
13
+ :title="$dataStore.menu.title"
14
+ :has-back="true"
15
+ back-icon="mdi-close"
16
+ class="justify-center"
17
+ @onBack="$dataStore.settings.open = false"
18
+ ></base-header>
19
+ <div>
20
+ <slot></slot>
21
+ </div>
22
+ </v-navigation-drawer>
23
+ </template>
24
+
25
+ <script lang="ts">
26
+ export default defineComponent({
27
+ name: 'BasePanel',
28
+ props: {},
29
+ setup() {
30
+ return {};
31
+ },
32
+ });
33
+ </script>
@@ -0,0 +1,80 @@
1
+ <template>
2
+ <v-navigation-drawer
3
+ v-model="$dataStore.settings.open"
4
+ :temporary="$dataStore.settings.overlay"
5
+ location="right"
6
+ class="sm:!w-[400px] lg:!relative"
7
+ :class="[
8
+ $dataStore.settings.overlay ? 'lg:!hidden' : '',
9
+ $dataStore.settings.open ? '!w-full lg:!w-[420px]' : 'lg:!w-[0px]',
10
+ ]"
11
+ >
12
+ <base-header
13
+ :title="$dataStore.menu.title"
14
+ :has-back="true"
15
+ back-icon="mdi-close"
16
+ class="justify-center"
17
+ @onBack="$dataStore.settings.open = false"
18
+ ></base-header>
19
+ <div>
20
+ <span
21
+ class="transition-all h-[64px] px-4 flex justify-between items-center border-b-[1px] hover:border-b-[#A0B3D8]"
22
+ >
23
+ <v-btn
24
+ size="x-small"
25
+ icon="mdi-minus"
26
+ color="#A0B3D8"
27
+ class="text-white"
28
+ variant="flat"
29
+ ></v-btn>
30
+ Шрифт
31
+ <v-btn
32
+ size="x-small"
33
+ icon="mdi-plus"
34
+ color="#A0B3D8"
35
+ class="text-white"
36
+ variant="flat"
37
+ ></v-btn>
38
+ </span>
39
+ <span
40
+ class="transition-all h-[64px] px-4 flex justify-between items-center border-b-[1px] hover:border-b-[#A0B3D8]"
41
+ >
42
+ <v-text-field
43
+ v-model="$dataStore.user.fullName"
44
+ :readonly="true"
45
+ hide-details
46
+ variant="plain"
47
+ :label="$dataStore.user.roles?.join(', ')"
48
+ ></v-text-field>
49
+ <i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i>
50
+ </span>
51
+ <span
52
+ class="transition-all h-[64px] px-4 flex justify-between items-center border-b-[1px] cursor-pointer hover:border-b-[#A0B3D8]"
53
+ @click="dialog = true"
54
+ >
55
+ Выход
56
+
57
+ <i class="mdi mdi-logout text-xl text-[#A0B3D8]"></i>
58
+ </span>
59
+ <base-dialog
60
+ v-model="dialog"
61
+ :title="$t('dialog.exit')"
62
+ :subtitle="$t('dialog.dataWillClear')"
63
+ actions="default"
64
+ @yes="logoutUser"
65
+ @no="dialog = false"
66
+ >
67
+ </base-dialog>
68
+ </div>
69
+ </v-navigation-drawer>
70
+ </template>
71
+
72
+ <script lang="ts" setup>
73
+ const dialog = ref(false);
74
+ const dataStore = useDataStore();
75
+
76
+ const logoutUser = async () => {
77
+ dialog.value = false;
78
+ await dataStore.logoutUser();
79
+ };
80
+ </script>
@@ -5,7 +5,11 @@
5
5
  :title="title"
6
6
  :has-back="hasBack"
7
7
  :back-icon="backIcon"
8
+ :has-more="hasMore"
9
+ :hide-more-on-lg="hideMoreOnLg"
10
+ :more-icon="moreIcon"
8
11
  @onBack="$emit('onBack')"
12
+ @onMore="$emit('onMore')"
9
13
  ></base-header>
10
14
  <slot key="slot-content" name="content"></slot>
11
15
  <section key="main" class="px-2 pt-[14px] flex flex-col gap-[10px]">
@@ -56,8 +60,20 @@ export default defineComponent({
56
60
  type: String,
57
61
  default: 'mdi-arrow-left',
58
62
  },
63
+ hasMore: {
64
+ type: Boolean,
65
+ default: false,
66
+ },
67
+ hideMoreOnLg: {
68
+ type: Boolean,
69
+ default: false,
70
+ },
71
+ moreIcon: {
72
+ type: String,
73
+ default: 'mdi-cog-outline',
74
+ },
59
75
  },
60
- emits: ['update:modelValue', 'onLink', 'onBack', 'clicked'],
76
+ emits: ['update:modelValue', 'onLink', 'onBack', 'onMore', 'clicked'],
61
77
  setup(props, { emit }) {
62
78
  const dataStore = useDataStore();
63
79
  const pickItem = (item: MenuItem) => {
@@ -737,6 +737,8 @@ export class ProductConditions {
737
737
  }
738
738
 
739
739
  export class DataStoreClass {
740
+ product: string | null;
741
+ showNav: boolean;
740
742
  menuItems: MenuItem[];
741
743
  menu: {
742
744
  title: string;
@@ -747,12 +749,16 @@ export class DataStoreClass {
747
749
  onLink: any;
748
750
  selectedItem: MenuItem;
749
751
  };
752
+ settings: {
753
+ open: boolean;
754
+ overlay: boolean;
755
+ };
750
756
  historyPageIndex: number;
751
757
  historyPageSize: number;
752
758
  historyTotalItems: number;
753
759
  isColumnAsc = { ...InitialColumns() };
754
760
  idleKey: number;
755
- processList: any[];
761
+ processList: any[] | null;
756
762
  countries: Value[];
757
763
  citizenshipCountries: Value[];
758
764
  taxCountries: Value[];
@@ -790,6 +796,8 @@ export class DataStoreClass {
790
796
  userGroups: any[];
791
797
  onMainPage: boolean;
792
798
  constructor() {
799
+ this.product = null;
800
+ this.showNav = true;
793
801
  this.menuItems = [];
794
802
  this.menu = {
795
803
  title: '',
@@ -800,12 +808,16 @@ export class DataStoreClass {
800
808
  onLink: {},
801
809
  selectedItem: new MenuItem(),
802
810
  };
811
+ this.settings = {
812
+ open: false,
813
+ overlay: false,
814
+ };
803
815
  this.historyPageIndex = 1;
804
816
  this.historyPageSize = 10;
805
817
  this.historyTotalItems = 0;
806
818
  this.isColumnAsc = { ...InitialColumns() };
807
819
  this.idleKey = 999;
808
- this.processList = [];
820
+ this.processList = null;
809
821
  this.countries = [];
810
822
  this.citizenshipCountries = [];
811
823
  this.taxCountries = [];
@@ -1,16 +1,13 @@
1
1
  export const constants = Object.freeze({
2
2
  products: {
3
+ pensionannuity: 1,
3
4
  baiterek: 3,
4
5
  halykmycar: 5,
5
6
  lifetrip: 7,
6
7
  bolashak: 8,
7
8
  liferenta: 9,
8
9
  },
9
- BAITEREK_ROUTE: 'baiterek',
10
- MYCAR_ROUTE: 'halykmycar',
11
- LIFETRIP_ROUTE: 'lifetrip',
12
- BOLASHAK_ROUTE: 'bolashak',
13
- LIFERENTA_ROUTE: 'liferenta',
10
+
14
11
  editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
15
12
  documentsLinkVisibleStatuses: [
16
13
  'DocumentsSignedFrom',
@@ -50,8 +47,9 @@ export const constants = Object.freeze({
50
47
  applicationCreated: 'applicationCreated',
51
48
  clipboard: 'clipboard',
52
49
  toHomePage: 'toHomePage',
53
- DOMevent: 'DOMevent',
54
50
  toStatementHistory: 'toStatementHistory',
51
+ toAuth: 'toAuth',
52
+ DOMevent: 'DOMevent',
55
53
  Error401: 'Error401',
56
54
  Error500: 'Error500',
57
55
  },
@@ -6,16 +6,24 @@
6
6
  ></div>
7
7
  <section class="flex h-full" :class="$libStyles.blueBgLight">
8
8
  <base-menu-nav
9
+ v-if="$dataStore.showNav"
9
10
  v-model="$dataStore.menu.selectedItem"
10
11
  :selected="$dataStore.menu.selectedItem"
11
12
  :title="$dataStore.menu.title ?? 'Страховые продукты'"
12
13
  :has-back="$dataStore.menu.hasBack ?? false"
13
14
  :back-icon="$dataStore.menu.backIcon ?? 'mdi-arrow-left'"
15
+ :has-more="
16
+ 'hasMore' in $route.meta && $route.meta.hasMore
17
+ ? !!$route.meta.hasMore
18
+ : false
19
+ "
20
+ :hide-more-on-lg="true"
14
21
  :class="{
15
22
  '!hidden':
16
23
  !$display().lgAndUp.value && !!$dataStore.menu.selectedItem.title,
17
24
  }"
18
25
  @onBack="$dataStore.menu.onBack"
26
+ @onMore="openSettings"
19
27
  @onLink="$dataStore.menu.onLink"
20
28
  >
21
29
  <template #end>
@@ -26,6 +34,15 @@
26
34
  </template>
27
35
  </base-menu-nav>
28
36
  <slot> </slot>
37
+ <base-settings-panel></base-settings-panel>
29
38
  </section>
30
39
  </div>
31
40
  </template>
41
+
42
+ <script setup lang="ts">
43
+ const dataStore = useDataStore();
44
+
45
+ const openSettings = async () => {
46
+ dataStore.settings.open = true;
47
+ };
48
+ </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.7-beta.5",
3
+ "version": "0.0.7-beta.7",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@nuxt/devtools": "^0.2.5",
27
- "nuxt": "^3.2.3",
27
+ "nuxt": "^3.3.1",
28
28
  "prettier": "^2.8.4",
29
29
  "typescript": "^4.9.5"
30
30
  },
31
31
  "dependencies": {
32
32
  "@mdi/font": "^7.1.96",
33
- "@nuxtjs/tailwindcss": "^6.4.1",
33
+ "@nuxtjs/tailwindcss": "^6.6.0",
34
34
  "@pinia/nuxt": "^0.4.7",
35
35
  "animate.css": "^4.1.1",
36
36
  "axios": "^1.3.4",
@@ -39,6 +39,6 @@
39
39
  "pinia": "^2.0.33",
40
40
  "v-idle-3": "^0.3.14",
41
41
  "vue-toastification": "^2.0.0-rc.5",
42
- "vuetify": "^3.1.8"
42
+ "vuetify": "^3.1.10"
43
43
  }
44
44
  }
@@ -9,7 +9,6 @@ import { ApiClass } from '@/api';
9
9
  export const useDataStore = defineStore('data', {
10
10
  state: () => ({
11
11
  ...new DataStoreClass(),
12
- product: null,
13
12
  t: t,
14
13
  rules: rules,
15
14
  toast: Toast,
@@ -176,12 +175,20 @@ export const useDataStore = defineStore('data', {
176
175
  async logoutUser() {
177
176
  this.isLoading = true;
178
177
  try {
178
+ const whichProduct = this.product;
179
179
  const token = JSON.parse(localStorage.getItem('accessToken'));
180
180
  if (token) {
181
181
  this.$reset();
182
182
  localStorage.clear();
183
+
184
+ if (whichProduct === 'efo') {
185
+ await this.router.push({ name: 'Auth' });
186
+ } else {
187
+ this.sendToParent(constants.postActions.toAuth, null);
188
+ }
189
+ } else {
190
+ this.showToaster('error', this.t('toaster.undefinedError'), 3000);
183
191
  }
184
- await this.router.push({ name: 'Auth' });
185
192
  } catch (err) {
186
193
  console.log(err);
187
194
  }
@@ -1118,7 +1125,7 @@ export const useDataStore = defineStore('data', {
1118
1125
  this.isLoading = true;
1119
1126
  try {
1120
1127
  const processList = await this.api.getProcessList();
1121
- if (processList.length > 0) {
1128
+ if (this.processList === null) {
1122
1129
  this.processList = processList;
1123
1130
  }
1124
1131
  } catch (err) {
package/store/messages.ts CHANGED
@@ -287,7 +287,7 @@ export const messages = {
287
287
  },
288
288
  agreementBlock: {
289
289
  title: 'Согласие на сбор и обработку пресональных данных',
290
- text: `Я, {text} предоставляю АО «Халык-Life» (БИН 051140004354) и (или) организациям,
290
+ text: `Я, предоставляю АО «Халык-Life» (БИН 051140004354) и (или) организациям,
291
291
  входящими в состав финансовой Группы «Халык» (Акционеру АО «Халык-Life» (БИН 940140000385) и его дочерним организациям),
292
292
  перестраховочным организациям, организации по формированию и ведению базы данных по страхованию (БИН 120940011577), юридическому лицу,
293
293
  осуществляющему деятельность по привлечению пенсионных взносов и пенсионным выплатам (БИН 971240002115), юридическому лицу,
@@ -1,10 +1,10 @@
1
- module.exports = {
2
- theme: {
3
- screens: {
4
- sm: { min: '600px' },
5
- md: { min: '960px' },
6
- lg: { min: '1280px' },
7
- xl: { min: '1920px' },
8
- },
9
- },
10
- };
1
+ module.exports = {
2
+ theme: {
3
+ screens: {
4
+ sm: { min: '600px' },
5
+ md: { min: '960px' },
6
+ lg: { min: '1280px' },
7
+ xl: { min: '1920px' },
8
+ },
9
+ },
10
+ };