Убрал localStorage с medicalId и заменил на route

This commit is contained in:
megavrilinvv
2023-08-16 10:09:22 +03:00
parent f67c9be11f
commit cdf9754a36
6 changed files with 25 additions and 50 deletions

View File

@@ -249,11 +249,7 @@ export default {
!!tooth.tooth_mobility &&
!!tooth.dental_condition;
if (isCreate) {
requestCreateMedicalCard(
tooth,
key,
localStorage.getItem("medicalId")
);
requestCreateMedicalCard(tooth, key, this.$route.params.id);
}
if (
toothResponse &&
@@ -273,7 +269,7 @@ export default {
requestCreateMedicalCard(
this.dentalIndications[key],
key,
localStorage.getItem("medicalId")
this.$route.params.id
);
}
if (
@@ -385,11 +381,7 @@ export default {
},
async fetchDataMedicalCard() {
await fetchWrapper
.get(
`medical_card/medical_history/${localStorage.getItem(
"medicalId"
)}/detail/`
)
.get(`medical_card/medical_history/${this.$route.params.id}/detail/`)
.then((res) => this.saveDataMedical(res));
},
},