fixes #5287 Añadir campo Locker (Taquilla) en Worker/Basic Data y crear nueva sección Worker/PDA #1347

Merged
alexandre merged 6 commits from 5287-worker-locker-pda into dev 2023-02-28 12:55:36 +00:00
4 changed files with 16 additions and 9 deletions
Showing only changes of commit d5ea59e284 - Show all commits

View File

@ -1,9 +1,15 @@
ALTER TABLE `vn`.`worker` ADD locker INT UNSIGNED NULL UNIQUE;
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
VALUES
('DeviceProduction', '*', '*', 'ALLOW', 'ROLE', 'employee'),
('DeviceProductionModels', '*', '*', 'ALLOW', 'ROLE', 'employee'),
('DeviceProductionState', '*', '*', 'ALLOW', 'ROLE', 'employee'),
('DeviceProductionUser', '*', '*', 'ALLOW', 'ROLE', 'employee'),
('Worker', 'deallocatePDA', '*', 'ALLOW', 'ROLE', 'employee'),
('Worker', 'allocatePDA', '*', 'ALLOW', 'ROLE', 'employee');
('DeviceProduction', '*', '*', 'ALLOW', 'ROLE', 'hr'),
('DeviceProductionModels', '*', '*', 'ALLOW', 'ROLE', 'hr'),
('DeviceProductionState', '*', '*', 'ALLOW', 'ROLE', 'hr'),
('DeviceProductionUser', '*', '*', 'ALLOW', 'ROLE', 'hr'),
('DeviceProduction', '*', '*', 'ALLOW', 'ROLE', 'productionAssi'),
('DeviceProductionModels', '*', '*', 'ALLOW', 'ROLE', 'productionAssi'),
('DeviceProductionState', '*', '*', 'ALLOW', 'ROLE', 'productionAssi'),
('DeviceProductionUser', '*', '*', 'ALLOW', 'ROLE', 'productionAssi'),
('Worker', 'deallocatePDA', '*', 'ALLOW', 'ROLE', 'hr'),
('Worker', 'allocatePDA', '*', 'ALLOW', 'ROLE', 'hr'),
('Worker', 'deallocatePDA', '*', 'ALLOW', 'ROLE', 'productionAssi'),
('Worker', 'allocatePDA', '*', 'ALLOW', 'ROLE', 'productionAssi');

View File

@ -7,7 +7,7 @@ describe('Worker pda path', () => {
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('employee', 'worker');
await page.loginAndModule('hr', 'worker');
await page.accessToSearchResult('employeeNick');
await page.accessToSection('worker.card.pda');
});

View File

@ -10,7 +10,7 @@
icon="delete"
vn-tooltip="Deallocate PDA"
ng-click="$ctrl.deallocatePDA()"
vn-acl="employee">
vn-acl="hr, productionAssi">
</vn-icon-button>
</append>
</vn-textfield>
@ -21,6 +21,7 @@
<vn-card class="vn-pa-lg">
<vn-horizontal>
<vn-autocomplete
vn-acl="hr, productionAssi"
ng-model="$ctrl.newPDA"
url="DeviceProductions"
fields="['id', 'modelFk', 'serialNumber']"

View File

@ -148,7 +148,7 @@
"state": "worker.card.pda",
"component": "vn-worker-pda",
"description": "PDA",
"acl": ["employee"]
"acl": ["hr", "productionAssi"]
}
]
}