Merge branch 'development'
This commit is contained in:
commit
823b126bd3
@ -16,6 +16,29 @@ export const requiredFields: ElementsNames[] = [
|
||||
'radioInfuranceOPF',
|
||||
];
|
||||
|
||||
const okvedCondition: ValidationCondition = calculationStore => {
|
||||
const lead = calculationStore.getOption('selectLead');
|
||||
const opportunity = calculationStore.getOption('selectOpportunity');
|
||||
|
||||
const okved =
|
||||
lead?.accountidData?.evo_okved || opportunity?.accountidData?.evo_okved;
|
||||
|
||||
if (
|
||||
okved &&
|
||||
['71.1', '77.3', '49.4', '49.32', '49.39', '47.91.2', '47.99.1'].some(
|
||||
code => okved.startsWith(code),
|
||||
)
|
||||
) {
|
||||
return {
|
||||
isValid: false,
|
||||
message:
|
||||
'По данному ОКВЭД Контрагента возможен только индивидуальный запрос тарифов КАСКО/ОСАГО. Просьба обратиться на адрес strakhovka@evoleasing.ru ',
|
||||
};
|
||||
}
|
||||
return {
|
||||
isValid: true,
|
||||
};
|
||||
};
|
||||
export const conditions: Partial<Record<ElementsNames, ValidationCondition>> = {
|
||||
selectLeaseObjectType: calculationStore => {
|
||||
const leaseObjectType = calculationStore.getOption('selectLeaseObjectType');
|
||||
@ -122,6 +145,8 @@ export const conditions: Partial<Record<ElementsNames, ValidationCondition>> = {
|
||||
isValid: true,
|
||||
};
|
||||
},
|
||||
selectOpportunity: okvedCondition,
|
||||
selectLead: okvedCondition,
|
||||
};
|
||||
|
||||
export const resetFields: ElementsNames[] = [
|
||||
|
||||
@ -13,6 +13,7 @@ query GetOwnerOptions($statecode: Int, $domainname: String) {
|
||||
evo_region_fias_id
|
||||
evo_city_fias_id
|
||||
}
|
||||
evo_okved
|
||||
}
|
||||
evo_inn
|
||||
link
|
||||
@ -33,6 +34,7 @@ query GetOwnerOptions($statecode: Int, $domainname: String) {
|
||||
evo_region_fias_id
|
||||
evo_city_fias_id
|
||||
}
|
||||
evo_okved
|
||||
}
|
||||
link
|
||||
}
|
||||
|
||||
@ -63,6 +63,7 @@ export interface IAccount extends BaseEntity {
|
||||
evo_legal_region_calc?: boolean;
|
||||
evo_osago_with_kasko?: boolean;
|
||||
evo_evokasko_access?: boolean;
|
||||
evo_okved?: string;
|
||||
}
|
||||
|
||||
export interface ISalonProvider extends IAccount {
|
||||
|
||||
Reference in New Issue
Block a user