feat: order visualization
parent
f3a986258b
commit
8a9fe74487
|
|
@ -125,7 +125,9 @@ declare global {
|
|||
const registerPlugins_: typeof import('./src/@core/utils/plugins')['registerPlugins_']
|
||||
const requiredValidator: typeof import('./src/@core/utils/validators')['requiredValidator']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const resolveOrderStatus: typeof import('./src/utils/order')['resolveOrderStatus']
|
||||
const resolveRef: typeof import('@vueuse/core')['resolveRef']
|
||||
const resolveStatus: typeof import('./src/utils/order')['resolveStatus']
|
||||
const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
|
||||
const resolveVuetifyTheme: typeof import('./src/@core/utils/vuetify')['resolveVuetifyTheme']
|
||||
const setActivePinia: typeof import('pinia')['setActivePinia']
|
||||
|
|
@ -480,6 +482,7 @@ declare module 'vue' {
|
|||
readonly registerPlugins: UnwrapRef<typeof import('./src/@core/utils/plugins')['registerPlugins']>
|
||||
readonly requiredValidator: UnwrapRef<typeof import('./src/@core/utils/validators')['requiredValidator']>
|
||||
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
|
||||
readonly resolveOrderStatus: UnwrapRef<typeof import('./src/utils/order')['resolveOrderStatus']>
|
||||
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
|
||||
readonly resolveUnref: UnwrapRef<typeof import('@vueuse/core')['resolveUnref']>
|
||||
readonly resolveVuetifyTheme: UnwrapRef<typeof import('./src/@core/utils/vuetify')['resolveVuetifyTheme']>
|
||||
|
|
@ -824,6 +827,7 @@ declare module '@vue/runtime-core' {
|
|||
readonly registerPlugins: UnwrapRef<typeof import('./src/@core/utils/plugins')['registerPlugins']>
|
||||
readonly requiredValidator: UnwrapRef<typeof import('./src/@core/utils/validators')['requiredValidator']>
|
||||
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
|
||||
readonly resolveOrderStatus: UnwrapRef<typeof import('./src/utils/order')['resolveOrderStatus']>
|
||||
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
|
||||
readonly resolveUnref: UnwrapRef<typeof import('@vueuse/core')['resolveUnref']>
|
||||
readonly resolveVuetifyTheme: UnwrapRef<typeof import('./src/@core/utils/vuetify')['resolveVuetifyTheme']>
|
||||
|
|
|
|||
|
|
@ -33,19 +33,6 @@ const refreshData = async () => {
|
|||
}
|
||||
|
||||
handleData()
|
||||
|
||||
const resolveStatus = (status: string) => {
|
||||
if (status === 'fulfilled')
|
||||
return { text: status, color: 'success' }
|
||||
else if (status === 'polled')
|
||||
return { text: status, color: 'info' }
|
||||
else if (status === 'intransit polled')
|
||||
return { text: status, color: 'warning' }
|
||||
else if (status === 'cancelled' || status === 'unfulfillable')
|
||||
return { text: status, color: 'error' }
|
||||
else
|
||||
return { text: status, color: 'primary' }
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -71,7 +58,7 @@ const resolveStatus = (status: string) => {
|
|||
<VChip
|
||||
label
|
||||
size="x-large"
|
||||
v-bind="resolveStatus(orderData.common.statusData.code)"
|
||||
v-bind="resolveOrderStatus(orderData.common.statusData.code)"
|
||||
/>
|
||||
<VChip
|
||||
label
|
||||
|
|
|
|||
|
|
@ -5,21 +5,6 @@ import { paginationMeta } from '@api-utils/paginationMeta'
|
|||
|
||||
const { t } = useI18n()
|
||||
|
||||
const widgetData = ref([
|
||||
{ title: 'Pending Payment', value: 56, icon: 'tabler-calendar-stats' },
|
||||
{ title: 'Unfulfilled', value: 25, icon: 'tabler-circle-x' },
|
||||
{ title: 'Completed', value: 12689, icon: 'tabler-checks' },
|
||||
{ title: 'Refunded', value: 124, icon: 'tabler-wallet' },
|
||||
])
|
||||
|
||||
const searchQuery = ref('')
|
||||
|
||||
// Data table options
|
||||
const itemsPerPage = ref(10)
|
||||
const page = ref(1)
|
||||
const sortBy = ref('meta.id')
|
||||
const orderBy = ref('desc')
|
||||
|
||||
// Data table Headers
|
||||
const headers = [
|
||||
{ title: 'Id', key: 'meta.id' },
|
||||
|
|
@ -29,6 +14,40 @@ const headers = [
|
|||
{ title: 'Type', key: 'common.transaction.transactionTypeDescription' },
|
||||
]
|
||||
|
||||
const selectedStatus = ref()
|
||||
|
||||
const status = [
|
||||
'canceled',
|
||||
'complete',
|
||||
'fulfilled',
|
||||
'intransit',
|
||||
'intransit polled',
|
||||
'new_order',
|
||||
'open',
|
||||
'polled',
|
||||
'received',
|
||||
'unfulfillable',
|
||||
]
|
||||
|
||||
const selectedType = ref()
|
||||
|
||||
const type = [
|
||||
'Delivery Order',
|
||||
'Pickup Order',
|
||||
'Retail Pickup Order',
|
||||
'Ship-for-Pickup Order',
|
||||
'Ship-to-Store Order',
|
||||
'unknown transaction type',
|
||||
]
|
||||
|
||||
const searchQuery = ref('')
|
||||
|
||||
// Data table options
|
||||
const itemsPerPage = ref(10)
|
||||
const page = ref(1)
|
||||
const sortBy = ref('meta.id')
|
||||
const orderBy = ref('desc')
|
||||
|
||||
const updateOptions = (options: any) => {
|
||||
page.value = options.page
|
||||
|
||||
|
|
@ -39,19 +58,6 @@ const updateOptions = (options: any) => {
|
|||
}
|
||||
}
|
||||
|
||||
const resolveStatus = (status: string) => {
|
||||
if (status === 'fulfilled')
|
||||
return { text: status, color: 'success' }
|
||||
else if (status === 'polled')
|
||||
return { text: status, color: 'info' }
|
||||
else if (status === 'intransit polled')
|
||||
return { text: status, color: 'warning' }
|
||||
else if (status === 'cancelled' || status === 'unfulfillable')
|
||||
return { text: status, color: 'error' }
|
||||
else
|
||||
return { text: status, color: 'primary' }
|
||||
}
|
||||
|
||||
const sortByMapping = (sortby: string) => {
|
||||
const headerMapping: { [key: string]: string } = {
|
||||
'meta.id': 'request_id',
|
||||
|
|
@ -76,8 +82,20 @@ const { data: ordersData } = await useApi<any>(createUrl('/obi/order',
|
|||
},
|
||||
))
|
||||
|
||||
const widgetData = ref(ordersData.value.statistics)
|
||||
const orders = computed(() => ordersData.value.orders)
|
||||
const totalOrder = computed(() => ordersData.value.total)
|
||||
|
||||
const minDate = ref(new Date(2023, 1, 7))
|
||||
const maxDate = ref(new Date())
|
||||
const dateRange = ref([minDate.value.getTime(), maxDate.value.getTime()])
|
||||
|
||||
const updateDates = () => {
|
||||
dateRange.value = dateRange.value.map(date => new Date(date).getTime())
|
||||
}
|
||||
|
||||
const formattedStartDate = computed(() => format(new Date(dateRange.value[0]), 'dd/MM/yyyy'))
|
||||
const formattedEndDate = computed(() => format(new Date(dateRange.value[1]), 'dd/MM/yyyy'))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -116,9 +134,12 @@ const totalOrder = computed(() => ordersData.value.total)
|
|||
{{ data.value }}
|
||||
</h4>
|
||||
|
||||
<h6 class="text-h6">
|
||||
{{ data.title }}
|
||||
</h6>
|
||||
<VChip
|
||||
v-bind="resolveOrderStatus(data.title)"
|
||||
variant="tonal"
|
||||
label
|
||||
size="default"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<VAvatar
|
||||
|
|
@ -146,6 +167,79 @@ const totalOrder = computed(() => ordersData.value.total)
|
|||
</VCardText>
|
||||
</VCard>
|
||||
|
||||
<VCard
|
||||
:title="$t('Filters')"
|
||||
class="mb-6"
|
||||
>
|
||||
<VCardText>
|
||||
<VRow>
|
||||
<!-- 👉 Select Status -->
|
||||
<VCol
|
||||
cols="12"
|
||||
sm="4"
|
||||
>
|
||||
<AppSelect
|
||||
v-model="selectedStatus"
|
||||
:placeholder="$t('Status')"
|
||||
:items="status"
|
||||
clearable
|
||||
clear-icon="tabler-x"
|
||||
/>
|
||||
</VCol>
|
||||
|
||||
<!-- 👉 Select Type -->
|
||||
<VCol
|
||||
cols="12"
|
||||
sm="4"
|
||||
>
|
||||
<AppSelect
|
||||
v-model="selectedType"
|
||||
:placeholder="$t('Type')"
|
||||
:items="type"
|
||||
clearable
|
||||
clear-icon="tabler-x"
|
||||
/>
|
||||
</VCol>
|
||||
</VRow>
|
||||
<VRow>
|
||||
<!-- 👉 dates range -->
|
||||
<VRangeSlider
|
||||
v-model="dateRange"
|
||||
:min="minDate.getTime()"
|
||||
:max="maxDate.getTime()"
|
||||
class="mb-4"
|
||||
:thumb-label="false"
|
||||
@change="updateDates"
|
||||
>
|
||||
<template #prepend>
|
||||
<VTextField
|
||||
v-model="formattedStartDate"
|
||||
hide-details
|
||||
single-line
|
||||
type="String"
|
||||
variant="outlined"
|
||||
density="compact"
|
||||
readonly
|
||||
style="inline-size: 120px"
|
||||
/>
|
||||
</template>
|
||||
<template #append>
|
||||
<VTextField
|
||||
v-model="formattedEndDate"
|
||||
hide-details
|
||||
single-line
|
||||
type="String"
|
||||
variant="outlined"
|
||||
density="compact"
|
||||
readonly
|
||||
style="inline-size: 120px"
|
||||
/>
|
||||
</template>
|
||||
</VRangeSlider>
|
||||
</VRow>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
<!-- 👉 Order Table -->
|
||||
<VCard>
|
||||
<!-- 👉 Filters -->
|
||||
<VCardText>
|
||||
|
|
@ -207,7 +301,7 @@ const totalOrder = computed(() => ordersData.value.total)
|
|||
<!-- Status -->
|
||||
<template #item.common.statusData.code="{ item }">
|
||||
<VChip
|
||||
v-bind="resolveStatus(item.common.statusData.code)"
|
||||
v-bind="resolveOrderStatus(item.common.statusData.code)"
|
||||
label
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const headers = computed(() => [
|
|||
{ title: 'Pos', key: 'nbcaisses' },
|
||||
{ title: 'IP', key: 'ip_master', sortable: false },
|
||||
{ title: t('Phone'), key: 'telephone', sortable: false },
|
||||
{ title: t('Brand'), key: 'enseigne' },
|
||||
{ title: t('Sign'), key: 'enseigne' },
|
||||
{ title: t('Country'), key: 'pays' },
|
||||
{ title: '', key: 'actions', sortable: false },
|
||||
])
|
||||
|
|
@ -206,7 +206,7 @@ watch(route, (to, from) => {
|
|||
>
|
||||
<AppSelect
|
||||
v-model="selectedBrand"
|
||||
:placeholder="$t('Brand')"
|
||||
:placeholder="$t('Sign')"
|
||||
:items="brand"
|
||||
clearable
|
||||
clear-icon="tabler-x"
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@
|
|||
"Close": "Close",
|
||||
"Connect to invidual POS": "Connect to invidual POS",
|
||||
"Orders list": "Orders list",
|
||||
"Sign": "Sign",
|
||||
"---------------------------": "---------------------------",
|
||||
"UI Elements": "عناصر واجهة المستخدم",
|
||||
"Forms & Tables": "النماذج والجداول",
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@
|
|||
"Close": "Close",
|
||||
"Connect to invidual POS": "Connect to invidual POS",
|
||||
"Orders list": "Orders list",
|
||||
"Sign": "Sign",
|
||||
"---------------------------": "---------------------------",
|
||||
"UI Elements": "UI Elements",
|
||||
"Forms & Tables": "Forms & Tables",
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@
|
|||
"Close": "Fermer",
|
||||
"Connect to invidual POS": "Connexion à une caisse individuelle",
|
||||
"Orders list": "Liste des commandes",
|
||||
"Sign": "Enseigne",
|
||||
"---------------------------": "---------------------------",
|
||||
"UI Elements": "ÉLÉMENTS DE L'UI",
|
||||
"Forms & Tables": "Formulaires et tableaux",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
export const resolveOrderStatus = (status: string) => {
|
||||
if (status === 'received')
|
||||
return { text: status, color: 'success' }
|
||||
else if (status === 'fulfilled' || status === 'polled')
|
||||
return { text: status, color: 'info' }
|
||||
else if (status === 'intransit polled')
|
||||
return { text: status, color: 'warning' }
|
||||
else if (status === 'canceled' || status === 'unfulfillable')
|
||||
return { text: status, color: 'error' }
|
||||
else
|
||||
return { text: status, color: 'primary' }
|
||||
}
|
||||
|
|
@ -10,164 +10,160 @@ interface Props {
|
|||
orderData: Order
|
||||
}
|
||||
|
||||
const resolveStatus = (status: string) => {
|
||||
if (status === 'fulfilled')
|
||||
return { text: status, color: 'success' }
|
||||
else if (status === 'polled')
|
||||
return { text: status, color: 'info' }
|
||||
else if (status === 'intransit polled')
|
||||
return { text: status, color: 'warning' }
|
||||
else if (status === 'cancelled' || status === 'unfulfillable')
|
||||
return { text: status, color: 'error' }
|
||||
else
|
||||
return { text: status, color: 'primary' }
|
||||
}
|
||||
|
||||
const panelStatus = ref(0)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 👉 Preparations 06990018 -->
|
||||
<!-- 👉 Preparations -->
|
||||
<VExpansionPanels
|
||||
v-model="panelStatus"
|
||||
variant="accordion"
|
||||
>
|
||||
<VExpansionPanel
|
||||
v-for="(section, index) in orderData.preparations"
|
||||
:key="index"
|
||||
elevation="0"
|
||||
>
|
||||
<template #title>
|
||||
<VCardText class="pa-sm-2">
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<div>
|
||||
<VChip
|
||||
v-bind="resolveStatus(section.status)"
|
||||
variant="tonal"
|
||||
label
|
||||
size="default"
|
||||
/>
|
||||
{{ section.fulfillmentSystemCd }} / {{ section.fulfillmentLocationCd }}
|
||||
<template v-if="orderData.preparations && orderData.preparations.length > 0">
|
||||
<VExpansionPanel
|
||||
v-for="(section, index) in orderData.preparations"
|
||||
:key="index"
|
||||
elevation="0"
|
||||
>
|
||||
<template #title>
|
||||
<VCardText class="pa-sm-2">
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<div>
|
||||
Prep #{{ index + 1 }} /
|
||||
<VChip
|
||||
v-bind="resolveOrderStatus(section.status)"
|
||||
variant="tonal"
|
||||
label
|
||||
size="default"
|
||||
/>
|
||||
{{ section.fulfillmentSystemCd }} / {{ section.fulfillmentLocationCd }}
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<span class="text-body-1 text-disabled font-weight-medium"> {{ format(section.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<span class="text-body-1 text-disabled font-weight-medium"> {{ format(section.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</vcardtext>
|
||||
</template>
|
||||
</vcardtext>
|
||||
</template>
|
||||
|
||||
<VExpansionPanelText>
|
||||
<!-- 👉 Preparation line -->
|
||||
<div class="mb-6">
|
||||
<VRow>
|
||||
<template
|
||||
v-for="preparationLine in orderData.preparations[index].lines"
|
||||
:key="preparationLine.lineFulfillId"
|
||||
>
|
||||
<VCol
|
||||
cols="12"
|
||||
md="4"
|
||||
sm="6"
|
||||
<VExpansionPanelText>
|
||||
<!-- 👉 Preparation line -->
|
||||
<div class="mb-6">
|
||||
<VRow>
|
||||
<template
|
||||
v-for="preparationLine in orderData.preparations[index].lines"
|
||||
:key="preparationLine.lineFulfillId"
|
||||
>
|
||||
<VCard
|
||||
flat
|
||||
border
|
||||
<VCol
|
||||
cols="12"
|
||||
md="4"
|
||||
sm="6"
|
||||
>
|
||||
<VCardText>
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<VChip
|
||||
variant="tonal"
|
||||
label
|
||||
>
|
||||
{{ preparationLine.lineItemOms }}
|
||||
</VChip>
|
||||
|
||||
<div class="d-flex">
|
||||
<span class="text-body-1 font-weight-medium align-center">
|
||||
{{ preparationLine.itemId }} / {{ preparationLine.seasonCode }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<VList class="card-list mt-1">
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">N°Exp:</span>
|
||||
<span>
|
||||
{{ preparationLine.numeroExpedition }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Cd:</span>
|
||||
<span>
|
||||
{{ preparationLine.fulfillmentSystemCd }} / {{ preparationLine.fulfillmentLocationCd }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Qty:</span>
|
||||
<span>
|
||||
{{ preparationLine.validatedFulfillQty }} / {{ preparationLine.fulfillQty }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Carrier:</span>
|
||||
<span>
|
||||
{{ preparationLine.carrier }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Tracking:</span>
|
||||
<span>
|
||||
{{ preparationLine.trackingCode }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">URL:</span>
|
||||
<span>
|
||||
<a
|
||||
v-if="preparationLine.trackingUrl"
|
||||
:href="preparationLine.trackingUrl"
|
||||
target="_blank"
|
||||
style="text-decoration: underline;"
|
||||
>Link</a>
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Restocking:</span>
|
||||
<span>
|
||||
{{ preparationLine.restockingCode }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<VCard
|
||||
flat
|
||||
border
|
||||
>
|
||||
<VCardText>
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<VChip
|
||||
v-bind="resolveStatus(preparationLine.status)"
|
||||
variant="tonal"
|
||||
label
|
||||
size="default"
|
||||
/>
|
||||
{{ format(section.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }}
|
||||
</VListItem>
|
||||
</VList>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
</VCol>
|
||||
</template>
|
||||
</VRow>
|
||||
</div>
|
||||
</VExpansionPanelText>
|
||||
</VExpansionPanel>
|
||||
>
|
||||
{{ preparationLine.lineItemOms }}
|
||||
</VChip>
|
||||
|
||||
<div class="d-flex">
|
||||
<span class="text-body-1 font-weight-medium align-center">
|
||||
{{ preparationLine.itemId }} / {{ preparationLine.seasonCode }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<VList class="card-list mt-1">
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">N°Exp:</span>
|
||||
<span>
|
||||
{{ preparationLine.numeroExpedition }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Cd:</span>
|
||||
<span>
|
||||
{{ preparationLine.fulfillmentSystemCd }} / {{ preparationLine.fulfillmentLocationCd }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Qty:</span>
|
||||
<span>
|
||||
{{ preparationLine.validatedFulfillQty }} / {{ preparationLine.fulfillQty }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Carrier:</span>
|
||||
<span>
|
||||
{{ preparationLine.carrier }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Tracking:</span>
|
||||
<span>
|
||||
{{ preparationLine.trackingCode }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">URL:</span>
|
||||
<span>
|
||||
<a
|
||||
v-if="preparationLine.trackingUrl"
|
||||
:href="preparationLine.trackingUrl"
|
||||
target="_blank"
|
||||
style="text-decoration: underline;"
|
||||
>Link</a>
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Restocking:</span>
|
||||
<span>
|
||||
{{ preparationLine.restockingCode }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<VChip
|
||||
v-bind="resolveOrderStatus(preparationLine.status)"
|
||||
variant="tonal"
|
||||
label
|
||||
size="default"
|
||||
/>
|
||||
{{ format(section.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }}
|
||||
</VListItem>
|
||||
</VList>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
</VCol>
|
||||
</template>
|
||||
</VRow>
|
||||
</div>
|
||||
</VExpansionPanelText>
|
||||
</VExpansionPanel>
|
||||
</template>
|
||||
<div
|
||||
v-else
|
||||
class="text-h4"
|
||||
>
|
||||
No preparation available
|
||||
</div>
|
||||
</VExpansionPanels>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,19 +10,6 @@ interface Props {
|
|||
orderData: Order
|
||||
}
|
||||
|
||||
const resolveStatus = (status: string) => {
|
||||
if (status === 'fulfilled')
|
||||
return { text: status, color: 'success' }
|
||||
else if (status === 'polled')
|
||||
return { text: status, color: 'info' }
|
||||
else if (status === 'intransit polled')
|
||||
return { text: status, color: 'warning' }
|
||||
else if (status === 'cancelled' || status === 'unfulfillable')
|
||||
return { text: status, color: 'error' }
|
||||
else
|
||||
return { text: status, color: 'primary' }
|
||||
}
|
||||
|
||||
const panelStatus = ref(0)
|
||||
</script>
|
||||
|
||||
|
|
@ -32,121 +19,130 @@ const panelStatus = ref(0)
|
|||
v-model="panelStatus"
|
||||
variant="accordion"
|
||||
>
|
||||
<VExpansionPanel
|
||||
v-for="(section, index) in orderData.receptions"
|
||||
:key="index"
|
||||
elevation="0"
|
||||
>
|
||||
<template #title>
|
||||
<VCardText class="pa-sm-2">
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<div>
|
||||
<VChip
|
||||
v-bind="resolveStatus(section.status)"
|
||||
variant="tonal"
|
||||
label
|
||||
size="default"
|
||||
/>
|
||||
{{ section.intransitSystemCd }} / {{ section.intransitLocationCd }}
|
||||
<template v-if="orderData.receptions && orderData.receptions.length > 0">
|
||||
<VExpansionPanel
|
||||
v-for="(section, index) in orderData.receptions"
|
||||
:key="index"
|
||||
elevation="0"
|
||||
>
|
||||
<template #title>
|
||||
<VCardText class="pa-sm-2">
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<div>
|
||||
Recep #{{ index + 1 }} /
|
||||
<VChip
|
||||
v-bind="resolveOrderStatus(section.status)"
|
||||
variant="tonal"
|
||||
label
|
||||
size="default"
|
||||
/>
|
||||
{{ section.intransitSystemCd }} / {{ section.intransitLocationCd }}
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<span class="text-body-1 text-disabled font-weight-medium"> {{ format(section.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<span class="text-body-1 text-disabled font-weight-medium"> {{ format(section.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</vcardtext>
|
||||
</template>
|
||||
</vcardtext>
|
||||
</template>
|
||||
|
||||
<VExpansionPanelText>
|
||||
<!-- 👉 Reception lines -->
|
||||
<div class="mb-6">
|
||||
<VRow>
|
||||
<template
|
||||
v-for="receptionLine in orderData.receptions[index].lines"
|
||||
:key="receptionLine.lineFulfillId"
|
||||
>
|
||||
<VCol
|
||||
cols="12"
|
||||
md="4"
|
||||
sm="6"
|
||||
<VExpansionPanelText>
|
||||
<!-- 👉 Reception lines -->
|
||||
<div class="mb-6">
|
||||
<VRow>
|
||||
<template
|
||||
v-for="receptionLine in orderData.receptions[index].lines"
|
||||
:key="receptionLine.lineFulfillId"
|
||||
>
|
||||
<VCard
|
||||
flat
|
||||
border
|
||||
<VCol
|
||||
cols="12"
|
||||
md="4"
|
||||
sm="6"
|
||||
>
|
||||
<VCardText>
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<VChip
|
||||
variant="tonal"
|
||||
label
|
||||
>
|
||||
{{ receptionLine.lineItemNo }}
|
||||
</VChip>
|
||||
|
||||
<div class="d-flex">
|
||||
<span class="text-body-1 font-weight-medium align-center">
|
||||
{{ receptionLine.itemId }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<VList class="card-list mt-1">
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Colis:</span>
|
||||
<span>
|
||||
{{ receptionLine.colisId }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Cd:</span>
|
||||
<span>
|
||||
{{ receptionLine.intransitSystemCd }} / {{ receptionLine.intransitLocationCd }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Qty:</span>
|
||||
<span>
|
||||
{{ receptionLine.validatedIntransitQty }} / {{ receptionLine.intransitQty }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Tracking:</span>
|
||||
<span>
|
||||
{{ receptionLine.trackingNumber }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Weight:</span>
|
||||
<span>
|
||||
{{ receptionLine.orderLineShipWeight }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<VCard
|
||||
flat
|
||||
border
|
||||
>
|
||||
<VCardText>
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<VChip
|
||||
v-bind="resolveStatus(receptionLine.status)"
|
||||
variant="tonal"
|
||||
label
|
||||
size="default"
|
||||
/>
|
||||
{{ format(section.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }}
|
||||
</VListItem>
|
||||
</VList>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
</VCol>
|
||||
</template>
|
||||
</VRow>
|
||||
</div>
|
||||
</VExpansionPanelText>
|
||||
</VExpansionPanel>
|
||||
>
|
||||
{{ receptionLine.lineItemNo }}
|
||||
</VChip>
|
||||
|
||||
<div class="d-flex">
|
||||
<span class="text-body-1 font-weight-medium align-center">
|
||||
{{ receptionLine.itemId }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<VList class="card-list mt-1">
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Colis:</span>
|
||||
<span>
|
||||
{{ receptionLine.colisId }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Cd:</span>
|
||||
<span>
|
||||
{{ receptionLine.intransitSystemCd }} / {{ receptionLine.intransitLocationCd }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem cla>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Qty:</span>
|
||||
<span>
|
||||
{{ receptionLine.validatedIntransitQty }} / {{ receptionLine.intransitQty }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Tracking:</span>
|
||||
<span>
|
||||
{{ receptionLine.trackingNumber }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<div class="text-body-1">
|
||||
<span class="font-weight-bold me-2">Weight:</span>
|
||||
<span>
|
||||
{{ receptionLine.orderLineShipWeight }}
|
||||
</span>
|
||||
</div>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<VChip
|
||||
v-bind="resolveOrderStatus(receptionLine.status)"
|
||||
variant="tonal"
|
||||
label
|
||||
size="default"
|
||||
/>
|
||||
{{ format(section.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }}
|
||||
</VListItem>
|
||||
</VList>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
</VCol>
|
||||
</template>
|
||||
</VRow>
|
||||
</div>
|
||||
</VExpansionPanelText>
|
||||
</VExpansionPanel>
|
||||
</template>
|
||||
<div
|
||||
v-else
|
||||
class="text-h4"
|
||||
>
|
||||
No reception available
|
||||
</div>
|
||||
</VExpansionPanels>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,15 +26,10 @@ const fetchData = async () => {
|
|||
}
|
||||
|
||||
watchEffect(() => {
|
||||
// eslint-disable-next-line sonarjs/no-collapsible-if
|
||||
if (props.item)
|
||||
// eslint-disable-next-line curly
|
||||
if (!(props.item.trim() === ''))
|
||||
fetchData()
|
||||
if (route.query.dbHost && props.item && !(props.item.trim() === ''))
|
||||
fetchData()
|
||||
})
|
||||
|
||||
// const { t } = useI18n()
|
||||
|
||||
const headers = computed(() => [
|
||||
{ title: t('ITEM_ID'), key: 'itemId' },
|
||||
{ title: t('LEVEL'), key: 'itemLevelCode' },
|
||||
|
|
|
|||
|
|
@ -30,15 +30,10 @@ const fetchData = async () => {
|
|||
}
|
||||
|
||||
watchEffect(() => {
|
||||
// eslint-disable-next-line sonarjs/no-collapsible-if
|
||||
if (props.item)
|
||||
// eslint-disable-next-line curly
|
||||
if (!(props.item.trim() === ''))
|
||||
fetchData()
|
||||
if (route.query.dbHost && props.item && !(props.item.trim() === ''))
|
||||
fetchData()
|
||||
})
|
||||
|
||||
// const { t } = useI18n()
|
||||
|
||||
const headers = computed(() => [
|
||||
{ title: t('ITEM_ID'), key: 'itemId' },
|
||||
{ title: 'LEVEL', key: 'level' },
|
||||
|
|
|
|||
|
|
@ -30,15 +30,10 @@ const fetchData = async () => {
|
|||
}
|
||||
|
||||
watchEffect(() => {
|
||||
// eslint-disable-next-line sonarjs/no-collapsible-if
|
||||
if (props.item)
|
||||
// eslint-disable-next-line curly
|
||||
if (!(props.item.trim() === ''))
|
||||
fetchData()
|
||||
if (route.query.dbHost && props.item && !(props.item.trim() === ''))
|
||||
fetchData()
|
||||
})
|
||||
|
||||
// const { t } = useI18n()
|
||||
|
||||
const headers = computed(() => [
|
||||
{ title: t('ITEM_ID'), key: 'itemId' },
|
||||
{ title: t('LEVEL'), key: 'level' },
|
||||
|
|
|
|||
|
|
@ -26,15 +26,10 @@ const fetchData = async () => {
|
|||
}
|
||||
|
||||
watchEffect(() => {
|
||||
// eslint-disable-next-line sonarjs/no-collapsible-if
|
||||
if (props.item)
|
||||
// eslint-disable-next-line curly
|
||||
if (!(props.item.trim() === ''))
|
||||
fetchData()
|
||||
if (route.query.dbHost && props.item && !(props.item.trim() === ''))
|
||||
fetchData()
|
||||
})
|
||||
|
||||
// const { t } = useI18n()
|
||||
|
||||
const headers = computed(() => [
|
||||
{ title: t('ITEM_ID'), key: 'itemId' },
|
||||
{ title: 'LOCATION', key: 'invLocationId' },
|
||||
|
|
|
|||
Loading…
Reference in New Issue