changes
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user