This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
xl="3"
|
xl="3"
|
||||||
>
|
>
|
||||||
<GzWoState
|
<GzWoState
|
||||||
|
v-if="pvm.subRights.states.visible"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:form-key="formCustomTemplateKey"
|
:form-key="formCustomTemplateKey"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
viz: {{ pvm.subRights.states.visible }}
|
||||||
<span class="text-caption">{{ $ay.t("WorkOrderStatus") }}</span>
|
<span class="text-caption">{{ $ay.t("WorkOrderStatus") }}</span>
|
||||||
<div>
|
<div>
|
||||||
{{ lastState }}
|
{{ lastState }}
|
||||||
@@ -55,6 +56,13 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return this.value.states[this.value.states.length - 1];
|
return this.value.states[this.value.states.length - 1];
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
canAdd: function() {
|
||||||
|
return (
|
||||||
|
!this.value.isLocked &&
|
||||||
|
this.pvm.rights.change &&
|
||||||
|
this.pvm.subRights.states.create
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -188,6 +188,18 @@ export default {
|
|||||||
ayaType: window.$gz.type.WorkOrder,
|
ayaType: window.$gz.type.WorkOrder,
|
||||||
selectedItemIndex: null,
|
selectedItemIndex: null,
|
||||||
subRights: {
|
subRights: {
|
||||||
|
items: {
|
||||||
|
visible: true,
|
||||||
|
create: true,
|
||||||
|
change: true,
|
||||||
|
delete: true
|
||||||
|
},
|
||||||
|
states: {
|
||||||
|
visible: true,
|
||||||
|
create: true,
|
||||||
|
change: true,
|
||||||
|
delete: true
|
||||||
|
},
|
||||||
labors: {
|
labors: {
|
||||||
visible: true,
|
visible: true,
|
||||||
create: true,
|
create: true,
|
||||||
@@ -512,72 +524,10 @@ export default {
|
|||||||
//
|
//
|
||||||
function setSubRights(vm) {
|
function setSubRights(vm) {
|
||||||
//determine rights to each which sections are hidden due to form customized out or rights / roles
|
//determine rights to each which sections are hidden due to form customized out or rights / roles
|
||||||
//todo: determine this and set accordingly, for now all set to available true:
|
//todo: determine this and set accordingly, for now all set to available true during init
|
||||||
//## NOTE: these are subrights only, descendents still need to first check if workorder isLocked and rights are read only etc before this level is checked
|
//## NOTE: these are subrights only, descendents still need to first check if workorder isLocked and rights are read only etc before this level is checked
|
||||||
/*
|
/*
|
||||||
subRights: {
|
*/
|
||||||
labors: {
|
|
||||||
visible: true,
|
|
||||||
create: true,
|
|
||||||
change: true,
|
|
||||||
delete: true
|
|
||||||
},
|
|
||||||
parts: {
|
|
||||||
visible: true,
|
|
||||||
create: true,
|
|
||||||
change: true,
|
|
||||||
delete: true
|
|
||||||
},
|
|
||||||
partRequests: {
|
|
||||||
visible: true,
|
|
||||||
create: true,
|
|
||||||
change: true,
|
|
||||||
delete: true
|
|
||||||
},
|
|
||||||
expenses: {
|
|
||||||
visible: true,
|
|
||||||
create: true,
|
|
||||||
change: true,
|
|
||||||
delete: true
|
|
||||||
},
|
|
||||||
loans: {
|
|
||||||
visible: true,
|
|
||||||
create: true,
|
|
||||||
change: true,
|
|
||||||
delete: true
|
|
||||||
},
|
|
||||||
scheduledUsers: {
|
|
||||||
visible: true,
|
|
||||||
create: true,
|
|
||||||
change: true,
|
|
||||||
delete: true
|
|
||||||
},
|
|
||||||
tasks: {
|
|
||||||
visible: true,
|
|
||||||
create: true,
|
|
||||||
change: true,
|
|
||||||
delete: true
|
|
||||||
},
|
|
||||||
travels: {
|
|
||||||
visible: true,
|
|
||||||
create: true,
|
|
||||||
change: true,
|
|
||||||
delete: true
|
|
||||||
},
|
|
||||||
units: {
|
|
||||||
visible: true,
|
|
||||||
create: true,
|
|
||||||
change: true,
|
|
||||||
delete: true
|
|
||||||
},
|
|
||||||
outsideServices: {
|
|
||||||
visible: true,
|
|
||||||
create: true,
|
|
||||||
change: true,
|
|
||||||
delete: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user