[#327] Afficher modifier une expédition terminée #34

Merged
tristan merged 3 commits from feat/327-voir-modifier-une-expedition-terminee into develop 2026-02-26 14:01:40 +00:00
3 changed files with 11 additions and 6 deletions
Showing only changes of commit 09db30af72 - Show all commits

View File

@@ -12,7 +12,7 @@
type="submit"
:disabled="isLoading"
>
<Icon :name="props.address ? 'mdi:check' : 'mdi:plus'" size="28" />
<Icon :name="props.address ? '' : 'mdi:plus'" size="28" />
{{ props.address? "Valider" : "Ajouter" }}
</button>
</div>

View File

@@ -190,7 +190,6 @@
type="submit"
class="inline-flex mb-16 items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2 justify-self-end"
>
<Icon name="mdi:check" size="28" />
Valider
</UiButton>
</div>

View File

@@ -256,13 +256,19 @@ const selectedCarrier = computed(() =>
carriers.value.find((carrier) => String(carrier.id) === form.carrierId) ?? null
)
const isLiotCarrier = computed(() => selectedCarrier.value?.code === SUPPLIER_CODE.LIOT)
const isAddressData = (value: unknown): value is AddressData =>
typeof value === 'object' &&
value !== null &&
'id' in value &&
'fullAddress' in value
const customerAddresses = computed<AddressData[]>(() => {
if (!form.customerId) return []
const customerId = Number(form.customerId)
if (!Number.isFinite(customerId)) {
return []
}
return customers.value.find((customer) => customer.id === customerId)?.addresses ?? []
if (!Number.isFinite(customerId) || customerId <= 0) return []
const addresses = customers.value.find((c) => c.id === customerId)?.addresses ?? []
return addresses.filter(isAddressData)
})
const customerAddressOptions = computed(() =>