This commit is contained in:
@@ -45,6 +45,7 @@
|
|||||||
:label="$sock.t('Customer')"
|
:label="$sock.t('Customer')"
|
||||||
:error-messages="form().serverErrors(this, 'customerId')"
|
:error-messages="form().serverErrors(this, 'customerId')"
|
||||||
@input="fieldValueChanged('customerId')"
|
@input="fieldValueChanged('customerId')"
|
||||||
|
@update:name="customerChanged"
|
||||||
></gz-pick-list>
|
></gz-pick-list>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
@@ -74,28 +75,100 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
<gz-date-time-picker
|
<v-row dense no-gutters>
|
||||||
ref="licenseExpire"
|
<v-col>
|
||||||
v-model="obj.licenseExpire"
|
<gz-date-time-picker
|
||||||
:label="$sock.t('LicenseExpiration')"
|
ref="licenseExpire"
|
||||||
:readonly="formState.readOnly"
|
v-model="obj.licenseExpire"
|
||||||
:error-messages="form().serverErrors(this, 'licenseExpire')"
|
:label="$sock.t('LicenseExpiration')"
|
||||||
data-cy="licenseExpire"
|
:readonly="formState.readOnly"
|
||||||
@input="fieldValueChanged('licenseExpire')"
|
:error-messages="form().serverErrors(this, 'licenseExpire')"
|
||||||
></gz-date-time-picker>
|
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>
|
||||||
|
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
<gz-date-time-picker
|
<v-row dense no-gutters>
|
||||||
ref="maintenanceExpire"
|
<v-col>
|
||||||
v-model="obj.maintenanceExpire"
|
<gz-date-time-picker
|
||||||
:label="$sock.t('LicenseMaintenanceExpire')"
|
ref="maintenanceExpire"
|
||||||
:rules="[form().required(this, 'maintenanceExpire')]"
|
v-model="obj.maintenanceExpire"
|
||||||
:readonly="formState.readOnly"
|
:label="$sock.t('LicenseMaintenanceExpire')"
|
||||||
:error-messages="form().serverErrors(this, 'maintenanceExpire')"
|
:rules="[form().required(this, 'maintenanceExpire')]"
|
||||||
data-cy="maintenanceExpire"
|
:readonly="formState.readOnly"
|
||||||
@input="fieldValueChanged('maintenanceExpire')"
|
:error-messages="
|
||||||
></gz-date-time-picker>
|
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>
|
||||||
|
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
@@ -118,21 +191,70 @@
|
|||||||
</div>
|
</div>
|
||||||
</v-col>
|
</v-col>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="obj.pGroup == 1">
|
<template v-if="obj.pGroup == 1">
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
<v-text-field
|
<v-row dense no-gutters>
|
||||||
ref="fetchCode"
|
<v-col cols="2">
|
||||||
v-model="obj.fetchCode"
|
<v-checkbox
|
||||||
dense
|
ref="wbi"
|
||||||
:readonly="formState.readOnly"
|
v-model="obj.wbi"
|
||||||
:label="$sock.t('LicenseFetchCode')"
|
dense
|
||||||
:rules="[form().required(this, 'fetchCode')]"
|
:readonly="formState.readOnly"
|
||||||
:error-messages="form().serverErrors(this, 'fetchCode')"
|
label="WBI"
|
||||||
data-cy="fetchCode"
|
data-cy="wbi"
|
||||||
@input="fieldValueChanged('fetchCode')"
|
:error-messages="form().serverErrors(this, 'wbi')"
|
||||||
></v-text-field>
|
@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>
|
</v-col>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="obj.pGroup == 2">
|
<template v-if="obj.pGroup == 2">
|
||||||
<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
|
||||||
@@ -185,6 +307,20 @@
|
|||||||
auto-grow
|
auto-grow
|
||||||
></v-textarea>
|
></v-textarea>
|
||||||
</v-col>
|
</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">
|
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
|
||||||
@@ -240,7 +376,30 @@ export default {
|
|||||||
licenseExpire: null,
|
licenseExpire: null,
|
||||||
maintenanceExpire: null,
|
maintenanceExpire: null,
|
||||||
wiki: 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: {
|
selectLists: {
|
||||||
pGroups: []
|
pGroups: []
|
||||||
@@ -381,6 +540,30 @@ export default {
|
|||||||
window.$gz.form.fieldValueChanged(this, ref);
|
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) {
|
async getDataFromApi(recordId) {
|
||||||
const vm = this;
|
const vm = this;
|
||||||
window.$gz.form.setFormState({
|
window.$gz.form.setFormState({
|
||||||
|
|||||||
Reference in New Issue
Block a user