diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 561671b..75b83ee 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,13 +4,17 @@ - @@ -792,7 +797,8 @@ - diff --git a/frontend/components/reception/reception-weight.vue b/frontend/components/reception/reception-weight.vue index b5e9c32..20f2978 100644 --- a/frontend/components/reception/reception-weight.vue +++ b/frontend/components/reception/reception-weight.vue @@ -5,11 +5,11 @@

Pont-bascule connecté

-
+
{{ displayWeight }} kg @@ -36,7 +36,7 @@ diff --git a/frontend/components/shipment/shipment-loading.vue b/frontend/components/shipment/shipment-loading.vue index bdd8595..078e049 100644 --- a/frontend/components/shipment/shipment-loading.vue +++ b/frontend/components/shipment/shipment-loading.vue @@ -1,5 +1,5 @@ diff --git a/frontend/composables/useWeighing.ts b/frontend/composables/useWeighing.ts index f18cd95..4d3dc8b 100644 --- a/frontend/composables/useWeighing.ts +++ b/frontend/composables/useWeighing.ts @@ -27,9 +27,7 @@ export const useWeighing = ({ const displayWeight = computed(() => weightData.value?.weight ?? currentWeightEntry.value?.weight ?? null) const displayDsd = computed(() => weightData.value?.dsd ?? currentWeightEntry.value?.dsd ?? '-') const title = computed(() => (mode === 'gross' ? 'Pesée à plein' : 'Pesée à vide')) - const showLoadingBox = computed( - () => isFetching.value || (displayWeight.value === null && currentWeightEntry.value === null) - ) + const showLoadingBox = computed(() => isFetching.value) const fetchWeight = async () => { isFetching.value = true @@ -111,9 +109,7 @@ export const useWeighingShipment = ({ const displayWeight = computed(() => weightData.value?.weight ?? currentWeightEntry.value?.weight ?? null) const displayDsd = computed(() => weightData.value?.dsd ?? currentWeightEntry.value?.dsd ?? '-') const title = computed(() => (modeShipment === 'gross' ? 'Pesée à vide' : 'Pesée à plein')) - const showLoadingBox = computed( - () => isFetching.value || (displayWeight.value === null && currentWeightEntry.value === null) - ) + const showLoadingBox = computed(() => isFetching.value) const fetchWeight = async () => { isFetching.value = true diff --git a/frontend/i18n/locales/fr.json b/frontend/i18n/locales/fr.json index 91dbc6a..cb6ac2d 100644 --- a/frontend/i18n/locales/fr.json +++ b/frontend/i18n/locales/fr.json @@ -109,9 +109,11 @@ }, "success": { "reception": { + "create": "Réception créée avec succès", "update": "Réception mise à jour avec succès." }, "shipment": { + "create": "Éxpedition créée avec succès", "update": "Éxpedition mise à jour avec succès." }, "supplier": { diff --git a/frontend/layouts/default.vue b/frontend/layouts/default.vue index d0df6cf..0b3ebf0 100644 --- a/frontend/layouts/default.vue +++ b/frontend/layouts/default.vue @@ -134,7 +134,8 @@ class="inline-flex items-center py-2 -my-2 text-xl leading-none transition hover:opacity-80" aria-haspopup="true" > - {{ userDisplayName }} + + {{ userDisplayName }} diff --git a/frontend/services/reception.ts b/frontend/services/reception.ts index 68d75d7..09a27e8 100644 --- a/frontend/services/reception.ts +++ b/frontend/services/reception.ts @@ -21,6 +21,7 @@ export async function getReception(id: number) { export async function createReception(payload: ReceptionPayload = {}) { const api = useApi() return api.post('receptions', payload, { + toastSuccessKey: 'success.reception.create', toastErrorKey: 'errors.reception.create' }) } diff --git a/frontend/services/shipment.ts b/frontend/services/shipment.ts index d701048..d273102 100644 --- a/frontend/services/shipment.ts +++ b/frontend/services/shipment.ts @@ -18,8 +18,10 @@ export async function getShipment(id: number) { } export async function createShipment(payload: ShipmentPayload = {}) { + console.log('test') const api = useApi() return api.post('shipments', payload, { + toastSuccessKey: 'success.shipment.create', toastErrorKey: 'errors.shipment.create' }) }