Rename concurrencyToken to concurrency

This commit is contained in:
2020-05-13 19:55:50 +00:00
parent c9b5df20af
commit 6e41dad1b0
10 changed files with 26 additions and 26 deletions

View File

@@ -31,7 +31,7 @@ export default {
} }
window.$gz.store.commit("setFormCustomTemplateItem", { window.$gz.store.commit("setFormCustomTemplateItem", {
formKey: formKey, formKey: formKey,
concurrencyToken: res.data.concurrencyToken, concurrency: res.data.concurrency,
value: addDataKeyNames(JSON.parse(res.data.template)) value: addDataKeyNames(JSON.parse(res.data.template))
}); });
@@ -45,7 +45,7 @@ export default {
set(formKey, token, template) { set(formKey, token, template) {
window.$gz.store.commit("setFormCustomTemplateItem", { window.$gz.store.commit("setFormCustomTemplateItem", {
formKey: formKey, formKey: formKey,
concurrencyToken: token, concurrency: token,
value: addDataKeyNames(JSON.parse(template)) value: addDataKeyNames(JSON.parse(template))
}); });
}, },

View File

@@ -349,7 +349,7 @@ export default {
return new Promise(function upsertDataToServer(resolve, reject) { return new Promise(function upsertDataToServer(resolve, reject) {
//determine if this is a new or existing record //determine if this is a new or existing record
let fetchOptions = undefined; let fetchOptions = undefined;
if (data.concurrencyToken) { if (data.concurrency) {
//has concurrency token, so this is a PUT as it's updating an existing record //has concurrency token, so this is a PUT as it's updating an existing record
fetchOptions = that.fetchPutOptions(data); fetchOptions = that.fetchPutOptions(data);
} else { } else {

View File

@@ -263,7 +263,7 @@ export default {
}); });
}, },
updateDisplayList(data) { updateDisplayList(data) {
//{"data":[{"id":1,"concurrencyToken":7733332,"contentType":"image/png","displayFileName":"Screen Shot 2020-01-09 at 10.50.24.png","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"},{"id":4,"concurrencyToken":7733354,"contentType":"text/plain","displayFileName":"TNT log file ayanova.txt","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"},{"id":2,"concurrencyToken":7733342,"contentType":"text/plain","displayFileName":"stack.txt","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"},{"id":3,"concurrencyToken":7733348,"contentType":"image/jpeg","displayFileName":"t2cx6sloffk41.jpg","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"}]} //{"data":[{"id":1,"concurrency":7733332,"contentType":"image/png","displayFileName":"Screen Shot 2020-01-09 at 10.50.24.png","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"},{"id":4,"concurrency":7733354,"contentType":"text/plain","displayFileName":"TNT log file ayanova.txt","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"},{"id":2,"concurrency":7733342,"contentType":"text/plain","displayFileName":"stack.txt","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"},{"id":3,"concurrency":7733348,"contentType":"image/jpeg","displayFileName":"t2cx6sloffk41.jpg","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"}]}
if (!data) { if (!data) {
data = []; data = [];
} }
@@ -277,7 +277,7 @@ export default {
//http://localhost:7575/api/v8/Attachment/download/100?t=sssss //http://localhost:7575/api/v8/Attachment/download/100?t=sssss
ret.push({ ret.push({
id: o.id, id: o.id,
concurrencyToken: o.concurrencyToken, concurrency: o.concurrency,
url: window.$gz.api.downloadUrl(o.id, o.contentType), url: window.$gz.api.downloadUrl(o.id, o.contentType),
name: o.displayFileName, name: o.displayFileName,
date: window.$gz.locale.utcDateToShortDateAndTimeLocalized( date: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
@@ -327,14 +327,14 @@ export default {
//post to server //post to server
/* /*
public uint ConcurrencyToken { get; set; } public uint Concurrency { get; set; }
[Required] [Required]
public string DisplayFileName { get; set; } public string DisplayFileName { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
*/ */
let p = { let p = {
concurrencyToken: o.concurrencyToken, concurrency: o.concurrency,
displayFileName: vm.editName, displayFileName: vm.editName,
notes: vm.editNotes notes: vm.editNotes
}; };

View File

@@ -78,7 +78,7 @@ export default new Vuex.Store({
}, },
setFormCustomTemplateItem(state, data) { setFormCustomTemplateItem(state, data) {
state.formCustomTemplate[data.formKey + "_concurrencyToken"] = state.formCustomTemplate[data.formKey + "_concurrencyToken"] =
data.concurrencyToken; data.concurrency;
state.formCustomTemplate[data.formKey] = data.value; state.formCustomTemplate[data.formKey] = data.value;
}, },
setLocale(state, data) { setLocale(state, data) {

View File

@@ -130,7 +130,7 @@ export default {
return { return {
obj: { obj: {
id: null, id: null,
concurrencyToken: null, concurrency: null,
template: null template: null
}, },
selectLists: { selectLists: {

View File

@@ -104,7 +104,7 @@ export default {
return { return {
enableCypress: true, enableCypress: true,
obj: [], obj: [],
concurrencyToken: undefined, concurrency: undefined,
formCustomTemplateKey: this.$route.params.formCustomTemplateKey, formCustomTemplateKey: this.$route.params.formCustomTemplateKey,
selectLists: { selectLists: {
uiFieldDataTypes: [] uiFieldDataTypes: []
@@ -182,7 +182,7 @@ export default {
//Note that server expects to see a string array of json template, not actual json //Note that server expects to see a string array of json template, not actual json
let newObj = { let newObj = {
formKey: vm.formCustomTemplateKey, formKey: vm.formCustomTemplateKey,
concurrencyToken: vm.concurrencyToken, concurrency: vm.concurrency,
template: "[]" template: "[]"
}; };
//temporary array to hold template for later stringification //temporary array to hold template for later stringification
@@ -233,11 +233,11 @@ export default {
//(update our local cached copy of the form customizations) //(update our local cached copy of the form customizations)
window.$gz.formCustomTemplate.set( window.$gz.formCustomTemplate.set(
vm.formCustomTemplateKey, vm.formCustomTemplateKey,
res.data.concurrencyToken, res.data.concurrency,
newObj.template newObj.template
); );
//set our local concurrency token value //set our local concurrency token value
vm.concurrencyToken = res.data.concurrencyToken; vm.concurrency = res.data.concurrency;
//form is now clean //form is now clean
window.$gz.form.setFormState({ window.$gz.form.setFormState({
@@ -435,7 +435,7 @@ function initDataObject(vm) {
}; };
vm.obj.push(objItem); vm.obj.push(objItem);
vm.concurrencyToken = window.$gz.formCustomTemplate.getTemplateConcurrencyToken( vm.concurrency = window.$gz.formCustomTemplate.getTemplateConcurrencyToken(
vm.formCustomTemplateKey vm.formCustomTemplateKey
); );
} }

View File

@@ -459,7 +459,7 @@ export default {
editView: [], editView: [],
name: "", name: "",
public: true, public: true,
concurrencyToken: 0, concurrency: 0,
userId: 0 userId: 0
}, },
listViewId: undefined, listViewId: undefined,
@@ -467,7 +467,7 @@ export default {
formKey: undefined, formKey: undefined,
fieldDefinitions: [], fieldDefinitions: [],
effectiveListView: undefined, effectiveListView: undefined,
concurrencyToken: undefined, concurrency: undefined,
selectLists: { selectLists: {
dateFilterOperators: [], dateFilterOperators: [],
dateFilterTokens: [], dateFilterTokens: [],
@@ -703,7 +703,7 @@ export default {
//are we working off a pre-existing listview (save over)? //are we working off a pre-existing listview (save over)?
if (vm.listViewId > 0) { if (vm.listViewId > 0) {
lvSave.id = vm.listViewId; lvSave.id = vm.listViewId;
lvSave.concurrencyToken = vm.obj.concurrencyToken; lvSave.concurrency = vm.obj.concurrency;
url = url + vm.listViewId; url = url + vm.listViewId;
} }
@@ -746,7 +746,7 @@ export default {
); );
} else { } else {
//Handle "put" of an existing record (UPDATE) //Handle "put" of an existing record (UPDATE)
vm.obj.concurrencyToken = res.data.concurrencyToken; vm.obj.concurrency = res.data.concurrency;
window.$gz.form.setFormState({ window.$gz.form.setFormState({
vm: vm, vm: vm,
dirty: false dirty: false
@@ -838,7 +838,7 @@ export default {
//Set some values that otherwise don't get updated because we're not really navigating fresh //Set some values that otherwise don't get updated because we're not really navigating fresh
vm.obj.name = res.data.name; vm.obj.name = res.data.name;
vm.obj.concurrencyToken = res.data.concurrencyToken; vm.obj.concurrency = res.data.concurrency;
vm.listViewId = res.data.id; vm.listViewId = res.data.id;
//Navigate to new record //Navigate to new record
//NOTE: this doesn't really update the form at all so need to set some th9ings //NOTE: this doesn't really update the form at all so need to set some th9ings
@@ -1237,7 +1237,7 @@ function setEffectiveListView(vm) {
vm.effectiveListView = JSON.parse(res.data.listView); vm.effectiveListView = JSON.parse(res.data.listView);
vm.obj.public = res.data.public; vm.obj.public = res.data.public;
vm.obj.name = res.data.name; vm.obj.name = res.data.name;
vm.obj.concurrencyToken = res.data.concurrencyToken; vm.obj.concurrency = res.data.concurrency;
vm.obj.userId = res.data.userId; vm.obj.userId = res.data.userId;
} }
}); });

View File

@@ -159,7 +159,7 @@ export default {
translations: [] translations: []
}, },
obj: { obj: {
/*concurrencyToken": 7490431, /*concurrency": 7490431,
"translationId": 1, "translationId": 1,
"emailAddress": null, "emailAddress": null,
"uiColor": "#000000", "uiColor": "#000000",
@@ -169,7 +169,7 @@ export default {
"hour12": true, "hour12": true,
"userId": 1 */ "userId": 1 */
id: 0, id: 0,
concurrencyToken: 0, concurrency: 0,
emailAddress: null, emailAddress: null,
uiColor: null, uiColor: null,
languageOverride: null, languageOverride: null,
@@ -302,7 +302,7 @@ export default {
//UserOptions is never a POST as it always exists and can't be deleted so always a PUT //UserOptions is never a POST as it always exists and can't be deleted so always a PUT
//Handle "put" of an existing record (UPDATE) //Handle "put" of an existing record (UPDATE)
vm.obj.concurrencyToken = res.data.concurrencyToken; vm.obj.concurrency = res.data.concurrency;
window.$gz.form.setFormState({ window.$gz.form.setFormState({
vm: vm, vm: vm,
dirty: false dirty: false

View File

@@ -186,7 +186,7 @@ export default {
//UserOptions is never a POST as it always exists and can't be deleted so always a PUT //UserOptions is never a POST as it always exists and can't be deleted so always a PUT
//Handle "put" of an existing record (UPDATE) //Handle "put" of an existing record (UPDATE)
vm.obj.concurrencyToken = res.data.concurrencyToken; vm.obj.concurrency = res.data.concurrency;
window.$gz.form.setFormState({ window.$gz.form.setFormState({
vm: vm, vm: vm,
dirty: false dirty: false

View File

@@ -324,7 +324,7 @@ export default {
//IMPORTANT NOTE: Fields that are NON NULLABLE in the schema for the table but *are* hideable **MUST** have a default value set here or else there will be no way to save the record //IMPORTANT NOTE: Fields that are NON NULLABLE in the schema for the table but *are* hideable **MUST** have a default value set here or else there will be no way to save the record
//I.E. Serial, usertype fields //I.E. Serial, usertype fields
id: 0, id: 0,
concurrencyToken: 0, concurrency: 0,
name: null, name: null,
serial: 0, serial: 0,
dollarAmount: null, dollarAmount: null,
@@ -491,7 +491,7 @@ export default {
); );
} else { } else {
//Handle "put" of an existing record (UPDATE) //Handle "put" of an existing record (UPDATE)
vm.obj.concurrencyToken = res.data.concurrencyToken; vm.obj.concurrency = res.data.concurrency;
window.$gz.form.setFormState({ window.$gz.form.setFormState({
vm: vm, vm: vm,
dirty: false dirty: false