Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
This commit is contained in:
commit
5163b7b253
|
@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
-
|
-
|
||||||
|
|
||||||
## [2324.01] - 2023-06-08
|
## [2324.01] - 2023-06-15
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- (Tickets -> Abono) Al abonar permite crear el ticket abono con almacén o sin almmacén
|
- (Tickets -> Abono) Al abonar permite crear el ticket abono con almacén o sin almmacén
|
||||||
|
|
|
@ -8,7 +8,7 @@ Salix is also the scientific name of a beautifull tree! :)
|
||||||
|
|
||||||
Required applications.
|
Required applications.
|
||||||
|
|
||||||
* Node.js = 14.x LTS
|
* Node.js >= 16.x LTS
|
||||||
* Docker
|
* Docker
|
||||||
* Git
|
* Git
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ $ npm run test:e2e
|
||||||
|
|
||||||
Open Visual Studio Code, press Ctrl+P and paste the following commands.
|
Open Visual Studio Code, press Ctrl+P and paste the following commands.
|
||||||
|
|
||||||
In Visual Studio Code we use the ESLint extension.
|
In Visual Studio Code we use the ESLint extension.
|
||||||
```
|
```
|
||||||
ext install dbaeumer.vscode-eslint
|
ext install dbaeumer.vscode-eslint
|
||||||
```
|
```
|
||||||
|
|
|
@ -62,10 +62,9 @@ module.exports = Self => {
|
||||||
scopes: ['change-password'],
|
scopes: ['change-password'],
|
||||||
userId: vnUser.id
|
userId: vnUser.id
|
||||||
});
|
});
|
||||||
throw new UserError('Pass expired', 'passExpired', {
|
const err = new UserError('Pass expired', 'passExpired');
|
||||||
id: vnUser.id,
|
err.details = {token: changePasswordToken};
|
||||||
token: changePasswordToken.id
|
throw err;
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default class Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
$onInit() {
|
$onInit() {
|
||||||
if (!this.$state.params || !this.$state.params.id || !this.$state.params.token)
|
if (!this.$state.params.id)
|
||||||
this.$state.go('login');
|
this.$state.go('login');
|
||||||
|
|
||||||
this.$http.get('UserPasswords/findOne')
|
this.$http.get('UserPasswords/findOne')
|
||||||
|
@ -25,7 +25,7 @@ export default class Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
submit() {
|
submit() {
|
||||||
const id = this.$state.params.id;
|
const userId = this.$state.params.userId;
|
||||||
const newPassword = this.newPassword;
|
const newPassword = this.newPassword;
|
||||||
const oldPassword = this.oldPassword;
|
const oldPassword = this.oldPassword;
|
||||||
|
|
||||||
|
@ -35,12 +35,12 @@ export default class Controller {
|
||||||
throw new UserError(`Passwords don't match`);
|
throw new UserError(`Passwords don't match`);
|
||||||
|
|
||||||
const headers = {
|
const headers = {
|
||||||
Authorization: this.$state.params.token
|
Authorization: this.$state.params.id
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$http.post('VnUsers/change-password',
|
this.$http.post('VnUsers/change-password',
|
||||||
{
|
{
|
||||||
id,
|
id: userId,
|
||||||
oldPassword,
|
oldPassword,
|
||||||
newPassword
|
newPassword
|
||||||
},
|
},
|
||||||
|
|
|
@ -27,10 +27,9 @@ export default class Controller {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.password = '';
|
this.password = '';
|
||||||
this.focusUser();
|
this.focusUser();
|
||||||
if (req?.data?.error?.code == 'passExpired') {
|
const err = req.data?.error;
|
||||||
const [args] = req.data.error.translateArgs;
|
if (err?.code == 'passExpired')
|
||||||
this.$state.go('change-password', args);
|
this.$state.go('change-password', err.details.token);
|
||||||
}
|
|
||||||
|
|
||||||
throw req;
|
throw req;
|
||||||
});
|
});
|
||||||
|
|
|
@ -38,7 +38,7 @@ function config($stateProvider, $urlRouterProvider) {
|
||||||
})
|
})
|
||||||
.state('change-password', {
|
.state('change-password', {
|
||||||
parent: 'outLayout',
|
parent: 'outLayout',
|
||||||
url: '/change-password?id&token',
|
url: '/change-password?id&userId',
|
||||||
description: 'Change password',
|
description: 'Change password',
|
||||||
template: '<vn-change-password></vn-change-password>'
|
template: '<vn-change-password></vn-change-password>'
|
||||||
})
|
})
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
name: account
|
||||||
|
columns:
|
||||||
|
id: id
|
|
@ -0,0 +1,3 @@
|
||||||
|
name: cuenta
|
||||||
|
columns:
|
||||||
|
id: id
|
|
@ -0,0 +1,5 @@
|
||||||
|
name: mail alias
|
||||||
|
columns:
|
||||||
|
id: id
|
||||||
|
mailAlias: alias
|
||||||
|
account: account
|
|
@ -0,0 +1,5 @@
|
||||||
|
name: alias de correo
|
||||||
|
columns:
|
||||||
|
id: id
|
||||||
|
mailAlias: alias
|
||||||
|
account: cuenta
|
|
@ -5,8 +5,7 @@ import UserError from 'core/lib/user-error';
|
||||||
export default class Controller extends Section {
|
export default class Controller extends Section {
|
||||||
onSynchronizeAll() {
|
onSynchronizeAll() {
|
||||||
this.vnApp.showSuccess(this.$t('Synchronizing in the background'));
|
this.vnApp.showSuccess(this.$t('Synchronizing in the background'));
|
||||||
this.$http.patch(`Accounts/syncAll`)
|
this.$http.patch(`Accounts/syncAll`);
|
||||||
.then(() => this.vnApp.showSuccess(this.$t('Users synchronized!')));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onUserSync() {
|
onUserSync() {
|
||||||
|
|
|
@ -2,7 +2,7 @@ const UserError = require('vn-loopback/util/user-error');
|
||||||
const base64url = require('base64url');
|
const base64url = require('base64url');
|
||||||
|
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
Self.remoteMethodCtx('confirm', {
|
Self.remoteMethod('confirm', {
|
||||||
description: 'Confirms electronic payment transaction',
|
description: 'Confirms electronic payment transaction',
|
||||||
accessType: 'WRITE',
|
accessType: 'WRITE',
|
||||||
accepts: [
|
accepts: [
|
||||||
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.confirm = async(ctx, signatureVersion, merchantParameters, signature) => {
|
Self.confirm = async(signatureVersion, merchantParameters, signature) => {
|
||||||
const $ = Self.app.models;
|
const $ = Self.app.models;
|
||||||
let transaction;
|
let transaction;
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ module.exports = Self => {
|
||||||
params['Ds_Currency'],
|
params['Ds_Currency'],
|
||||||
params['Ds_Response'],
|
params['Ds_Response'],
|
||||||
params['Ds_ErrorCode']
|
params['Ds_ErrorCode']
|
||||||
], {userId: ctx.req.accessToken.userId});
|
]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
@ -118,7 +118,8 @@
|
||||||
label="Company"
|
label="Company"
|
||||||
show-field="code"
|
show-field="code"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
ng-model="$ctrl.companyFk">
|
ng-model="$ctrl.companyFk"
|
||||||
|
on-change="$ctrl.getInvoiceDate(value)">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
url="Printers"
|
url="Printers"
|
||||||
|
|
|
@ -7,23 +7,29 @@ class Controller extends Section {
|
||||||
$onInit() {
|
$onInit() {
|
||||||
const date = Date.vnNew();
|
const date = Date.vnNew();
|
||||||
Object.assign(this, {
|
Object.assign(this, {
|
||||||
maxShipped: new Date(date.getFullYear(), date.getMonth(), 0),
|
maxShipped: new Date(date.getFullYear(), date.getMonth(), 0),
|
||||||
clientsToInvoice: 'all',
|
clientsToInvoice: 'all',
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$http.get('UserConfigs/getUserConfig')
|
this.$http.get('UserConfigs/getUserConfig')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.companyFk = res.data.companyFk;
|
this.companyFk = res.data.companyFk;
|
||||||
const params = {
|
this.getInvoiceDate(this.companyFk);
|
||||||
companyFk: this.companyFk
|
});
|
||||||
};
|
}
|
||||||
return this.$http.get('InvoiceOuts/getInvoiceDate', {params});
|
|
||||||
})
|
getInvoiceDate(companyFk) {
|
||||||
.then(res => {
|
const params = { companyFk: companyFk };
|
||||||
this.minInvoicingDate = res.data.issued ? new Date(res.data.issued) : null;
|
this.fetchInvoiceDate(params);
|
||||||
this.invoiceDate = this.minInvoicingDate;
|
}
|
||||||
});
|
|
||||||
}
|
fetchInvoiceDate(params) {
|
||||||
|
this.$http.get('InvoiceOuts/getInvoiceDate', { params })
|
||||||
|
.then(res => {
|
||||||
|
this.minInvoicingDate = res.data.issued ? new Date(res.data.issued) : null;
|
||||||
|
this.invoiceDate = this.minInvoicingDate;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
stopInvoicing() {
|
stopInvoicing() {
|
||||||
this.status = 'stopping';
|
this.status = 'stopping';
|
||||||
|
@ -42,7 +48,7 @@ class Controller extends Section {
|
||||||
throw new UserError('Invoice date and the max date should be filled');
|
throw new UserError('Invoice date and the max date should be filled');
|
||||||
if (this.invoiceDate < this.maxShipped)
|
if (this.invoiceDate < this.maxShipped)
|
||||||
throw new UserError('Invoice date can\'t be less than max date');
|
throw new UserError('Invoice date can\'t be less than max date');
|
||||||
if (this.invoiceDate.getTime() < this.minInvoicingDate.getTime())
|
if (this.minInvoicingDate && this.invoiceDate.getTime() < this.minInvoicingDate.getTime())
|
||||||
throw new UserError('Exists an invoice with a previous date');
|
throw new UserError('Exists an invoice with a previous date');
|
||||||
if (!this.companyFk)
|
if (!this.companyFk)
|
||||||
throw new UserError('Choose a valid company');
|
throw new UserError('Choose a valid company');
|
||||||
|
|
|
@ -2,14 +2,17 @@ name: request
|
||||||
columns:
|
columns:
|
||||||
id: id
|
id: id
|
||||||
description: description
|
description: description
|
||||||
created: created
|
buyerCode: buyer
|
||||||
quantity: quantity
|
quantity: quantity
|
||||||
price: price
|
price: price
|
||||||
isOk: ok
|
|
||||||
response: response
|
|
||||||
saleFk: sale
|
|
||||||
ticketFk: ticket
|
|
||||||
attenderFk: attender
|
|
||||||
requesterFk: requester
|
|
||||||
itemFk: item
|
itemFk: item
|
||||||
|
clientFk: client
|
||||||
|
response: response
|
||||||
|
total: total
|
||||||
|
buyed: buyed
|
||||||
|
saleFk: sale
|
||||||
|
created: created
|
||||||
|
isOk: ok
|
||||||
|
requesterFk: requester
|
||||||
|
attenderFk: attender
|
||||||
|
ticketFk: ticket
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
name: peticion
|
name: petición
|
||||||
columns:
|
columns:
|
||||||
id: id
|
id: id
|
||||||
description: descripción
|
description: descripción
|
||||||
created: creado
|
buyerCode: comprador
|
||||||
quantity: cantidad
|
quantity: cantidad
|
||||||
price: precio
|
price: precio
|
||||||
isOk: ok
|
|
||||||
response: respuesta
|
|
||||||
saleFk: línea
|
|
||||||
ticketFk: ticket
|
|
||||||
attenderFk: asistente
|
|
||||||
requesterFk: solicitante
|
|
||||||
itemFk: artículo
|
itemFk: artículo
|
||||||
|
clientFk: cliente
|
||||||
|
response: respuesta
|
||||||
|
total: total
|
||||||
|
buyed: comprado
|
||||||
|
saleFk: línea
|
||||||
|
created: creado
|
||||||
|
isOk: ok
|
||||||
|
requesterFk: solicitante
|
||||||
|
attenderFk: asistente
|
||||||
|
ticketFk: ticket
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
name: zone event
|
name: event
|
||||||
columns:
|
columns:
|
||||||
id: id
|
id: id
|
||||||
zoneFk: zone
|
zoneFk: zone
|
||||||
type: type
|
type: type
|
||||||
dated: dated
|
dated: dated
|
||||||
started: started
|
started: starts
|
||||||
ended: ended
|
ended: ends
|
||||||
weekDays: week days
|
weekDays: week days
|
||||||
hour: hour
|
hour: hour
|
||||||
travelingDays: traveling days
|
travelingDays: traveling days
|
||||||
price: price
|
price: price
|
||||||
bonus: bonus
|
bonus: bonus
|
||||||
m3Max: max m3
|
m3Max: max. m3
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
name: evento zona
|
name: evento
|
||||||
columns:
|
columns:
|
||||||
id: id
|
id: id
|
||||||
zoneFk: zona
|
zoneFk: zona
|
||||||
type: tipo
|
type: tipo
|
||||||
dated: fecha
|
dated: fecha
|
||||||
started: comenzado
|
started: empieza
|
||||||
ended: terminado
|
ended: termina
|
||||||
weekDays: días semana
|
weekDays: días semana
|
||||||
hour: hora
|
hour: hora
|
||||||
travelingDays: días de viaje
|
travelingDays: días de viaje
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: zone exclusion
|
name: exclusion
|
||||||
columns:
|
columns:
|
||||||
id: id
|
id: id
|
||||||
dated: dated
|
dated: date
|
||||||
zoneFk: zone
|
zoneFk: zone
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: zone exclusion
|
name: exclusión
|
||||||
columns:
|
columns:
|
||||||
id: id
|
id: id
|
||||||
dated: fecha
|
dated: fecha
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
name: zone included
|
name: inclusion
|
||||||
columns:
|
columns:
|
||||||
id: id
|
id: id
|
||||||
dated: dated
|
dated: dated
|
||||||
zoneFk: zone
|
zoneFk: zone
|
||||||
|
isIncluded: incluida
|
||||||
|
geoFk: localización
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
name: zona incluida
|
name: inclusión
|
||||||
columns:
|
columns:
|
||||||
id: id
|
id: id
|
||||||
dated: fecha
|
dated: fecha
|
||||||
zoneFk: zona
|
zoneFk: zona
|
||||||
|
isIncluded: incluida
|
||||||
|
geoFk: localización
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: zone warehouse
|
name: warehouse
|
||||||
columns:
|
columns:
|
||||||
id: id
|
id: id
|
||||||
warehouseFk: warehouse
|
warehouseFk: warehouse
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: almacén zona
|
name: almacén
|
||||||
columns:
|
columns:
|
||||||
id: id
|
id: id
|
||||||
warehouseFk: almacén
|
warehouseFk: almacén
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-back",
|
"name": "salix-back",
|
||||||
"version": "23.26.01",
|
"version": "23.24.01",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "Salix backend",
|
"description": "Salix backend",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue