This commit is contained in:
@@ -235,12 +235,12 @@ export default {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case socktype.SubscriptionServer:
|
case socktype.SubscriptionServer:
|
||||||
vm.$router.push({
|
vm.$router.push({
|
||||||
name: "subscription-server-edit",
|
name: "subscription-server-edit",
|
||||||
params: { recordid: tid.id }
|
params: { recordid: tid.id }
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
|
|||||||
@@ -168,8 +168,8 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
sockType: { type: Number, default: null },
|
ayaType: { type: Number, default: null },
|
||||||
sockId: { type: Number, default: null },
|
ayaId: { type: Number, default: null },
|
||||||
readonly: Boolean
|
readonly: Boolean
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -217,8 +217,8 @@ export default {
|
|||||||
fileData.push({ name: f.name, lastModified: f.lastModified });
|
fileData.push({ name: f.name, lastModified: f.lastModified });
|
||||||
}
|
}
|
||||||
const at = {
|
const at = {
|
||||||
sockId: vm.sockId,
|
sockId: vm.ayaId,
|
||||||
sockType: vm.sockType,
|
sockType: vm.ayaType,
|
||||||
files: vm.uploadFiles,
|
files: vm.uploadFiles,
|
||||||
fileData: JSON.stringify(fileData), //note this is required for an array or it will come to the server as a string [object,object]
|
fileData: JSON.stringify(fileData), //note this is required for an array or it will come to the server as a string [object,object]
|
||||||
notes: vm.notes ? vm.notes : ""
|
notes: vm.notes ? vm.notes : ""
|
||||||
@@ -259,7 +259,7 @@ export default {
|
|||||||
const vm = this;
|
const vm = this;
|
||||||
try {
|
try {
|
||||||
const res = await window.$gz.api.get(
|
const res = await window.$gz.api.get(
|
||||||
"attachment/list?socktype=" + vm.sockType + "&ayaid=" + vm.sockId
|
"attachment/list?socktype=" + vm.ayaType + "&sockid=" + vm.ayaId
|
||||||
);
|
);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
window.$gz.errorHandler.handleFormError(res.error);
|
window.$gz.errorHandler.handleFormError(res.error);
|
||||||
|
|||||||
@@ -598,26 +598,26 @@ function generateMenu(vm) {
|
|||||||
}
|
}
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
// menuOptions.menuItems.push({
|
||||||
title: "WorkOrderList",
|
// title: "WorkOrderList",
|
||||||
icon: "$sockiTools",
|
// icon: "$sockiTools",
|
||||||
key: FORM_KEY + ":WorkOrderList",
|
// key: FORM_KEY + ":WorkOrderList",
|
||||||
vm: vm
|
// vm: vm
|
||||||
});
|
// });
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
// menuOptions.menuItems.push({
|
||||||
title: "QuoteList",
|
// title: "QuoteList",
|
||||||
icon: "$sockiPencilAlt",
|
// icon: "$sockiPencilAlt",
|
||||||
key: FORM_KEY + ":QuoteList",
|
// key: FORM_KEY + ":QuoteList",
|
||||||
vm: vm
|
// vm: vm
|
||||||
});
|
// });
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
// menuOptions.menuItems.push({
|
||||||
title: "PMList",
|
// title: "PMList",
|
||||||
icon: "$sockiBusinessTime",
|
// icon: "$sockiBusinessTime",
|
||||||
key: FORM_KEY + ":PMList",
|
// key: FORM_KEY + ":PMList",
|
||||||
vm: vm
|
// vm: vm
|
||||||
});
|
// });
|
||||||
|
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
|
|||||||
@@ -666,26 +666,26 @@ function generateMenu(vm) {
|
|||||||
}
|
}
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
// menuOptions.menuItems.push({
|
||||||
title: "WorkOrderList",
|
// title: "WorkOrderList",
|
||||||
icon: "$sockiTools",
|
// icon: "$sockiTools",
|
||||||
key: FORM_KEY + ":WorkOrderList",
|
// key: FORM_KEY + ":WorkOrderList",
|
||||||
vm: vm
|
// vm: vm
|
||||||
});
|
// });
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
// menuOptions.menuItems.push({
|
||||||
title: "QuoteList",
|
// title: "QuoteList",
|
||||||
icon: "$sockiPencilAlt",
|
// icon: "$sockiPencilAlt",
|
||||||
key: FORM_KEY + ":QuoteList",
|
// key: FORM_KEY + ":QuoteList",
|
||||||
vm: vm
|
// vm: vm
|
||||||
});
|
// });
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
// menuOptions.menuItems.push({
|
||||||
title: "PMList",
|
// title: "PMList",
|
||||||
icon: "$sockiBusinessTime",
|
// icon: "$sockiBusinessTime",
|
||||||
key: FORM_KEY + ":PMList",
|
// key: FORM_KEY + ":PMList",
|
||||||
vm: vm
|
// vm: vm
|
||||||
});
|
// });
|
||||||
|
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
|
|||||||
@@ -99,16 +99,51 @@
|
|||||||
</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>
|
||||||
ref="subscriptionExpire"
|
<v-col cols="1">
|
||||||
v-model="obj.subscriptionExpire"
|
<v-menu offset-y>
|
||||||
:label="$sock.t('SubServerSubExpire')"
|
<template v-slot:activator="{ on, attrs }">
|
||||||
:rules="[form().required(this, 'subscriptionExpire')]"
|
<v-btn icon v-bind="attrs" v-on="on">
|
||||||
:readonly="formState.readOnly"
|
<v-icon small>$sockiEllipsisV</v-icon>
|
||||||
:error-messages="form().serverErrors(this, 'subscriptionExpire')"
|
</v-btn>
|
||||||
data-cy="subscriptionExpire"
|
</template>
|
||||||
@input="fieldValueChanged('subscriptionExpire')"
|
<v-list>
|
||||||
></gz-date-time-picker>
|
<v-list-item @click="subExpireAddOneWeek">
|
||||||
|
<v-list-item-icon>
|
||||||
|
<v-icon>$sockiCopy</v-icon>
|
||||||
|
</v-list-item-icon>
|
||||||
|
<v-list-item-title>One week</v-list-item-title>
|
||||||
|
</v-list-item>
|
||||||
|
<v-list-item @click="subExpireAddOneMonth">
|
||||||
|
<v-list-item-icon>
|
||||||
|
<v-icon>$sockiClone</v-icon>
|
||||||
|
</v-list-item-icon>
|
||||||
|
<v-list-item-title>One month</v-list-item-title>
|
||||||
|
</v-list-item>
|
||||||
|
<v-list-item @click="subExpireAddOneYear">
|
||||||
|
<v-list-item-icon>
|
||||||
|
<v-icon>$sockiMapMarker</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>
|
||||||
|
<v-col cols="11">
|
||||||
|
<gz-date-time-picker
|
||||||
|
ref="subscriptionExpire"
|
||||||
|
v-model="obj.subscriptionExpire"
|
||||||
|
:label="$sock.t('SubServerSubExpire')"
|
||||||
|
:rules="[form().required(this, 'subscriptionExpire')]"
|
||||||
|
:readonly="formState.readOnly"
|
||||||
|
:error-messages="
|
||||||
|
form().serverErrors(this, 'subscriptionExpire')
|
||||||
|
"
|
||||||
|
data-cy="subscriptionExpire"
|
||||||
|
@input="fieldValueChanged('subscriptionExpire')"
|
||||||
|
></gz-date-time-picker>
|
||||||
|
</v-col>
|
||||||
|
</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">
|
||||||
@@ -265,7 +300,7 @@ export default {
|
|||||||
concurrency: 0,
|
concurrency: 0,
|
||||||
name: null,
|
name: null,
|
||||||
active: true,
|
active: true,
|
||||||
customerId: 0,
|
customerId: null,
|
||||||
notes: null,
|
notes: null,
|
||||||
created: window.$gz.locale.nowUTC8601String(),
|
created: window.$gz.locale.nowUTC8601String(),
|
||||||
dataCenter: null,
|
dataCenter: null,
|
||||||
@@ -997,6 +1032,35 @@ export default {
|
|||||||
window.$gz.eventBus.$off("menu-click", clickHandler);
|
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
subExpireAddOneWeek: function() {
|
||||||
|
// // eslint-disable-next-line
|
||||||
|
// debugger;
|
||||||
|
const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);
|
||||||
|
this.obj.subscriptionExpire = window.$gz.locale.addDurationToUTC8601String(
|
||||||
|
now,
|
||||||
|
{
|
||||||
|
days: 7
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
subExpireAddOneMonth: function() {
|
||||||
|
const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);
|
||||||
|
this.obj.subscriptionExpire = window.$gz.locale.addDurationToUTC8601String(
|
||||||
|
now,
|
||||||
|
{
|
||||||
|
months: 1
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
subExpireAddOneYear: function() {
|
||||||
|
const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);
|
||||||
|
this.obj.subscriptionExpire = window.$gz.locale.addDurationToUTC8601String(
|
||||||
|
now,
|
||||||
|
{
|
||||||
|
years: 1
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
},
|
},
|
||||||
@@ -1303,26 +1367,26 @@ function generateMenu(vm) {
|
|||||||
}
|
}
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
// menuOptions.menuItems.push({
|
||||||
title: "WorkOrderList",
|
// title: "WorkOrderList",
|
||||||
icon: "$sockiTools",
|
// icon: "$sockiTools",
|
||||||
key: FORM_KEY + ":WorkOrderList",
|
// key: FORM_KEY + ":WorkOrderList",
|
||||||
vm: vm
|
// vm: vm
|
||||||
});
|
// });
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
// menuOptions.menuItems.push({
|
||||||
title: "QuoteList",
|
// title: "QuoteList",
|
||||||
icon: "$sockiPencilAlt",
|
// icon: "$sockiPencilAlt",
|
||||||
key: FORM_KEY + ":QuoteList",
|
// key: FORM_KEY + ":QuoteList",
|
||||||
vm: vm
|
// vm: vm
|
||||||
});
|
// });
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
// menuOptions.menuItems.push({
|
||||||
title: "PMList",
|
// title: "PMList",
|
||||||
icon: "$sockiBusinessTime",
|
// icon: "$sockiBusinessTime",
|
||||||
key: FORM_KEY + ":PMList",
|
// key: FORM_KEY + ":PMList",
|
||||||
vm: vm
|
// vm: vm
|
||||||
});
|
// });
|
||||||
|
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
|
|||||||
@@ -597,7 +597,7 @@ namespace Sockeye.Api.Controllers
|
|||||||
await ct.Database.OpenConnectionAsync();
|
await ct.Database.OpenConnectionAsync();
|
||||||
cmd.CommandText = $@"select afileattachment.id, afileattachment.xmin as concurrency, displayfilename,contenttype,lastmodified, afileattachment.notes, size, auser.name as attachedbyuser from afileattachment
|
cmd.CommandText = $@"select afileattachment.id, afileattachment.xmin as concurrency, displayfilename,contenttype,lastmodified, afileattachment.notes, size, auser.name as attachedbyuser from afileattachment
|
||||||
left join auser on (afileattachment.attachedByUserId=auser.id)
|
left join auser on (afileattachment.attachedByUserId=auser.id)
|
||||||
where attachtosockType={(int)sockType} and attachtoobjectid={sockId}
|
where attachtoatype={(int)sockType} and attachtoobjectid={sockId}
|
||||||
order by displayfilename";
|
order by displayfilename";
|
||||||
|
|
||||||
using (var dr = await cmd.ExecuteReaderAsync())
|
using (var dr = await cmd.ExecuteReaderAsync())
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ namespace Sockeye.DataList
|
|||||||
FieldKey = "object",
|
FieldKey = "object",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "afileattachment.AttachToObjectid",
|
SqlIdColumnName = "afileattachment.AttachToObjectid",
|
||||||
SqlValueColumnName = $"AYGETNAME(afileattachment.AttachToObjectid, afileattachment.attachtosockType,{translationId})",
|
SqlValueColumnName = $"AYGETNAME(afileattachment.AttachToObjectid, afileattachment.attachtoatype,{translationId})",
|
||||||
SqlATypeColumnName = "afileattachment.attachtosockType",
|
SqlATypeColumnName = "afileattachment.attachtoatype",
|
||||||
Translate = true
|
Translate = true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,19 @@ namespace Sockeye.Biz
|
|||||||
case SockType.Review:
|
case SockType.Review:
|
||||||
return await ct.Review.AnyAsync(z => z.Id == id);
|
return await ct.Review.AnyAsync(z => z.Id == id);
|
||||||
|
|
||||||
|
case SockType.License:
|
||||||
|
return await ct.License.AnyAsync(z => z.Id == id);
|
||||||
|
case SockType.TrialLicenseRequest:
|
||||||
|
return await ct.TrialLicenseRequest.AnyAsync(z => z.Id == id);
|
||||||
|
case SockType.SubscriptionServer:
|
||||||
|
return await ct.SubscriptionServer.AnyAsync(z => z.Id == id);
|
||||||
|
case SockType.Purchase:
|
||||||
|
return await ct.Purchase.AnyAsync(z => z.Id == id);
|
||||||
|
case SockType.Product:
|
||||||
|
return await ct.Product.AnyAsync(z => z.Id == id);
|
||||||
|
case SockType.GZCase:
|
||||||
|
return await ct.GZCase.AnyAsync(z => z.Id == id);
|
||||||
|
|
||||||
|
|
||||||
case SockType.CustomerNotifySubscription:
|
case SockType.CustomerNotifySubscription:
|
||||||
return await ct.CustomerNotifySubscription.AnyAsync(z => z.Id == id);
|
return await ct.CustomerNotifySubscription.AnyAsync(z => z.Id == id);
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
|
|
||||||
|
|
||||||
await ExecQueryAsync("CREATE TABLE afileattachment (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, "
|
await ExecQueryAsync("CREATE TABLE afileattachment (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, "
|
||||||
+ "attachtoobjectid BIGINT NOT NULL, attachtosockType INTEGER NOT NULL, attachedbyuserid BIGINT NOT NULL REFERENCES auser (id), "
|
+ "attachtoobjectid BIGINT NOT NULL, attachtoatype INTEGER NOT NULL, attachedbyuserid BIGINT NOT NULL REFERENCES auser (id), "
|
||||||
+ "storedfilename TEXT NOT NULL, displayfilename TEXT NOT NULL, contenttype TEXT, lastmodified TIMESTAMPTZ NOT NULL, notes TEXT, exists BOOL NOT NULL, size BIGINT NOT NULL)");
|
+ "storedfilename TEXT NOT NULL, displayfilename TEXT NOT NULL, contenttype TEXT, lastmodified TIMESTAMPTZ NOT NULL, notes TEXT, exists BOOL NOT NULL, size BIGINT NOT NULL)");
|
||||||
|
|
||||||
//index required for ops that need to check if file already in db (delete, count refs etc)
|
//index required for ops that need to check if file already in db (delete, count refs etc)
|
||||||
@@ -438,7 +438,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
|
|
||||||
//index for the common issue of checking if an object has an attachment and retrieving them
|
//index for the common issue of checking if an object has an attachment and retrieving them
|
||||||
//note always query (where clause) in this same order for best performance
|
//note always query (where clause) in this same order for best performance
|
||||||
await ExecQueryAsync("CREATE INDEX idx_afileattachment_attachtoobjectid_attachtosockType ON afileattachment (attachtoobjectid, attachtosockType );");
|
await ExecQueryAsync("CREATE INDEX idx_afileattachment_attachtoobjectid_attachtoaType ON afileattachment (attachtoobjectid, attachtoaType );");
|
||||||
|
|
||||||
await ExecQueryAsync("CREATE TABLE aopsjob (gid uuid PRIMARY KEY, name TEXT NOT NULL, created TIMESTAMPTZ NOT NULL, exclusive BOOL NOT NULL, "
|
await ExecQueryAsync("CREATE TABLE aopsjob (gid uuid PRIMARY KEY, name TEXT NOT NULL, created TIMESTAMPTZ NOT NULL, exclusive BOOL NOT NULL, "
|
||||||
+ "startafter TIMESTAMPTZ NOT NULL, jobtype INTEGER NOT NULL, subtype INTEGER, objectid BIGINT, sockType INTEGER, jobstatus INTEGER NOT NULL, jobinfo TEXT)");
|
+ "startafter TIMESTAMPTZ NOT NULL, jobtype INTEGER NOT NULL, subtype INTEGER, objectid BIGINT, sockType INTEGER, jobstatus INTEGER NOT NULL, jobinfo TEXT)");
|
||||||
|
|||||||
Reference in New Issue
Block a user