fix: Product แก้สถานะ
This commit is contained in:
parent
3fca025af8
commit
39ba6b7c3b
2 changed files with 11 additions and 3 deletions
|
|
@ -15,6 +15,7 @@ defineProps<{
|
||||||
price?: number;
|
price?: number;
|
||||||
process?: number;
|
process?: number;
|
||||||
id?: string;
|
id?: string;
|
||||||
|
status?: boolean;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -24,7 +25,7 @@ defineProps<{
|
||||||
bordered
|
bordered
|
||||||
style="box-shadow: var(--shadow-3); width: 240px; height: 286px"
|
style="box-shadow: var(--shadow-3); width: 240px; height: 286px"
|
||||||
>
|
>
|
||||||
<div class="q-pa-sm">
|
<div class="q-pa-sm" :class="{ inactive: status }">
|
||||||
<div class="row flex justify-between text-bold">
|
<div class="row flex justify-between text-bold">
|
||||||
<div class="col-9">{{ title ?? 'title' }}</div>
|
<div class="col-9">{{ title ?? 'title' }}</div>
|
||||||
<div class="col-3 relative-position" style="left: 10px; bottom: 10px">
|
<div class="col-3 relative-position" style="left: 10px; bottom: 10px">
|
||||||
|
|
@ -168,4 +169,8 @@ defineProps<{
|
||||||
</AppBox>
|
</AppBox>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
.inactive {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,10 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function editProduct(productId: string, data: ProductCreate) {
|
async function editProduct(
|
||||||
|
productId: string,
|
||||||
|
data: ProductCreate & { status: string },
|
||||||
|
) {
|
||||||
const { image, code, ...payload } = data;
|
const { image, code, ...payload } = data;
|
||||||
|
|
||||||
const res = await api.put<ProductCreate & { imageUploadUrl: string }>(
|
const res = await api.put<ProductCreate & { imageUploadUrl: string }>(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue