diff --git a/src/pages/obi/order/details/[id].vue b/src/pages/obi/order/details/[id].vue index 1f6583b..9813df3 100644 --- a/src/pages/obi/order/details/[id].vue +++ b/src/pages/obi/order/details/[id].vue @@ -12,10 +12,10 @@ const orderData = ref() const orderTab = ref(null) const tabs = [ - { title: 'General' }, - { title: 'Preparation' }, - { title: 'Receipt' }, - { title: 'Flow' }, + { title: t('General') }, + { title: t('Preparation') }, + { title: t('Receipt') }, + { title: t('Flow') }, ] const { data, error, execute: fetchOrder } = await useApi(`/obi/order/${route.params.id}`) @@ -80,7 +80,7 @@ handleData() color="primary" @click="refreshData" > - Reload + {{ t("Reload") }} diff --git a/src/pages/obi/order/list/index.vue b/src/pages/obi/order/list/index.vue index eca945b..5973166 100644 --- a/src/pages/obi/order/list/index.vue +++ b/src/pages/obi/order/list/index.vue @@ -1,5 +1,5 @@ @@ -342,7 +399,7 @@ const formattedEndDate = computed(() => format(new Date(dateRange.value[1]), 'dd v-bind="slotProps" :icon="false" > - Next + {{ $t('$vuetify.pagination.ariaLabel.next') }} @@ -352,14 +409,3 @@ const formattedEndDate = computed(() => format(new Date(dateRange.value[1]), 'dd - - diff --git a/src/plugins/fake-api/utils/paginationMeta.ts b/src/plugins/fake-api/utils/paginationMeta.ts index c94fe32..ee42114 100755 --- a/src/plugins/fake-api/utils/paginationMeta.ts +++ b/src/plugins/fake-api/utils/paginationMeta.ts @@ -1,6 +1,7 @@ export const paginationMeta = (options: T, total: number) => { const start = (options.page - 1) * options.itemsPerPage + 1 const end = Math.min(options.page * options.itemsPerPage, total) + const { t } = useI18n() - return `Showing ${total === 0 ? 0 : start} to ${end} of ${total} entries` + return `${t('Showing')} ${total === 0 ? 0 : start} ${t('to')} ${end} ${t('of')} ${total} ${t('entries')}` } diff --git a/src/plugins/i18n/locales/ar.json b/src/plugins/i18n/locales/ar.json index 2279543..7fd729e 100755 --- a/src/plugins/i18n/locales/ar.json +++ b/src/plugins/i18n/locales/ar.json @@ -70,8 +70,57 @@ "Dates range error": "With a date range, a text of at least 5 characters must be specified", "Close": "Close", "Connect to invidual POS": "Connect to invidual POS", - "Orders list": "Orders list", "Sign": "Sign", + "Order list": "قائمة الطلبات", + "Status": "الحالة", + "Type": "النوع", + "Last month": "الشهر الماضي", + "This month": "هذا الشهر", + "Last 7 days": "آخر 7 أيام", + "Today": "اليوم", + "All": "الكل", + "Date begin": "Date begin", + "Date end": "Date end", + "Order": "الطلب", + "showing": "Showing", + "to": "to", + "of": "of", + "entries": "entries", + "Consumed": "Consumed", + "Created": "Created", + "Qty": "Qty", + "General": "General", + "Preparation": "Preparation", + "Receipt": "Receipt", + "Order lines": "Order lines", + "Transaction date history": "Transaction date history", + "Creation date history": "Creation date history", + "Status order history": "Status order history", + "Order was": "Order was", + "Your order has been": "Your order has been", + "Order line was": "Order line was", + "successfully": "successfully", + "OMS": "OMS", + "OMS Partner": "OMS Partner", + "Transaction details": "Transaction details", + "Last status": "Last status", + "Added": "Added", + "Modified": "Modified", + "Transaction": "Transaction", + "Open order": "Open order", + "Origin request": "Origin request", + "Cust Id": "Cust Id", + "Ship for Pickup": "Ship for Pickup", + "Order transaction": "Order transaction", + "Order Details": "Order Details", + "Package": "Package", + "Tracking": "Tracking", + "Cd": "Cd", + "Weight": "Weight", + "N°Exp": "N°Exp", + "Carrier": "Carrier", + "URL": "URL", + "Restocking": "Restocking", "---------------------------": "---------------------------", "UI Elements": "عناصر واجهة المستخدم", "Forms & Tables": "النماذج والجداول", @@ -212,7 +261,6 @@ "Ecommerce": "التجارة الإلكترونية", "Product": "المنتج", "Category": "الفئة", - "Order": "طلب", "Details": "تفاصيل", "Customer": "الزبون", "Manage Review": "إدارة المراجعة", diff --git a/src/plugins/i18n/locales/en.json b/src/plugins/i18n/locales/en.json index d5d4369..e36545d 100755 --- a/src/plugins/i18n/locales/en.json +++ b/src/plugins/i18n/locales/en.json @@ -72,6 +72,55 @@ "Connect to invidual POS": "Connect to invidual POS", "Orders list": "Orders list", "Sign": "Sign", + "Status": "Status", + "Type": "Type", + "Last month": "Last month", + "This month": "This month", + "Last 7 days": "Last 7 days", + "Today": "Today", + "All": "All", + "Date begin": "Date begin", + "Date end": "Date end", + "Order": "Order", + "Showing": "Showing", + "to": "to", + "of": "of", + "entries": "entries", + "Consumed": "Consumed", + "Created": "Created", + "Qty": "Qty", + "Preparation": "Preparation", + "Receipt": "Réception", + "Order lines": "Order lines", + "Status history": "Status history", + "Transaction date history": "Transaction date history", + "Creation date history": "Creation date history", + "Status order history": "Status order history", + "Order was": "Order was", + "Order has been": "Order has been", + "Order line was": "Order line was", + "successfully": "successfully", + "OMS": "OMS", + "OMS Partner": "OMS Partner", + "Transaction details": "Transaction details", + "Last status": "Last status", + "Added": "Added", + "Modified": "Modified", + "Transaction": "Transaction", + "Open order": "Open order", + "Origin request": "Origin request", + "Cust Id": "Cust Id", + "Ship for Pickup": "Ship for Pickup", + "Order transaction": "Order transaction", + "Order Details": "Order Details", + "Package": "Package", + "Tracking": "Tracking", + "Cd": "Cd", + "Weight": "Weight", + "N°Exp": "N°Exp", + "Carrier": "Carrier", + "URL": "URL", + "Restocking": "Restocking", "---------------------------": "---------------------------", "UI Elements": "UI Elements", "Forms & Tables": "Forms & Tables", @@ -218,7 +267,6 @@ "Swiper": "Swiper", "Product": "Product", "Category": "Category", - "Order": "Order", "Details": "Details", "Customer": "Customer", "Manage Review": "Manage Review", diff --git a/src/plugins/i18n/locales/fr.json b/src/plugins/i18n/locales/fr.json index b55f43c..714f7db 100755 --- a/src/plugins/i18n/locales/fr.json +++ b/src/plugins/i18n/locales/fr.json @@ -72,6 +72,56 @@ "Connect to invidual POS": "Connexion à une caisse individuelle", "Orders list": "Liste des commandes", "Sign": "Enseigne", + "Order list": "Liste des commandes", + "Status": "Statut", + "Type": "Type", + "Last month": "Mois dernier", + "This month": "Ce mois", + "Last 7 days": "7 derniers jours", + "Today": "Aujourd'hui", + "All": "Tous", + "Date begin": "Date début", + "Date end": "Date fin", + "Order": "Commande", + "Showing": "Affichage", + "to": "à", + "of": "parmi", + "entries": "entrées", + "Consumed": "Consumed", + "Created": "Créé", + "Qty": "Qté", + "Preparation": "Preparation", + "Receipt": "Réception", + "Order lines": "Lignes de commande", + "Status history": "Histo. statuts", + "Transaction date history": "Histo. dates transaction", + "Creation date history": "Histo. dates création", + "Status order history": "Historique statuts commande", + "Order was": "Commande a été", + "Order has been": "Commande a été", + "Order line was": "Ligne a été", + "successfully": "avec succès", + "OMS": "OMS", + "OMS Partner": "Partenaire OMS", + "Transaction details": "Détails transaction", + "Last status": "Dernier statut", + "Added": "Ajouté", + "Modified": "Modifié", + "Transaction": "Transaction", + "Open order": "Commande", + "Origin request": "Origine", + "Cust Id": "Id client", + "Ship for Pickup": "Ship for Pickup", + "Order transaction": "Transaction commande", + "Order Details": "Details commande", + "Package": "Colis", + "Tracking": "Tracking", + "Cd": "Cd", + "Weight": "Poids", + "N°Exp": "N°Exp", + "Carrier": "Transport", + "URL": "URL", + "Restocking": "Restocking", "---------------------------": "---------------------------", "UI Elements": "ÉLÉMENTS DE L'UI", "Forms & Tables": "Formulaires et tableaux", @@ -214,7 +264,6 @@ "Ecommerce": "Commerce électronique", "Product": "Produit", "Category": "Catégorie", - "Order": "Ordre", "Details": "Détails", "Customer": "Client", "Manage Review": "Gérer la revue", @@ -252,7 +301,7 @@ "dataFooter": { "itemsPerPageText": "Objets par page:", "itemsPerPageAll": "Tout", - "pageText": "{0}-{1} of {2}", + "pageText": "{0}-{1} de {2}", "firstPage": "Première page", "prevPage": "Page précédente", "nextPage": "Page suivante", diff --git a/src/plugins/i18n/vue-i18n.d.ts b/src/plugins/i18n/vue-i18n.d.ts index 2690f90..e4ffa69 100755 --- a/src/plugins/i18n/vue-i18n.d.ts +++ b/src/plugins/i18n/vue-i18n.d.ts @@ -6,10 +6,13 @@ /** * you need to import the some interfaces */ +import ar from '@/plugins/i18n/locales/ar.json'; import en from '@/plugins/i18n/locales/en.json'; +import fr from '@/plugins/i18n/locales/fr.json'; import 'vue-i18n'; -type LocaleMessage = typeof en +type LocaleMessage = typeof en & typeof fr & typeof ar; + declare module 'vue-i18n' { export interface DefineLocaleMessage extends LocaleMessage { diff --git a/src/plugins/vuetify/index.ts b/src/plugins/vuetify/index.ts index 76229d0..6b12e5e 100755 --- a/src/plugins/vuetify/index.ts +++ b/src/plugins/vuetify/index.ts @@ -1,10 +1,13 @@ import { deepMerge } from '@antfu/utils' import type { App } from 'vue' +import { useI18n } from 'vue-i18n' import { createVuetify } from 'vuetify' import { VBtn } from 'vuetify/components/VBtn' +import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n' import defaults from './defaults' import { icons } from './icons' import { staticPrimaryColor, themes } from './theme' +import { getI18n } from '@/plugins/i18n/index' // Styles import { cookieRef } from '@/@layouts/stores/config' @@ -37,7 +40,9 @@ export default function (app: App) { defaults, icons, theme: optionTheme, - + locale: { + adapter: createVueI18nAdapter({ i18n: getI18n(), useI18n }), + }, }) app.use(vuetify) diff --git a/src/utils/order.ts b/src/utils/order.ts index 9069456..eee07fe 100644 --- a/src/utils/order.ts +++ b/src/utils/order.ts @@ -1,7 +1,7 @@ export const resolveOrderStatus = (status: string) => { - if (status === 'received') + if (status === 'received' || status === 'fulfilled') return { text: status, color: 'success' } - else if (status === 'fulfilled' || status === 'polled') + else if (status === 'polled') return { text: status, color: 'info' } else if (status === 'intransit polled') return { text: status, color: 'warning' } diff --git a/src/views/pages/order/view/OrderOms.vue b/src/views/pages/order/view/OrderOms.vue index 83f86ae..335169f 100644 --- a/src/views/pages/order/view/OrderOms.vue +++ b/src/views/pages/order/view/OrderOms.vue @@ -7,6 +7,8 @@ import 'vue-json-pretty/lib/styles.css' const props = defineProps() +const { t } = useI18n() + interface Props { orderData: Order } @@ -56,10 +58,10 @@ const openOmsOrderPage = (): void => {
- Proximis + {{ $t('OMS') }}

- OMS Partner + {{ $t('OMS Partner') }}

@@ -81,7 +83,7 @@ const openOmsOrderPage = (): void => {
- Transaction details + {{ $t('Transaction details') }}
@@ -95,7 +97,7 @@ const openOmsOrderPage = (): void => {
- Last status: + {{ $t('Last status') }}: {{ omsData.oms.item.status }} @@ -105,7 +107,7 @@ const openOmsOrderPage = (): void => {
- Added: + {{ $t('Added') }}: {{ format(omsData.oms.item.modificationDate, "EEEE d MMMM yyyy HH:mm:ss") }} @@ -125,7 +127,7 @@ const openOmsOrderPage = (): void => {
- Modified: + {{ $t('Modified') }}: {{ format(omsData.oms.item.creationDate, "EEEE d MMMM yyyy HH:mm:ss") }} @@ -147,7 +149,7 @@ const openOmsOrderPage = (): void => { class="mt-0" @click="openOrderMessageDialog" > - Transaction + {{ $t('Transaction') }} @@ -162,7 +164,7 @@ const openOmsOrderPage = (): void => { class="mt-0" @click="openOmsOrderPage" > - Open order + {{ $t('Open order') }} @@ -191,7 +193,7 @@ const openOmsOrderPage = (): void => { /> - Order transaction + {{ t("Order transaction") }} @@ -200,7 +202,7 @@ const openOmsOrderPage = (): void => { variant="text" @click="OrderMessageDialogVisible = false" > - Close + {{ t("Close") }} diff --git a/src/views/pages/order/view/OrderPanel.vue b/src/views/pages/order/view/OrderPanel.vue index f820307..146376f 100644 --- a/src/views/pages/order/view/OrderPanel.vue +++ b/src/views/pages/order/view/OrderPanel.vue @@ -20,12 +20,12 @@ interface Props {
- Order Details + {{ $t('Order Details') }}
- Origin request: + {{ $t('Origin request') }}: {{ props.orderData.common.requestingLocationCd }} / {{ props.orderData.common.requestingSystemCd }} @@ -33,7 +33,7 @@ interface Props {
- Cust Id: + {{ $t('Cust Id') }}: {{ props.orderData.common.customerId }} @@ -41,7 +41,7 @@ interface Props {
- Date creation: + {{ $t('Created') }}: {{ format(props.orderData.common.fdateCreation, "EEEE d MMMM yyyy HH:mm:ss") }} @@ -49,7 +49,7 @@ interface Props {
- Ship for Pickup: + {{ $t('Ship for Pickup') }}: {{ props.orderData.common.shipforpickupLocationCd }} / {{ props.orderData.common.shipforpickupSystemCd }} @@ -57,7 +57,7 @@ interface Props {
- Transaction + {{ $t('Transaction') }}
diff --git a/src/views/pages/order/view/OrderTabGeneralH.vue b/src/views/pages/order/view/OrderTabGeneralH.vue index 419781b..1b86678 100755 --- a/src/views/pages/order/view/OrderTabGeneralH.vue +++ b/src/views/pages/order/view/OrderTabGeneralH.vue @@ -19,7 +19,6 @@ const headers = computed(() => [ { title: t('Date'), key: 'transactionDate' }, { title: t('Status'), key: 'status' }, { title: t('Consumed'), key: 'consumed' }, - { title: t('Created'), key: 'fdateCreation' }, ]) @@ -29,7 +28,7 @@ const headers = computed(() => [ @@ -52,43 +51,53 @@ const headers = computed(() => [ + + @@ -115,7 +124,7 @@ const headers = computed(() => [ - + [ >
- Order was {{ historyItem.status }} (Id: #{{ historyItem.statusId }}) + + {{ historyItem.status }} + + (Id#{{ historyItem.statusId }})
{{ format(historyItem.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }}
-

- Your order has been {{ historyItem.status }} successfully -

diff --git a/src/views/pages/order/view/OrderTabPreparationH.vue b/src/views/pages/order/view/OrderTabPreparationH.vue index 7f96ab4..eb4f712 100644 --- a/src/views/pages/order/view/OrderTabPreparationH.vue +++ b/src/views/pages/order/view/OrderTabPreparationH.vue @@ -80,7 +80,7 @@ const panelStatus = ref(0)
- N°Exp: + {{ $t('N°Exp') }}: {{ preparationLine.numeroExpedition }} @@ -88,7 +88,7 @@ const panelStatus = ref(0)
- Cd: + {{ $t('Cd') }}: {{ preparationLine.fulfillmentSystemCd }} / {{ preparationLine.fulfillmentLocationCd }} @@ -96,7 +96,7 @@ const panelStatus = ref(0)
- Qty: + {{ $t('Qty') }}: {{ preparationLine.validatedFulfillQty }} / {{ preparationLine.fulfillQty }} @@ -104,7 +104,7 @@ const panelStatus = ref(0)
- Carrier: + {{ $t('Carrier') }}: {{ preparationLine.carrier }} @@ -112,7 +112,7 @@ const panelStatus = ref(0)
- Tracking: + {{ $t('Tracking') }}: {{ preparationLine.trackingCode }} @@ -120,7 +120,7 @@ const panelStatus = ref(0)
- URL: + {{ $t('URL') }}:
- Restocking: + {{ $t('Restocking') }}: {{ preparationLine.restockingCode }} @@ -144,9 +144,9 @@ const panelStatus = ref(0) v-bind="resolveOrderStatus(preparationLine.status)" variant="tonal" label - size="default" + size="x-small" /> - {{ format(section.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }} + {{ format(section.transactionDate, "dd/MM/yyyy HH:mm:ss") }} diff --git a/src/views/pages/order/view/OrderTabReceptionH.vue b/src/views/pages/order/view/OrderTabReceptionH.vue index eb17ca1..3963f28 100644 --- a/src/views/pages/order/view/OrderTabReceptionH.vue +++ b/src/views/pages/order/view/OrderTabReceptionH.vue @@ -80,7 +80,7 @@ const panelStatus = ref(0)
- Colis: + {{ $t('Package') }}: {{ receptionLine.colisId }} @@ -88,7 +88,7 @@ const panelStatus = ref(0)
- Cd: + {{ $t('Cd') }}: {{ receptionLine.intransitSystemCd }} / {{ receptionLine.intransitLocationCd }} @@ -96,7 +96,7 @@ const panelStatus = ref(0)
- Qty: + {{ $t('Qty') }}: {{ receptionLine.validatedIntransitQty }} / {{ receptionLine.intransitQty }} @@ -104,7 +104,7 @@ const panelStatus = ref(0)
- Tracking: + {{ $t('Tracking') }}: {{ receptionLine.trackingNumber }} @@ -112,7 +112,7 @@ const panelStatus = ref(0)
- Weight: + {{ $t('Weight') }}: {{ receptionLine.orderLineShipWeight }} @@ -123,9 +123,9 @@ const panelStatus = ref(0) v-bind="resolveOrderStatus(receptionLine.status)" variant="tonal" label - size="default" + size="x-small" /> - {{ format(section.transactionDate, "EEEE d MMMM yyyy HH:mm:ss") }} + {{ format(section.transactionDate, "dd/MM/yyyy HH:mm:ss") }}