From f69226d8537b183a59920dc934d10b16677b9a5a Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 14 Sep 2020 19:23:56 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 16 +++++------ .../components/report-selector-control.vue | 27 ------------------- ayanova/src/views/ay-report-edit.vue | 2 +- 3 files changed, 9 insertions(+), 36 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 9cb7de61..d9059318 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -3,16 +3,9 @@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -todo: export from grid to xls, csv etc. - I'm thinking perhaps also a secondary ability to make report templates that are actually intended for export to xls or whatever as an additional feature - but the easiest thing for people would be a straight export of grid data from grid, perhaps using the reportdata system since it pulls in all the bits needed for full data rather than just id links - https://www.npmjs.com/package/json-2-csv - -todo: Is the report list filtered by roles? It should not present reports that a user is not permitted to use by role. - probably need to post-process the report list or include the roles with it and then test them at the client before displaying or at the server before sending - todo: Add sanitize html for Marked markdown helper as in Wiki control +todo: what does jsreport do to sanitize / secure the generated templates? TODO: Report confirmation checklist page breaks properly EXAMPLE NEEDED @@ -38,6 +31,13 @@ TODO: Report confirmation checklist -------- NON REPORTING RELATED STUFF --------------- +todo: export from grid to xls, csv etc. + I'm thinking perhaps also a secondary ability to make report templates that are actually intended for export to xls or whatever as an additional feature + but the easiest thing for people would be a straight export of grid data from grid, perhaps using the reportdata system since it pulls in all the bits needed for full data rather than just id links + https://www.npmjs.com/package/json-2-csv + From extensions? + (because it's a single or list thing) + todo: consider feature to set server to always use a pre-set browser locale settings and not the ones in the browse itself Scenario is user in another country but needs to login and work with central server? server - wide diff --git a/ayanova/src/components/report-selector-control.vue b/ayanova/src/components/report-selector-control.vue index 4c48a74c..8cb5017c 100644 --- a/ayanova/src/components/report-selector-control.vue +++ b/ayanova/src/components/report-selector-control.vue @@ -87,16 +87,6 @@ export default { return; } - /* - public class RenderReportParameter - { - public long ReportId { get; set; } - public long[] SelectedRowIds { get; set; } - public string DataListKey { get; set; } - public string ListView { get; set; }//optional, if null or empty will use default list view built into DataList - public JToken ClientMeta {get;set;}//meta JSON data passed from client, not part of biz object data - } -*/ let reportDataOptions = vm.reportDataOptions; if (!reportDataOptions) { throw "Missing report data unable to render report"; @@ -104,15 +94,12 @@ export default { reportDataOptions.ReportId = reportId; //Meta data from client for use by report script reportDataOptions.ClientMeta = window.$gz.api.reportClientMetaData(); - let url = "report/render"; - let res = await window.$gz.api.upsert(url, reportDataOptions); if (res.error) { throw res.error; } else { let reportUrl = window.$gz.api.reportDownloadUrl(res.data); - //console.log("Report url:", reportUrl); if (window.open(reportUrl, "Report") == null) { throw "Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting"; } @@ -129,25 +116,11 @@ export default { throw "report-selector:Open - ObjectType is missing or empty"; } - //source data object - //either need to rehydrate or send as is if not selectedRowIds - // { - // ObjectType: ayaType, - // selectedRowIds: selectedRowIds, - // dataListKey: vm.dataListKey, - // listView: untokenizeListView(vm.listView) - // } - this.reportDataOptions = reportDataOptions; - - //rights - //get report list from server - let res = await window.$gz.api.get( `report/list/${reportDataOptions.ObjectType}` ); - //console.log("report-selectr report list from server is: ", res); if (res.error) { throw res.error; } else { diff --git a/ayanova/src/views/ay-report-edit.vue b/ayanova/src/views/ay-report-edit.vue index 4b6aaaf4..04e576ea 100644 --- a/ayanova/src/views/ay-report-edit.vue +++ b/ayanova/src/views/ay-report-edit.vue @@ -356,7 +356,7 @@ Handlebars.registerHelper('loud', function (aString) { //enable / disable RENDER button if it can be rendered (has data) if (this.reportData != null) { - if (!val.dirty && val.valid) { + if (!val.dirty) {//not disabling if invalid because that sometimes just means it needs to be re-run due to server error window.$gz.eventBus.$emit("menu-enable-item", FORM_KEY + ":render"); } else { window.$gz.eventBus.$emit(