WIP : cas produit manquant

This commit is contained in:
2024-07-12 21:47:36 +02:00
parent 0d6b6c592f
commit d40050ee2a

View File

@@ -21,7 +21,7 @@ const {
const brokenAmount = ref(0)
const actionClaim = computed(()=> {
if (brokenAmount.value > 10) {
if (brokenAmount.value > 10 && currentTicket.value.filter2 === 'Produit cassé / défaillant') {
return {
label : "Demander le retour du colis au client",
method : 'askParcelReturn',
@@ -31,7 +31,7 @@ const actionClaim = computed(()=> {
if(messages.value[0].claim.refund_mode === 'Réexpédition souhaitée'){
return {
label : "Valider la demande de réexpedition",
method : 'validateResend',
method : currentTicket.value.filter2 === 'Produit cassé / défaillant' ? 'validateFreeResend' : 'validateFreeWithoutClearanceResend',
parcelType : null,
}
}
@@ -48,7 +48,7 @@ const actionClaim = computed(()=> {
onMounted(async () => {
messages.value = await TicketApi.getMessages(storeTicket.currentTicket.code, storeTicket.idTicket)
if(currentTicket.value.filter2 === 'Produit cassé / défaillant'){
if(currentTicket.value.filter2 === 'Produit cassé / défaillant' || currentTicket.value.filter2 === 'Produit manquant'){
brokenAmount.value = await TicketApi.getBrokenAmount(storeTicket.currentTicket.code, storeTicket.idTicket)
}