Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5472-user_passExpired

This commit is contained in:
Alex Moreno 2023-06-07 08:34:55 +02:00
commit abf454496d
5 changed files with 7 additions and 5 deletions

View File

@ -64,6 +64,6 @@ describe('SmartTable SearchBar integration', () => {
await page.reload({ await page.reload({
waitUntil: 'networkidle2' waitUntil: 'networkidle2'
}); });
await page.waitForTextInField(selectors.itemFixedPrice.firstItemID, '13'); await page.waitForTextInField(selectors.itemFixedPrice.firstItemID, '3');
}); });
}); });

View File

@ -88,7 +88,8 @@ describe('Item fixed prices path', () => {
it('should reload the section and check the created price has the expected ID', async() => { it('should reload the section and check the created price has the expected ID', async() => {
await page.goto(`http://localhost:5000/#!/item/fixed-price`); await page.goto(`http://localhost:5000/#!/item/fixed-price`);
await page.autocompleteSearch($.warehouseFilter, 'Warehouse one');
await page.click($.chip);
const result = await page.waitToGetProperty($.fourthItemID, 'value'); const result = await page.waitToGetProperty($.fourthItemID, 'value');
expect(result).toContain('13'); expect(result).toContain('13');

View File

@ -20,8 +20,6 @@ class Controller {
name: config.languages[code] ? config.languages[code] : code name: config.languages[code] ? config.languages[code] : code
}); });
} }
vnConfig.initialize();
} }
set lang(value) { set lang(value) {

View File

@ -10,6 +10,9 @@ function config($stateProvider, $urlRouterProvider) {
.state('layout', { .state('layout', {
abstract: true, abstract: true,
template: '<vn-layout></vn-layout>', template: '<vn-layout></vn-layout>',
resolve: {
config: ['vnConfig', vnConfig => vnConfig.initialize()]
}
}) })
.state('outLayout', { .state('outLayout', {
abstract: true, abstract: true,

View File

@ -48,7 +48,7 @@ module.exports = Self => {
try { try {
let buy = await models.Buy.findOne({where: {entryFk: args.id}}, myOptions); let buy = await models.Buy.findOne({where: {entryFk: args.id}}, myOptions);
if (buy) if (buy)
await buy.updateAttribute('printedStickers', args.printedStickers); await buy.updateAttribute('printedStickers', args.printedStickers, myOptions);
else { else {
const userConfig = await models.UserConfig.findById(userId, {fields: ['warehouseFk']}, myOptions); const userConfig = await models.UserConfig.findById(userId, {fields: ['warehouseFk']}, myOptions);
await Self.rawSql( await Self.rawSql(