evo_id_elt field for osago

This commit is contained in:
vchikalkin 2021-06-21 11:13:38 +03:00
parent 3ac5757e76
commit 1822213ad5
3 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,11 @@ const mapInsType = {
osago: 100000001,
};
const map_evo_id_elt_FieldName = {
kasko: 'evo_id_elt',
osago: 'evo_id_elt_osago',
};
export const initFields = ['evo_id_elt', 'name', 'accountid'];
export function initIns(this: ICalculationStore, insType) {
@ -20,10 +25,11 @@ export function initIns(this: ICalculationStore, insType) {
}
const { ELTStore } = this.stores;
const list: TCRMEntity[] = [];
const evo_id_elt_fieldName = map_evo_id_elt_FieldName[insType];
insuranceCompanies.forEach(company => {
if (
company &&
company.evo_id_elt &&
company[evo_id_elt_fieldName] &&
company.evo_type_ins_policy &&
company.evo_type_ins_policy.includes(mapInsType[insType])
) {

View File

@ -11,6 +11,7 @@ const query = gql`
name
evo_type_ins_policy
evo_id_elt
evo_id_elt_osago
}
}
`;

View File

@ -17,6 +17,7 @@ export interface IAccount {
evo_kpp?: string;
evo_address_legalidData?: IEvoAddress;
evo_id_elt?: string;
evo_id_elt_osago?: string;
}
export interface IEvoAddress {