Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
This commit is contained in:
commit
9b0cf7f378
|
@ -22,11 +22,13 @@ module.exports = Self => {
|
|||
const tokenId = ctx.req.accessToken.id;
|
||||
|
||||
const now = new Date();
|
||||
const differenceMilliseconds = now - created;
|
||||
const differenceMilliseconds = now - new Date(created);
|
||||
const differenceSeconds = Math.floor(differenceMilliseconds / 1000);
|
||||
|
||||
const accessTokenConfig = await models.AccessTokenConfig.findOne({fields: ['renewPeriod']});
|
||||
|
||||
console.log(userId, created, now, differenceMilliseconds, differenceSeconds, accessTokenConfig.renewPeriod, differenceSeconds <= accessTokenConfig.renewPeriod);
|
||||
|
||||
if (differenceSeconds <= accessTokenConfig.renewPeriod)
|
||||
throw new UserError(`The renew period has not been exceeded`);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ describe('Travel descriptor path', () => {
|
|||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('buyer', 'travel');
|
||||
await page.write(selectors.travelIndex.generalSearchFilter, '1');
|
||||
await page.write(selectors.travelIndex.generalSearchFilter, '3');
|
||||
await page.keyboard.press('Enter');
|
||||
await page.waitForState('travel.card.summary');
|
||||
});
|
||||
|
@ -23,7 +23,7 @@ describe('Travel descriptor path', () => {
|
|||
await page.waitForState('travel.index');
|
||||
const result = await page.countElement(selectors.travelIndex.anySearchResult);
|
||||
|
||||
expect(result).toBeGreaterThanOrEqual(7);
|
||||
expect(result).toBeGreaterThanOrEqual(1);
|
||||
});
|
||||
|
||||
it('should navigate to the first search result', async() => {
|
||||
|
|
|
@ -49,6 +49,7 @@ export class Layout extends Component {
|
|||
const differenceMilliseconds = now - new Date(this.vnToken.created);
|
||||
const differenceSeconds = Math.floor(differenceMilliseconds / 1000);
|
||||
|
||||
console.log(this.vnToken.created, now, differenceMilliseconds, differenceSeconds, this.renewPeriod, differenceSeconds > this.renewPeriod);
|
||||
if (differenceSeconds > this.renewPeriod) {
|
||||
this.$http.post('VnUsers/renewToken')
|
||||
.then(json => {
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
icon="install_mobile"
|
||||
ng-show="$ctrl.totalChecked > 0"
|
||||
ng-click="$ctrl.sendDocuware()"
|
||||
vn-tooltip="Set as delivered and open delivery note(s)"
|
||||
vn-tooltip="Set as delivered and send delivery note(s) to the tablet"
|
||||
tooltip-position="left">
|
||||
</vn-button>
|
||||
<vn-button class="round vn-mb-sm"
|
||||
|
|
|
@ -3,7 +3,7 @@ Go to lines: Ir a lineas
|
|||
Not available: No disponible
|
||||
Not visible: No visible
|
||||
Payment on account...: Pago a cuenta...
|
||||
Set as delivered and open delivery note(s): Marcar como servido/s y abrir albarán/es
|
||||
Set as delivered and send delivery note(s) to the tablet: Marcar como servido/s y enviar albarán/es a la tablet
|
||||
Closure: Cierre
|
||||
You cannot make a payment on account from multiple clients: No puedes realizar un pago a cuenta de clientes diferentes
|
||||
Filter by selection: Filtro por selección
|
||||
|
|
|
@ -37,6 +37,16 @@ class Controller extends SearchPanel {
|
|||
}
|
||||
|
||||
applyFilters(param) {
|
||||
if (typeof this.filter.scopeDays === 'number') {
|
||||
const shippedFrom = Date.vnNew();
|
||||
shippedFrom.setHours(0, 0, 0, 0);
|
||||
|
||||
const shippedTo = new Date(shippedFrom.getTime());
|
||||
shippedTo.setDate(shippedTo.getDate() + this.filter.scopeDays);
|
||||
shippedTo.setHours(23, 59, 59, 999);
|
||||
Object.assign(this.filter, {shippedFrom, shippedTo});
|
||||
}
|
||||
|
||||
this.model.applyFilter({}, this.filter)
|
||||
.then(() => {
|
||||
if (param && this.model._orgData.length === 1)
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
</span>
|
||||
</vn-td>
|
||||
<vn-td expand>{{entry.supplierName}}</vn-td>
|
||||
<vn-td shrink>{{entry.ref}}</vn-td>
|
||||
<vn-td shrink>{{entry.reference}}</vn-td>
|
||||
<vn-td shrink>{{entry.hb}}</vn-td>
|
||||
<vn-td shrink>{{entry.freightValue | currency: 'EUR': 2}}</vn-td>
|
||||
<vn-td shrink>{{entry.packageValue | currency: 'EUR': 2}}</vn-td>
|
||||
|
|
Loading…
Reference in New Issue