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
|
@ -4091,3 +4091,12 @@ INSERT INTO vn.ppe (id, amortization, firstAmortizated, lastAmortizated, finishe
|
||||||
VALUES
|
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),
|
(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)
|
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||||
VALUES ('Vehicle', 'filter', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
VALUES ('Vehicle', 'filter', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
('Vehicle', 'filter', 'READ', 'ALLOW', 'ROLE', 'delivery'),
|
('Vehicle', 'filter', 'READ', 'ALLOW', 'ROLE', 'delivery'),
|
||||||
|
@ -15,3 +16,21 @@ INSERT INTO salix.ACL (model, property, accessType, permission, principalType, p
|
||||||
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
|
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'delivery'),
|
('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