This commit is contained in:
2021-03-07 21:33:01 +00:00
parent 71af22af84
commit 9a1f6f103b
2 changed files with 31 additions and 16 deletions

View File

@@ -181,7 +181,7 @@ export default {
//this is required for the control to update and parent form to detect it //this is required for the control to update and parent form to detect it
this.$emit("input", e.id); this.$emit("input", e.id);
//this is sometimes required for forms that need the full selection value //this is sometimes required for forms that need more than the ID (contract etc)
this.$emit("update:name", e.name); this.$emit("update:name", e.name);
this.$emit("update:active", e.active); this.$emit("update:active", e.active);
}, },

View File

@@ -478,7 +478,12 @@
<!-- #################################################################################################--> <!-- #################################################################################################-->
<!-- ########################## CONTRACT PART OVERRIDE ITEM EDIT FORM ###############################--> <!-- ########################## CONTRACT PART OVERRIDE ITEM EDIT FORM ###############################-->
<!-- #################################################################################################--> <!-- #################################################################################################-->
<template v-if="obj.contractPartOverrideItems.length"> <template
v-if="
obj.contractPartOverrideItems.length &&
editContractPartOverrideItemIndex != -1
"
>
<v-row justify="center"> <v-row justify="center">
<v-dialog v-model="editContractPartOverrideItemDialog"> <v-dialog v-model="editContractPartOverrideItemDialog">
<v-card> <v-card>
@@ -664,7 +669,12 @@
<!-- #########################################################################################################--> <!-- #########################################################################################################-->
<!-- ########################## CONTRACT SERVICE RATE OVERRIDE ITEM EDIT FORM ###############################--> <!-- ########################## CONTRACT SERVICE RATE OVERRIDE ITEM EDIT FORM ###############################-->
<!-- #########################################################################################################--> <!-- #########################################################################################################-->
<template v-if="obj.contractServiceRateOverrideItems.length"> <template
v-if="
obj.contractServiceRateOverrideItems.length &&
editContractServiceRateOverrideItemIndex != -1
"
>
<v-row justify="center"> <v-row justify="center">
<v-dialog v-model="editContractServiceRateOverrideItemDialog"> <v-dialog v-model="editContractServiceRateOverrideItemDialog">
<v-card> <v-card>
@@ -853,7 +863,12 @@
<!-- ########################################################################################################--> <!-- ########################################################################################################-->
<!-- ########################## CONTRACT TRAVEL RATE OVERRIDE ITEM EDIT FORM ###############################--> <!-- ########################## CONTRACT TRAVEL RATE OVERRIDE ITEM EDIT FORM ###############################-->
<!-- ########################################################################################################--> <!-- ########################################################################################################-->
<template v-if="obj.contractTravelRateOverrideItems.length"> <template
v-if="
obj.contractTravelRateOverrideItems.length &&
editContractTravelRateOverrideItemIndex != -1
"
>
<v-row justify="center"> <v-row justify="center">
<v-dialog v-model="editContractTravelRateOverrideItemDialog"> <v-dialog v-model="editContractTravelRateOverrideItemDialog">
<v-card> <v-card>
@@ -1042,7 +1057,9 @@
<!-- #########################################################################################################--> <!-- #########################################################################################################-->
<!-- ########################## SERVICE RATE ITEM EDIT FORM ###############################--> <!-- ########################## SERVICE RATE ITEM EDIT FORM ###############################-->
<!-- #########################################################################################################--> <!-- #########################################################################################################-->
<template v-if="obj.serviceRateItems.length"> <template
v-if="obj.serviceRateItems.length && editServiceRateItemIndex != -1"
>
<v-row justify="center"> <v-row justify="center">
<v-dialog v-model="editServiceRateItemDialog"> <v-dialog v-model="editServiceRateItemDialog">
<v-card> <v-card>
@@ -1094,7 +1111,7 @@
<v-btn <v-btn
color="red darken-1" color="red darken-1"
text text
@click="deleteServiceRateItem(editServiceRateItemIndex)" @click="deleteServiceRateItem()"
>{{ $ay.t("Delete") }}</v-btn >{{ $ay.t("Delete") }}</v-btn
> >
<v-spacer></v-spacer> <v-spacer></v-spacer>
@@ -1140,11 +1157,7 @@
block block
text text
color="red darken-1" color="red darken-1"
@click=" @click="deleteServiceRateItem()"
deleteContractServiceRateOverrideItem(
obj.serviceRateItems[editServiceRateItemIndex]
)
"
>{{ $ay.t("Delete") }}</v-btn >{{ $ay.t("Delete") }}</v-btn
> >
</v-row> </v-row>
@@ -1346,7 +1359,7 @@ export default {
this.editContractPartOverrideItemIndex, this.editContractPartOverrideItemIndex,
1 1
); );
this.editContractPartOverrideItemIndex = 0; this.editContractPartOverrideItemIndex = -1;
this.formState.dirty = true; this.formState.dirty = true;
}, },
@@ -1378,7 +1391,7 @@ export default {
this.editContractServiceRateOverrideItemIndex, this.editContractServiceRateOverrideItemIndex,
1 1
); );
this.editContractServiceRateOverrideItemIndex = 0; this.editContractServiceRateOverrideItemIndex = -1;
this.formState.dirty = true; this.formState.dirty = true;
}, },
@@ -1410,7 +1423,7 @@ export default {
this.editContractTravelRateOverrideItemIndex, this.editContractTravelRateOverrideItemIndex,
1 1
); );
this.editContractTravelRateOverrideItemIndex = 0; this.editContractTravelRateOverrideItemIndex = -1;
this.formState.dirty = true; this.formState.dirty = true;
}, },
addServiceRateItem: function() { addServiceRateItem: function() {
@@ -1428,8 +1441,10 @@ export default {
this.editServiceRateItemIndex = index; this.editServiceRateItemIndex = index;
this.editServiceRateItemDialog = true; this.editServiceRateItemDialog = true;
}, },
deleteServiceRateItem: function(index) { deleteServiceRateItem: function() {
this.obj.serviceRateItems.splice(index, 1); this.editServiceRateItemDialog = false;
this.obj.serviceRateItems.splice(this.editServiceRateItemIndex, 1);
this.editServiceRateItemIndex = -1;
this.formState.dirty = true; this.formState.dirty = true;
}, },
canSave: function() { canSave: function() {