This commit is contained in:
2023-01-12 22:53:47 +00:00
parent e1534a35a6
commit 237404527d
2 changed files with 42 additions and 102 deletions

View File

@@ -32,14 +32,14 @@
</v-col> </v-col>
<v-col cols="12" sm="6" lg="4" xl="3"> <v-col cols="12" sm="6" lg="4" xl="3">
<v-text-field <v-text-field
ref="iPAddress" ref="ipAddress"
v-model="obj.iPAddress" v-model="obj.ipAddress"
dense dense
:readonly="formState.readOnly" :readonly="formState.readOnly"
:label="$sock.t('SubServerIP')" :label="$sock.t('SubServerIP')"
data-cy="iPAddress" data-cy="ipAddress"
:error-messages="form().serverErrors(this, 'iPAddress')" :error-messages="form().serverErrors(this, 'ipAddress')"
@input="fieldValueChanged('iPAddress')" @input="fieldValueChanged('ipAddress')"
></v-text-field> ></v-text-field>
</v-col> </v-col>
@@ -210,13 +210,7 @@
@input="fieldValueChanged('customerSubDomain')" @input="fieldValueChanged('customerSubDomain')"
></v-text-field> ></v-text-field>
</v-col> </v-col>
<v-col <v-col cols="12" sm="6" lg="4" xl="3">
v-if="form().showMe(this, 'LoanUnitRateMonthCost')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-currency <gz-currency
ref="cost" ref="cost"
v-model="obj.cost" v-model="obj.cost"
@@ -374,6 +368,7 @@ export default {
trialCompany: null, trialCompany: null,
operatingSystem: "Ubuntu 22.10", operatingSystem: "Ubuntu 22.10",
customerSubDomain: null, customerSubDomain: null,
cost: 7.0,
wiki: null, wiki: null,
tags: [] tags: []
}, },

View File

@@ -21,83 +21,21 @@
@input="fieldValueChanged('eventType')" @input="fieldValueChanged('eventType')"
></v-select> ></v-select>
</v-col> </v-col>
<v-col v-if="showWoStatus" cols="12" sm="6" lg="4" xl="3"> <v-col v-if="showServerStatus" cols="12" sm="6" lg="4" xl="3">
<v-autocomplete <v-select
ref="idValue"
v-model="obj.idValue" v-model="obj.idValue"
dense dense
:items="selectLists.wostatus" :items="selectLists.serverStates"
item-text="name" item-text="name"
item-value="id" item-value="id"
:label="$sock.t('WorkOrderStatus')" :readonly="formState.readOnly"
> :label="$sock.t('ServerState')"
<template v-slot:item="data"> data-cy="idValue"
<v-list-item-avatar> :rules="[form().integerValid(this, 'idValue')]"
<v-icon :color="data.item.color">$sockiFlag</v-icon> :error-messages="form().serverErrors(this, 'idValue')"
</v-list-item-avatar> @input="fieldValueChanged('idValue')"
<v-list-item-content> ></v-select>
<v-list-item-title
><span class="text-subtitle-2">{{ data.item.name }}</span
><v-icon
v-if="data.item.locked"
small
color="disabled"
class="ml-2"
>$sockiLock</v-icon
>
<v-icon
v-if="data.item.completed"
color="disabled"
class="ml-1"
small
>$sockiCheckCircle</v-icon
></v-list-item-title
>
<v-list-item-subtitle>
{{ data.item.notes }}</v-list-item-subtitle
>
</v-list-item-content>
<v-list-item-action> </v-list-item-action>
</template>
</v-autocomplete>
</v-col>
<v-col v-if="showQuoteStatus" cols="12" sm="6" lg="4" xl="3">
<v-autocomplete
v-model="obj.idValue"
dense
:items="selectLists.quotestatus"
item-text="name"
item-value="id"
:label="$sock.t('QuoteQuoteStatusType')"
>
<template v-slot:item="data">
<v-list-item-avatar>
<v-icon :color="data.item.color">$sockiFlag</v-icon>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title
><span class="text-subtitle-2">{{ data.item.name }}</span
><v-icon
v-if="data.item.locked"
small
color="disabled"
class="ml-2"
>$sockiLock</v-icon
>
<v-icon
v-if="data.item.completed"
color="disabled"
class="ml-1"
small
>$sockiCheckCircle</v-icon
></v-list-item-title
>
<v-list-item-subtitle>
{{ data.item.notes }}</v-list-item-subtitle
>
</v-list-item-content>
<v-list-item-action> </v-list-item-action>
</template>
</v-autocomplete>
</v-col> </v-col>
<v-col v-if="showDecValue" cols="12" sm="6" lg="4" xl="3"> <v-col v-if="showDecValue" cols="12" sm="6" lg="4" xl="3">
@@ -243,8 +181,7 @@ export default {
data() { data() {
return { return {
selectLists: { selectLists: {
wostatus: [], serverStates: [],
quotestatus: [],
eventTypes: [], eventTypes: [],
deliveryMethods: [], deliveryMethods: [],
coreSockTypes: [] coreSockTypes: []
@@ -284,24 +221,16 @@ export default {
showDeliveryMethod() { showDeliveryMethod() {
return this.obj.eventType != 27; return this.obj.eventType != 27;
}, },
showWoStatus() { showServerStatus() {
switch (this.obj.eventType) { switch (this.obj.eventType) {
case 4: case 36:
case 24: case 37:
return true;
default:
return false;
}
},
showQuoteStatus() {
switch (this.obj.eventType) {
case 9:
case 29:
return true; return true;
default: default:
return false; return false;
} }
}, },
showDecValue() { showDecValue() {
//WorkorderTotalExceedsThreshold = 23 The "Andy" //WorkorderTotalExceedsThreshold = 23 The "Andy"
return this.obj.eventType == 23; // || this.obj.eventType == 11; //service bank threshold return this.obj.eventType == 23; // || this.obj.eventType == 11; //service bank threshold
@@ -332,6 +261,7 @@ export default {
case 22: case 22:
case 25: case 25:
case 34: case 34:
case 38:
return true; return true;
default: default:
return false; return false;
@@ -342,6 +272,8 @@ export default {
case 24: case 24:
case 29: case 29:
case 10: case 10:
case 37:
case 39:
return true; return true;
default: default:
return false; return false;
@@ -542,7 +474,7 @@ export default {
this.obj.decValue = 0; this.obj.decValue = 0;
} }
if (!this.showQuoteStatus && !this.showWoStatus) { if (!this.showQuoteStatus && !this.showServerStatus) {
this.obj.idValue = 0; this.obj.idValue = 0;
} }
@@ -742,10 +674,9 @@ async function fetchTranslatedText() {
"Tags", "Tags",
"Duration", "Duration",
"TaggedWith", "TaggedWith",
"WorkOrderStatus",
"Total", "Total",
"UiFieldDataTypesInteger", "UiFieldDataTypesInteger",
"QuoteQuoteStatusType" "ServerState"
]); ]);
} }
@@ -785,5 +716,19 @@ async function populateSelectionLists(vm) {
); );
await window.$gz.enums.fetchEnumList("coreview"); await window.$gz.enums.fetchEnumList("coreview");
vm.selectLists.coreSockTypes = window.$gz.enums.getSelectionList("coreview"); vm.selectLists.coreSockTypes = window.$gz.enums.getSelectionList("coreview");
await window.$gz.enums.fetchEnumList("ServerState");
vm.selectLists.serverStates = window.$gz.enums.getSelectionList(
"ServerState"
);
} }
/*
ServerStateStatusChange = 36,
ServerStateStatusAge=37,
SubscriptionServerExpiring = 38,
SubscriptionServerLastUpdateAge = 39,
SubscriptionServerRequestReceived = 40,
LicenseTrialRequestReceived = 41,
PurchaseNotificationReceived = 42
*/
</script> </script>