Created the model and UI
This commit is contained in:
parent
e4b61f81a9
commit
600dd7a434
|
@ -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';
|
||||
};
|
||||
};
|
|
@ -64,6 +64,9 @@
|
|||
},
|
||||
"WorkerTimeControlMail": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"workerDisableExcluded": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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: [
|
||||
|
|
Loading…
Reference in New Issue