refs #5843 fix(timeControl_filter): not use userFk
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-08-02 13:26:42 +02:00
parent 6f227d45c4
commit 56cd94feaa
2 changed files with 3 additions and 9 deletions

View File

@ -36,9 +36,9 @@ module.exports = Self => {
if (isSubordinate === false) if (isSubordinate === false)
throw new UserError(`You don't have enough privileges`); throw new UserError(`You don't have enough privileges`);
const subordinate = await Worker.findById(ctx.args.workerFk); const subordinate = await Worker.findById(ctx.args.workerFk, {fields: ['id']});
filter = mergeFilters(filter, {where: { filter = mergeFilters(filter, {where: {
userFk: subordinate.userFk userFk: subordinate.id
}}); }});
return Self.find(filter); return Self.find(filter);

View File

@ -4,7 +4,7 @@
filter="::$ctrl.filter" filter="::$ctrl.filter"
data="$ctrl.hours"> data="$ctrl.hours">
</vn-crud-model> </vn-crud-model>
<div ng-if="$ctrl.card.hasWorkCenter"> <div>
<vn-card class="vn-pa-lg vn-w-lg"> <vn-card class="vn-pa-lg vn-w-lg">
<vn-table model="model" auto-load="false"> <vn-table model="model" auto-load="false">
<vn-thead> <vn-thead>
@ -106,12 +106,6 @@
</vn-button> </vn-button>
</vn-button-bar> </vn-button-bar>
</div> </div>
<div
ng-if="!$ctrl.card.hasWorkCenter"
class="bg-title"
translate>
Autonomous worker
</div>
<vn-side-menu side="right"> <vn-side-menu side="right">
<div class="vn-pa-md"> <div class="vn-pa-md">