[WIP] Добавил отображение данных с бэка на форме страховки
This commit is contained in:
@@ -26,6 +26,21 @@ const state = () => ({
|
||||
house_number: null,
|
||||
apartment_number: null,
|
||||
},
|
||||
insuranceDMS: {
|
||||
series: null,
|
||||
number: null,
|
||||
photo: null,
|
||||
},
|
||||
insuranceOMS: {
|
||||
series: null,
|
||||
number: null,
|
||||
photo: null,
|
||||
},
|
||||
benefit: {
|
||||
name: null,
|
||||
discount: null,
|
||||
photo: null,
|
||||
},
|
||||
},
|
||||
avatar: "",
|
||||
});
|
||||
@@ -74,12 +89,29 @@ const getters = {
|
||||
id: residenceAddress?.id,
|
||||
},
|
||||
insuranceDMS: {
|
||||
series: person.insurance_policy.find((e) => e.title === "DMS")?.series,
|
||||
series: person?.insurance_policy?.find((e) => e.title === "DMS")
|
||||
?.series,
|
||||
number: person.insurance_policy.find((e) => e.title === "DMS")?.number,
|
||||
photo: person.insurance_policy.find((e) => e.title === "DMS")?.photo
|
||||
? rootState.getUrl +
|
||||
person.insurance_policy.find((e) => e.title === "DMS")?.photo
|
||||
: null,
|
||||
},
|
||||
insuranceOMS: {
|
||||
series: person.insurance_policy.find((e) => e.title === "OMS")?.series,
|
||||
series: person?.insurance_policy?.find((e) => e.title === "OMS")
|
||||
?.series,
|
||||
number: person.insurance_policy.find((e) => e.title === "OMS")?.number,
|
||||
photo: person.insurance_policy.find((e) => e.title === "OMS")?.photo
|
||||
? rootState.getUrl +
|
||||
person.insurance_policy.find((e) => e.title === "OMS")?.photo
|
||||
: null,
|
||||
},
|
||||
benefit: {
|
||||
name: person?.benefit?.name,
|
||||
discount: person?.benefit?.discount,
|
||||
photo: person?.photo_benefit
|
||||
? rootState.getUrl + person.photo_benefit
|
||||
: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user