mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-13 11:03:18 +03:30
fix : update delete confirmation modal and test result style
This commit is contained in:
+14
-17
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user