This commit is contained in:
@@ -245,6 +245,8 @@ todo: in UI the workorder state should show current state but be expandable to v
|
|||||||
LastStateViz??
|
LastStateViz??
|
||||||
Also, this will be best for sites that don't really use the state fully and just want to ignore it or set it once to completed, that kind of thing
|
Also, this will be best for sites that don't really use the state fully and just want to ignore it or set it once to completed, that kind of thing
|
||||||
so maybe it's a single / collection depending on if there are more than one but collapsable??
|
so maybe it's a single / collection depending on if there are more than one but collapsable??
|
||||||
|
Status control, displays last status as a read only text field maybe decorated in an H3 tag or something, but when you click on it opens a form to append a new status
|
||||||
|
control handles the rights and roles and shit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
45
ayanova/src/components/_barebones_template.vue
Normal file
45
ayanova/src/components/_barebones_template.vue
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
barebones template
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/* XXXeslint-disable */
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
default: "{}",
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
formKey: { type: String, default: "" }, //used to grab template from store
|
||||||
|
readonly: Boolean,
|
||||||
|
disabled: Boolean,
|
||||||
|
parentVM: {
|
||||||
|
default: null,
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
form() {
|
||||||
|
return window.$gz.form;
|
||||||
|
},
|
||||||
|
fieldValueChanged(ref) {
|
||||||
|
if (
|
||||||
|
!this.parentVM.formState.loading &&
|
||||||
|
!this.parentVM.formState.readonly
|
||||||
|
) {
|
||||||
|
window.$gz.form.fieldValueChanged(this.parentVM, ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
45
ayanova/src/components/work-order-header.vue
Normal file
45
ayanova/src/components/work-order-header.vue
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<h1>WorkOrder header</h1>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/* XXXeslint-disable */
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
default: "{}",
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
formKey: { type: String, default: "" }, //used to grab template from store
|
||||||
|
readonly: Boolean,
|
||||||
|
disabled: Boolean,
|
||||||
|
parentVM: {
|
||||||
|
default: null,
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
form() {
|
||||||
|
return window.$gz.form;
|
||||||
|
},
|
||||||
|
fieldValueChanged(ref) {
|
||||||
|
if (
|
||||||
|
!this.parentVM.formState.loading &&
|
||||||
|
!this.parentVM.formState.readonly
|
||||||
|
) {
|
||||||
|
window.$gz.form.fieldValueChanged(this.parentVM, ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
0
ayanova/src/components/work-order-items.vue
Normal file
0
ayanova/src/components/work-order-items.vue
Normal file
0
ayanova/src/components/work-order-state.vue
Normal file
0
ayanova/src/components/work-order-state.vue
Normal file
@@ -4,67 +4,8 @@
|
|||||||
<div v-if="formState.ready">
|
<div v-if="formState.ready">
|
||||||
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
||||||
<v-form ref="form">
|
<v-form ref="form">
|
||||||
<v-row>
|
<GzWoHeader data-cy="woHeader" />
|
||||||
organize as controls see dashboard <br />
|
<GzWoItems data-cy="woItems" />
|
||||||
woheader here <br />wostate control here<br />
|
|
||||||
woitems control here
|
|
||||||
<!-- --------------------------------- -->
|
|
||||||
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
|
|
||||||
<v-textarea
|
|
||||||
v-model="obj.notes"
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
:label="$ay.t('WorkOrderNotes')"
|
|
||||||
:error-messages="form().serverErrors(this, 'notes')"
|
|
||||||
ref="notes"
|
|
||||||
data-cy="notes"
|
|
||||||
@input="fieldValueChanged('notes')"
|
|
||||||
auto-grow
|
|
||||||
></v-textarea>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
|
|
||||||
<gz-tag-picker
|
|
||||||
v-model="obj.tags"
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
ref="tags"
|
|
||||||
data-cy="tags"
|
|
||||||
:error-messages="form().serverErrors(this, 'tags')"
|
|
||||||
@input="fieldValueChanged('tags')"
|
|
||||||
></gz-tag-picker>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12">
|
|
||||||
<gz-custom-fields
|
|
||||||
v-model="obj.customFields"
|
|
||||||
:form-key="formCustomTemplateKey"
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
:parent-v-m="this"
|
|
||||||
ref="customFields"
|
|
||||||
data-cy="customFields"
|
|
||||||
:error-messages="form().serverErrors(this, 'customFields')"
|
|
||||||
@input="fieldValueChanged('customFields')"
|
|
||||||
></gz-custom-fields>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'Wiki')" cols="12">
|
|
||||||
<gz-wiki
|
|
||||||
:aya-type="ayaType"
|
|
||||||
:aya-id="obj.id"
|
|
||||||
ref="wiki"
|
|
||||||
v-model="obj.wiki"
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
@input="fieldValueChanged('wiki')"
|
|
||||||
></gz-wiki
|
|
||||||
></v-col>
|
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'Attachments') && obj.id" cols="12">
|
|
||||||
<gz-attachments
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
:aya-type="ayaType"
|
|
||||||
:aya-id="obj.id"
|
|
||||||
></gz-attachments
|
|
||||||
></v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-form>
|
</v-form>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="!formState.ready">
|
<template v-if="!formState.ready">
|
||||||
@@ -83,11 +24,19 @@
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import GzWoHeader from "../components/work-order-header.vue";
|
||||||
|
import GzWoItems from "../components/work-order-items.vue";
|
||||||
|
|
||||||
const FORM_KEY = "workorder-edit";
|
const FORM_KEY = "workorder-edit";
|
||||||
const API_BASE_URL = "workorder/";
|
const API_BASE_URL = "workorder/";
|
||||||
const FORM_CUSTOM_TEMPLATE_KEY = "WorkOrder"; //<-- Should always be CoreBizObject AyaType name here where possible
|
const FORM_CUSTOM_TEMPLATE_KEY = "WorkOrder"; //<-- Should always be CoreBizObject AyaType name here where possible
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
GzWoHeader,
|
||||||
|
GzWoItems
|
||||||
|
},
|
||||||
async created() {
|
async created() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user