hl-core 0.0.10-beta.45 → 0.0.10-beta.47
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/components/Form/ManagerAttachment.vue +4 -0
- package/components/Pages/MemberForm.vue +3 -3
- package/components/Pages/ProductConditions.vue +20 -5
- package/composables/index.ts +17 -2
- package/package.json +1 -1
- package/store/data.store.ts +8 -4
- package/store/rules.ts +1 -1
- package/types/enum.ts +2 -0
|
@@ -155,24 +155,28 @@ export default defineComponent({
|
|
|
155
155
|
);
|
|
156
156
|
const isSaleChanellReadonly = computed(() => {
|
|
157
157
|
if (!isReadonly.value) {
|
|
158
|
+
if (dataStore.isTravelAgent()) return true;
|
|
158
159
|
if (dataStore.isGons) return !dataStore.isServiceManager();
|
|
159
160
|
}
|
|
160
161
|
return isReadonly.value;
|
|
161
162
|
});
|
|
162
163
|
const isRegionReadonly = computed(() => {
|
|
163
164
|
if (!isReadonly.value) {
|
|
165
|
+
if (dataStore.isTravelAgent()) return true;
|
|
164
166
|
if (dataStore.isGons) return !dataStore.isServiceManager() && !dataStore.isAgent();
|
|
165
167
|
}
|
|
166
168
|
return isReadonly.value;
|
|
167
169
|
});
|
|
168
170
|
const isManagerReadonly = computed(() => {
|
|
169
171
|
if (!isReadonly.value) {
|
|
172
|
+
if (dataStore.isTravelAgent()) return true;
|
|
170
173
|
if (dataStore.isGons) return !dataStore.isServiceManager();
|
|
171
174
|
}
|
|
172
175
|
return isReadonly.value;
|
|
173
176
|
});
|
|
174
177
|
const isAgentReadonly = computed(() => {
|
|
175
178
|
if (!isReadonly.value) {
|
|
179
|
+
if (dataStore.isTravelAgent()) return true;
|
|
176
180
|
if (dataStore.isGons) return !dataStore.isServiceManager();
|
|
177
181
|
if (dataStore.isPension) return true;
|
|
178
182
|
}
|
|
@@ -339,10 +339,10 @@
|
|
|
339
339
|
v-if="hasWorkPositionDict"
|
|
340
340
|
v-model.trim="member.jobPosition"
|
|
341
341
|
:label="$dataStore.t('form.jobPosition')"
|
|
342
|
-
:readonly="isDisabled || member.positionCode !== 'other'"
|
|
343
342
|
:clearable="!isDisabled"
|
|
344
343
|
:rules="$rules.required"
|
|
345
344
|
append-inner-icon="mdi-chevron-right"
|
|
345
|
+
readonly
|
|
346
346
|
@click="openCustomPanel('workPosition')"
|
|
347
347
|
/>
|
|
348
348
|
<base-form-input
|
|
@@ -749,7 +749,7 @@
|
|
|
749
749
|
/>
|
|
750
750
|
</div>
|
|
751
751
|
<div v-if="searchQuery && positionsList !== null && !positionsList.length && isPanelLoading === false" class="w-full flex flex-col items-center gap-2 px-2">
|
|
752
|
-
<base-btn :text="$dataStore.t('buttons.add')" @click="pickPosition({ workPositionName: searchQuery, workPositionCode: 'other' })" />
|
|
752
|
+
<!-- <base-btn :text="$dataStore.t('buttons.add')" @click="pickPosition({ workPositionName: searchQuery, workPositionCode: 'other' })" /> -->
|
|
753
753
|
<span :class="[$styles.mutedText]">{{ $dataStore.t('toaster.notFound') }}</span>
|
|
754
754
|
</div>
|
|
755
755
|
</base-animation>
|
|
@@ -1745,7 +1745,7 @@ export default {
|
|
|
1745
1745
|
dataStore.isLoading = true;
|
|
1746
1746
|
const docTypeCodes = {
|
|
1747
1747
|
'1UDL': 1,
|
|
1748
|
-
PS:
|
|
1748
|
+
PS: 11,
|
|
1749
1749
|
SBI: 3,
|
|
1750
1750
|
VNZ: 4,
|
|
1751
1751
|
};
|
|
@@ -1408,7 +1408,7 @@ export default defineComponent({
|
|
|
1408
1408
|
}
|
|
1409
1409
|
};
|
|
1410
1410
|
|
|
1411
|
-
const pickPanelValue = (item: Value) => {
|
|
1411
|
+
const pickPanelValue = async (item: Value) => {
|
|
1412
1412
|
dataStore.rightPanel.open = false;
|
|
1413
1413
|
isPanelOpen.value = false;
|
|
1414
1414
|
isMultiplePanelOpen.value = false;
|
|
@@ -1429,9 +1429,22 @@ export default defineComponent({
|
|
|
1429
1429
|
} else {
|
|
1430
1430
|
// @ts-ignore
|
|
1431
1431
|
productConditionsForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
1432
|
-
if (currentPanel.value === 'paymentPeriod' &&
|
|
1433
|
-
|
|
1434
|
-
|
|
1432
|
+
if (currentPanel.value === 'paymentPeriod' && item.code === 'single') {
|
|
1433
|
+
if (hasProcessIndexRate.value) {
|
|
1434
|
+
const defaultIndexRate = dataStore.processIndexRate.find((i: any) => i.isDefault === true);
|
|
1435
|
+
if (defaultIndexRate) productConditionsForm.processIndexRate = defaultIndexRate;
|
|
1436
|
+
}
|
|
1437
|
+
if (whichProduct.value === 'bolashak') {
|
|
1438
|
+
const termCover = additionalTerms.value?.findIndex(i => i.coverTypeCode === 10);
|
|
1439
|
+
if (termCover !== -1) {
|
|
1440
|
+
const termList = await dataStore.getAdditionalInsuranceTermsAnswers(additionalTerms.value[termCover].coverTypeId);
|
|
1441
|
+
const defaultTermValue = termList?.find(i => i.isDefault === true);
|
|
1442
|
+
if (defaultTermValue) {
|
|
1443
|
+
additionalTerms.value[termCover].coverSumId = String(defaultTermValue.id);
|
|
1444
|
+
additionalTerms.value[termCover].coverSumName = String(defaultTermValue.nameRu);
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1435
1448
|
}
|
|
1436
1449
|
}
|
|
1437
1450
|
};
|
|
@@ -1796,7 +1809,9 @@ export default defineComponent({
|
|
|
1796
1809
|
|
|
1797
1810
|
const filterTermConditions = (term: AddCover) => {
|
|
1798
1811
|
if (term.coverTypeCode === 10 && !props.isCalculator) {
|
|
1799
|
-
|
|
1812
|
+
const isSinglePeriod = whichProduct.value === 'bolashak' ? productConditionsForm.paymentPeriod?.code === 'single' : false;
|
|
1813
|
+
const isDifferentClients = !!formStore.insuredForm.find((member: Member) => member.iin === formStore.policyholderForm.iin) === false;
|
|
1814
|
+
return isDifferentClients && !isSinglePeriod;
|
|
1800
1815
|
}
|
|
1801
1816
|
return true;
|
|
1802
1817
|
};
|
package/composables/index.ts
CHANGED
|
@@ -815,9 +815,10 @@ export class RoleController {
|
|
|
815
815
|
const dataStore = useDataStore();
|
|
816
816
|
const hasAccessByProduct = (() => {
|
|
817
817
|
const product = productFromExternal as Projects;
|
|
818
|
-
if (dataStore.isLifetrip || product === 'lifetrip') return this.isBranchDirector();
|
|
818
|
+
if (dataStore.isLifetrip || product === 'lifetrip') return this.isBranchDirector() || this.isTravelAgent();
|
|
819
819
|
if (dataStore.isPension || product === 'pensionannuitynew') return this.isBranchDirector() || this.isExecutor();
|
|
820
820
|
if (dataStore.isLifeBusiness || product === 'lifebusiness') return this.isHeadManager() || this.isBranchDirector();
|
|
821
|
+
if (dataStore.isCritical || product === 'criticalillness') return this.isBranchDirector();
|
|
821
822
|
return false;
|
|
822
823
|
})();
|
|
823
824
|
return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti() || hasAccessByProduct;
|
|
@@ -861,6 +862,8 @@ export class RoleController {
|
|
|
861
862
|
isUKP = () => this.isRole(constants.roles.UKP);
|
|
862
863
|
isDpDirector = () => this.isRole(constants.roles.DpDirector);
|
|
863
864
|
isSecurity = () => this.isRole(constants.roles.Security);
|
|
865
|
+
isURAP = () => this.isRole(constants.roles.URAP);
|
|
866
|
+
isTravelAgent = () => this.isRole(constants.roles.TravelAgent);
|
|
864
867
|
hasAccess = () => {
|
|
865
868
|
const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn() || this.isDsuioOrv();
|
|
866
869
|
return {
|
|
@@ -870,7 +873,17 @@ export class RoleController {
|
|
|
870
873
|
toAML: this.isCompliance() || baseAccessRoles,
|
|
871
874
|
toAULETTI: this.isAgentAuletti() || this.isManagerAuletti() || baseAccessRoles,
|
|
872
875
|
toLKA_A: this.isAgentAuletti() || baseAccessRoles,
|
|
873
|
-
toUU:
|
|
876
|
+
toUU:
|
|
877
|
+
this.isDsuio() ||
|
|
878
|
+
this.isActuary() ||
|
|
879
|
+
this.isUSNSACCINS() ||
|
|
880
|
+
this.isServiceManager() ||
|
|
881
|
+
this.isAccountant() ||
|
|
882
|
+
this.isAdjuster() ||
|
|
883
|
+
this.isHeadAdjuster() ||
|
|
884
|
+
this.isArchivist() ||
|
|
885
|
+
this.isSecurity() ||
|
|
886
|
+
baseAccessRoles,
|
|
874
887
|
toDSO:
|
|
875
888
|
this.isDsuio() ||
|
|
876
889
|
this.isActuary() ||
|
|
@@ -914,6 +927,8 @@ export class RoleController {
|
|
|
914
927
|
this.isUKP() ||
|
|
915
928
|
this.isDpDirector() ||
|
|
916
929
|
this.isSecurity() ||
|
|
930
|
+
this.isURAP() ||
|
|
931
|
+
this.isTravelAgent() ||
|
|
917
932
|
baseAccessRoles,
|
|
918
933
|
};
|
|
919
934
|
};
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -1530,9 +1530,13 @@ export const useDataStore = defineStore('data', {
|
|
|
1530
1530
|
},
|
|
1531
1531
|
async getCurrencies() {
|
|
1532
1532
|
try {
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1535
|
-
|
|
1533
|
+
const makeCall = !this.isLKA || !this.isLKA_A;
|
|
1534
|
+
if (makeCall) {
|
|
1535
|
+
const currencies = await this.api.getCurrencies();
|
|
1536
|
+
this.currencies = currencies;
|
|
1537
|
+
return currencies;
|
|
1538
|
+
}
|
|
1539
|
+
return null;
|
|
1536
1540
|
} catch (err) {
|
|
1537
1541
|
console.log(err);
|
|
1538
1542
|
}
|
|
@@ -1971,7 +1975,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1971
1975
|
this.isGons || product === 'gons' ? this.getNumberWithSpacesAfterComma(calculationResponse.premium) : this.getNumberWithSpaces(calculationResponse.premium);
|
|
1972
1976
|
|
|
1973
1977
|
this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
|
|
1974
|
-
if (this.isKazyna || product === 'halykkazyna' ||
|
|
1978
|
+
if (this.isKazyna || product === 'halykkazyna' || this.isGons || product === 'gons') {
|
|
1975
1979
|
if (this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar != null) {
|
|
1976
1980
|
this.formStore.productConditionsForm.requestedSumInsuredInDollar = this.getNumberWithSpaces(calculationResponse.amountInCurrency);
|
|
1977
1981
|
} else {
|
package/store/rules.ts
CHANGED
|
@@ -227,7 +227,7 @@ export const rules = {
|
|
|
227
227
|
},
|
|
228
228
|
],
|
|
229
229
|
policyholderAgeLimit: [(v: any) => v >= 18 || t('rules.policyholderAgeLimit')],
|
|
230
|
-
beneficiaryAgeLimit: [(v: any) => v
|
|
230
|
+
beneficiaryAgeLimit: [(v: any) => v < 15 || t('rules.beneficiaryAgeLimit')],
|
|
231
231
|
dateInPast: [
|
|
232
232
|
(v: any) => {
|
|
233
233
|
const givenDate = new Date(formatDate(v)!);
|