This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -52,7 +52,7 @@
|
||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\PostgreSQLPortable_12.0\\App\\PgSQL\\bin\\"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"Name":"SAMPLE one object prints per page","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\n\t<h2>Example: Translation helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\t<p> this will show on the first page only as is HTML code BEFORE the #each aspect which is used for iteration</p>\n\t<p> if want this on its own page unto itself, wrap it also in a class that does a page-break</p>\n\n{{#each ayReportData}} <!-- the #each aspect MUST encompass the section where the class is that forces page break -->\n\t<div class=\"singlePage\" >\t\t\n\t\t<h2>{{ayT 'WidgetName' }}: {{ Name }}</h2>\n\t\t<div>{{ayT 'WidgetSerial' }}:{{ Serial }}</div>\n\t\t<div class=\"example\" >{{ayT 'WidgetDollarAmount' }}:{{ DollarAmount }}</div>\n\t\t<div>{{ayT 'WidgetStartDate' }}:{{ StartDate }}</div>\n\t\t<div>{{ayT 'WidgetNotes' }}:{{ Notes }}</div>\t\t\n\t</div>\n{{/each}}\n\n\n</body>\n\n</html>","Style":".example {\n color: blue;\n}\n\n\n.singlePage\n{\npage-break-after: always;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Fetch translation keys required for report \n //Server will get the translations that match the current logged in user's language\n //Only translation keys pre-fetched here will be available for use with the ayT translation helper\n\n //NOTE: you *must* await the call to ayGetTranslations or they will not be present for the report template use\n\n await ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\n ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}
|
||||
@@ -0,0 +1 @@
|
||||
{"Name":"SAMPLE showing IF ELSE inline html","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>this is an examle report template that shows value of Count <span class='redFont'>in red if has 0 or null</span>, or shows <span class='greenFont'>green if has ANY value</span></p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\t\t<h3>Name: {{ Name }} </h3>\n\t\t{{#if Count}}<p class='greenFont'>Count is: {{ Count }}</p>{{else}} <p class='redFont'>has 0 or null</p>{{/if}}\n\t\t<hr>\t\t\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".redFont {\r\n color: red;\r\n}\r\n\r\n.greenFont {\r\n color: green;\r\n}\r\n","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}
|
||||
@@ -0,0 +1 @@
|
||||
{"Name":"SAMPLE showing tag only if has specific tagword","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>See help documentation for details</p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\n\t\tName: {{ Name }} <br/>\n\t\t\n\t\t<p>Tags: </p>\n\t\t<p>Displays first tag :::::{{ Tags.[0]}} </p>\n\t\t<p>Displays all tags for this object::::: {{ Tags}} </p>\n\t\t<p>Displays if has brown in its tags::::: {{ isInTag2 Tags}} </p>\n\t\t<p> Count: {{Count}}</p>\n\t\t\n\t\t<! below example of using #if helper to show if is true or has value, or show in green if if false, undefined, null, \"\", 0, or [] >\n\t\t<ul>\n\t\t\t {{#if CustomFields.c4}} <li class='redMe' >true custom fields c4 is true</li> {{else}} <li class='greenMe' >custom fields c4 is false</li> {{/if}}\n\t\t\t <li>Actual Count value: {{Count}} </li>\n\t\t\t {{#if Count}} <li class='redMe' >renders in red font if 'Count' has any value </li> {{else}} <li class='greenMe' >renders in green font if false, undefined, null, \"\", 0, or []</li> {{/if}}\n\t\t</ul>\n\n\t\t<p>{{isInTag3 Tags}} </p>\n\t\t\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".redMe {\r\n color: red;\r\n}\r\n\r\n.greenMe {\r\n color: green;\r\n}\r\n\r\n.redfont {\r\n color: red;\r\n}","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"\r\n\r\nHandlebars.registerHelper('isInTag', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brown'))\r\n\t\t{ \r\n return 'brown'; \r\n\t\t}\r\n }\r\n return 'no brown';\r\n});\r\n\r\nHandlebars.registerHelper('isInTag2', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brow'))\r\n\t\t{ \r\n\t\t\treturn 'THE WORD or part of word BROW IS IN HERE';\r\n\t\t}\r\n }\r\n return 'NOPE part of full word with \\'brow\\' is NOT HERE';\r\n});\r\n\r\nHandlebars.registerHelper('isInTag3', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brow'))\r\n\t\t{ \r\n\t\t\treturn new Handlebars.SafeString(\"<p class='redMe' >\" + \"brownbrwnbrown is in here!!!!!!!!!!!!\" +\"</p>\");\r\n\t\t}\r\n }\r\n return 'some other text'; //if don't want to return any element at all, comment this else aspect out fully\r\n});\r\n","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user