fix(04): product work layout & i18n

This commit is contained in:
puriphatt 2024-08-19 10:37:05 +07:00
parent 43b23cabae
commit 8137526500
4 changed files with 23 additions and 8 deletions

View file

@ -50,8 +50,11 @@ withDefaults(
@click="$emit('select', data)" @click="$emit('select', data)"
> >
<div class="row flex justify-between text-bold"> <div class="row flex justify-between text-bold">
<div class="col ellipsis-2-lines" :class="{ inactive: isDisabled }"> <div class="col ellipsis" :class="{ inactive: isDisabled }">
{{ title ?? 'title' }} {{ title ?? 'title' }}
<q-tooltip anchor="bottom start" self="top left" :delay="300">
{{ title ?? 'title' }}
</q-tooltip>
</div> </div>
<div <div
v-if="isSelected === false" v-if="isSelected === false"

View file

@ -170,6 +170,9 @@ export default {
title: 'Service', title: 'Service',
showTotalPrice: 'Show Total Price', showTotalPrice: 'Show Total Price',
}, },
product: {
allProduct: 'All Product',
},
}, },
backend: { backend: {

View file

@ -174,6 +174,9 @@ export default {
title: 'บริการ', title: 'บริการ',
showTotalPrice: 'แสดงราคารวม', showTotalPrice: 'แสดงราคารวม',
}, },
product: {
allProduct: 'สินค้าทั้งหมด',
},
}, },
backend: { backend: {

View file

@ -2450,6 +2450,7 @@ watch(
@viewCard=" @viewCard="
() => { () => {
if (productMode === 'type') { if (productMode === 'type') {
editByTree = 'type';
currentStatusProduct = currentStatusProduct =
props.row.status === 'INACTIVE'; props.row.status === 'INACTIVE';
clearFormGroup(); clearFormGroup();
@ -2459,6 +2460,7 @@ watch(
drawerInfo = true; drawerInfo = true;
} }
if (productMode === 'group') { if (productMode === 'group') {
editByTree = 'group';
currentStatusProduct = currentStatusProduct =
props.row.status === 'INACTIVE'; props.row.status === 'INACTIVE';
clearFormGroup(); clearFormGroup();
@ -2992,7 +2994,11 @@ watch(
<div class="col"> <div class="col">
<div class="col ellipsis" style="max-width: 20vw"> <div class="col ellipsis" style="max-width: 20vw">
{{ props.row.name }} {{ props.row.name }}
<q-tooltip> <q-tooltip
anchor="bottom left"
self="center left"
:delay="300"
>
{{ props.row.name }} {{ props.row.name }}
</q-tooltip> </q-tooltip>
</div> </div>
@ -3689,12 +3695,12 @@ watch(
</template> </template>
</DialogForm> </DialogForm>
<!-- work product --> <!-- work product, product work -->
<DialogForm <DialogForm
v-model:modal="dialogTotalProduct" v-model:modal="dialogTotalProduct"
noAddress noAddress
noAppBox noAppBox
title="สินค้าทั้งหมด" :title="$t('productService.product.allProduct')"
:saveAmount="selectProduct.length" :saveAmount="selectProduct.length"
:submit=" :submit="
() => { () => {
@ -3727,8 +3733,8 @@ watch(
} }
" "
> >
<div class="q-pa-lg full-height scroll column no-wrap"> <div class="full-width q-pa-lg">
<div class="row items-center justify-between"> <div class="row items-center justify-between q-mb-md">
<q-checkbox <q-checkbox
:label="$t('selectAll')" :label="$t('selectAll')"
:model-value=" :model-value="
@ -3794,9 +3800,9 @@ watch(
class="flex col justify-center items-center" class="flex col justify-center items-center"
v-if="resultSearchProduct?.length === 0" v-if="resultSearchProduct?.length === 0"
> >
<NoData /> <NoData notFound />
</div> </div>
<div v-else class="row q-mt-md q-col-gutter-md"> <div v-else class="row q-col-gutter-md">
<div <div
class="col-md-3 col-sm-6 col-12" class="col-md-3 col-sm-6 col-12"
v-for="i in (!!inputSearchProductAndService v-for="i in (!!inputSearchProductAndService