Merge branch 'dev' into 7355-accountMigration2
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2024-08-14 07:51:30 +00:00
commit f5fd85771f
11 changed files with 40 additions and 7 deletions

View File

@ -24,6 +24,10 @@ module.exports = Self => {
arg: 'lang', arg: 'lang',
type: 'string', type: 'string',
description: 'The user lang' description: 'The user lang'
}, {
arg: 'twoFactor',
type: 'string',
description: 'The user twoFactor'
} }
], ],
http: { http: {
@ -32,8 +36,8 @@ module.exports = Self => {
} }
}); });
Self.updateUser = async(ctx, id, name, nickname, email, lang) => { Self.updateUser = async(ctx, id, name, nickname, email, lang, twoFactor) => {
await Self.userSecurity(ctx, id); await Self.userSecurity(ctx, id);
await Self.upsertWithWhere({id}, {name, nickname, email, lang}); await Self.upsertWithWhere({id}, {name, nickname, email, lang, twoFactor});
}; };
}; };

View File

@ -101,9 +101,10 @@ module.exports = function(Self) {
const headers = httpRequest.headers; const headers = httpRequest.headers;
const origin = headers.origin; const origin = headers.origin;
const defaultHash = '/reset-password?access_token=$token$'; const defaultHash = '!/reset-password?access_token=$token$';
const recoverHashes = { const recoverHashes = {
hedera: 'verificationToken=$token$' hedera: '!verificationToken=$token$',
lilium: '/resetPassword?access_token=$token$'
}; };
const app = info.options?.app; const app = info.options?.app;
@ -115,7 +116,7 @@ module.exports = function(Self) {
const params = { const params = {
recipient: info.email, recipient: info.email,
lang: user.lang, lang: user.lang,
url: origin + '/#!' + recoverHash url: origin + '/#' + recoverHash
}; };
const options = Object.assign({}, info.options); const options = Object.assign({}, info.options);

View File

@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `salix`.`ACL_afterDelete`
AFTER DELETE ON `ACL` AFTER DELETE ON `ACL`
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
INSERT INTO ACL INSERT INTO ACLLog
SET `action` = 'delete', SET `action` = 'delete',
`changedModel` = 'Acl', `changedModel` = 'Acl',
`changedModelId` = OLD.id, `changedModelId` = OLD.id,

View File

@ -189,7 +189,7 @@ BEGIN
SELECT * FROM sales SELECT * FROM sales
UNION ALL UNION ALL
SELECT * FROM orders SELECT * FROM orders
ORDER BY shipped, ORDER BY shipped DESC,
(inventorySupplierFk = entityId) DESC, (inventorySupplierFk = entityId) DESC,
alertLevel DESC, alertLevel DESC,
isTicket, isTicket,

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeInsert`
BEFORE INSERT ON `host`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;

View File

@ -4,5 +4,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeUpdate`
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
SET new.updated = util.VN_NOW(); SET new.updated = util.VN_NOW();
SET NEW.editorFk = account.myUser_getId();
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -0,0 +1 @@
DROP TABLE bi.Greuges_comercial_detail;

View File

@ -0,0 +1 @@
ALTER TABLE vn.host ADD editorFk int(10) unsigned DEFAULT NULL NULL;

View File

@ -0,0 +1,3 @@
ALTER TABLE vn.item
ADD CONSTRAINT item_itemPackingType_FK FOREIGN KEY (itemPackingTypeFk)
REFERENCES vn.itemPackingType(code) ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@ -0,0 +1,7 @@
name: time control
columns:
direction: direction
isSendMail: sent mail
logExclude: excluded log
manual: manual
timed: timed

View File

@ -0,0 +1,7 @@
name: control horario
columns:
direction: dirección
isSendMail: correo enviado
logExclude: registro excluido
manual: manual
timed: fichada