refs #5648 vn-confirm
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-05-22 10:41:02 +02:00
parent 23287e5ebf
commit 1b19035d8d
2 changed files with 19 additions and 19 deletions

View File

@ -481,18 +481,21 @@
on-accept="$ctrl.transferSales($ctrl.transfer.ticketId)">
</vn-confirm>
<vn-confirm
vn-id="claimSure"
message="Do you want to create a claim?"
on-accept="$ctrl.onCreateClaimAccepted()">
</vn-confirm>
<vn-confirm
vn-id="claimConfirm"
question="Do you want to continue?"
message="Claim out of time"
on-accept="$ctrl.onCreateClaimAccepted()">
</vn-confirm>¡
</vn-confirm>
<vn-confirm
vn-id="claimSure"
message="Do you want to create a claim?"
on-accept="$ctrl.createClaim">
</vn-confirm>
<vn-menu vn-id="moreOptions">
@ -514,11 +517,12 @@
</vn-item>
<vn-item translate
name="claim"
ng-click="$ctrl.createClaim()"
ng-click="claimSure.show()"
ng-if="$ctrl.isClaimable">
Add claim
Add claim
</vn-item>
<vn-item translate
name="reserve"
ng-click="$ctrl.markAsReserved()"

View File

@ -194,17 +194,13 @@ class Controller extends Section {
}
createClaim() {
this.$.claimSure.show();
const timeDifference = new Date().getTime() - new Date(this.ticket.shipped).getTime();
const pastDays = Math.floor(timeDifference / 86400000);
setTimeout(() => {
const timeDifference = new Date().getTime() - new Date(this.ticket.shipped).getTime();
const pastDays = Math.floor(timeDifference / 86400000);
if (pastDays >= this.ticketConfig[0].daysForWarningClaim)
this.$.claimConfirm.show();
else
this.onCreateClaimAccepted();
}, 10000000);
if (pastDays >= this.ticketConfig[0].daysForWarningClaim)
this.$.claimConfirm.show();
else
this.onCreateClaimAccepted();
}
onCreateClaimAccepted() {