This commit is contained in:
2020-04-07 14:07:19 +00:00
parent c179c4d40b
commit 45ce2be3d8
3 changed files with 38 additions and 12 deletions

View File

@@ -732,6 +732,29 @@ export default {
sessionStorage.setItem(formKey, JSON.stringify(formSettings.temp));
}
}, ////////////////////////////////////
// Get last report used from form settings
//
getLastReport(formKey) {
let fs = window.$gz.store.state.formSettings[formKey];
if (fs == null || fs.lastReport == null) {
return null;
}
return fs.lastReport;
}, ////////////////////////////////////
// Set last report used in form settings
//
setLastReport(formKey, reportSelected) {
let fs = window.$gz.store.state.formSettings[formKey];
if (fs == null || fs.lastReport == null) {
fs = {};
}
fs.lastReport = reportSelected;
window.$gz.store.commit("setFormSettings", {
formKey: formKey,
formSettings: fs
});
}, ////////////////////////////////////
// Add no selection item
// Used by forms that need the option of an unselected
// item in a pick list