hl-core 0.0.9-beta.4 → 0.0.9-beta.5
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MemberCodes } from '../types/enum';
|
|
2
|
-
import {
|
|
2
|
+
import { useAxiosInstance } from '../composables/axios';
|
|
3
3
|
import { Value, IDocument } from '../composables/classes';
|
|
4
4
|
import { AxiosRequestConfig } from 'axios';
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ export class ApiClass {
|
|
|
13
13
|
private readonly productUrl: string = import.meta.env.VITE_PRODUCT_URL as string;
|
|
14
14
|
|
|
15
15
|
private async axiosCall<T>(config: AxiosRequestConfig): Promise<T> {
|
|
16
|
-
const { data } = await
|
|
16
|
+
const { data } = await useAxiosInstance(this.baseURL).request<T>(config);
|
|
17
17
|
return data;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -217,6 +217,7 @@
|
|
|
217
217
|
</template>
|
|
218
218
|
|
|
219
219
|
<script lang="ts">
|
|
220
|
+
import { StoreMembers } from 'types/enum';
|
|
220
221
|
import { Member, Value } from '../../composables/classes';
|
|
221
222
|
|
|
222
223
|
export default defineComponent({
|
|
@@ -229,6 +230,10 @@ export default defineComponent({
|
|
|
229
230
|
type: String as PropType<'default' | 'panel'>,
|
|
230
231
|
default: 'default',
|
|
231
232
|
},
|
|
233
|
+
whichForm: {
|
|
234
|
+
type: String as PropType<'contragent' | keyof typeof StoreMembers>,
|
|
235
|
+
default: 'contragent',
|
|
236
|
+
},
|
|
232
237
|
},
|
|
233
238
|
emits: ['success'],
|
|
234
239
|
setup(props, { emit }) {
|
|
@@ -314,7 +319,7 @@ export default defineComponent({
|
|
|
314
319
|
};
|
|
315
320
|
|
|
316
321
|
const saveMember = async () => {
|
|
317
|
-
const hasSaved = await dataStore.saveContragent(props.member,
|
|
322
|
+
const hasSaved = await dataStore.saveContragent(props.member, props.whichForm, null, true);
|
|
318
323
|
if (hasSaved === false) {
|
|
319
324
|
return false;
|
|
320
325
|
}
|
|
@@ -711,7 +711,7 @@ export default {
|
|
|
711
711
|
if (dataStore.isGons || dataStore.isBolashak) {
|
|
712
712
|
return [];
|
|
713
713
|
}
|
|
714
|
-
if ((dataStore.isKazyna || dataStore.isLiferenta) && member.value.age < 18) {
|
|
714
|
+
if ((dataStore.isKazyna || dataStore.isLiferenta) && Number(member.value.age) < 18) {
|
|
715
715
|
return [];
|
|
716
716
|
}
|
|
717
717
|
}
|
|
@@ -1078,7 +1078,7 @@ export default {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
if (dataStore.isKazyna || dataStore.isLiferenta) {
|
|
1081
|
-
if (whichForm.value === formStore.beneficiaryFormKey && member.value.age < 18) {
|
|
1081
|
+
if (whichForm.value === formStore.beneficiaryFormKey && Number(member.value.age) < 18) {
|
|
1082
1082
|
return true;
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
package/composables/axios.ts
CHANGED
package/nuxt.config.ts
CHANGED
|
@@ -6,7 +6,7 @@ import VueI18nVitePlugin from '@intlify/unplugin-vue-i18n/vite';
|
|
|
6
6
|
export default defineNuxtConfig({
|
|
7
7
|
ssr: false,
|
|
8
8
|
spaLoadingTemplate: false,
|
|
9
|
-
modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss', '@nuxt/devtools'],
|
|
9
|
+
modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss', '@nuxt/devtools', '@vueuse/nuxt'],
|
|
10
10
|
|
|
11
11
|
imports: {
|
|
12
12
|
dirs: ['store', 'composables'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl-core",
|
|
3
|
-
"version": "0.0.9-beta.
|
|
3
|
+
"version": "0.0.9-beta.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "nuxt.config.ts",
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@nuxt/devtools": "^0.4.5",
|
|
45
|
+
"@vueuse/components": "^10.2.1",
|
|
46
|
+
"@vueuse/core": "^10.2.1",
|
|
47
|
+
"@vueuse/nuxt": "^10.2.1",
|
|
45
48
|
"nuxt": "^3.6.2",
|
|
46
49
|
"prettier": "^2.8.8"
|
|
47
50
|
},
|
|
@@ -59,7 +62,6 @@
|
|
|
59
62
|
"pinia": "^2.1.4",
|
|
60
63
|
"typedoc": "^0.24.8",
|
|
61
64
|
"typescript": "5.0.4",
|
|
62
|
-
"v-idle-3": "^0.3.14",
|
|
63
65
|
"vue-i18n": "^9.2.2",
|
|
64
66
|
"vue-json-pretty": "^2.2.4",
|
|
65
67
|
"vue-toastification": "^2.0.0-rc.5",
|
|
@@ -3,13 +3,10 @@ import { constants } from '../composables/constants';
|
|
|
3
3
|
import { Styles } from '../composables/styles';
|
|
4
4
|
import VueDatePicker from '@vuepic/vue-datepicker';
|
|
5
5
|
import '@vuepic/vue-datepicker/dist/main.css';
|
|
6
|
-
import Vidle from 'v-idle-3';
|
|
7
6
|
import Maska from 'maska';
|
|
8
7
|
import i18n from '../configs/i18n';
|
|
9
8
|
|
|
10
9
|
export default defineNuxtPlugin(nuxtApp => {
|
|
11
|
-
//@ts-ignore
|
|
12
|
-
nuxtApp.vueApp.use(Vidle, {});
|
|
13
10
|
nuxtApp.vueApp.use(Maska);
|
|
14
11
|
nuxtApp.vueApp.use(i18n);
|
|
15
12
|
nuxtApp.vueApp.component('VueDatePicker', VueDatePicker);
|