Убрал localStorage с medicalId и заменил на route
This commit is contained in:
@@ -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: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user