Merge pull request #189 from Frappet/feat/customer-request-cancel-status
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 8s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 8s
feat: customer request cancel status
This commit is contained in:
commit
0ba89577fc
6 changed files with 44 additions and 12 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',
|
||||||
|
|
@ -936,6 +937,7 @@ export default {
|
||||||
InProgress: 'In Progress',
|
InProgress: 'In Progress',
|
||||||
Completed: 'Completed',
|
Completed: 'Completed',
|
||||||
Canceled: 'Canceled',
|
Canceled: 'Canceled',
|
||||||
|
CancelRequested: 'Cancel Requested',
|
||||||
|
|
||||||
AwaitOrder: 'Awaiting Order',
|
AwaitOrder: 'Awaiting Order',
|
||||||
ReadyOrder: 'Ready for Order',
|
ReadyOrder: 'Ready for Order',
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,7 @@ export default {
|
||||||
group: 'กลุ่ม',
|
group: 'กลุ่ม',
|
||||||
laborIdentified: 'ระบุแรงงาน',
|
laborIdentified: 'ระบุแรงงาน',
|
||||||
beDue: 'จะครบกำหนดในอีก',
|
beDue: 'จะครบกำหนดในอีก',
|
||||||
|
noReason: 'ไม่มีเหตุผล',
|
||||||
due: 'ครบกำหนด',
|
due: 'ครบกำหนด',
|
||||||
overDue: 'เลยกำหนด',
|
overDue: 'เลยกำหนด',
|
||||||
status: 'สถานะ',
|
status: 'สถานะ',
|
||||||
|
|
@ -924,6 +925,7 @@ export default {
|
||||||
InProgress: 'กำลังดำเนินการ',
|
InProgress: 'กำลังดำเนินการ',
|
||||||
Completed: 'เสร็จสิ้น',
|
Completed: 'เสร็จสิ้น',
|
||||||
Canceled: 'ยกเลิก',
|
Canceled: 'ยกเลิก',
|
||||||
|
CancelRequested: 'ต้องการยกเลิก',
|
||||||
|
|
||||||
AwaitOrder: 'รอสั่งงาน',
|
AwaitOrder: 'รอสั่งงาน',
|
||||||
ReadyOrder: 'พร้อมสั่งงาน',
|
ReadyOrder: 'พร้อมสั่งงาน',
|
||||||
|
|
|
||||||
|
|
@ -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 ||
|
||||||
|
|
|
||||||
|
|
@ -183,6 +183,24 @@ function getEmployeeName(
|
||||||
$t(`requestList.status.${props.row.requestDataStatus}`) || '-'
|
$t(`requestList.status.${props.row.requestDataStatus}`) || '-'
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
<BadgeComponent
|
||||||
|
v-if="
|
||||||
|
props.row.customerRequestCancel &&
|
||||||
|
props.row.requestDataStatus !== RequestDataStatus.Canceled
|
||||||
|
"
|
||||||
|
:hsla-color="'--red-5-hsl'"
|
||||||
|
class="q-ml-sm"
|
||||||
|
: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
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ export type RequestData = {
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
|
|
||||||
|
customerRequestCancel?: boolean;
|
||||||
|
customerRequestCancelReason?: string;
|
||||||
|
|
||||||
quotation: QuotationFull & {
|
quotation: QuotationFull & {
|
||||||
debitNoteQuotationId: string;
|
debitNoteQuotationId: string;
|
||||||
isDebitNote: boolean;
|
isDebitNote: boolean;
|
||||||
|
|
@ -60,6 +63,8 @@ export type RequestWork = {
|
||||||
attributes?: Attributes;
|
attributes?: Attributes;
|
||||||
creditNoteId?: string;
|
creditNoteId?: string;
|
||||||
processByUserId?: string;
|
processByUserId?: string;
|
||||||
|
customerRequestCancel?: boolean;
|
||||||
|
customerRequestCancelReason?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type RowDocument = {
|
export type RowDocument = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue