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

@ -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

@ -9,3 +9,5 @@ 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
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