remove(claimRma): refs #6349 remove
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Pablo Natek 2024-02-26 18:38:50 +01:00
parent 7ffc11e45a
commit 8263b203a7
8 changed files with 5 additions and 63 deletions

View File

@ -1356,8 +1356,6 @@ INSERT INTO `ACL` VALUES (385,'Route','driverRoutePdf','READ','ALLOW','ROLE','em
INSERT INTO `ACL` VALUES (386,'Route','driverRouteEmail','WRITE','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (386,'Route','driverRouteEmail','WRITE','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (387,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','customer'); INSERT INTO `ACL` VALUES (387,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','customer');
INSERT INTO `ACL` VALUES (388,'Supplier','newSupplier','WRITE','ALLOW','ROLE','administrative'); INSERT INTO `ACL` VALUES (388,'Supplier','newSupplier','WRITE','ALLOW','ROLE','administrative');
INSERT INTO `ACL` VALUES (389,'ClaimRma','*','READ','ALLOW','ROLE','claimManager');
INSERT INTO `ACL` VALUES (390,'ClaimRma','*','WRITE','ALLOW','ROLE','claimManager');
INSERT INTO `ACL` VALUES (391,'Notification','*','WRITE','ALLOW','ROLE','system'); INSERT INTO `ACL` VALUES (391,'Notification','*','WRITE','ALLOW','ROLE','system');
INSERT INTO `ACL` VALUES (392,'Boxing','*','*','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (392,'Boxing','*','*','ALLOW','ROLE','employee');
INSERT INTO `ACL` VALUES (393,'Url','*','READ','ALLOW','ROLE','employee'); INSERT INTO `ACL` VALUES (393,'Url','*','READ','ALLOW','ROLE','employee');

View File

@ -1880,14 +1880,6 @@ INSERT INTO `vn`.`claimRatio`(`clientFk`, `yearSale`, `claimAmount`, `claimingRa
(1103, 2000, 0.00, 0.00, 0.02, 1.00), (1103, 2000, 0.00, 0.00, 0.02, 1.00),
(1104, 2500, 150.00, 0.02, 0.10, 1.00); (1104, 2500, 150.00, 0.02, 0.10, 1.00);
INSERT INTO vn.claimRma (`id`, `code`, `created`, `workerFk`)
VALUES
(1, '02676A049183', DEFAULT, 1106),
(2, '02676A049183', DEFAULT, 1106),
(3, '02676A049183', DEFAULT, 1107),
(4, '02676A049183', DEFAULT, 1107),
(5, '01837B023653', DEFAULT, 1106);
INSERT INTO `vn`.`claimLog` (`originFk`, userFk, `action`, changedModel, oldInstance, newInstance, changedModelId, `description`) INSERT INTO `vn`.`claimLog` (`originFk`, userFk, `action`, changedModel, oldInstance, newInstance, changedModelId, `description`)
VALUES VALUES
(1, 18, 'update', 'Claim', '{"hasToPickUp":false}', '{"hasToPickUp":true}', 1, NULL), (1, 18, 'update', 'Claim', '{"hasToPickUp":false}', '{"hasToPickUp":true}', 1, NULL),

View File

@ -0,0 +1,4 @@
-- Place your SQL code here
RENAME TABLE IF EXISTS vn.claimRma TO vn.claimRma__;
ALTER TABLE IF EXISTS vn.claimRma__ COMMENT='kkeada el 2024-02-26 por Pablo';
ALTER TABLE vn.claim CHANGE IF EXISTS rma rma__ varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL;

View File

@ -43,8 +43,5 @@
}, },
"ClaimObservation": { "ClaimObservation": {
"dataSource": "vn" "dataSource": "vn"
},
"ClaimRma": {
"dataSource": "vn"
} }
} }

View File

@ -1,9 +0,0 @@
const LoopBackContext = require('loopback-context');
module.exports = Self => {
Self.observe('before save', async function(ctx) {
const changes = ctx.data || ctx.instance;
const loopBackContext = LoopBackContext.getCurrentContext();
changes.workerFk = loopBackContext.active.accessToken.userId;
});
};

View File

@ -1,30 +0,0 @@
{
"name": "ClaimRma",
"base": "VnModel",
"options": {
"mysql": {
"table": "claimRma"
}
},
"properties": {
"id": {
"id": true,
"type": "number",
"description": "Identifier"
},
"code": {
"type": "string",
"required": true
},
"created": {
"type": "date"
}
},
"relations": {
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
}
}
}

View File

@ -45,9 +45,6 @@
}, },
"packages": { "packages": {
"type": "number" "type": "number"
},
"rma": {
"type": "string"
} }
}, },
"relations": { "relations": {
@ -56,12 +53,6 @@
"model": "ClaimState", "model": "ClaimState",
"foreignKey": "claimStateFk" "foreignKey": "claimStateFk"
}, },
"rmas": {
"type": "hasMany",
"model": "ClaimRma",
"foreignKey": "code",
"primaryKey": "rma"
},
"client": { "client": {
"type": "belongsTo", "type": "belongsTo",
"model": "Client", "model": "Client",

View File

@ -179,7 +179,6 @@ localFixtures:
- claimLog - claimLog
- claimObservation - claimObservation
- claimRatio - claimRatio
- claimRma
- claimState - claimState
- client - client
- clientConfig - clientConfig