Revert "Handle onsubmit"
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This reverts commit 7c5b61cca8
.
This commit is contained in:
parent
7c5b61cca8
commit
6e49982531
|
@ -21,17 +21,14 @@ const closeButton = ref(null);
|
||||||
|
|
||||||
const warehousesOptions = ref([]);
|
const warehousesOptions = ref([]);
|
||||||
|
|
||||||
const onSubmit = async () => await createZoneWarehouse();
|
|
||||||
|
|
||||||
const createZoneWarehouse = () => {
|
const createZoneWarehouse = () => {
|
||||||
try {
|
try {
|
||||||
axios.post(`Zones/${route.params.id}/warehouses`, ZoneWarehouseFormData);
|
axios.post(`Zones/${route.params.id}/warehouses`, ZoneWarehouseFormData);
|
||||||
emit('onSubmit');
|
emit('onSubmit');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} finally {
|
|
||||||
closeForm();
|
|
||||||
}
|
}
|
||||||
|
closeForm();
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeForm = () => {
|
const closeForm = () => {
|
||||||
|
@ -46,7 +43,7 @@ const closeForm = () => {
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="(data) => (warehousesOptions = data)"
|
@on-fetch="(data) => (warehousesOptions = data)"
|
||||||
/>
|
/>
|
||||||
<FormPopup model="ZoneWarehouse" @on-submit="onSubmit">
|
<FormPopup model="ZoneWarehouse" @on-submit="createZoneWarehouse()">
|
||||||
<template #form-inputs>
|
<template #form-inputs>
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
Loading…
Reference in New Issue