Merge refactor/i18n into develop

This commit is contained in:
Methapon Metanipat 2024-08-26 16:24:08 +07:00
parent 3da5bf9079
commit c681b19e39
99 changed files with 2192 additions and 2987 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, watch, reactive, handleError } from 'vue';
import { ref, watch, reactive } from 'vue';
import { useI18n } from 'vue-i18n';
import { onMounted } from 'vue';
import { getUserId, getRole } from 'src/services/keycloak';
@ -114,14 +114,14 @@ const stat = ref<
{
icon: 'mdi-folder-outline',
count: 0,
label: 'productAndService',
label: 'productService.group.title',
mode: 'group',
color: 'pink',
},
{
icon: 'mdi-folder-table-outline',
count: 0,
label: 'productAndServiceType',
label: 'productService.type.title',
mode: 'type',
color: 'purple',
},
@ -135,7 +135,7 @@ const stat = ref<
{
icon: 'mdi-shopping-outline',
count: 0,
label: 'product',
label: 'productService.product.title',
mode: 'product',
color: 'green',
},
@ -284,31 +284,31 @@ const tbColumn = {
{
name: 'branchLabelNo',
align: 'center',
label: 'orderNumber',
label: 'general.order',
field: 'branchNo',
},
{
name: 'name',
align: 'left',
label: 'name',
label: 'general.name',
field: 'name',
},
{
name: 'detail',
align: 'left',
label: 'detail',
label: 'general.detail',
field: 'detail',
},
{
name: 'formDialogInputRemark',
align: 'left',
label: 'formDialogInputRemark',
label: 'general.remark',
field: 'remark',
},
{
name: 'createdAt',
align: 'left',
label: 'createdAt',
label: 'general.createdAt',
field: 'createdAt',
},
],
@ -317,26 +317,31 @@ const tbColumn = {
{
name: 'branchLabelNo',
align: 'center',
label: 'orderNumber',
label: 'general.order',
field: 'branchNo',
},
{ name: 'productName', align: 'left', label: 'productName', field: 'name' },
{
name: 'productName',
align: 'left',
label: 'general.name',
field: 'name',
},
{
name: 'productDetail',
align: 'left',
label: 'productDetail',
label: 'general.detail',
field: 'detail',
},
{
name: 'productProcessingTime',
align: 'left',
label: 'productProcessingTime',
label: 'productService.product.processingTimeDay',
field: 'process',
},
{
name: 'priceInformation',
align: 'center',
label: 'priceInformation',
label: 'productService.product.priceInformation',
field: 'name',
},
],
@ -344,26 +349,31 @@ const tbColumn = {
{
name: 'branchLabelNo',
align: 'center',
label: 'orderNumber',
label: 'general.order',
field: 'branchNo',
},
{ name: 'serviceName', align: 'left', label: 'serviceName', field: 'name' },
{
name: 'serviceName',
align: 'left',
label: 'general.name',
field: 'name',
},
{
name: 'serviceDetail',
align: 'left',
label: 'serviceDetail',
label: 'general.detail',
field: 'detail',
},
{
name: 'serviceWorkTotal',
align: 'left',
label: 'serviceWorkTotal',
label: 'productService.service.totalWork',
field: (v) => v.work.length,
},
{
name: 'createdAt',
align: 'left',
label: 'createdAt',
label: 'general.createdAt',
field: 'createdAt',
},
],
@ -376,11 +386,11 @@ const tbColumn = {
const tbControl = reactive({
groupAndType: {
fieldDisplay: [
{ value: 'branchLabelNo', label: 'orderNumber' },
{ value: 'name', label: 'name' },
{ value: 'detail', label: 'detail' },
{ value: 'formDialogInputRemark', label: 'formDialogInputRemark' },
{ value: 'createdAt', label: 'createdAt' },
{ value: 'branchLabelNo', label: 'general.order' },
{ value: 'name', label: 'general.name' },
{ value: 'detail', label: 'general.detail' },
{ value: 'formDialogInputRemark', label: 'general.remark' },
{ value: 'createdAt', label: 'general.createdAt' },
],
fieldSelected: [
'branchLabelNo',
@ -392,11 +402,17 @@ const tbControl = reactive({
},
product: {
fieldDisplay: [
{ value: 'branchLabelNo', label: 'orderNumber' },
{ value: 'productName', label: 'productName' },
{ value: 'productDetail', label: 'productDetail' },
{ value: 'productProcessingTime', label: 'productProcessingTime' },
{ value: 'priceInformation', label: 'priceInformation' },
{ value: 'branchLabelNo', label: 'general.order' },
{ value: 'productName', label: 'general.name' },
{ value: 'productDetail', label: 'general.detail' },
{
value: 'productProcessingTime',
label: 'productService.product.processingTimeDay',
},
{
value: 'priceInformation',
label: 'productService.product.priceInformation',
},
],
fieldSelected: [
'branchLabelNo',
@ -408,11 +424,11 @@ const tbControl = reactive({
},
service: {
fieldDisplay: [
{ value: 'branchLabelNo', label: 'orderNumber' },
{ value: 'serviceName', label: 'serviceName' },
{ value: 'serviceDetail', label: 'serviceDetail' },
{ value: 'serviceWorkTotal', label: 'serviceWorkTotal' },
{ value: 'createdAt', label: 'createdAt' },
{ value: 'branchLabelNo', label: 'general.order' },
{ value: 'serviceName', label: 'general.name' },
{ value: 'serviceDetail', label: 'general.detail' },
{ value: 'serviceWorkTotal', label: 'productService.service.totalWork' },
{ value: 'createdAt', label: 'general.createdAt' },
],
fieldSelected: [
'branchLabelNo',
@ -726,13 +742,13 @@ async function triggerChangeStatus(
color: status !== 'INACTIVE' ? 'warning' : 'info',
icon:
status !== 'INACTIVE' ? 'mdi-alert' : 'mdi-message-processing-outline',
title: t('confirmChangeStatusTitle'),
title: t('dialog.title.confirmChangeStatus'),
actionText:
status !== 'INACTIVE' ? t('switchOffLabel') : t('switchOnLabel'),
status !== 'INACTIVE' ? t('general.close') : t('general.open'),
message:
status !== 'INACTIVE'
? t('confirmChangeStatusOffMessage')
: t('confirmChangeStatusOnMessage'),
? t('dialog.message.confirmChangeStatusOff')
: t('dialog.message.confirmChangeStatusOn'),
action: async () => {
if (type === 'group' || productMode.value === 'group') {
const res = await toggleStatusGroup(id, status as Status)
@ -763,10 +779,10 @@ async function deleteServiceConfirm(serviceId?: string) {
dialog({
color: 'negative',
icon: 'mdi-alert',
title: t('deleteConfirmTitle'),
actionText: t('ok'),
title: t('dialog.title.confirmDelete'),
actionText: t('general.delete'),
persistent: true,
message: t('deleteConfirmMessage'),
message: t('dialog.message.confirmDelete'),
action: async () => {
const res = await deleteService(serviceId ?? currentIdService.value);
@ -790,10 +806,10 @@ async function deleteProductConfirm(id?: string) {
dialog({
color: 'negative',
icon: 'mdi-alert',
title: t('deleteConfirmTitle'),
actionText: t('ok'),
title: t('dialog.title.confirmDelete'),
actionText: t('general.delete'),
persistent: true,
message: t('deleteConfirmMessage'),
message: t('dialog.message.confirmDelete'),
action: async () => {
const res = await deleteProduct(id ?? currentIdProduct.value);
@ -823,10 +839,10 @@ async function deleteProductById(productId?: string) {
dialog({
color: 'negative',
icon: 'mdi-alert',
title: t('deleteConfirmTitle'),
actionText: t('ok'),
title: t('dialog.title.confirmDelete'),
actionText: t('general.delete'),
persistent: true,
message: t('deleteConfirmMessage'),
message: t('dialog.message.confirmDelete'),
action: async () => {
if (editByTree.value !== undefined) {
if (editByTree.value === 'type') {
@ -1180,9 +1196,9 @@ function confirmDeleteWork(id: string) {
dialog({
color: 'negative',
icon: 'mdi-alert',
title: t('deleteConfirmTitle'),
actionText: t('delete'),
message: t('deleteConfirmMessage'),
title: t('dialog.title.confirmDelete'),
actionText: t('general.delete'),
message: t('dialog.message.confirmDelete'),
action: async () => {
deleteWork(id);
flowStore.rotate();
@ -1329,19 +1345,20 @@ function handleStatus() {
return tempValue;
}
// function handleHold(node: ProductGroup & { type: string}) {
// if ($q.screen.gt.xs) return;
// return function (props: unknown) {
// holdDialog.value = true;
// currentNode.value = node;
// };
// }
function handleHold(node: ProductGroup & { type: string }) {
if ($q.screen.gt.xs) return;
console.log('asd');
holdDialog.value = true;
currentNode.value = node;
// return function (props: unknown) {
// };
}
onMounted(async () => {
utilsStore.currentTitle.title = 'mainProductTitle';
utilsStore.currentTitle.title = 'productService.title';
utilsStore.currentTitle.path = [
{
text: 'manage',
text: 'productService.caption',
i18n: true,
handler: () => {
expandedTree.value = [];
@ -1366,7 +1383,7 @@ watch(
let tmp: typeof utilsStore.currentTitle.path = [
{
text: 'manage',
text: 'productService.caption',
i18n: true,
handler: () => {
productMode.value = 'group';
@ -1385,7 +1402,7 @@ watch(
productMode.value === 'service'
) {
tmp.push({
text: 'productGroup',
text: 'productService.group.withName',
i18n: true,
argsi18n: { name: pathGroupName.value },
handler: () => {
@ -1404,13 +1421,15 @@ watch(
},
});
if (expandedTree.value.length === 0) {
utilsStore.currentTitle.path = [{ text: 'manage', i18n: true }];
utilsStore.currentTitle.path = [
{ text: 'productService.caption', i18n: true },
];
return;
}
}
if (productMode.value === 'service') {
tmp.push({
text: 'productType',
text: 'productService.type.withName',
i18n: true,
argsi18n: { name: pathTypeName.value },
});
@ -1469,7 +1488,7 @@ watch([currentStatusList, productMode], () => {
style="color: white; background-color: hsla(var(--pink-6-hsl))"
padding="xs"
icon="mdi-folder-multiple-plus-outline"
:label="$t('productAndService')"
:label="$t('productService.group.addTitle')"
external-label
label-position="left"
@click="
@ -1482,7 +1501,7 @@ watch([currentStatusList, productMode], () => {
<q-fab-action
v-if="productMode === 'type'"
id="btn-add-product-type"
:label="$t('productAndServiceType')"
:label="$t('productService.type.addTitle')"
external-label
label-position="left"
style="color: white; background-color: hsla(var(--purple-11-hsl))"
@ -1497,7 +1516,7 @@ watch([currentStatusList, productMode], () => {
></q-fab-action>
<q-fab-action
v-if="productMode === 'service'"
:label="$t('buttonAddProduct')"
:label="$t('productService.product.addTitle')"
external-label
label-position="left"
style="color: white; background-color: hsla(var(--green-11-hsl))"
@ -1514,7 +1533,7 @@ watch([currentStatusList, productMode], () => {
></q-fab-action>
<q-fab-action
v-if="productMode === 'service'"
:label="$t('addService')"
:label="$t('productService.service.addTitle')"
external-label
label-position="left"
style="color: white; background-color: hsla(var(--orange-6-hsl))"
@ -1535,7 +1554,7 @@ watch([currentStatusList, productMode], () => {
<div class="full-height column no-wrap">
<div class="text-body-2 q-mb-xs flex items-center">
{{ $t('dataSum') }}
{{ $t('general.dataSum') }}
<q-btn
class="q-ml-xs"
icon="mdi-pin-outline"
@ -1580,7 +1599,9 @@ watch([currentStatusList, productMode], () => {
class="row no-wrap full-width bordered-b text-weight-bold surface-3 items-center q-px-md q-py-sm"
:style="`min-height: ${$q.screen.gt.sm ? '57px' : '100.8px'}`"
>
<div class="col ellipsis-2-lines">ดการสาขาทงหมด</div>
<div class="col ellipsis-2-lines">
{{ $t('productService.caption') }}
</div>
</div>
<div class="col full-width scroll">
@ -1712,6 +1733,7 @@ watch([currentStatusList, productMode], () => {
}
}
"
@handle-hold="handleHold"
/>
</div>
</div>
@ -1735,7 +1757,7 @@ watch([currentStatusList, productMode], () => {
outlined
:class="{ 'col-12': $q.screen.lt.md }"
dense
:label="$t('search')"
:label="$t('general.search')"
class=""
:bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearch"
@ -1765,10 +1787,10 @@ watch([currentStatusList, productMode], () => {
emit-value
:hide-dropdown-icon="$q.screen.lt.sm"
:options="[
{ label: $t('all'), value: 'All' },
{ label: $t('statusACTIVE'), value: 'ACTIVE' },
{ label: $t('general.all'), value: 'All' },
{ label: $t('general.active'), value: 'ACTIVE' },
{
label: $t('statusINACTIVE'),
label: $t('general.inactive'),
value: 'INACTIVE',
},
]"
@ -1786,7 +1808,7 @@ watch([currentStatusList, productMode], () => {
}))
"
:hide-dropdown-icon="$q.screen.lt.sm"
:display-value="$t('displayField')"
:display-value="$t('general.displayField')"
v-model="tbControl.groupAndType.fieldSelected"
class="col q-ml-sm"
option-label="label"
@ -2105,7 +2127,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--green-6-hsl))"
/>
<span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }}
{{ $t('general.viewDetail') }}
</span>
</q-item>
@ -2149,7 +2171,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--cyan-6-hsl))"
/>
<span class="col-9 q-px-md flex items-center">
{{ $t('edit') }}
{{ $t('general.edit') }}
</span>
</q-item>
@ -2191,7 +2213,7 @@ watch([currentStatusList, productMode], () => {
}"
/>
<span class="col-9 q-px-md flex items-center">
{{ $t('delete') }}
{{ $t('general.delete') }}
</span>
</q-item>
@ -2218,8 +2240,8 @@ watch([currentStatusList, productMode], () => {
<span class="q-pl-md">
{{
props.row.status !== 'INACTIVE'
? $t('switchOnLabel')
: $t('switchOffLabel')
? $t('general.open')
: $t('general.close')
}}
</span>
</div>
@ -2344,11 +2366,10 @@ watch([currentStatusList, productMode], () => {
<div class="col-4">
<div class="row items-center">
<div
class="app-text-muted"
style="width: 80px"
class="app-text-muted q-mr-sm"
v-if="$q.screen.gt.sm"
>
{{ $t('showing') }}
{{ $t('general.recordPerPage') }}
</div>
<div>
<q-btn-dropdown
@ -2382,7 +2403,7 @@ watch([currentStatusList, productMode], () => {
<div class="col-4 row justify-center app-text-muted">
{{
$t('recordsPage', {
$t('general.recordsPage', {
resultcurrentPage: productGroup?.length,
total: totalGroup,
})
@ -2410,11 +2431,10 @@ watch([currentStatusList, productMode], () => {
<div class="col-4">
<div class="row items-center">
<div
class="app-text-muted"
style="width: 80px"
class="app-text-muted q-mr-sm"
v-if="$q.screen.gt.sm"
>
{{ $t('showing') }}
{{ $t('general.recordPerPage') }}
</div>
<div>
<q-btn-dropdown
@ -2448,7 +2468,7 @@ watch([currentStatusList, productMode], () => {
<div class="col-4 row justify-center app-text-muted">
{{
$t('recordsPage', {
$t('general.recordsPage', {
resultcurrentPage: productType?.length,
total: totalType,
})
@ -2485,7 +2505,7 @@ watch([currentStatusList, productMode], () => {
outlined
dense
unelavated
:label="$t('search')"
:label="$t('general.search')"
:bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearchProductAndService"
debounce="250"
@ -2514,10 +2534,10 @@ watch([currentStatusList, productMode], () => {
map-options
emit-value
:options="[
{ label: $t('all'), value: 'All' },
{ label: $t('statusACTIVE'), value: 'ACTIVE' },
{ label: $t('general.all'), value: 'All' },
{ label: $t('general.active'), value: 'ACTIVE' },
{
label: $t('statusINACTIVE'),
label: $t('general.inactive'),
value: 'INACTIVE',
},
]"
@ -2540,7 +2560,7 @@ watch([currentStatusList, productMode], () => {
value: x.value,
}))
"
:display-value="$t('displayField')"
:display-value="$t('general.displayField')"
:model-value="
{
product: tbControl.product.fieldSelected,
@ -2618,6 +2638,7 @@ watch([currentStatusList, productMode], () => {
<q-tab
id="tab-service"
name="service"
class="text-capitalize"
@click="
async () => {
currentPageServiceAndProduct = 1;
@ -2642,6 +2663,7 @@ watch([currentStatusList, productMode], () => {
<q-tab
id="tab-product"
name="product"
class="text-capitalize"
@click="
async () => {
currentPageServiceAndProduct = 1;
@ -2660,7 +2682,7 @@ watch([currentStatusList, productMode], () => {
: 'app-text-muted'
"
>
{{ $t('product') }}
{{ $t('productService.product.title') }}
</div>
</q-tab>
</q-tabs>
@ -2889,7 +2911,7 @@ watch([currentStatusList, productMode], () => {
v-if="priceDisplay.price"
>
<div class="col app-text-muted-2 text-caption">
{{ $t('salePrice') }}
{{ $t('productService.product.salePrice') }}
</div>
<div class="col text-weight-bold">
฿{{
@ -2906,7 +2928,7 @@ watch([currentStatusList, productMode], () => {
v-if="priceDisplay.agentPrice"
>
<div class="col app-text-muted-2 text-caption">
{{ $t('agentPrice') }}
{{ $t('productService.product.agentPrice') }}
</div>
<div class="col text-weight-bold">
฿{{
@ -2926,7 +2948,9 @@ watch([currentStatusList, productMode], () => {
v-if="priceDisplay.serviceCharge"
>
<div class="col app-text-muted-2 text-caption">
{{ $t('processingPrice') }}
{{
$t('productService.product.processingPrice')
}}
</div>
<div class="col">
฿{{
@ -3021,7 +3045,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--green-6-hsl))"
/>
<span class="col-9 q-px-md flex items-center">
{{ $t('viewDetail') }}
{{ $t('general.viewDetail') }}
</span>
</q-item>
@ -3059,7 +3083,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--cyan-6-hsl))"
/>
<span class="col-9 q-px-md flex items-center">
{{ $t('edit') }}
{{ $t('general.edit') }}
</span>
</q-item>
<q-item
@ -3095,7 +3119,7 @@ watch([currentStatusList, productMode], () => {
}"
/>
<span class="col-9 q-px-md flex items-center">
{{ $t('delete') }}
{{ $t('general.delete') }}
</span>
</q-item>
@ -3124,8 +3148,8 @@ watch([currentStatusList, productMode], () => {
<span class="q-pl-md">
{{
props.row.status !== 'INACTIVE'
? $t('switchOnLabel')
: $t('switchOffLabel')
? $t('general.open')
: $t('general.close')
}}
</span>
</div>
@ -3197,12 +3221,8 @@ watch([currentStatusList, productMode], () => {
>
<div class="col-4">
<div class="row items-center">
<div
class="app-text-muted"
style="width: 80px"
v-if="$q.screen.gt.sm"
>
{{ $t('showing') }}
<div class="app-text-muted q-mr-sm" v-if="$q.screen.gt.sm">
{{ $t('general.recordPerPage') }}
</div>
<div>
<q-btn-dropdown
@ -3242,7 +3262,7 @@ watch([currentStatusList, productMode], () => {
<div class="col-4 row justify-center app-text-muted">
{{
$t('recordsPage', {
$t('general.recordsPage', {
resultcurrentPage:
productAndServiceTab === 'product'
? product?.length
@ -3288,7 +3308,7 @@ watch([currentStatusList, productMode], () => {
hideActive
useToggle
:img="`/images/product-service-${productMode}-avatar-add${productMode === 'type' ? ($q.dark.isActive ? '-d' : '-l') : ''}.png`"
:toggleTitle="$t('formDialogTitleUseStatus')"
:toggleTitle="$t('status.title')"
:icon="
productMode === 'group'
? 'mdi-folder-plus-outline'
@ -3340,7 +3360,7 @@ watch([currentStatusList, productMode], () => {
<SideMenu
:menu="[
{
name: $t('formDialogTitleInformation'),
name: $t('form.field.basicInformation'),
anchor: 'form-group',
},
]"
@ -3377,12 +3397,12 @@ watch([currentStatusList, productMode], () => {
:title="
$t(
editByTree === 'group'
? 'productGroup'
? 'productService.group.withName'
: editByTree === 'type'
? 'productType'
? 'productService.type.withName'
: productMode === 'group'
? 'productGroup'
: 'productType',
? 'productService.group.withName'
: 'productService.type.withName',
{
name: formDataGroup.code,
},
@ -3448,7 +3468,7 @@ watch([currentStatusList, productMode], () => {
}-hsl)/0.1)`"
:title="formDataGroup.name"
:caption="formDataGroup.code"
:toggleTitle="$t('formDialogTitleUserStatus')"
:toggleTitle="$t('status.title')"
:menu="[
{
icon: 'mdi-office-building-outline',
@ -3507,12 +3527,13 @@ watch([currentStatusList, productMode], () => {
</div>
</div>
<div
v-if="$q.screen.gt.sm"
class="col full-height rounded scroll row q-py-md q-pl-md q-pr-sm"
>
<SideMenu
:menu="[
{
name: $t('formDialogTitleInformation'),
name: $t('form.field.basicInformation'),
anchor: 'info-group',
},
]"
@ -3548,6 +3569,7 @@ watch([currentStatusList, productMode], () => {
<!-- work product, product work -->
<DialogForm
v-model:modal="dialogTotalProduct"
:submitLabel="$t('general.select')"
noAddress
noAppBox
:title="$t('productService.product.allProduct')"
@ -3596,7 +3618,7 @@ watch([currentStatusList, productMode], () => {
v-if="productIsAdd?.length !== 0"
>
<q-checkbox
:label="$t('selectAll')"
:label="$t('general.selectAll')"
:model-value="
!!inputSearchProductAndService
? selectProduct.length ===
@ -3646,9 +3668,8 @@ watch([currentStatusList, productMode], () => {
lazy-rules="ondemand"
id="input-search-add-product"
outlined
style="width: 250px"
dense
:label="$t('search')"
:label="$t('general.search')"
:bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearchProductAndService"
debounce="500"
@ -3673,7 +3694,7 @@ watch([currentStatusList, productMode], () => {
"
/>
</div>
<div v-else class="row q-col-gutter-md">
<div v-else class="row q-col-gutter-md full-width">
<div
class="col-md-3 col-sm-6 col-12"
v-for="i in (!!inputSearchProductAndService
@ -3739,7 +3760,7 @@ watch([currentStatusList, productMode], () => {
<!-- Add Product -->
<DialogForm
v-model:modal="dialogProduct"
:title="$t('buttonAddProduct')"
:title="$t('productService.product.addTitle')"
:submit="
() => {
submitProduct();
@ -3757,7 +3778,7 @@ watch([currentStatusList, productMode], () => {
hideFade
useToggle
hideActive
:toggleTitle="$t('formDialogTitleUseStatus')"
:toggleTitle="$t('status.title')"
:img="profileUrl || '/images/product-avatar-add.png'"
fallbackCover="/images/product-banner.png"
:bgColor="`hsla(var(--teal-${$q.dark.isActive ? '8' : '10'}-hsl)/0.15)`"
@ -3777,12 +3798,27 @@ watch([currentStatusList, productMode], () => {
formDataProduct.status === 'CREATED' ? 'INACTIVE' : 'CREATED';
}
"
:tabsList="
$q.screen.gt.sm
? []
: [
{
name: 1,
label: $t(`form.field.basicInformation`),
},
{
name: 2,
label: $t('productService.product.priceInformation'),
},
]
"
v-model:currentTab="productTab"
/>
</div>
<div
class="col surface-1 q-ma-lg rounded bordered scroll row relative-position"
id="group-form"
id="product-form"
>
<div
class="col"
@ -3804,8 +3840,8 @@ watch([currentStatusList, productMode], () => {
<span class="full-width q-py-sm" style="padding-inline: 20px">
{{
v === 1
? $t('formDialogTitleInformation')
: $t('priceInformation')
? $t('form.field.basicInformation')
: $t('productService.product.priceInformation')
}}
</span>
</q-item>
@ -3844,7 +3880,7 @@ watch([currentStatusList, productMode], () => {
<DialogForm
v-model:modal="dialogProductEdit"
noAddress
:title="$t('editProduct')"
:title="$t('productService.product.title')"
:editData="() => (infoProductEdit = true)"
:undo="
() => {
@ -3875,7 +3911,7 @@ watch([currentStatusList, productMode], () => {
fallbackImg="/images/product-avatar.png"
color="var(--teal-10)"
:readonly="!infoProductEdit"
:toggleTitle="$t('formDialogTitleUseStatus')"
:toggleTitle="$t('status.title')"
:img="profileUrl || '/images/product-avatar.png'"
fallbackCover="/images/product-banner.png"
:bgColor="`hsla(var(--teal-${$q.dark.isActive ? '8' : '10'}-hsl)/0.15)`"
@ -3899,6 +3935,21 @@ watch([currentStatusList, productMode], () => {
);
}
"
:tabsList="
$q.screen.gt.sm
? []
: [
{
name: 1,
label: $t(`form.field.basicInformation`),
},
{
name: 2,
label: $t('productService.product.priceInformation'),
},
]
"
v-model:currentTab="productTab"
/>
</div>
@ -3964,8 +4015,8 @@ watch([currentStatusList, productMode], () => {
<span class="full-width q-py-sm" style="padding-inline: 20px">
{{
v === 1
? $t('formDialogTitleInformation')
: $t('priceInformation')
? $t('form.field.basicInformation')
: $t('productService.product.priceInformation')
}}
</span>
</q-item>
@ -4008,7 +4059,7 @@ watch([currentStatusList, productMode], () => {
no-address
no-app-box
height="95vh"
:title="$t('addService')"
:title="$t('productService.service.addTitle')"
v-model:modal="dialogService"
:submit="
() => {
@ -4028,7 +4079,7 @@ watch([currentStatusList, productMode], () => {
hideFade
useToggle
hideActive
:toggleTitle="$t('formDialogTitleUseStatus')"
:toggleTitle="$t('status.title')"
:img="profileUrl || '/images/service-avatar-add.png'"
fallbackCover="/images/service-banner.png"
:bgColor="`hsla(var(--orange-${$q.dark.isActive ? '6' : '5'}-hsl)/0.15)`"
@ -4055,12 +4106,27 @@ watch([currentStatusList, productMode], () => {
: 'CREATED';
}
"
:tabsList="
$q.screen.gt.sm
? []
: [
{
name: 1,
label: $t('productService.service.information'),
},
{
name: 2,
label: $t('productService.service.workInformation'),
},
]
"
v-model:currentTab="serviceTab"
/>
</div>
<div
class="col surface-1 q-mx-lg q-mt-lg q-mb-md rounded bordered scroll row relative-position"
id="group-form"
id="service-form"
>
<div
class="col"
@ -4080,7 +4146,11 @@ watch([currentStatusList, productMode], () => {
@click="serviceTab = v"
>
<span class="full-width q-py-sm" style="padding-inline: 20px">
{{ v === 1 ? $t('serviceInformation') : $t('workInformation') }}
{{
v === 1
? $t('productService.service.information')
: $t('productService.service.workInformation')
}}
</span>
</q-item>
</div>
@ -4155,7 +4225,7 @@ watch([currentStatusList, productMode], () => {
no-app-box
height="75vh"
width="75%"
:title="$t('properties')"
:title="$t('productService.service.properties')"
v-model:modal="propertiesDialog"
:submit="
() => {
@ -4175,7 +4245,7 @@ watch([currentStatusList, productMode], () => {
}
"
>
<div class="q-pa-lg full-height">
<div class="q-pa-lg full-width full-height">
<ServiceProperties
v-model:properties-option="propertiesOption"
v-model:form-service-properties="tempValueProperties"
@ -4189,7 +4259,7 @@ watch([currentStatusList, productMode], () => {
height="65vh"
width="65%"
v-model:modal="manageWorkNameDialog"
:title="$t('manage')"
:title="$t('general.manage')"
:close="triggerConfirmCloseWork"
>
<div class="q-pa-lg full-height">
@ -4246,7 +4316,7 @@ watch([currentStatusList, productMode], () => {
:caption="formDataProductService.code"
:active="formDataProductService.status !== 'INACTIVE'"
:readonly="!infoServiceEdit"
:toggleTitle="$t('formDialogTitleUseStatus')"
:toggleTitle="$t('status.title')"
:img="profileUrl || '/images/service-avatar.png'"
fallbackCover="/images/service-banner.png"
:bgColor="`hsla(var(--orange-${$q.dark.isActive ? '6' : '5'}-hsl)/0.15)`"
@ -4275,6 +4345,21 @@ watch([currentStatusList, productMode], () => {
);
}
"
:tabsList="
$q.screen.gt.sm
? []
: [
{
name: 1,
label: $t('productService.service.information'),
},
{
name: 2,
label: $t('productService.service.workInformation'),
},
]
"
v-model:currentTab="serviceTab"
/>
</div>
@ -4340,7 +4425,11 @@ watch([currentStatusList, productMode], () => {
@click="serviceTab = v"
>
<span class="full-width q-py-sm" style="padding-inline: 20px">
{{ v === 1 ? $t('serviceInformation') : $t('workInformation') }}
{{
v === 1
? $t('productService.service.information')
: $t('productService.service.workInformation')
}}
</span>
</q-item>
</div>
@ -4464,7 +4553,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--green-6-hsl))"
/>
</q-item-section>
<q-item-section>{{ $t('viewDetail') }}</q-item-section>
<q-item-section>{{ $t('general.viewDetail') }}</q-item-section>
</q-item>
<q-item
@ -4499,7 +4588,7 @@ watch([currentStatusList, productMode], () => {
style="color: hsl(var(--cyan-6-hsl))"
/>
</q-item-section>
<q-item-section>{{ $t('edit') }}</q-item-section>
<q-item-section>{{ $t('general.edit') }}</q-item-section>
</q-item>
<q-item
@ -4523,7 +4612,7 @@ watch([currentStatusList, productMode], () => {
<q-item-section avatar>
<q-icon name="mdi-trash-can-outline" class="app-text-negative" />
</q-item-section>
<q-item-section>{{ $t('delete') }}</q-item-section>
<q-item-section>{{ $t('general.delete') }}</q-item-section>
</q-item>
<q-item clickable v-ripple>
@ -4562,8 +4651,8 @@ watch([currentStatusList, productMode], () => {
<q-item-section>
{{
currentNode.status !== 'INACTIVE'
? $t('switchOnLabel')
: $t('switchOffLabel')
? $t('general.open')
: $t('general.close')
}}
</q-item-section>
</q-item>