Skip to content

Commit

Permalink
Fix: 🔧
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyCreeper committed Dec 17, 2023
1 parent 7d72444 commit 4b728e5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/views/admin/settings/VendorManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ const dialog = reactive<{
}
},
selections: [],
delete: (e: { info: { backend: { endpoint: string } } }[] | string) => {
delete: async (e: { info: { backend: { endpoint: string } } }[] | string) => {
if (Array.isArray(e)) {
deleteVendor(e.map((item) => item.info.backend.endpoint));
await deleteVendor(e.map((item) => item.info.backend.endpoint));
} else {
deleteVendor([e]);
await deleteVendor([e]);
}
getVendorsList();
await getVendorsList();
},
openDialog: (type: "new" | "edit", data?: Backend) => {
dialog.dialog = type;
Expand All @@ -89,11 +89,11 @@ const dialog = reactive<{
dialog.data.backend.etcd = JSON.parse(JSON.stringify(dialog.defaultData.backend.etcd));
},
submit: async () => {
await formRef.value?.validate((valid, fields) => {
await formRef.value?.validate(async (valid, fields) => {
if (valid) {
dialog.dialog === "new" ? addVendor(dialog.data) : editVendor(dialog.data);
dialog.dialog === "new" ? await addVendor(dialog.data) : await editVendor(dialog.data);
dialog.closeDialog();
getVendorsList(true);
await getVendorsList(true);
}
});
},
Expand Down Expand Up @@ -158,8 +158,8 @@ const statusList = {
}
};
onMounted(() => {
getVendorsList();
onMounted(async () => {
await getVendorsList();
});
</script>

Expand Down

0 comments on commit 4b728e5

Please sign in to comment.