mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-13 04:03:21 +03:30
fix : update delete confirmation modal and test result style
This commit is contained in:
+15
-18
@@ -192,7 +192,7 @@ export default {
|
||||
this.load();
|
||||
},
|
||||
methods: {
|
||||
...mapMutations("modal", ["changeCurrentModal"]),
|
||||
...mapMutations("modal", ["changeCurrentModal",'closeModal']),
|
||||
async load(page = 1) {
|
||||
let filter = '?';
|
||||
for (const key in this.filter) {
|
||||
@@ -221,25 +221,22 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
removeModal(id) {
|
||||
removeModal(testResultId) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(urls.removePackage(testResultId));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) {
|
||||
this.items.splice(key, 1);
|
||||
modal: "modal-user-confirmation",
|
||||
properties: {width: '30'},
|
||||
success: async () => {
|
||||
const result = await ApiService.delete(urls.removePackage(testResultId));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.closeModal();
|
||||
},
|
||||
});
|
||||
},
|
||||
async generateBarcode(id, type) {
|
||||
const result = await ApiService.post(urls.Barcode(id, type));
|
||||
|
||||
Reference in New Issue
Block a user