4563-Worker-Description-workerDisableExcluded-checkbox #1076

Merged
joan merged 10 commits from 4563-Worker-Description-workerDisableExcluded-checkbox into dev 2022-11-02 06:34:51 +00:00
Contributor
No description provided.
pau added the
CR / Tests passed
label 2022-10-06 10:01:06 +00:00
pau added 3 commits 2022-10-06 10:01:07 +00:00
gitea/salix/pipeline/head Something is wrong with the build of this commit Details
1165e050eb
feat: workerDisableExcluded update DB field
gitea/salix/pipeline/head This commit is unstable Details
3376293d1a
Added user icon and fixed icon not updating
pau requested review from joan 2022-10-06 10:01:28 +00:00
joan requested changes 2022-10-13 12:52:22 +00:00
@ -0,0 +22,4 @@
Self.workerDisableExcluded = async id => {
let result;
const query = `Select * from vn.workerDisableExcluded where workerFk like ${id}`;
Contributor

No necesitas crear un nuevo endpoint (Ruta de back) para consultar esa información. Puedes hacerlo directamente al modelo WorkerDisableExcluded desde front.

Tampoco se deben pasar valores directamente a la consulta, se deben parametrizar los valores para evitar ataques de inyeccion SQL.

Select * from vn.workerDisableExcluded where workerFk like ${id}

await Self.rawSql(query, [id])

No necesitas crear un nuevo endpoint (Ruta de back) para consultar esa información. Puedes hacerlo directamente al modelo WorkerDisableExcluded desde front. Tampoco se deben pasar valores directamente a la consulta, se deben parametrizar los valores para evitar ataques de inyeccion SQL. ``` Select * from vn.workerDisableExcluded where workerFk like ${id} ``` `await Self.rawSql(query, [id])`
pau marked this conversation as resolved
@ -0,0 +30,4 @@
const models = Self.app.models;
if (!currValue) {
await models.WorkerDisableExcluded.create({
Contributor

No necesitas una ruta de back, se puede hacer desde front directamente al modelo

DELETE WorkerDisableExcluded/:id

No necesitas una ruta de back, se puede hacer desde front directamente al modelo DELETE WorkerDisableExcluded/:id
pau marked this conversation as resolved
@ -65,2 +65,4 @@
"WorkerTimeControlMail": {
"dataSource": "vn"
},
"workerDisableExcluded": {
Contributor

W

W
pau marked this conversation as resolved
@ -0,0 +1,26 @@
{
"name": "workerDisableExcluded",
Contributor

Capitalizar

Capitalizar
pau marked this conversation as resolved
@ -15,2 +15,4 @@
</div>
</slot-before>
<slot-menu>
<!--ng-if="!$ctrl.canBeExcluded"-->
Contributor

Eliminar comentario

Eliminar comentario
pau marked this conversation as resolved
@ -17,0 +20,4 @@
ng-click="$ctrl.setExcluded()"
translate
ng-if="!$ctrl.excluded">
Marcar para no deshabilitar
Contributor

No deberían haber frases en español

No deberían haber frases en español
pau marked this conversation as resolved
@ -17,0 +26,4 @@
ng-click="$ctrl.setExcluded()"
translate
ng-if="$ctrl.excluded">
Marcar como deshabilitable
Contributor

No deberían haber frases en español

No deberían haber frases en español
pau marked this conversation as resolved
@ -39,1 +54,4 @@
</div>
<div class="icons">
<vn-icon
vn-tooltip="Fijado para no deshabilitar"
Contributor

No deberían haber frases en español / Traducir del inglés

No deberían haber frases en español / Traducir del inglés
pau marked this conversation as resolved
@ -18,0 +26,4 @@
}
async canBeExcluded() {
await new Promise(r => setTimeout(r, 500));
Contributor

Evitar async/await en front, no funciona correctamente en ciertos casos en esta versión de angularjs

Evitar timeouts

        await new Promise(r => setTimeout(r, 500));
Evitar async/await en front, no funciona correctamente en ciertos casos en esta versión de angularjs Evitar timeouts ``` await new Promise(r => setTimeout(r, 500)); ```
pau marked this conversation as resolved
pau added 1 commit 2022-10-18 08:26:46 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
1d8fb25325
Refactored according to the suggested changes
pau added 1 commit 2022-10-18 08:30:46 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
89bbf35a87
Merge branch 'dev' into 4563-Worker-Description-workerDisableExcluded-checkbox
pau added 1 commit 2022-10-18 08:34:01 +00:00
gitea/salix/pipeline/head This commit looks good Details
c9e9e3545d
Added ACL
pau added 1 commit 2022-10-18 08:38:54 +00:00
gitea/salix/pipeline/head This commit looks good Details
f481cc3c97
Capitalizar
pau added 1 commit 2022-10-18 08:46:28 +00:00
gitea/salix/pipeline/head This commit looks good Details
81088bc495
Fixed ACL
pau requested review from joan 2022-10-18 08:49:45 +00:00
pau added 1 commit 2022-10-19 05:35:39 +00:00
joan requested changes 2022-10-25 07:24:08 +00:00
@ -0,0 +1,2 @@
INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalId)
VALUES ('WorkerDisableExcluded','*','*','ALLOW','employee');
Contributor

princiaplId: hr

princiaplId: hr
pau added 1 commit 2022-10-25 07:25:39 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
23598c993b
Change ACL from employee to hr
pau requested review from joan 2022-10-25 08:45:08 +00:00
joan approved these changes 2022-11-02 06:34:40 +00:00
joan merged commit 33c92a0f24 into dev 2022-11-02 06:34:51 +00:00
joan deleted branch 4563-Worker-Description-workerDisableExcluded-checkbox 2022-11-02 06:34:52 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#1076
No description provided.