fix : update delete confirmation modal and test result style

This commit is contained in:
zeinab.ashrafi
2025-04-21 14:27:47 +03:30
parent 69e44905ff
commit 32e8bb910f
13 changed files with 149 additions and 267 deletions
+14 -17
View File
@@ -211,7 +211,7 @@ export default {
},
methods: {
...mapMutations('myItems', ["SET_FILTER"]),
...mapMutations("modal", ["changeCurrentModal"]),
...mapMutations("modal", ["changeCurrentModal",'closeModal']),
...mapActions('myItems', ['loadMyItem', 'removeItem', 'showItem', 'generateBarcode']),
onFilterClick() {
this.loadMyItem();
@@ -247,23 +247,20 @@ export default {
},
removeModal(id) {
this.changeCurrentModal({
modal: "modal-delete-delete",
properties: {
success: () => {
this.remove(id);
},
}
});
},
async remove(id) {
const result = await ApiService.delete(urls.removeItem(id));
if (result && result.status == 200) {
for (const key in this.items) {
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
this.items.splice(key, 1);
modal: "modal-user-confirmation",
properties: {width: '30'},
success: async () => {
const result = await ApiService.delete(urls.removeItem(id));
if (result && result.status == 200) {
for (const key in this.items) {
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
this.items.splice(key, 1);
}
}
}
}
}
this.closeModal();
},
});
},
async loadMedicalCenters() {
const result = await ApiService.get(urls.listFilterItemsTestResult);