Убрал localStorage с medicalId и заменил на route
This commit is contained in:
@@ -140,13 +140,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
filterDataBenefit(text) {
|
||||
if (text.length > 1) {
|
||||
localStorage.setItem("searchBenefit", text);
|
||||
this.$store.dispatch("getBenefitDataSearch");
|
||||
} else {
|
||||
this.$store.dispatch("getBenefitData");
|
||||
localStorage.removeItem("searchBenefit", text);
|
||||
}
|
||||
if (text.length > 1)
|
||||
return this.$store.dispatch("getBenefitDataSearch", text);
|
||||
this.$store.dispatch("getBenefitData", text);
|
||||
},
|
||||
removeImage(docKey, field) {
|
||||
this.basic[docKey][field] = {};
|
||||
|
||||
@@ -191,8 +191,7 @@ export default {
|
||||
checkChangeInput(val, key) {
|
||||
if (key === "last_name") {
|
||||
if (val.length > 0) {
|
||||
localStorage.setItem("searchConfidant", val);
|
||||
this.$store.dispatch("getPersonsFiltredList").then((res) => {
|
||||
this.$store.dispatch("getPersonsFiltredList", val).then((res) => {
|
||||
if (res.length > 0) {
|
||||
this.listPersons = res;
|
||||
this.isOpenListConfidant = true;
|
||||
@@ -225,7 +224,8 @@ export default {
|
||||
getRequestConfidant(
|
||||
this.confidant,
|
||||
initConfidantData,
|
||||
this.initPerson
|
||||
this.initPerson,
|
||||
this.$route.params.id
|
||||
).then(() => {
|
||||
this.$store.dispatch("getMedicalCardData");
|
||||
this.isLoadingData = false;
|
||||
@@ -259,9 +259,7 @@ export default {
|
||||
if (this.confidant.id) {
|
||||
fetchWrapper
|
||||
.del(
|
||||
`medical_card/medical_history/${localStorage.getItem(
|
||||
"medicalId"
|
||||
)}/delete_confidant/`,
|
||||
`medical_card/medical_history/${this.$route.params.id}/delete_confidant/`,
|
||||
{
|
||||
confidants: [
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
methods: {
|
||||
removeMedicalCard() {
|
||||
this.changeShownRemoveModal(false);
|
||||
this.$store.dispatch("removeMedicalCardData");
|
||||
this.$store.dispatch("removeMedicalCardData", this.$route.params.id);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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));
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user