test → dev #1701

Merged
guillermo merged 10 commits from test into dev 2023-08-04 09:39:34 +00:00
4 changed files with 27 additions and 10 deletions
Showing only changes of commit 8deb8c1f54 - Show all commits

View File

@ -339,8 +339,9 @@ export default class SmartTable extends Component {
if (!header) return;
const tbody = this.element.querySelector('tbody');
const columns = header.querySelectorAll('th');
if (!tbody) return;
const columns = header.querySelectorAll('th');
const hasSearchRow = tbody.querySelector('tr#searchRow');
if (hasSearchRow) {
if (this.$inputsScope)

View File

@ -36,9 +36,9 @@ module.exports = Self => {
if (isSubordinate === false)
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: {
userFk: subordinate.userFk
userFk: subordinate.id
}});
return Self.find(filter);

View File

@ -32,6 +32,28 @@ class Controller extends Descriptor {
this.vnApp.showSuccess(this.$t('Department deleted.'));
});
}
loadData() {
const filter = {
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMail', 'hasToMistake', 'clientFk'],
include: [
{relation: 'client',
scope: {
fields: ['id', 'name']
}},
{
relation: 'worker',
scope: {
fields: ['id', 'firstName', 'lastName']
}
}
]
};
return this.getData(`Departments/${this.id}`, {filter})
.then(res => this.entity = res.data);
}
}
Controller.$inject = ['$element', '$scope', '$rootScope'];

View File

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