Rename concurrencyToken to concurrency
This commit is contained in:
@@ -31,7 +31,7 @@ export default {
|
||||
}
|
||||
window.$gz.store.commit("setFormCustomTemplateItem", {
|
||||
formKey: formKey,
|
||||
concurrencyToken: res.data.concurrencyToken,
|
||||
concurrency: res.data.concurrency,
|
||||
value: addDataKeyNames(JSON.parse(res.data.template))
|
||||
});
|
||||
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
set(formKey, token, template) {
|
||||
window.$gz.store.commit("setFormCustomTemplateItem", {
|
||||
formKey: formKey,
|
||||
concurrencyToken: token,
|
||||
concurrency: token,
|
||||
value: addDataKeyNames(JSON.parse(template))
|
||||
});
|
||||
},
|
||||
|
||||
@@ -349,7 +349,7 @@ export default {
|
||||
return new Promise(function upsertDataToServer(resolve, reject) {
|
||||
//determine if this is a new or existing record
|
||||
let fetchOptions = undefined;
|
||||
if (data.concurrencyToken) {
|
||||
if (data.concurrency) {
|
||||
//has concurrency token, so this is a PUT as it's updating an existing record
|
||||
fetchOptions = that.fetchPutOptions(data);
|
||||
} else {
|
||||
|
||||
@@ -263,7 +263,7 @@ export default {
|
||||
});
|
||||
},
|
||||
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) {
|
||||
data = [];
|
||||
}
|
||||
@@ -277,7 +277,7 @@ export default {
|
||||
//http://localhost:7575/api/v8/Attachment/download/100?t=sssss
|
||||
ret.push({
|
||||
id: o.id,
|
||||
concurrencyToken: o.concurrencyToken,
|
||||
concurrency: o.concurrency,
|
||||
url: window.$gz.api.downloadUrl(o.id, o.contentType),
|
||||
name: o.displayFileName,
|
||||
date: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
||||
@@ -327,14 +327,14 @@ export default {
|
||||
|
||||
//post to server
|
||||
/*
|
||||
public uint ConcurrencyToken { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
[Required]
|
||||
public string DisplayFileName { get; set; }
|
||||
public string Notes { get; set; }
|
||||
*/
|
||||
|
||||
let p = {
|
||||
concurrencyToken: o.concurrencyToken,
|
||||
concurrency: o.concurrency,
|
||||
displayFileName: vm.editName,
|
||||
notes: vm.editNotes
|
||||
};
|
||||
|
||||
@@ -78,7 +78,7 @@ export default new Vuex.Store({
|
||||
},
|
||||
setFormCustomTemplateItem(state, data) {
|
||||
state.formCustomTemplate[data.formKey + "_concurrencyToken"] =
|
||||
data.concurrencyToken;
|
||||
data.concurrency;
|
||||
state.formCustomTemplate[data.formKey] = data.value;
|
||||
},
|
||||
setLocale(state, data) {
|
||||
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
return {
|
||||
obj: {
|
||||
id: null,
|
||||
concurrencyToken: null,
|
||||
concurrency: null,
|
||||
template: null
|
||||
},
|
||||
selectLists: {
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
return {
|
||||
enableCypress: true,
|
||||
obj: [],
|
||||
concurrencyToken: undefined,
|
||||
concurrency: undefined,
|
||||
formCustomTemplateKey: this.$route.params.formCustomTemplateKey,
|
||||
selectLists: {
|
||||
uiFieldDataTypes: []
|
||||
@@ -182,7 +182,7 @@ export default {
|
||||
//Note that server expects to see a string array of json template, not actual json
|
||||
let newObj = {
|
||||
formKey: vm.formCustomTemplateKey,
|
||||
concurrencyToken: vm.concurrencyToken,
|
||||
concurrency: vm.concurrency,
|
||||
template: "[]"
|
||||
};
|
||||
//temporary array to hold template for later stringification
|
||||
@@ -233,11 +233,11 @@ export default {
|
||||
//(update our local cached copy of the form customizations)
|
||||
window.$gz.formCustomTemplate.set(
|
||||
vm.formCustomTemplateKey,
|
||||
res.data.concurrencyToken,
|
||||
res.data.concurrency,
|
||||
newObj.template
|
||||
);
|
||||
//set our local concurrency token value
|
||||
vm.concurrencyToken = res.data.concurrencyToken;
|
||||
vm.concurrency = res.data.concurrency;
|
||||
|
||||
//form is now clean
|
||||
window.$gz.form.setFormState({
|
||||
@@ -435,7 +435,7 @@ function initDataObject(vm) {
|
||||
};
|
||||
|
||||
vm.obj.push(objItem);
|
||||
vm.concurrencyToken = window.$gz.formCustomTemplate.getTemplateConcurrencyToken(
|
||||
vm.concurrency = window.$gz.formCustomTemplate.getTemplateConcurrencyToken(
|
||||
vm.formCustomTemplateKey
|
||||
);
|
||||
}
|
||||
|
||||
@@ -459,7 +459,7 @@ export default {
|
||||
editView: [],
|
||||
name: "",
|
||||
public: true,
|
||||
concurrencyToken: 0,
|
||||
concurrency: 0,
|
||||
userId: 0
|
||||
},
|
||||
listViewId: undefined,
|
||||
@@ -467,7 +467,7 @@ export default {
|
||||
formKey: undefined,
|
||||
fieldDefinitions: [],
|
||||
effectiveListView: undefined,
|
||||
concurrencyToken: undefined,
|
||||
concurrency: undefined,
|
||||
selectLists: {
|
||||
dateFilterOperators: [],
|
||||
dateFilterTokens: [],
|
||||
@@ -703,7 +703,7 @@ export default {
|
||||
//are we working off a pre-existing listview (save over)?
|
||||
if (vm.listViewId > 0) {
|
||||
lvSave.id = vm.listViewId;
|
||||
lvSave.concurrencyToken = vm.obj.concurrencyToken;
|
||||
lvSave.concurrency = vm.obj.concurrency;
|
||||
url = url + vm.listViewId;
|
||||
}
|
||||
|
||||
@@ -746,7 +746,7 @@ export default {
|
||||
);
|
||||
} else {
|
||||
//Handle "put" of an existing record (UPDATE)
|
||||
vm.obj.concurrencyToken = res.data.concurrencyToken;
|
||||
vm.obj.concurrency = res.data.concurrency;
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
dirty: false
|
||||
@@ -838,7 +838,7 @@ export default {
|
||||
|
||||
//Set some values that otherwise don't get updated because we're not really navigating fresh
|
||||
vm.obj.name = res.data.name;
|
||||
vm.obj.concurrencyToken = res.data.concurrencyToken;
|
||||
vm.obj.concurrency = res.data.concurrency;
|
||||
vm.listViewId = res.data.id;
|
||||
//Navigate to new record
|
||||
//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.obj.public = res.data.public;
|
||||
vm.obj.name = res.data.name;
|
||||
vm.obj.concurrencyToken = res.data.concurrencyToken;
|
||||
vm.obj.concurrency = res.data.concurrency;
|
||||
vm.obj.userId = res.data.userId;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -159,7 +159,7 @@ export default {
|
||||
translations: []
|
||||
},
|
||||
obj: {
|
||||
/*concurrencyToken": 7490431,
|
||||
/*concurrency": 7490431,
|
||||
"translationId": 1,
|
||||
"emailAddress": null,
|
||||
"uiColor": "#000000",
|
||||
@@ -169,7 +169,7 @@ export default {
|
||||
"hour12": true,
|
||||
"userId": 1 */
|
||||
id: 0,
|
||||
concurrencyToken: 0,
|
||||
concurrency: 0,
|
||||
emailAddress: null,
|
||||
uiColor: 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
|
||||
|
||||
//Handle "put" of an existing record (UPDATE)
|
||||
vm.obj.concurrencyToken = res.data.concurrencyToken;
|
||||
vm.obj.concurrency = res.data.concurrency;
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
dirty: false
|
||||
|
||||
@@ -186,7 +186,7 @@ export default {
|
||||
//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)
|
||||
vm.obj.concurrencyToken = res.data.concurrencyToken;
|
||||
vm.obj.concurrency = res.data.concurrency;
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
dirty: false
|
||||
|
||||
@@ -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
|
||||
//I.E. Serial, usertype fields
|
||||
id: 0,
|
||||
concurrencyToken: 0,
|
||||
concurrency: 0,
|
||||
name: null,
|
||||
serial: 0,
|
||||
dollarAmount: null,
|
||||
@@ -491,7 +491,7 @@ export default {
|
||||
);
|
||||
} else {
|
||||
//Handle "put" of an existing record (UPDATE)
|
||||
vm.obj.concurrencyToken = res.data.concurrencyToken;
|
||||
vm.obj.concurrency = res.data.concurrency;
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
dirty: false
|
||||
|
||||
Reference in New Issue
Block a user