diff --git a/src/components/common/VnDms.vue b/src/components/common/VnDms.vue index 5432dea1e..920b7f137 100644 --- a/src/components/common/VnDms.vue +++ b/src/components/common/VnDms.vue @@ -78,6 +78,7 @@ async function save() { const body = mapperDms(dms.value); const response = await axios.post(getUrl(), body[0], body[1]); emit('onDataSaved', body[1].params, response); + return response; } function defaultData() { diff --git a/src/pages/Worker/Card/WorkerLocker.vue b/src/pages/Worker/Card/WorkerLocker.vue index 171074b20..f19fc8ae6 100644 --- a/src/pages/Worker/Card/WorkerLocker.vue +++ b/src/pages/Worker/Card/WorkerLocker.vue @@ -27,7 +27,7 @@ const save = async (data) => { const lockerId = data.id ?? originaLockerId.value; const workerFk = lockerId == originaLockerId.value ? null : entityId.value; - await axios.patch(`Lockers/${lockerId}`, { workerFk }); + return axios.patch(`Lockers/${lockerId}`, { workerFk }); }; const init = async (data) => {