refs #5152 added confirmation popup
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-02-08 10:54:21 +01:00
parent 0e8848b31c
commit 4413c8828b
6 changed files with 34 additions and 7 deletions

View File

@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [2306.01] - 2023-02-23
### Added
-
- (Tickets -> Datos Básicos) Mensaje de confirmación al intentar generar tickets con negativos
### Changed
- (General -> Inicio) Ahora permite recuperar la contraseña tanto con el correo de recuperación como el usuario

View File

@ -21,3 +21,5 @@ companyFk: empresa
agencyModeFk: agencia
ticketFk: ticket
mergedTicket: ticket fusionado
withWarningAccept: aviso negativos
isWithoutNegatives: sin negativos

View File

@ -83,6 +83,11 @@ module.exports = Self => {
type: 'boolean',
description: 'Is whithout negatives',
required: true
},
{
arg: 'withWarningAccept',
type: 'boolean',
description: 'Has pressed in confirm message',
}],
returns: {
type: ['object'],

View File

@ -40,7 +40,7 @@
</vn-fetched-tags>
</vn-td>
<vn-td ng-if="$ctrl.ticket.sale.haveDifferences" number>
<span
<span
class="chip"
ng-class="{'alert': sale.quantity>sale.movable}">
{{::sale.movable}}
@ -64,14 +64,14 @@
<vn-side-menu side="right">
<div class="vn-pa-md">
<div class="totalBox align-left">
<h6 class="align-center" translate>Total</h6>
<h6 class="align-center" translate>Total</h6>
<div> <vn-label translate>Price</vn-label> {{$ctrl.totalPrice | currency: 'EUR': 2}} </div>
<div> <vn-label translate>New price</vn-label> {{$ctrl.totalNewPrice | currency: 'EUR': 2}} </div>
<div> <vn-label translate>Difference</vn-label> {{$ctrl.totalPriceDifference | currency: 'EUR': 2}} </div>
</div>
<vn-card ng-show="::$ctrl.totalPriceDifference">
<div class="totalBox align-left" >
<h6 class="align-center" translate>Charge difference to</h6>
<h6 class="align-center" translate>Charge difference to</h6>
<div ng-repeat="action in ticketUpdateActions">
<vn-radio
ng-model="$ctrl.ticket.option"
@ -82,7 +82,7 @@
</div>
</vn-card>
<div class="totalBox align-left" ng-show="::$ctrl.haveNegatives">
<vn-check
<vn-check
ng-model="$ctrl.ticket.withoutNegatives"
label="Create without negatives"
info="Clone this ticket with the changes and only sales availables">
@ -95,4 +95,10 @@
warehouse-fk="$ctrl.ticket.warehouseFk"
ticket-fk="$ctrl.ticket.id">
</vn-item-descriptor-popover>
<vn-confirm
vn-id="negativesConfirm"
on-accept="$ctrl.onConfirmAccept()"
question="Negatives are going to be generated, are you sure you want to advance all the lines?"
message="Edit basic data">
</vn-confirm>

View File

@ -83,6 +83,17 @@ class Controller extends Component {
}
onSubmit() {
if (this.haveNegatives && !this.ticket.withoutNegatives)
this.$.negativesConfirm.show();
else this.applyChanges();
}
onConfirmAccept() {
this.ticket.withWarningAccept = true;
this.applyChanges();
}
applyChanges() {
if (!this.ticket.option) {
return this.vnApp.showError(
this.$t('Choose an option')
@ -102,7 +113,8 @@ class Controller extends Component {
landed: this.ticket.landed,
isDeleted: this.ticket.isDeleted,
option: parseInt(this.ticket.option),
isWithoutNegatives: this.ticket.withoutNegatives
isWithoutNegatives: this.ticket.withoutNegatives,
withWarningAccept: this.ticket.withWarningAccept
};
this.$http.post(query, params)

View File

@ -8,4 +8,6 @@ New price: Nuevo precio
Price difference: Diferencia de precio
Create without negatives: Crear sin negativos
Clone this ticket with the changes and only sales availables: Clona este ticket con los cambios y solo las ventas disponibles.
Movable: Movible
Movable: Movible
Negatives are going to be generated, are you sure you want to advance all the lines?: Se van a generar negativos, ¿seguro que quieres adelantar todas las líneas?
Edit basic data: Editar datos básicos