fix: create service and edit product image

This commit is contained in:
puriphatt 2024-07-03 10:08:51 +00:00
parent 18c32e3b34
commit 3792c19ce4
3 changed files with 7 additions and 2 deletions

View file

@ -99,6 +99,7 @@ const stat = ref<
]);
const { t } = useI18n();
const baseUrl = ref<string>(import.meta.env.VITE_API_BASE_URL);
const inputSearch = ref('');
const inputSearchProductAndService = ref('');
@ -695,6 +696,9 @@ const prevProduct = ref<ProductCreate>({
function assignFormDataProduct(data: ProductList) {
statusToggle.value = data.status === 'INACTIVE' ? false : true;
console.log(data);
profileUrl.value = `${baseUrl.value}/product/${data?.id}/image`;
profileSubmit.value = true;
prevProduct.value = {
productTypeId: data.productTypeId,
@ -783,6 +787,7 @@ async function submitService() {
formDataProductService.value.productTypeId = currentIdType.value;
if (dialogService.value) {
formDataProductService.value.productTypeId = currentIdType.value;
await createService(formDataProductService.value);
totalService.value = totalService.value + 1;
}