feat: refs #7119 add vehicle type management and delivery role permissions
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
55a0a5bc9a
commit
2ae0097fa8
|
@ -4090,4 +4090,13 @@ INSERT INTO vn.bankPolicy (id, `ref`, amount, committedFee, nonCommittedFee, ann
|
|||
INSERT INTO vn.ppe (id, amortization, firstAmortizated, lastAmortizated, finished, value, planFk, groupFk, account, endowment, elementAccount, nature, location, discharged, cause, isInvestmentAsset, workerFk, companyFk, description, isDone)
|
||||
VALUES
|
||||
(1, 0.00, '2001-01-01', NULL, NULL, 700.95, 16, 4, '3456000000', '4320000000', '12345', 'INMOVILIZADO', 'V02', NULL, NULL, 0, NULL, 442, 'UTILLAJE LASER ROTATIVO AUTONIVELANTE 500M', NULL),
|
||||
(2, 0.00, '2001-01-01', NULL, NULL, 400.00, 16, 4, '5678000000', '1230000000', '67891', 'INMOVILIZADO', 'V02', NULL, NULL, 0, NULL, 442, 'UTILLAJE BALANZA Z100 150KILOS', NULL);
|
||||
(2, 0.00, '2001-01-01', NULL, NULL, 400.00, 16, 4, '5678000000', '1230000000', '67891', 'INMOVILIZADO', 'V02', NULL, NULL, 0, NULL, 442, 'UTILLAJE BALANZA Z100 150KILOS', NULL);
|
||||
|
||||
INSERT IGNORE INTO vn.vehicleType (id, name)
|
||||
VALUES (1,'vehículo empresa'),
|
||||
(2, 'furgoneta'),
|
||||
(3, 'cabeza tractora'),
|
||||
(4, 'remolque');
|
||||
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
USE vn;
|
||||
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||
VALUES ('Vehicle', 'filter', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||
('Vehicle', 'filter', 'READ', 'ALLOW', 'ROLE', 'delivery'),
|
||||
|
@ -14,4 +15,22 @@ INSERT INTO salix.ACL (model, property, accessType, permission, principalType, p
|
|||
('Ppe', 'find', 'READ', 'ALLOW', 'ROLE', 'delivery' ),
|
||||
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
|
||||
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'delivery'),
|
||||
('Vehicle', '__get__active', 'READ', 'ALLOW', 'ROLE', 'employee');
|
||||
('Vehicle', '__get__active', 'READ', 'ALLOW', 'ROLE', 'employee');
|
||||
|
||||
ALTER TABLE vehicle ADD COLUMN importCooler decimal(10,2) DEFAULT NULL;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS vehicleType (
|
||||
id INT(11) PRIMARY KEY AUTO_INCREMENT,
|
||||
name VARCHAR(45) NOT NULL
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO vehicleType (id, name)
|
||||
VALUES (1,'vehículo empresa'),
|
||||
(2, 'furgoneta'),
|
||||
(3, 'cabeza tractora'),
|
||||
(4, 'remolque');
|
||||
ALTER TABLE vehicle ADD COLUMN vehicleTypeFk INT(11) DEFAULT 1;
|
||||
|
||||
ALTER TABLE vehicle ADD CONSTRAINT fk_vehicle_vehicleType FOREIGN KEY (vehicleTypeFk) REFERENCES vehicleType(id);
|
||||
|
||||
|
|
Loading…
Reference in New Issue