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 @@ - + + + + + + - - - + + @@ -226,36 +230,36 @@ - { + "keyToString": { + "RunOnceActivity.MCP Project settings loaded": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", + "RunOnceActivity.git.unshallow": "true", + "RunOnceActivity.typescript.service.memoryLimit.init": "true", + "git-widget-placeholder": "develop", + "last_opened_file_path": "//wsl.localhost/Ubuntu-24.04/home/m-tristan/workspace/Ferme", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "settings.editor.selected.configurable": "advanced.settings", + "ts.external.directory.path": "/opt/phpstorm/plugins/javascript-plugin/jsLanguageServicesImpl/external", + "vue.rearranger.settings.migration": "true" }, - "keyToStringList": { - "DatabaseDriversLRU": [ - "postgresql" + "keyToStringList": { + "DatabaseDriversLRU": [ + "postgresql" ], - "com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File": [ - "TEXT" + "com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File": [ + "TEXT" ], - "vue.recent.templates": [ - "Vue Composition API Component" + "vue.recent.templates": [ + "Vue Composition API Component" ] } -}]]> +} @@ -324,14 +328,8 @@ - - - - 1769073690382 - - - - 1769073690382 + + @@ -717,7 +715,15 @@ 1773761787472 - + + + 1773766207721 + + + + 1773766207721 + + @@ -767,7 +773,6 @@ - @@ -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 @@ - + Chargement des bovins diff --git a/frontend/components/shipment/shipment-weight.vue b/frontend/components/shipment/shipment-weight.vue index 9be730f..e0856dc 100644 --- a/frontend/components/shipment/shipment-weight.vue +++ b/frontend/components/shipment/shipment-weight.vue @@ -5,13 +5,13 @@ Pont-bascule connecté - + + class="w-full flex flex-col items-center justify-center border border-primary-500 h-[90px] mt-12 mb-[86px] text-4xl text-primary-500"> {{ displayWeight }} kg @@ -36,7 +36,7 @@ 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' }) }
Pont-bascule connecté