feat: customer requested cancel indicator
This commit is contained in:
parent
9e7d67fb6c
commit
72985c382f
5 changed files with 29 additions and 13 deletions
|
|
@ -113,6 +113,7 @@ export default {
|
||||||
group: 'Group',
|
group: 'Group',
|
||||||
laborIdentified: 'Labor identified',
|
laborIdentified: 'Labor identified',
|
||||||
beDue: 'Due in',
|
beDue: 'Due in',
|
||||||
|
noReason: 'No reason',
|
||||||
due: 'Due',
|
due: 'Due',
|
||||||
overDue: 'Overdue',
|
overDue: 'Overdue',
|
||||||
status: 'Status',
|
status: 'Status',
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,7 @@ export default {
|
||||||
group: 'กลุ่ม',
|
group: 'กลุ่ม',
|
||||||
laborIdentified: 'ระบุแรงงาน',
|
laborIdentified: 'ระบุแรงงาน',
|
||||||
beDue: 'จะครบกำหนดในอีก',
|
beDue: 'จะครบกำหนดในอีก',
|
||||||
|
noReason: 'ไม่มีเหตุผล',
|
||||||
due: 'ครบกำหนด',
|
due: 'ครบกำหนด',
|
||||||
overDue: 'เลยกำหนด',
|
overDue: 'เลยกำหนด',
|
||||||
status: 'สถานะ',
|
status: 'สถานะ',
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,9 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
|
||||||
import { baseUrl } from 'src/stores/utils';
|
import { baseUrl } from 'src/stores/utils';
|
||||||
|
|
||||||
import BadgeComponent from 'src/components/BadgeComponent.vue';
|
|
||||||
|
|
||||||
import { ProductRelation, PayCondition } from 'src/stores/quotations/types';
|
import { ProductRelation, PayCondition } from 'src/stores/quotations/types';
|
||||||
import { Step, RequestWorkStatus } from 'src/stores/request-list/types';
|
import { Step, RequestWorkStatus } from 'src/stores/request-list/types';
|
||||||
|
import BadgeComponent from 'src/components/BadgeComponent.vue';
|
||||||
const workStatus = ref([
|
|
||||||
RequestWorkStatus.Ready,
|
|
||||||
RequestWorkStatus.Waiting,
|
|
||||||
RequestWorkStatus.InProgress,
|
|
||||||
RequestWorkStatus.Validate,
|
|
||||||
RequestWorkStatus.Ended,
|
|
||||||
RequestWorkStatus.Completed,
|
|
||||||
]);
|
|
||||||
|
|
||||||
defineEmits<{
|
defineEmits<{
|
||||||
(
|
(
|
||||||
|
|
@ -29,6 +18,8 @@ const props = defineProps<{
|
||||||
code: string;
|
code: string;
|
||||||
status?: Step;
|
status?: Step;
|
||||||
imgUrl?: string;
|
imgUrl?: string;
|
||||||
|
requestCancel?: boolean;
|
||||||
|
requestCancelReason?: string;
|
||||||
installmentInfo?: {
|
installmentInfo?: {
|
||||||
total: number;
|
total: number;
|
||||||
paid?: number;
|
paid?: number;
|
||||||
|
|
@ -108,6 +99,18 @@ function changeableStatus(currentStatus?: RequestWorkStatus) {
|
||||||
<div class="rounded q-px-xs app-text-muted surface-3">
|
<div class="rounded q-px-xs app-text-muted surface-3">
|
||||||
{{ product?.code || code }}
|
{{ product?.code || code }}
|
||||||
</div>
|
</div>
|
||||||
|
<BadgeComponent
|
||||||
|
v-if="requestCancel && !cancel"
|
||||||
|
:hsla-color="'--red-5-hsl'"
|
||||||
|
class="q-ml-sm"
|
||||||
|
:title="$t(`requestList.status.CancelRequested`) || '-'"
|
||||||
|
>
|
||||||
|
<template #append>
|
||||||
|
<q-tooltip>
|
||||||
|
{{ requestCancelReason || $t('general.noReason') }}
|
||||||
|
</q-tooltip>
|
||||||
|
</template>
|
||||||
|
</BadgeComponent>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="q-ml-auto q-gutter-y-xs">
|
<div class="q-ml-auto q-gutter-y-xs">
|
||||||
|
|
|
||||||
|
|
@ -731,6 +731,8 @@ async function submitRequestAction(data: {
|
||||||
<!-- product -->
|
<!-- product -->
|
||||||
<template v-for="(value, index) in productsList" :key="value">
|
<template v-for="(value, index) in productsList" :key="value">
|
||||||
<ProductExpansion
|
<ProductExpansion
|
||||||
|
:request-cancel="value.customerRequestCancel"
|
||||||
|
:request-cancel-reason="value.customerRequestCancelReason"
|
||||||
:cancel="data.requestDataStatus === RequestDataStatus.Canceled"
|
:cancel="data.requestDataStatus === RequestDataStatus.Canceled"
|
||||||
:readonly="
|
:readonly="
|
||||||
data.requestDataStatus === RequestDataStatus.Canceled ||
|
data.requestDataStatus === RequestDataStatus.Canceled ||
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,16 @@ function getEmployeeName(
|
||||||
:hsla-color="'--red-5-hsl'"
|
:hsla-color="'--red-5-hsl'"
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
:title="$t(`requestList.status.CancelRequested`) || '-'"
|
:title="$t(`requestList.status.CancelRequested`) || '-'"
|
||||||
/>
|
>
|
||||||
|
<template #append>
|
||||||
|
<q-tooltip>
|
||||||
|
{{
|
||||||
|
props.row.customerRequestCancelReason ||
|
||||||
|
$t('general.noReason')
|
||||||
|
}}
|
||||||
|
</q-tooltip>
|
||||||
|
</template>
|
||||||
|
</BadgeComponent>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td class="text-right">
|
<q-td class="text-right">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue