This commit is contained in:
2021-03-07 21:06:25 +00:00
parent 290c5963c5
commit 71af22af84
3 changed files with 153 additions and 30 deletions

View File

@@ -35,6 +35,10 @@ MISC ITEMS THAT CAME UP
todo: BUGBUG delete all tags from customer, go back in and zone2 appears for some reason
todo: attach a photo from phone, no error just does nothing
Test locally first to confirm, probably a rights issue of some kind
todo: NOT import PO's unless they are current, active and unreceived
todo: erase database should reset all id values if they aren't reset already so that future data doesn't result in a new PO starting at 29000 due to huge db trial seed prior
@@ -81,10 +85,7 @@ todo: it's a bit hard to click on a single digit or character link in a data tab
todo: partassembly form should use an edit dialog rather than edit in place in the grid as it's ugly and clunky and outside of the standard that will be used in PO and wo etc
todo: WHEN HAVE WORKORDER FORM customer popup notes need to pop pop pop, forgot to code for that before
It's been requested for a couple of other places as well so I need a re-usable solution for this
maybe it requires dismissal rather than what I was thinking of which is a self closing alert as people may want to read it for a while.
However, I also find that incredibly annoying but I guess that's the point :)
todo: WHEN HAVE WORKORDER FORM customer alert notes
## SERVER MISC ITEMS
@@ -151,9 +152,6 @@ todo: tag search in picklist, does it support more than one tag? I forget
Users may need to "triangulate" on to an item by multiple tags
todo: NEXT DEPLOY TO DEVOPS attach a photo from phone, no error just does nothing
worked here locally latest build
retest on server after next deploy
TODO: //MIGRATE_OUTSTANDING comment tag
@@ -200,6 +198,11 @@ todo: service rates contract list
add via form even though only one item, more efficient
edit / remove via form
todo: edit item by item being passed in is flawed potentially because it looks for ID to match when in reality it should pass the index
because id is 0 for added items and there could be two added items
every op should be by index to ensure it works properly
go back and fix the ones by looking at teh edit first to find the by id and then switchup to index like for contract service rates which does it correctly
todo: contractrate checkbox missing in rates
todo: might want to put more fields in the contractdatalist, it's very sparse adn the old v7 had pretty much all the fields as well

View File

@@ -181,6 +181,9 @@ export default {
//this is required for the control to update and parent form to detect it
this.$emit("input", e.id);
//this is sometimes required for forms that need the full selection value
this.$emit("update:name", e.name);
this.$emit("update:active", e.active);
},
fetchValueIfNotPresent() {
//is there a value that might require fetching?

View File

@@ -362,24 +362,18 @@
v-for="(item, index) in obj.serviceRateItems"
:key="item.Id"
>
<td class="text-right">
<gz-pick-list
:allow-no-selection="false"
:can-clear="false"
:aya-type="ayaTypes().ServiceRate"
:show-edit-icon="false"
v-model="item.serviceRateId"
></gz-pick-list>
<td class="text-left">
{{ item.serviceRateViz }}
</td>
<td class="text-right">
<v-btn
@click="removeServiceRateItem(index)"
icon
@click="editServiceRateItem(index)"
class="ml-4"
>
<v-icon>
$ayiTrashAlt
$ayiEdit
</v-icon>
</v-btn>
</td>
@@ -605,7 +599,7 @@
<v-btn
color="blue darken-1"
text
@click="editPoItemDialog = false"
@click="editContractPartOverrideItemDialog = false"
>{{ $ay.t("Close") }}</v-btn
>
@@ -794,7 +788,7 @@
<v-btn
color="blue darken-1"
text
@click="editPoItemDialog = false"
@click="editContractServiceRateOverrideItemDialog = false"
>{{ $ay.t("Close") }}</v-btn
>
@@ -983,7 +977,7 @@
<v-btn
color="blue darken-1"
text
@click="editPoItemDialog = false"
@click="editContractTravelRateOverrideItemDialog = false"
>{{ $ay.t("Close") }}</v-btn
>
@@ -1044,6 +1038,122 @@
</v-dialog>
</v-row>
</template>
<!-- #########################################################################################################-->
<!-- ########################## SERVICE RATE ITEM EDIT FORM ###############################-->
<!-- #########################################################################################################-->
<template v-if="obj.serviceRateItems.length">
<v-row justify="center">
<v-dialog v-model="editServiceRateItemDialog">
<v-card>
<v-card-title> </v-card-title>
<v-card-text>
<v-row>
<v-col cols="12" sm="6" lg="4" xl="3">
<gz-pick-list
:allow-no-selection="false"
:can-clear="false"
:aya-type="ayaTypes().ServiceRate"
:show-edit-icon="true"
v-model="
obj.serviceRateItems[editServiceRateItemIndex]
.serviceRateId
"
:readonly="formState.readOnly"
:label="$ay.t('ServiceRate')"
ref="userid"
data-cy="userid"
:rules="[
form().integerValid(
this,
'ServiceRateItems.ServiceRateId'
),
form().required(this, 'ServiceRateItems.ServiceRateId')
]"
:error-messages="
form().serverErrors(
this,
`ServiceRateItems[${editServiceRateItemIndex}].ServiceRateId`
)
"
@input="
fieldValueChanged(
`ServiceRateItems[${editServiceRateItemIndex}].ServiceRateId`
)
"
:name.sync="
obj.serviceRateItems[editServiceRateItemIndex]
.serviceRateViz
"
></gz-pick-list>
</v-col>
</v-row>
</v-card-text>
<v-card-actions>
<template v-if="!$vuetify.breakpoint.xs">
<v-btn
color="red darken-1"
text
@click="deleteServiceRateItem(editServiceRateItemIndex)"
>{{ $ay.t("Delete") }}</v-btn
>
<v-spacer></v-spacer>
<v-btn
color="blue darken-1"
text
@click="addServiceRateItem()"
class="ml-4"
>{{ $ay.t("New") }}</v-btn
>
<v-btn
color="blue darken-1"
text
@click="editServiceRateItemDialog = false"
class="ml-4"
>{{ $ay.t("OK") }}</v-btn
>
</template>
<template v-else>
<!-- MOBILE FORMAT -->
<v-row>
<v-btn
class="mt-4"
block
text
color="blue darken-1"
@click="editServiceRateItemDialog = false"
>{{ $ay.t("OK") }}</v-btn
>
<v-btn
class="mt-4"
block
text
color="blue darken-1"
@click="addServiceRateItem()"
>{{ $ay.t("New") }}</v-btn
>
<v-btn
class="mt-8 mb-6"
block
text
color="red darken-1"
@click="
deleteContractServiceRateOverrideItem(
obj.serviceRateItems[editServiceRateItemIndex]
)
"
>{{ $ay.t("Delete") }}</v-btn
>
</v-row>
</template>
</v-card-actions>
</v-card>
</v-dialog>
</v-row>
</template>
</div>
</template>
@@ -1166,7 +1276,11 @@ export default {
editContractServiceRateOverrideItemDialog: false,
editContractServiceRateOverrideItemIndex: 0,
editContractTravelRateOverrideItemDialog: false,
editContractTravelRateOverrideItemIndex: 0
editContractTravelRateOverrideItemIndex: 0,
editServiceRateItemDialog: false,
editServiceRateItemIndex: 0,
editTravelRateItemDialog: false,
editTravelRateItemIndex: 0
};
},
//WATCHERS
@@ -1299,22 +1413,25 @@ export default {
this.editContractTravelRateOverrideItemIndex = 0;
this.formState.dirty = true;
},
addServiceRateItem: function() {
this.obj.serviceRateItems.push({
id: 0,
contractId: this.obj.id,
serviceRateId: null
});
this.editServiceRateItemIndex =
this.obj.serviceRateItems.push({
id: 0,
contractId: this.obj.id,
serviceRateId: null
}) - 1;
this.editServiceRateItemDialog = true;
this.formState.dirty = true;
},
removeServiceRateItem: function(index) {
editServiceRateItem: function(index) {
this.editServiceRateItemIndex = index;
this.editServiceRateItemDialog = true;
},
deleteServiceRateItem: function(index) {
this.obj.serviceRateItems.splice(index, 1);
this.formState.dirty = true;
},
canSave: function() {
return this.formState.valid && this.formState.dirty;
},