@@ -201,8 +210,10 @@ import { isRowRemovable } from '~/shared/utils/collectionRow'
import CarrierAddressBlock from '~/modules/transport/components/CarrierAddressBlock.vue'
import CarrierContactBlock from '~/modules/transport/components/CarrierContactBlock.vue'
import CarrierPriceBlock from '~/modules/transport/components/CarrierPriceBlock.vue'
+import CarrierQualimatTab from '~/modules/transport/components/CarrierQualimatTab.vue'
import { useCarrierForm } from '~/modules/transport/composables/useCarrierForm'
import { useCarrier } from '~/modules/transport/composables/useCarrier'
+import type { QualimatCarrierRow } from '~/modules/transport/composables/useQualimatSearch'
import { clampPercent, sanitizeDecimal } from '~/modules/transport/utils/forms/numberInput'
interface SelectOption {
@@ -235,10 +246,12 @@ const {
dischargeUploading,
selectDischarge,
clearDischarge,
+ setCertification,
isLiot,
certificationReadonly,
showCharteredFields,
showDischarge,
+ applyQualimatSelection,
address,
addressErrors,
submitAddress,
@@ -267,12 +280,14 @@ const certificationOptions = computed
(() => {
const TAB_ICONS: Record = {
+ qualimat: 'mdi:truck-fast-outline',
addresses: 'mdi:map-marker-outline',
contacts: 'mdi:account-box-plus-outline',
prices: 'mdi:payment',
}
const activeTab = ref('addresses')
-const tabs = computed(() => ['addresses', 'contacts', 'prices'].map(key => ({
+// Onglet Qualimat disponible en modif (ERP-172) : « actualiser » nom + certification.
+const tabs = computed(() => ['qualimat', 'addresses', 'contacts', 'prices'].map(key => ({
key,
label: t(`transport.carriers.tab.${key}`),
icon: TAB_ICONS[key],
@@ -361,6 +376,15 @@ async function onUpdateMain(): Promise {
}
}
+/** Intégration d'une ligne QUALIMAT (onglet Qualimat) : actualise nom + certification
+ * + FK via PATCH (applyQualimatSelection). L'adresse existante n'est pas touchée. */
+async function onIntegrateQualimat(row: QualimatCarrierRow): Promise {
+ const ok = await applyQualimatSelection(row)
+ if (ok) {
+ toast.success({ title: t('transport.carriers.toast.integrateSuccess') })
+ }
+}
+
async function onSubmitAddresses(): Promise {
const ok = await submitAddress(err => toast.error({ title: t('transport.carriers.toast.error'), message: apiErrorMessage(err) }))
if (ok) toast.success({ title: t('transport.carriers.toast.addressSaved') })
diff --git a/frontend/modules/transport/pages/carriers/new.vue b/frontend/modules/transport/pages/carriers/new.vue
index 1277711..40744dc 100644
--- a/frontend/modules/transport/pages/carriers/new.vue
+++ b/frontend/modules/transport/pages/carriers/new.vue
@@ -156,46 +156,14 @@
assistee (table de selection) ; Adresses / Contacts / Prix arrivent aux
tickets suivants (placeholders « A venir »). -->
-
+
-
-
-
-
-
-
-
-
-
-
- {{ formatDateFr(item.validityDate as string) }}
-
-
-
-
+
-
-
- {{ t('transport.carriers.form.qualimat.confirm.title') }}
-
- {{ t('transport.carriers.form.qualimat.confirm.message') }}
-
-
-
-
-
-
-
+
{{ t('transport.carriers.form.confirmDelete.title') }}
@@ -353,15 +299,15 @@
-
-