feat: add radio button
gitea/salix/pipeline/head Build queued... Details

This commit is contained in:
Vicent Llopis 2022-10-17 10:19:07 +02:00
parent 15ba6681af
commit 6924b05c8a
4 changed files with 19 additions and 2 deletions

View File

@ -36,7 +36,7 @@ module.exports = Self => {
arg: 'toClientId', arg: 'toClientId',
type: 'number', type: 'number',
description: 'The maximum client id', description: 'The maximum client id',
required: false required: true
}, },
{ {
arg: 'companyFk', arg: 'companyFk',

View File

@ -37,6 +37,18 @@
</vn-date-picker> </vn-date-picker>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-radio
label="All clients"
val="allClients"
ng-model="$ctrl.clientsNumber">
</vn-radio>
<vn-radio
label="Clients range"
val="clientsRange"
ng-model="$ctrl.clientsNumber">
</vn-radio>
</vn-horizontal>
<vn-horizontal ng-show="$ctrl.clientsNumber == 'clientsRange'">
<vn-autocomplete <vn-autocomplete
url="Clients" url="Clients"
label="From client" label="From client"

View File

@ -8,6 +8,7 @@ class Controller extends Dialog {
this.invoice = { this.invoice = {
maxShipped: new Date() maxShipped: new Date()
}; };
this.clientsNumber = 'allClients';
} }
$onInit() { $onInit() {
@ -66,6 +67,8 @@ class Controller extends Dialog {
}); });
this.$.invoiceButton.disabled = true; this.$.invoiceButton.disabled = true;
if (this.clientsNumber == 'allClients') this.getMaxClientId();
return this.$http.post(`InvoiceOuts/clientToInvoice`, this.invoice) return this.$http.post(`InvoiceOuts/clientToInvoice`, this.invoice)
.then(async res => { .then(async res => {
const clientsAndAddresses = res.data.clientsAndAddresses; const clientsAndAddresses = res.data.clientsAndAddresses;

View File

@ -9,3 +9,5 @@ Invoice date and the max date should be filled: La fecha de factura y la fecha l
Choose a valid clients range: Selecciona un rango válido de clientes Choose a valid clients range: Selecciona un rango válido de clientes
of: de of: de
Id Client: Id Cliente Id Client: Id Cliente
All clients: Todos los clientes
Clients range: Rango de clientes