This commit is contained in:
@@ -57,6 +57,9 @@ todo: workorders - need to set billing and service address from customers on mig
|
|||||||
|
|
||||||
todo: Translation: "Physical" address seems wierd, rename to Street address or Delivery address or Service Address or whatever
|
todo: Translation: "Physical" address seems wierd, rename to Street address or Delivery address or Service Address or whatever
|
||||||
|
|
||||||
|
todo: Any "Priority" type value in UI that has colors should use ayaFireAlt icon instead of round circle which is for minor status only
|
||||||
|
Flag is for major status like all of workorder
|
||||||
|
|
||||||
todo: be sure to address items in case https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3864
|
todo: be sure to address items in case https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3864
|
||||||
before next update to server / windows build for Joyce
|
before next update to server / windows build for Joyce
|
||||||
|
|
||||||
@@ -301,21 +304,12 @@ todo: many biz objects are not using new PUT methodology
|
|||||||
CURRENTLY DOING: woitempriority, woitemstatus edit forms first so have something to test the control on
|
CURRENTLY DOING: woitempriority, woitemstatus edit forms first so have something to test the control on
|
||||||
|
|
||||||
|
|
||||||
TODO: Need control for selection.
|
TODO: Componentize the priority and woitem status controls from working examples in form now
|
||||||
it's just a select list but needs to show the color, background is sketchy as might conflict with text color so keep in mind
|
also it needs to auto filter out the inactive ones unless it's the current selection
|
||||||
check vuetify docs for select see about color, I'm thinking if I can get a round dot color in there at start or stop will be ok
|
TOOD: Grid is showing id for status / priority and not the actual items
|
||||||
could use emoji or similar if necessary or maybe it's like the grid lists and just colors a border on one side (!!!!!)
|
will need something funky with colors etc I guess
|
||||||
|
|
||||||
wo should prefetch and store picklist style like the wostatus already does on open
|
TODO: help docs for woitemstatus and woitempriority edit and list forms
|
||||||
|
|
||||||
TODO: help docs for woitemstatus and woitempriority
|
|
||||||
|
|
||||||
|
|
||||||
Joyce is going to:
|
|
||||||
1797-B 10th street
|
|
||||||
East courtenay
|
|
||||||
past superstore area
|
|
||||||
taking van
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,213 +1,240 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="value != null">
|
<div v-if="value != null">
|
||||||
<!-- Title and menu -->
|
<v-row>
|
||||||
<v-col cols="12">
|
<!-- Title and menu -->
|
||||||
<v-menu offset-y>
|
<v-col cols="12">
|
||||||
<template v-slot:activator="{ on, attrs }">
|
<v-menu offset-y>
|
||||||
<div class="text-h6">
|
<template v-slot:activator="{ on, attrs }">
|
||||||
<v-icon large color="primary">$ayiWrench</v-icon>
|
<div class="text-h6">
|
||||||
{{ $ay.t("WorkOrderItemList") }}
|
<v-icon large color="primary">$ayiWrench</v-icon>
|
||||||
<v-btn large icon v-bind="attrs" v-on="on">
|
{{ $ay.t("WorkOrderItemList") }}
|
||||||
<v-icon small color="primary">$ayiEllipsisV</v-icon>
|
<v-btn large icon v-bind="attrs" v-on="on">
|
||||||
</v-btn>
|
<v-icon small color="primary">$ayiEllipsisV</v-icon>
|
||||||
</div>
|
</v-btn>
|
||||||
</template>
|
</div>
|
||||||
<v-list>
|
</template>
|
||||||
<v-list-item v-if="canAdd" @click="newItem">
|
<v-list>
|
||||||
<v-list-item-icon>
|
<v-list-item v-if="canAdd" @click="newItem">
|
||||||
<v-icon>$ayiPlus</v-icon>
|
<v-list-item-icon>
|
||||||
</v-list-item-icon>
|
<v-icon>$ayiPlus</v-icon>
|
||||||
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
</v-list-item-icon>
|
||||||
</v-list-item>
|
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
||||||
<v-list-item v-if="canDelete && !isDeleted" @click="deleteItem">
|
</v-list-item>
|
||||||
<v-list-item-icon>
|
<v-list-item v-if="canDelete && !isDeleted" @click="deleteItem">
|
||||||
<v-icon>$ayiTrashAlt</v-icon>
|
<v-list-item-icon>
|
||||||
</v-list-item-icon>
|
<v-icon>$ayiTrashAlt</v-icon>
|
||||||
<v-list-item-title>{{ $ay.t("SoftDelete") }}</v-list-item-title>
|
</v-list-item-icon>
|
||||||
</v-list-item>
|
<v-list-item-title>{{ $ay.t("SoftDelete") }}</v-list-item-title>
|
||||||
<v-list-item v-if="canDelete && isDeleted" @click="unDeleteItem">
|
</v-list-item>
|
||||||
<v-list-item-icon>
|
<v-list-item v-if="canDelete && isDeleted" @click="unDeleteItem">
|
||||||
<v-icon>$ayiTrashRestoreAlt</v-icon>
|
<v-list-item-icon>
|
||||||
</v-list-item-icon>
|
<v-icon>$ayiTrashRestoreAlt</v-icon>
|
||||||
<v-list-item-title>{{ $ay.t("Undelete") }}</v-list-item-title>
|
</v-list-item-icon>
|
||||||
</v-list-item>
|
<v-list-item-title>{{ $ay.t("Undelete") }}</v-list-item-title>
|
||||||
</v-list>
|
</v-list-item>
|
||||||
</v-menu>
|
</v-list>
|
||||||
</v-col>
|
</v-menu>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
<template v-if="showTable">
|
<template v-if="showTable">
|
||||||
<!-- ################################ WORK ORDER ITEMS TABLE ############################### -->
|
<!-- ################################ WORK ORDER ITEMS TABLE ############################### -->
|
||||||
<v-col cols="12" class="mb-10">
|
<v-col cols="12" class="mb-10">
|
||||||
<v-data-table
|
<v-data-table
|
||||||
:headers="headerList"
|
:headers="headerList"
|
||||||
:items="itemList"
|
:items="itemList"
|
||||||
item-key="index"
|
item-key="index"
|
||||||
v-model="selectedRow"
|
v-model="selectedRow"
|
||||||
class="elevation-1"
|
class="elevation-1"
|
||||||
disable-pagination
|
disable-pagination
|
||||||
disable-filtering
|
disable-filtering
|
||||||
disable-sort
|
disable-sort
|
||||||
hide-default-footer
|
hide-default-footer
|
||||||
data-cy="itemsTable"
|
data-cy="itemsTable"
|
||||||
dense
|
dense
|
||||||
:item-class="itemRowClasses"
|
:item-class="itemRowClasses"
|
||||||
@click:row="handleRowClick"
|
@click:row="handleRowClick"
|
||||||
:show-select="$vuetify.breakpoint.xs"
|
:show-select="$vuetify.breakpoint.xs"
|
||||||
single-select
|
single-select
|
||||||
|
>
|
||||||
|
</v-data-table>
|
||||||
|
</v-col>
|
||||||
|
</template>
|
||||||
|
<template v-if="activeItemIndex != null">
|
||||||
|
<v-btn
|
||||||
|
v-if="canDelete && isDeleted"
|
||||||
|
large
|
||||||
|
@click="unDeleteItem"
|
||||||
|
color="primary"
|
||||||
|
>{{ $ay.t("Undelete")
|
||||||
|
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
||||||
>
|
>
|
||||||
</v-data-table>
|
|
||||||
</v-col>
|
|
||||||
</template>
|
|
||||||
<template v-if="activeItemIndex != null">
|
|
||||||
<v-btn
|
|
||||||
v-if="canDelete && isDeleted"
|
|
||||||
large
|
|
||||||
@click="unDeleteItem"
|
|
||||||
color="primary"
|
|
||||||
>{{ $ay.t("Undelete")
|
|
||||||
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
|
|
||||||
>
|
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'WorkOrderItemSummary')" cols="12">
|
<v-col v-if="form().showMe(this, 'WorkOrderItemSummary')" cols="12">
|
||||||
<v-textarea
|
<v-textarea
|
||||||
v-model="value.items[activeItemIndex].notes"
|
v-model="value.items[activeItemIndex].notes"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
:disabled="isDeleted"
|
:disabled="isDeleted"
|
||||||
:label="$ay.t('WorkOrderItemSummary')"
|
:label="$ay.t('WorkOrderItemSummary')"
|
||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(this, `items[${activeItemIndex}].notes`)
|
form().serverErrors(this, `items[${activeItemIndex}].notes`)
|
||||||
"
|
"
|
||||||
ref="notes"
|
ref="notes"
|
||||||
data-cy="notes"
|
data-cy="notes"
|
||||||
@input="fieldValueChanged('notes')"
|
@input="fieldValueChanged('notes')"
|
||||||
auto-grow
|
auto-grow
|
||||||
></v-textarea>
|
></v-textarea>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderItemSequence')"
|
v-if="form().showMe(this, 'WorkOrderItemSequence')"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
xl="3"
|
xl="3"
|
||||||
>
|
|
||||||
<v-text-field
|
|
||||||
v-model="value.items[activeItemIndex].sequence"
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
:disabled="isDeleted"
|
|
||||||
:label="$ay.t('Sequence')"
|
|
||||||
ref="sequence"
|
|
||||||
:rules="[form().integerValid(this, 'sequence')]"
|
|
||||||
:error-messages="form().serverErrors(this, 'sequence')"
|
|
||||||
@input="fieldValueChanged('sequence')"
|
|
||||||
type="number"
|
|
||||||
></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'WorkOrderItemTechNotes')" cols="12">
|
|
||||||
<v-textarea
|
|
||||||
v-model="value.items[activeItemIndex].techNotes"
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
:disabled="isDeleted"
|
|
||||||
:label="$ay.t('WorkOrderItemTechNotes')"
|
|
||||||
:error-messages="form().serverErrors(this, 'techNotes')"
|
|
||||||
ref="techNotes"
|
|
||||||
data-cy="techNotes"
|
|
||||||
@input="fieldValueChanged('techNotes')"
|
|
||||||
auto-grow
|
|
||||||
></v-textarea>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
|
||||||
<v-autocomplete
|
|
||||||
v-model="value.items[activeItemIndex].workorderItemStatusId"
|
|
||||||
@input="fieldValueChanged('workorderItemStatusId')"
|
|
||||||
:items="pvm.selectLists.woItemStatus"
|
|
||||||
item-text="name"
|
|
||||||
item-value="id"
|
|
||||||
:label="$ay.t('WorkOrderItemWorkOrderStatusID')"
|
|
||||||
prepend-icon="$ayiEdit"
|
|
||||||
@click:prepend="handleEditItemStatusClick()"
|
|
||||||
>
|
>
|
||||||
<template v-slot:selection="{ item }">
|
<v-text-field
|
||||||
<v-icon class="mr-3" :color="item.color">$ayiCircle</v-icon
|
v-model="value.items[activeItemIndex].sequence"
|
||||||
>{{ item.name }}
|
:readonly="formState.readOnly"
|
||||||
</template>
|
:disabled="isDeleted"
|
||||||
|
:label="$ay.t('Sequence')"
|
||||||
|
ref="sequence"
|
||||||
|
:rules="[form().integerValid(this, 'sequence')]"
|
||||||
|
:error-messages="form().serverErrors(this, 'sequence')"
|
||||||
|
@input="fieldValueChanged('sequence')"
|
||||||
|
type="number"
|
||||||
|
></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
<template v-slot:item="{ item }">
|
<v-col v-if="form().showMe(this, 'WorkOrderItemTechNotes')" cols="12">
|
||||||
<v-list-item-avatar>
|
<v-textarea
|
||||||
<v-icon :color="item.color">$ayiCircle</v-icon>
|
v-model="value.items[activeItemIndex].techNotes"
|
||||||
</v-list-item-avatar>
|
:readonly="formState.readOnly"
|
||||||
<v-list-item-content>
|
:disabled="isDeleted"
|
||||||
<v-list-item-title
|
:label="$ay.t('WorkOrderItemTechNotes')"
|
||||||
><span
|
:error-messages="form().serverErrors(this, 'techNotes')"
|
||||||
:class="
|
ref="techNotes"
|
||||||
item.active
|
data-cy="techNotes"
|
||||||
? ''
|
@input="fieldValueChanged('techNotes')"
|
||||||
: 'disabled--text text-decoration-line-through'
|
auto-grow
|
||||||
"
|
></v-textarea>
|
||||||
>{{ item.name }}</span
|
</v-col>
|
||||||
></v-list-item-title
|
|
||||||
>
|
|
||||||
<v-list-item-subtitle> {{ item.notes }}</v-list-item-subtitle>
|
|
||||||
</v-list-item-content>
|
|
||||||
</template>
|
|
||||||
</v-autocomplete>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col
|
||||||
<v-autocomplete
|
v-if="form().showMe(this, 'WorkOrderItemWorkOrderStatusID')"
|
||||||
v-model="value.items[activeItemIndex].workorderItemPriorityId"
|
cols="12"
|
||||||
@input="fieldValueChanged('workorderItemPriorityId')"
|
sm="6"
|
||||||
:items="pvm.selectLists.woItemPriorities"
|
lg="4"
|
||||||
item-text="name"
|
xl="3"
|
||||||
item-value="id"
|
|
||||||
:label="$ay.t('WorkOrderItemPriorityID')"
|
|
||||||
prepend-icon="$ayiEdit"
|
|
||||||
@click:prepend="handleEditItemPriorityClick()"
|
|
||||||
>
|
>
|
||||||
<template v-slot:selection="{ item }">
|
<v-autocomplete
|
||||||
<v-icon class="mr-3" :color="item.color">$ayiFireAlt</v-icon
|
v-model="value.items[activeItemIndex].workorderItemStatusId"
|
||||||
>{{ item.name }}
|
:readonly="formState.readOnly"
|
||||||
</template>
|
:disabled="isDeleted"
|
||||||
|
@input="fieldValueChanged('workorderItemStatusId')"
|
||||||
|
:items="pvm.selectLists.woItemStatus"
|
||||||
|
item-text="name"
|
||||||
|
item-value="id"
|
||||||
|
:label="$ay.t('WorkOrderItemWorkOrderStatusID')"
|
||||||
|
:error-messages="form().serverErrors(this, 'workorderItemStatusId')"
|
||||||
|
ref="workorderItemStatusId"
|
||||||
|
data-cy="workorderItemStatusId"
|
||||||
|
prepend-icon="$ayiEdit"
|
||||||
|
@click:prepend="handleEditItemStatusClick()"
|
||||||
|
>
|
||||||
|
<template v-slot:selection="{ item }">
|
||||||
|
<v-icon class="mr-3" :color="item.color">$ayiCircle</v-icon
|
||||||
|
>{{ item.name }}
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-slot:item="{ item }">
|
<template v-slot:item="{ item }">
|
||||||
<v-list-item-avatar>
|
<v-list-item-avatar>
|
||||||
<v-icon :color="item.color">$ayiFireAlt</v-icon>
|
<v-icon :color="item.color">$ayiCircle</v-icon>
|
||||||
</v-list-item-avatar>
|
</v-list-item-avatar>
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title
|
<v-list-item-title
|
||||||
><span
|
><span
|
||||||
:class="
|
:class="
|
||||||
item.active
|
item.active
|
||||||
? ''
|
? ''
|
||||||
: 'disabled--text text-decoration-line-through'
|
: 'disabled--text text-decoration-line-through'
|
||||||
"
|
"
|
||||||
>{{ item.name }}</span
|
>{{ item.name }}</span
|
||||||
></v-list-item-title
|
></v-list-item-title
|
||||||
>
|
>
|
||||||
</v-list-item-content>
|
<v-list-item-subtitle> {{ item.notes }}</v-list-item-subtitle>
|
||||||
</template>
|
</v-list-item-content>
|
||||||
</v-autocomplete>
|
</template>
|
||||||
</v-col>
|
</v-autocomplete>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
//status WorkOrderItemWorkOrderStatusID WorkorderItemStatusId //priority
|
<v-col
|
||||||
|
v-if="form().showMe(this, 'WorkOrderItemPriorityID')"
|
||||||
|
cols="12"
|
||||||
|
sm="6"
|
||||||
|
lg="4"
|
||||||
|
xl="3"
|
||||||
|
>
|
||||||
|
<v-autocomplete
|
||||||
|
v-model="value.items[activeItemIndex].workorderItemPriorityId"
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:disabled="isDeleted"
|
||||||
|
@input="fieldValueChanged('workorderItemPriorityId')"
|
||||||
|
:items="pvm.selectLists.woItemPriorities"
|
||||||
|
item-text="name"
|
||||||
|
item-value="id"
|
||||||
|
:label="$ay.t('WorkOrderItemPriorityID')"
|
||||||
|
:error-messages="
|
||||||
|
form().serverErrors(this, 'workorderItemPriorityId')
|
||||||
|
"
|
||||||
|
ref="workorderItemPriorityId"
|
||||||
|
data-cy="workorderItemPriorityId"
|
||||||
|
prepend-icon="$ayiEdit"
|
||||||
|
@click:prepend="handleEditItemPriorityClick()"
|
||||||
|
>
|
||||||
|
<template v-slot:selection="{ item }">
|
||||||
|
<v-icon class="mr-3" :color="item.color">$ayiFireAlt</v-icon
|
||||||
|
>{{ item.name }}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item="{ item }">
|
||||||
|
<v-list-item-avatar>
|
||||||
|
<v-icon :color="item.color">$ayiFireAlt</v-icon>
|
||||||
|
</v-list-item-avatar>
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title
|
||||||
|
><span
|
||||||
|
:class="
|
||||||
|
item.active
|
||||||
|
? ''
|
||||||
|
: 'disabled--text text-decoration-line-through'
|
||||||
|
"
|
||||||
|
>{{ item.name }}</span
|
||||||
|
></v-list-item-title
|
||||||
|
>
|
||||||
|
</v-list-item-content>
|
||||||
|
</template>
|
||||||
|
</v-autocomplete>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<!-- //status WorkOrderItemWorkOrderStatusID WorkorderItemStatusId //priority
|
||||||
WorkOrderItemPriorityID WorkorderItemPriorityId //requestdate
|
WorkOrderItemPriorityID WorkorderItemPriorityId //requestdate
|
||||||
WorkOrderItemRequestDate RequestDate //warrantyservice
|
WorkOrderItemRequestDate RequestDate //warrantyservice
|
||||||
WorkOrderItemWarrantyService WarrantyService
|
WorkOrderItemWarrantyService WarrantyService -->
|
||||||
|
<v-col cols="12">
|
||||||
<GzWoItemScheduledUsers
|
<GzWoItemScheduledUsers
|
||||||
v-if="
|
v-if="
|
||||||
pvm.subRights.scheduledUsers.visible &&
|
pvm.subRights.scheduledUsers.visible &&
|
||||||
form().showMe(this, 'WorkOrderItemScheduledUserList')
|
form().showMe(this, 'WorkOrderItemScheduledUserList')
|
||||||
"
|
"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:pvm="pvm"
|
:pvm="pvm"
|
||||||
:active-wo-item-index="activeItemIndex"
|
:active-wo-item-index="activeItemIndex"
|
||||||
data-cy="woItemScheduledUsers"
|
data-cy="woItemScheduledUsers"
|
||||||
@change="$emit('change')"
|
@change="$emit('change')"
|
||||||
/>
|
/>
|
||||||
</template>
|
</v-col>
|
||||||
|
</template>
|
||||||
|
</v-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -453,7 +480,7 @@ and it's probably not a big list to fill anyway
|
|||||||
x.quantityReceived,
|
x.quantityReceived,
|
||||||
this.pvm.languageName
|
this.pvm.languageName
|
||||||
),
|
),
|
||||||
status: x.workorderItemStatusId, //todo: get real status name etc here
|
status: x.workorderItemStatusId, //todo: get real status name etc here use
|
||||||
requestDate: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
requestDate: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
||||||
x.requestDate,
|
x.requestDate,
|
||||||
this.pvm.timeZoneName,
|
this.pvm.timeZoneName,
|
||||||
@@ -492,5 +519,10 @@ and it's probably not a big list to fill anyway
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: Function status name from woitemstatusid
|
||||||
|
//and priority same
|
||||||
|
//this.pvm.pickLists.woItemStatus.find(x=>x.id==x.workorderItemStatusId)
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ function generateMenu(vm) {
|
|||||||
let menuOptions = {
|
let menuOptions = {
|
||||||
isMain: false,
|
isMain: false,
|
||||||
readOnly: vm.formState.readOnly,
|
readOnly: vm.formState.readOnly,
|
||||||
icon: "$ayiCircle",
|
icon: "$ayiFireAlt",
|
||||||
title: "WorkOrderItemPriority",
|
title: "WorkOrderItemPriority",
|
||||||
helpUrl: "svc-work-order-item-priority",
|
helpUrl: "svc-work-order-item-priority",
|
||||||
formData: {
|
formData: {
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ async function clickHandler(menuItem) {
|
|||||||
function generateMenu(vm) {
|
function generateMenu(vm) {
|
||||||
let menuOptions = {
|
let menuOptions = {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "$ayiCircle",
|
icon: "$ayiFireAlt",
|
||||||
title: "WorkOrderItemPriorityList",
|
title: "WorkOrderItemPriorityList",
|
||||||
helpUrl: "svc-work-order-item-priority",
|
helpUrl: "svc-work-order-item-priority",
|
||||||
menuItems: [],
|
menuItems: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user