fix: work component & work dialog

This commit is contained in:
puriphatt 2024-06-25 11:04:34 +00:00
parent 6222db1973
commit bdcda30890
3 changed files with 12 additions and 11 deletions

View file

@ -50,7 +50,7 @@ function confirmDelete(items: unknown[], index: number) {
<template> <template>
<div class="column col-12 full-height"> <div class="column col-12 full-height">
<div class="app-text-muted row items-start"> <div class="app-text-muted row items-start q-mb-md">
{{ $t(`workInformation`) }} {{ $t(`workInformation`) }}
<q-btn <q-btn
v-if="!readonly" v-if="!readonly"
@ -65,8 +65,9 @@ function confirmDelete(items: unknown[], index: number) {
/> />
</div> </div>
<div v-if="workItems.length > 0" class="col q-gutter-y-md"> <div v-if="workItems.length > 0" class="col q-gutter-y-md row">
<WorkManagementComponent <WorkManagementComponent
class="col-12"
v-for="(work, index) in workItems" v-for="(work, index) in workItems"
:key="work.id" :key="work.id"
:index="index" :index="index"
@ -86,6 +87,7 @@ function confirmDelete(items: unknown[], index: number) {
@manage-work-name="$emit('manageWorkName')" @manage-work-name="$emit('manageWorkName')"
@work-properties="$emit('workProperties', index)" @work-properties="$emit('workProperties', index)"
></WorkManagementComponent> ></WorkManagementComponent>
<div class="col-12" style="height: 12px"></div>
</div> </div>
<div <div

View file

@ -81,8 +81,7 @@ defineEmits<{
<div <div
for="select-work-name" for="select-work-name"
class="col rounded q-py-sm q-px-md" class="col rounded q-py-sm q-px-md"
:class="{ bordered: !readonly }" style="background-color: var(--surface-1); z-index: 2"
:style="`background-color:${readonly ? 'var(--surface-2)' : 'var(--surface-1); z-index: 2'}`"
@click="() => (readonly ? '' : fetchListOfWork())" @click="() => (readonly ? '' : fetchListOfWork())"
> >
<span class="text-body2" style="color: var(--foreground)"> <span class="text-body2" style="color: var(--foreground)">

View file

@ -1933,7 +1933,7 @@ watch(currentStatus, async () => {
<!-- edit service --> <!-- edit service -->
<FormDialog <FormDialog
no-address no-address
no-app-box :no-app-box="currentServiceTab !== 'workInformation'"
:edit="!(formDataProductService.status === 'INACTIVE')" :edit="!(formDataProductService.status === 'INACTIVE')"
height="95vh" height="95vh"
:isEdit="infoServiceEdit" :isEdit="infoServiceEdit"
@ -1976,7 +1976,10 @@ watch(currentStatus, async () => {
/> />
</template> </template>
<div v-if="currentServiceTab === 'serviceInformation'" class="col-10"> <div
v-if="currentServiceTab === 'serviceInformation'"
class="col-md-10 col-sm-12"
>
<div class="surface-1 rounded bordered q-pa-lg full-width row"> <div class="surface-1 rounded bordered q-pa-lg full-width row">
<BasicInformation <BasicInformation
:readonly="!infoServiceEdit" :readonly="!infoServiceEdit"
@ -2009,10 +2012,7 @@ watch(currentStatus, async () => {
</div> </div>
</div> </div>
<div <template #information>
v-if="currentServiceTab === 'workInformation'"
class="surface-1 rounded bordered col-10 q-pa-lg"
>
<FormServiceWork <FormServiceWork
:readonly="!infoServiceEdit" :readonly="!infoServiceEdit"
v-model:work-items="workItems" v-model:work-items="workItems"
@ -2034,7 +2034,7 @@ watch(currentStatus, async () => {
} }
" "
/> />
</div> </template>
</FormDialog> </FormDialog>
</template> </template>