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