This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
:label="$sock.t('Customer')"
|
||||
:error-messages="form().serverErrors(this, 'customerId')"
|
||||
@input="fieldValueChanged('customerId')"
|
||||
@update:name="customerChanged"
|
||||
></gz-pick-list>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
@@ -74,28 +75,100 @@
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-date-time-picker
|
||||
ref="licenseExpire"
|
||||
v-model="obj.licenseExpire"
|
||||
:label="$sock.t('LicenseExpiration')"
|
||||
:readonly="formState.readOnly"
|
||||
:error-messages="form().serverErrors(this, 'licenseExpire')"
|
||||
data-cy="licenseExpire"
|
||||
@input="fieldValueChanged('licenseExpire')"
|
||||
></gz-date-time-picker>
|
||||
<v-row dense no-gutters>
|
||||
<v-col>
|
||||
<gz-date-time-picker
|
||||
ref="licenseExpire"
|
||||
v-model="obj.licenseExpire"
|
||||
:label="$sock.t('LicenseExpiration')"
|
||||
:readonly="formState.readOnly"
|
||||
:error-messages="form().serverErrors(this, 'licenseExpire')"
|
||||
data-cy="licenseExpire"
|
||||
@input="fieldValueChanged('licenseExpire')"
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
<template v-if="!formState.readOnly">
|
||||
<v-col cols="1">
|
||||
<v-menu offset-y>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn icon v-bind="attrs" v-on="on">
|
||||
<v-icon small>$sockiPlus</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item @click="dtAddOneWeek('licenseExpire')">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$sockiPlus</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>One week</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item @click="dtAddOneMonth('licenseExpire')">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$sockiPlus</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>One month</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item @click="dtAddOneYear('licenseExpire')">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$sockiPlus</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>One year</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</template>
|
||||
</v-row>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-date-time-picker
|
||||
ref="maintenanceExpire"
|
||||
v-model="obj.maintenanceExpire"
|
||||
:label="$sock.t('LicenseMaintenanceExpire')"
|
||||
:rules="[form().required(this, 'maintenanceExpire')]"
|
||||
:readonly="formState.readOnly"
|
||||
:error-messages="form().serverErrors(this, 'maintenanceExpire')"
|
||||
data-cy="maintenanceExpire"
|
||||
@input="fieldValueChanged('maintenanceExpire')"
|
||||
></gz-date-time-picker>
|
||||
<v-row dense no-gutters>
|
||||
<v-col>
|
||||
<gz-date-time-picker
|
||||
ref="maintenanceExpire"
|
||||
v-model="obj.maintenanceExpire"
|
||||
:label="$sock.t('LicenseMaintenanceExpire')"
|
||||
:rules="[form().required(this, 'maintenanceExpire')]"
|
||||
:readonly="formState.readOnly"
|
||||
:error-messages="
|
||||
form().serverErrors(this, 'maintenanceExpire')
|
||||
"
|
||||
data-cy="maintenanceExpire"
|
||||
@input="fieldValueChanged('maintenanceExpire')"
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
<template v-if="!formState.readOnly">
|
||||
<v-col cols="1">
|
||||
<v-menu offset-y>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn icon v-bind="attrs" v-on="on">
|
||||
<v-icon small>$sockiPlus</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item @click="dtAddOneWeek('maintenanceExpire')">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$sockiPlus</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>One week</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item @click="dtAddOneMonth('maintenanceExpire')">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$sockiPlus</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>One month</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item @click="dtAddOneYear('maintenanceExpire')">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$sockiPlus</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>One year</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</template>
|
||||
</v-row>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
@@ -118,21 +191,70 @@
|
||||
</div>
|
||||
</v-col>
|
||||
</template>
|
||||
|
||||
<template v-if="obj.pGroup == 1">
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
ref="fetchCode"
|
||||
v-model="obj.fetchCode"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('LicenseFetchCode')"
|
||||
:rules="[form().required(this, 'fetchCode')]"
|
||||
:error-messages="form().serverErrors(this, 'fetchCode')"
|
||||
data-cy="fetchCode"
|
||||
@input="fieldValueChanged('fetchCode')"
|
||||
></v-text-field>
|
||||
<v-row dense no-gutters>
|
||||
<v-col cols="2">
|
||||
<v-checkbox
|
||||
ref="wbi"
|
||||
v-model="obj.wbi"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
label="WBI"
|
||||
data-cy="wbi"
|
||||
:error-messages="form().serverErrors(this, 'wbi')"
|
||||
@change="fieldValueChanged('wbi')"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
<template v-if="obj.wbi">
|
||||
<v-col>
|
||||
<gz-date-time-picker
|
||||
ref="wbiExpires"
|
||||
v-model="obj.wbiExpires"
|
||||
:rules="[form().required(this, 'wbiExpires')]"
|
||||
:readonly="formState.readOnly"
|
||||
:error-messages="form().serverErrors(this, 'wbiExpires')"
|
||||
data-cy="wbiExpires"
|
||||
@input="fieldValueChanged('wbiExpires')"
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
<template v-if="!formState.readOnly">
|
||||
<v-col cols="1">
|
||||
<v-menu offset-y>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn icon v-bind="attrs" v-on="on">
|
||||
<v-icon small>$sockiPlus</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item @click="dtAddOneWeek('wbiExpires')">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$sockiPlus</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>One week</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item @click="dtAddOneMonth('wbiExpires')">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$sockiPlus</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>One month</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item @click="dtAddOneYear('wbiExpires')">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$sockiPlus</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>One year</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</template>
|
||||
</template>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</template>
|
||||
|
||||
<template v-if="obj.pGroup == 2">
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
@@ -185,6 +307,20 @@
|
||||
auto-grow
|
||||
></v-textarea>
|
||||
</v-col>
|
||||
<template v-if="obj.pGroup == 1">
|
||||
<v-col cols="12">
|
||||
<v-text-field
|
||||
ref="fetchCode"
|
||||
v-model="obj.fetchCode"
|
||||
dense
|
||||
readonly
|
||||
:label="$sock.t('LicenseFetchCode')"
|
||||
:error-messages="form().serverErrors(this, 'fetchCode')"
|
||||
data-cy="fetchCode"
|
||||
@input="fieldValueChanged('fetchCode')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</template>
|
||||
<!-- --------------------------------- -->
|
||||
|
||||
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
|
||||
@@ -240,7 +376,30 @@ export default {
|
||||
licenseExpire: null,
|
||||
maintenanceExpire: null,
|
||||
wiki: null,
|
||||
tags: []
|
||||
tags: [],
|
||||
//v7 props
|
||||
wbi: false,
|
||||
wbiExpires: null,
|
||||
mbi: false,
|
||||
mbiExpires: null,
|
||||
ri: false,
|
||||
riExpires: null,
|
||||
qbi: false,
|
||||
qbiExpires: null,
|
||||
qboi: false,
|
||||
qboiExpires: null,
|
||||
pti: false,
|
||||
ptiExpires: null,
|
||||
quickNotification: false,
|
||||
quickNotificationExpires: null,
|
||||
exportToXLS: false,
|
||||
exportToXLSExpires: null,
|
||||
outlookSchedule: false,
|
||||
outlookScheduleExpires: null,
|
||||
oli: false,
|
||||
oliExpires: null,
|
||||
importExportCSVDuplicate: false,
|
||||
importExportCSVDuplicateExpires: null
|
||||
},
|
||||
selectLists: {
|
||||
pGroups: []
|
||||
@@ -381,6 +540,30 @@ export default {
|
||||
window.$gz.form.fieldValueChanged(this, ref);
|
||||
}
|
||||
},
|
||||
customerChanged(newName) {
|
||||
console.log("CUSTOMER CHANGED");
|
||||
this.obj.regTo = newName;
|
||||
},
|
||||
dtAddOneWeek: function(propName) {
|
||||
// // eslint-disable-next-line
|
||||
// debugger;
|
||||
const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);
|
||||
this.obj[propName] = window.$gz.locale.addDurationToUTC8601String(now, {
|
||||
days: 7
|
||||
});
|
||||
},
|
||||
dtAddOneMonth: function(propName) {
|
||||
const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);
|
||||
this.obj[propName] = window.$gz.locale.addDurationToUTC8601String(now, {
|
||||
months: 1
|
||||
});
|
||||
},
|
||||
dtAddOneYear: function(propName) {
|
||||
const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);
|
||||
this.obj[propName] = window.$gz.locale.addDurationToUTC8601String(now, {
|
||||
years: 1
|
||||
});
|
||||
},
|
||||
async getDataFromApi(recordId) {
|
||||
const vm = this;
|
||||
window.$gz.form.setFormState({
|
||||
|
||||
Reference in New Issue
Block a user