This commit is contained in:
Viet An
2026-05-15 11:18:33 +07:00
parent 869138c003
commit 0ef1d29850
18 changed files with 175 additions and 111 deletions

View File

@@ -24,9 +24,13 @@ function selected(field, data) {
else body.value[field] = data.id;
}
const refreshData = inject("refreshData");
async function createProduct() {
isPending.value = true;
const res = await $insertapi("product", body.value);
if (res !== "error") {
if (refreshData) refreshData();
}
isPending.value = false;
}
</script>