This commit is contained in:
2023-01-17 01:58:09 +00:00
parent b222a916e5
commit 28fbcb0978
2 changed files with 14 additions and 56 deletions

View File

@@ -210,7 +210,7 @@
></v-checkbox>
</v-col>
<template v-if="obj.pGroup == 0">
<template v-if="obj.pGroup == 0 || obj.pGroup == 4">
<v-col cols="12">
<div class="text-h1 error--text">
DO NOT USE, NOT A VALID PRODUCT GROUP
@@ -1340,11 +1340,21 @@ export default {
window.$gz.errorHandler.errorToString(res, this)
);
} else {
/*
public enum ProductGroup
{
Misc = 0,
AyaNova7 = 1,
RavenPerpetual = 2,
RavenSubscription = 3,
NotSet = 4
}
*/
//Use customer record to update stuff here
this.obj.fetchEmail = res.data.emailAddress;
this.obj.regTo = res.data.name;
if (this.pGroup > 1) {
//NOT V7 OR MISC PRODUCT (so raven basically for now anyway)
if (this.pGroup == 3 || this.pGroup == 2) {
//RAVEN
this.obj.dbId = res.data.dbId;
}
}
@@ -1800,56 +1810,4 @@ function addToDate(vm, propName, span) {
);
}
}
/*
"CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created TIMESTAMPTZ NOT NULL, active BOOL NOT NULL DEFAULT false, "
+ "customerid BIGINT REFERENCES acustomer(id), pgroup INTEGER NOT NULL DEFAULT 0, regto TEXT NOT NULL, key TEXT NOT NULL, fetchcode TEXT, fetchemail TEXT, "
+ "fetchedon TIMESTAMPTZ, dbid TEXT, licenseexpire TIMESTAMPTZ, maintenanceexpire TIMESTAMPTZ NOT NULL, "
+ "wiki TEXT, tags VARCHAR(255) ARRAY )"
public DateTime Created { get; set; }
public bool Active { get; set; }//active licenses can be fetched by customer, inactive means still putting together or it's been kiboshed
public long? CustomerId { get; set; }
[NotMapped]
public string CustomerViz { get; set; }
[Required]
public ProductGroup PGroup {get;set;}
public string RegTo { get; set; }
public string Key { get; set; }
public string FetchCode { get; set; }//v7 uses
public string FetchEmail { get; set; }//v7 uses
public DateTime? FetchedOn { get; set; }
public string DbId { get; set; }//v8 uses
public DateTime LicenseExpire { get; set; }
public DateTime MaintenanceExpire { get; set; }
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseList', 'Licenses' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Licensed to' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseKey', 'License key' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchCode', 'Fetch code' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchEmail', 'Fetch email' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchedOn', 'Fetched date' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseDBID', 'DBID' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expires' FROM atranslation t where t.baselanguage = 'en'");
{
"id": 0,
"concurrency": 0,
"created": "2023-01-05T23:47:06.881Z",
"active": true,
"customerId": 0,
"customerViz": "string",
"pGroup": 0,
"regTo": "string",
"key": "string",
"fetchCode": "string",
"fetchEmail": "string",
"fetchedOn": "2023-01-05T23:47:06.881Z",
"dbId": "string",
"licenseExpire": "2023-01-05T23:47:06.881Z",
"maintenanceExpire": "2023-01-05T23:47:06.881Z",
"wiki": "string",
"tags": [
"string"
]
}
*/
</script>

View File

@@ -196,7 +196,7 @@ export default {
id: 0,
concurrency: 0,
name: null,
pGroup: 0,
pGroup: 4,
active: true,
vendorId: 1,
licenseInterval: "365.0:00:00",