Created the model and UI

This commit is contained in:
Pau 2022-10-05 11:52:14 +02:00
parent e4b61f81a9
commit 600dd7a434
5 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,26 @@
module.exports = Self => {
Self.remoteMethod('workerDisableExcluded', {
description: 'Check an email inbox and process it',
accessType: 'READ',
accepts: {
arg: 'workerFk',
type: 'Number',
required: true,
description: `The worker id`
},
returns: {
type: ['Object'],
root: true
},
http: {
path: `/workerDisableExcluded`,
verb: 'GET'
}
});
Self.workerDisableExcluded = workerFk => {
console.log(workerFk);
return 'tests123';
};
};

View File

@ -64,6 +64,9 @@
},
"WorkerTimeControlMail": {
"dataSource": "vn"
},
"workerDisableExcluded": {
"dataSource": "vn"
}
}

View File

@ -0,0 +1,23 @@
{
"name": "workerDisableExcluded",
"base": "VnModel",
"options": {
"mysql": {
"table": "workerDisableExcluded"
}
},
"properties": {
"id": {
"id": true,
"type": "number"
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}

View File

@ -14,6 +14,16 @@
</vn-float-button>
</div>
</slot-before>
<slot-menu>
<label class="vn-item">
<!--
<input ng-if="$ctrl.isExcluded()" type="checkbox" id="canBeDisabled" disabled checked>
<input ng-if="!$ctrl.isExcluded()" type="checkbox" id="canBeDisabled" disabled>
-->
<p>{{$ctrl.isExcluded()}}</p>
</label>
</slot-menu>
<slot-body>
<div class="attributes">
<vn-label-value

View File

@ -15,6 +15,14 @@ class Controller extends Descriptor {
this.entity = value;
}
async isExcluded() {
// eslint-disable-next-line no-console
console.log(this.entity);
let excluded = await this.$http.get(`workerDisableExcluded`);
// eslint-disable-next-line no-console
console.log(excluded);
}
loadData() {
const filter = {
include: [