sf-i-reporting 1.0.113 → 1.0.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dev/index.html +2 -1
- package/package.json +1 -1
- package/sf-i-reporting.d.ts.map +1 -1
- package/sf-i-reporting.js +78 -16
- package/sf-i-reporting.js.map +1 -1
- package/src/sf-i-reporting.ts +71 -15
package/src/sf-i-reporting.ts
CHANGED
|
@@ -64,7 +64,7 @@ export class SfIReporting extends LitElement {
|
|
|
64
64
|
// configjson: string = "[{\"type\":\"sf-i-uploader\",\"name\":\"\",\"size\":\"large\",\"label\":\"Contract Document *\",\"hint\":\"Document of the contract\",\"id\":\"contractdocuments\",\"value\":[{\"arrWords\":[\"FlaggGRC\",\"Governance\",\"IRskl\",\"Complierce\",\"ISO\",\"27001\",\"Certified\",\"IS\",\"YOUR\",\"ORGANIZATION\",\"READY\",\"FOR\",\"INDIA'S\",\"DPDP\",\"ACT?\"],\"arrWordsMeta\":{\"PAGE\":1,\"LINE\":7,\"WORD\":15},\"jobId\":\"22d56d6c41f9930e5f7aea16613241b19fd36b4a0fd2ae0e9e284376387670f2\",\"filename\":\"dpdp.jpg\",\"key\":\"ea08e215-a394-429a-ab6b-9b761f1f87b6\",\"ext\":\"jpg\"}],\"options\":[\"Yes\",\"No\"],\"collapse\":\"true\",\"mode\":\"multiselect-dropdown\",\"maxselect\":\"1\",\"apiid\":\"1peg5170d3\",\"searchstring\":\"\",\"selectprojection\":\"\",\"ignoredprojections\":\"\",\"savenameseparate\":\"no\",\"dependencies\":[],\"allowedextensions\":\"["jpg","png","pdf","xls","xlsx","doc","docx"]\",\"extract\":\"yes\",\"maxsize\":\"5242880\",\"allowdownload\":\"yes\",\"selectfields\":[],\"mandatory\":\"\",\"copytoreopen\":false,\"displayinhistory\":true,\"elementsjson\":\"\",\"customreporting\":true},{\"type\":\"date\",\"name\":\"\",\"size\":\"large\",\"label\":\"Date of Execution *\",\"hint\":\"The date of execution of the contract\",\"id\":\"dateofexecution\",\"value\":\"2025-05-23\",\"options\":[\"Yes\",\"No\"],\"collapse\":\"true\",\"mode\":\"\",\"maxselect\":\"\",\"apiid\":\"\",\"searchstring\":\"\",\"selectprojection\":\"\",\"ignoredprojections\":\"\",\"savenameseparate\":\"no\",\"dependencies\":[],\"allowedextensions\":\"\",\"extract\":\"\",\"maxsize\":\"\",\"allowdownload\":\"\",\"selectfields\":[],\"mandatory\":\"\",\"copytoreopen\":false,\"displayinhistory\":true,\"elementsjson\":\"\",\"customreporting\":true},{\"type\":\"date\",\"name\":\"\",\"size\":\"large\",\"label\":\"Due Date *\",\"hint\":\"The due date for the contract.\",\"id\":\"duedate\",\"value\":\"2025-05-30\",\"options\":[\"Yes\",\"No\"],\"collapse\":\"true\",\"mode\":\"\",\"maxselect\":\"\",\"apiid\":\"\",\"searchstring\":\"\",\"selectprojection\":\"\",\"ignoredprojections\":\"\",\"savenameseparate\":\"no\",\"dependencies\":[],\"allowedextensions\":\"\",\"extract\":\"\",\"maxsize\":\"\",\"allowdownload\":\"\",\"selectfields\":[],\"mandatory\":\"\",\"copytoreopen\":false,\"displayinhistory\":true,\"elementsjson\":\"\",\"customreporting\":true},{\"type\":\"textarea\",\"name\":\"\",\"size\":\"small\",\"label\":\"Remarks\",\"hint\":\"Remarks on the contract\",\"id\":\"remarks\",\"value\":\"There are no remarks\",\"options\":[\"Yes\",\"No\"],\"collapse\":\"true\",\"mode\":\"\",\"maxselect\":\"\",\"apiid\":\"\",\"searchstring\":\"\",\"selectprojection\":\"\",\"ignoredprojections\":\"\",\"savenameseparate\":\"no\",\"dependencies\":[],\"allowedextensions\":\"\",\"extract\":\"\",\"maxsize\":\"\",\"allowdownload\":\"\",\"selectfields\":[],\"mandatory\":null,\"copytoreopen\":true,\"displayinhistory\":true,\"elementsjson\":\"\",\"customreporting\":true},{\"type\":\"sf-checklist\",\"name\":\"\",\"size\":\"small\",\"label\":\"Terms *\",\"hint\":\"Terms in the contract\",\"id\":\"terms\",\"value\":\"\",\"options\":[\"Yes\",\"No\"],\"collapse\":\"true\",\"mode\":\"\",\"maxselect\":\"\",\"apiid\":\"\",\"searchstring\":\"\",\"selectprojection\":\"\",\"ignoredprojections\":\"\",\"savenameseparate\":\"no\",\"dependencies\":[],\"allowedextensions\":\"\",\"extract\":\"\",\"maxsize\":\"\",\"allowdownload\":\"\",\"selectfields\":[],\"mandatory\":\"\",\"copytoreopen\":true,\"displayinhistory\":true,\"elementsjson\":\"[{\\\"name\\\":\\\"All personnel should wear uniform\\\"},{\\\"name\\\":\\\"Security services personnel should have ID cards\\\"}]\",\"customreporting\":true}]"
|
|
65
65
|
// configjson: string = "[{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Name *\",\"hint\":\"RCM Source name\",\"id\":\"name\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Description\",\"hint\":\"RCM Source description\",\"id\":\"description\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"RCM Source URL *\",\"hint\":\"RCM Source url\",\"id\":\"url\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"RCM Source Frequency *\",\"hint\":\"RCM Source checking frequency\",\"id\":\"frequency\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"date\",\"size\":\"large\",\"label\":\"Last Check Date *\",\"hint\":\"The date on which this RCM Source was last checked\",\"id\":\"lastcheckdate\",\"mandatory\":\"\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"date\",\"size\":\"large\",\"label\":\"Due Date *\",\"hint\":\"The date on which this RCM Source is to be checked next.\",\"id\":\"duedate\",\"mandatory\":\"\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-bricks\",\"size\":\"large\",\"label\":\"Country *\",\"hint\":\"Country for RCM Source\",\"id\":\"country\",\"mode\":\"select\",\"savenameseparate\":\"yes\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-bricks\",\"size\":\"large\",\"label\":\"Entity *\",\"hint\":\"Entity for RCM Source\",\"id\":\"entity\",\"dependencies\":[\"country\"],\"mode\":\"select\",\"savenameseparate\":\"yes\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-bricks\",\"size\":\"large\",\"label\":\"Location *\",\"hint\":\"Location for RCM Source\",\"id\":\"locations\",\"dependencies\":[\"country\",\"entity\"],\"mode\":\"select\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-bricks\",\"size\":\"large\",\"label\":\"Tags *\",\"hint\":\"Tags applied to RCM Source\",\"id\":\"tags\",\"mode\":\"multiselect\",\"dependencies\":[\"country\",\"entity\",\"locations\"],\"searchstring\":\"-Tags\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Reporter *\",\"hint\":\"Reporter for the RCM Source\",\"id\":\"reporters\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/userprofile\",\"searchstring\":\"\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["usermap","designation","project","updatetype","userid","shortid","kra","role","trainingstatute","shortnumid","lastmodifiedby","lastmodifiedtime"]\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Approver *\",\"hint\":\"Approver for the RCM Source\",\"id\":\"approvers\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/userprofile\",\"searchstring\":\"\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["usermap","designation","project","updatetype","userid","shortid","kra","role","trainingstatute","shortnumid","lastmodifiedby","lastmodifiedtime"]\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Function head *\",\"hint\":\"Function head for the RCM Source\",\"id\":\"functionheads\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/userprofile\",\"searchstring\":\"\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["usermap","designation","project","updatetype","userid","shortid","kra","role","trainingstatute","shortnumid","lastmodifiedby","lastmodifiedtime"]\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form-select\",\"size\":\"large\",\"label\":\"Statute *\",\"hint\":\"Statute for RCM Source\",\"id\":\"statute\",\"mode\":\"select\",\"dependencies\":[\"country\"],\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/statute\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["lastmodifiedtime","lastmodifiedby","shortnumid","definitions","applicability","subcategory","category","state","jurisdiction","country","updatetype","project","tagtype","shortid"]\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-select\",\"size\":\"large\",\"label\":\"RCM Source Type *\",\"apiid\":\"6ftklrdwhdtrdom7toyew7buc40mifqn.lambda-url.us-east-1.on.aws\",\"hint\":\"RCM Source Type\",\"id\":\"rcmsourcetype\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-select\",\"size\":\"large\",\"label\":\"Category *\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/category\",\"hint\":\"Category\",\"id\":\"category\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-sub-select\",\"size\":\"large\",\"label\":\"SubCategory *\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/subcategory\",\"hint\":\"Subcategory\",\"id\":\"subcategory\",\"dependencies\":[\"category\"],\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"section\",\"name\":\"Additional Fields\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Context\",\"hint\":\"Context of the RCM Source\",\"id\":\"context\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Disable Approval\",\"hint\":\"Disable approval required for the RCM Source\",\"id\":\"makercheckers\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/tagging\",\"searchstring\":\"MakerChecker\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["updatetype","project","tagtype","shortid"]\",\"maxselect\":\"1\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Auditor\",\"hint\":\"Auditor for the RCM Source\",\"id\":\"auditors\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/userprofile\",\"searchstring\":\"\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["usermap","designation","project","updatetype","userid","shortid","kra","role","trainingstatute","shortnumid","lastmodifiedby","lastmodifiedtime"]\",\"maxselect\":\"1\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Viewer\",\"hint\":\"Viewer for the RCM Source\",\"id\":\"viewers\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/userprofile\",\"searchstring\":\"\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["usermap","designation","project","updatetype","userid","shortid","kra","role","trainingstatute","shortnumid","lastmodifiedby","lastmodifiedtime"]\",\"maxselect\":\"1\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},[{\"type\":\"sourcereport\",\"id\":\"sourcereport\",\"name\":\"Source Report\",\"customreporting\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Remarks\",\"hint\":\"Remarks on the RCM Source\",\"id\":\"remarks\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"sf-i-select\",\"size\":\"large\",\"label\":\"RCM Source Impact *\",\"apiid\":\"r7u3dzkyoiyizxhb4n7hb523te0kbijf.lambda-url.us-east-1.on.aws\",\"hint\":\"RCM Source Impact\",\"id\":\"rcmsourceimpact\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"}]]"
|
|
66
66
|
// configjson: string = "[{\"type\":\"date\",\"name\":\"\",\"size\":\"large\",\"label\":\"Last Check Date *\",\"hint\":\"The date on which this RCM Source was last checked\",\"id\":\"lastcheckdate\",\"value\":\"2025-07-10\",\"options\":[\"Yes\",\"No\"],\"collapse\":\"true\",\"mode\":\"\",\"maxselect\":\"\",\"apiid\":\"\",\"searchstring\":\"\",\"selectprojection\":\"\",\"ignoredprojections\":\"\",\"savenameseparate\":\"no\",\"dependencies\":[],\"allowedextensions\":\"\",\"extract\":\"\",\"maxsize\":\"\",\"allowdownload\":\"\",\"selectfields\":[],\"mandatory\":\"\",\"copytoreopen\":false,\"displayinhistory\":true,\"hideinadmin\":false,\"elementsjson\":\"\",\"customreporting\":true},[{\"id\":\"sourcereport\",\"type\":\"sourcereport\",\"label\":\"Source Report\",\"schema\":\"[{\\\"type\\\":\\\"textarea\\\",\\\"size\\\":\\\"small\\\",\\\"label\\\":\\\"Remarks {iter}\\\",\\\"hint\\\":\\\"Remarks on the RCM Source\\\",\\\"id\\\":\\\"remarks{iter}\\\",\\\"copytoreopen\\\":\\\"yes\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"sf-i-select\\\",\\\"size\\\":\\\"large\\\",\\\"label\\\":\\\"RCM Source Impact {iter}\\\",\\\"apiid\\\":\\\"r7u3dzkyoiyizxhb4n7hb523te0kbijf.lambda-url.us-east-1.on.aws\\\",\\\"hint\\\":\\\"RCM Source Impact\\\",\\\"id\\\":\\\"rcmsourceimpact{iter}\\\",\\\"copytoreopen\\\":\\\"yes\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"}]\",\"direction\":\"column\",\"customreporting\":true,\"children\":[],\"name\":\"Source Report\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Remarks {iter}\",\"hint\":\"Remarks on the RCM Source\",\"id\":\"remarks{iter}\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"sf-i-select\",\"size\":\"large\",\"label\":\"RCM Source Impact {iter}\",\"apiid\":\"r7u3dzkyoiyizxhb4n7hb523te0kbijf.lambda-url.us-east-1.on.aws\",\"hint\":\"RCM Source Impact\",\"id\":\"rcmsourceimpact{iter}\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"}]]"
|
|
67
|
-
// configjson: string = "[{\"type\":\"date\",\"name\":\"\",\"size\":\"large\",\"label\":\"Last Check Date *\",\"hint\":\"The date on which this RCM Source was last checked\",\"id\":\"lastcheckdate\",\"value\":\"2025-07-10\",\"options\":[\"Yes\",\"No\"],\"collapse\":\"true\",\"mode\":\"\",\"maxselect\":\"\",\"apiid\":\"\",\"searchstring\":\"\",\"selectprojection\":\"\",\"ignoredprojections\":\"\",\"savenameseparate\":\"no\",\"dependencies\":[],\"allowedextensions\":\"\",\"extract\":\"\",\"maxsize\":\"\",\"allowdownload\":\"\",\"selectfields\":[],\"mandatory\":\"\",\"copytoreopen\":false,\"displayinhistory\":true,\"hideinadmin\":false,\"elementsjson\":\"\",\"customreporting\":true},[{\"id\":\"sourcereport\",\"type\":\"sourcereport\",\"label\":\"Source Report\",\"schema\":\"[{\\\"type\\\":\\\"textarea\\\",\\\"size\\\":\\\"small\\\",\\\"label\\\":\\\"Remarks {iter}\\\",\\\"hint\\\":\\\"Remarks on the RCM Source\\\",\\\"id\\\":\\\"remarks{iter}\\\",\\\"copytoreopen\\\":\\\"yes\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"sf-i-select\\\",\\\"size\\\":\\\"large\\\",\\\"label\\\":\\\"RCM Source Impact {iter}\\\",\\\"apiid\\\":\\\"r7u3dzkyoiyizxhb4n7hb523te0kbijf.lambda-url.us-east-1.on.aws\\\",\\\"hint\\\":\\\"RCM Source Impact\\\",\\\"id\\\":\\\"rcmsourceimpact{iter}\\\",\\\"
|
|
67
|
+
// configjson: string = "[{\"type\":\"date\",\"name\":\"\",\"size\":\"large\",\"label\":\"Last Check Date *\",\"hint\":\"The date on which this RCM Source was last checked\",\"id\":\"lastcheckdate\",\"value\":\"2025-07-10\",\"options\":[\"Yes\",\"No\"],\"collapse\":\"true\",\"mode\":\"\",\"maxselect\":\"\",\"apiid\":\"\",\"searchstring\":\"\",\"selectprojection\":\"\",\"ignoredprojections\":\"\",\"savenameseparate\":\"no\",\"dependencies\":[],\"allowedextensions\":\"\",\"extract\":\"\",\"maxsize\":\"\",\"allowdownload\":\"\",\"selectfields\":[],\"mandatory\":\"\",\"copytoreopen\":false,\"displayinhistory\":true,\"hideinadmin\":false,\"elementsjson\":\"\",\"customreporting\":true},[{\"id\":\"sourcereport\",\"type\":\"sourcereport\",\"label\":\"Source Report\",\"schema\":\"[{\\\"type\\\":\\\"sf-i-select\\\",\\\"size\\\":\\\"large\\\",\\\"label\\\":\\\"Country {iter}\\\",\\\"apiid\\\":\\\"dnytrdlrmxgsy.cloudfront.net/country\\\",\\\"hint\\\":\\\"Country\\\",\\\"id\\\":\\\"country{iter}\\\",\\\"copytoreopen\\\":\\\"yes\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"sf-i-sub-select\\\",\\\"size\\\":\\\"large\\\",\\\"label\\\":\\\"State {iter}\\\",\\\"apiid\\\":\\\"dnytrdlrmxgsy.cloudfront.net/state\\\",\\\"hint\\\":\\\"State\\\",\\\"id\\\":\\\"state{iter}\\\",\\\"dependencies\\\":[\\\"country{iter}\\\"],\\\"copytoreopen\\\":\\\"yes\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"sf-i-form-select\\\",\\\"size\\\":\\\"large\\\",\\\"label\\\":\\\"Statute {iter}\\\",\\\"hint\\\":\\\"Statute for RCM Source\\\",\\\"id\\\":\\\"statute{iter}\\\",\\\"mode\\\":\\\"select\\\",\\\"dependencies\\\":[\\\"country{iter}\\\"],\\\"apiid\\\":\\\"dnytrdlrmxgsy.cloudfront.net/statute\\\",\\\"selectprojection\\\":\\\"name\\\",\\\"ignoredprojections\\\":\\\"["lastmodifiedtime","lastmodifiedby","shortnumid","definitions","applicability","subcategory","category","state","jurisdiction","country","updatetype","project","tagtype","shortid"]\\\",\\\"maxselect\\\":\\\"1\\\",\\\"displayinhistory\\\":\\\"yes\\\"},{\\\"type\\\":\\\"textarea\\\",\\\"size\\\":\\\"small\\\",\\\"label\\\":\\\"Notification Name {iter}\\\",\\\"hint\\\":\\\"Notification name from the source\\\",\\\"id\\\":\\\"notification-name-{iter}\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"textarea\\\",\\\"size\\\":\\\"small\\\",\\\"label\\\":\\\"Notification Reference {iter}\\\",\\\"hint\\\":\\\"Notification reference from the source\\\",\\\"id\\\":\\\"notification-reference{iter}\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"date\\\",\\\"size\\\":\\\"large\\\",\\\"label\\\":\\\"Publication Date {iter}\\\",\\\"hint\\\":\\\"The date on which this notification is published.\\\",\\\"id\\\":\\\"publication-date{iter}\\\",\\\"mandatory\\\":\\\"\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"date\\\",\\\"size\\\":\\\"large\\\",\\\"label\\\":\\\"Effective Date {iter}\\\",\\\"hint\\\":\\\"The date on which this notification is effective.\\\",\\\"id\\\":\\\"effective-date{iter}\\\",\\\"mandatory\\\":\\\"\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"textarea\\\",\\\"size\\\":\\\"small\\\",\\\"label\\\":\\\"Remarks {iter}\\\",\\\"hint\\\":\\\"Remarks on the RCM Source\\\",\\\"id\\\":\\\"remarks{iter}\\\",\\\"copytoreopen\\\":\\\"yes\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"sf-i-select\\\",\\\"size\\\":\\\"large\\\",\\\"label\\\":\\\"RCM Source Impact {iter}\\\",\\\"apiid\\\":\\\"r7u3dzkyoiyizxhb4n7hb523te0kbijf.lambda-url.us-east-1.on.aws\\\",\\\"hint\\\":\\\"RCM Source Impact\\\",\\\"id\\\":\\\"rcmsourceimpact{iter}\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"sf-i-select\\\",\\\"size\\\":\\\"large\\\",\\\"label\\\":\\\"RCM Source Type {iter}\\\",\\\"apiid\\\":\\\"6ftklrdwhdtrdom7toyew7buc40mifqn.lambda-url.us-east-1.on.aws\\\",\\\"hint\\\":\\\"RCM Source Type\\\",\\\"id\\\":\\\"rcmsourcetype{iter}\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"},{\\\"type\\\":\\\"sf-i-uploader\\\",\\\"size\\\":\\\"large\\\",\\\"label\\\":\\\"RCM Document {iter}\\\",\\\"hint\\\":\\\"Document of the contract\\\",\\\"id\\\":\\\"documents{iter}\\\",\\\"mode\\\":\\\"multiselect-dropdown\\\",\\\"apiid\\\":\\\"1peg5170d3\\\",\\\"allowedextensions\\\":\\\"["jpg","png","pdf","xls","xlsx","doc","docx"]\\\",\\\"extract\\\":\\\"no\\\",\\\"maxselect\\\":\\\"1\\\",\\\"maxsize\\\":\\\"10242880\\\",\\\"allowdownload\\\":\\\"yes\\\",\\\"displayinhistory\\\":\\\"yes\\\",\\\"customreporting\\\":\\\"yes\\\"}]\",\"direction\":\"column\",\"customreporting\":true,\"children\":[],\"name\":\"Source Report\"},{\"type\":\"sf-i-select\",\"size\":\"large\",\"label\":\"Country {iter}\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/country\",\"hint\":\"Country\",\"id\":\"country{iter}\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"sf-i-sub-select\",\"size\":\"large\",\"label\":\"State {iter}\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/state\",\"hint\":\"State\",\"id\":\"state{iter}\",\"dependencies\":[\"country{iter}\"],\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"sf-i-form-select\",\"size\":\"large\",\"label\":\"Statute {iter}\",\"hint\":\"Statute for RCM Source\",\"id\":\"statute{iter}\",\"mode\":\"select\",\"dependencies\":[\"country{iter}\"],\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/statute\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["lastmodifiedtime","lastmodifiedby","shortnumid","definitions","applicability","subcategory","category","state","jurisdiction","country","updatetype","project","tagtype","shortid"]\",\"maxselect\":\"1\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Notification Name {iter}\",\"hint\":\"Notification name from the source\",\"id\":\"notification-name-{iter}\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Notification Reference {iter}\",\"hint\":\"Notification reference from the source\",\"id\":\"notification-reference{iter}\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"date\",\"size\":\"large\",\"label\":\"Publication Date {iter}\",\"hint\":\"The date on which this notification is published.\",\"id\":\"publication-date{iter}\",\"mandatory\":\"\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"date\",\"size\":\"large\",\"label\":\"Effective Date {iter}\",\"hint\":\"The date on which this notification is effective.\",\"id\":\"effective-date{iter}\",\"mandatory\":\"\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Remarks {iter}\",\"hint\":\"Remarks on the RCM Source\",\"id\":\"remarks{iter}\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"sf-i-select\",\"size\":\"large\",\"label\":\"RCM Source Impact {iter}\",\"apiid\":\"r7u3dzkyoiyizxhb4n7hb523te0kbijf.lambda-url.us-east-1.on.aws\",\"hint\":\"RCM Source Impact\",\"id\":\"rcmsourceimpact{iter}\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"sf-i-select\",\"size\":\"large\",\"label\":\"RCM Source Type {iter}\",\"apiid\":\"6ftklrdwhdtrdom7toyew7buc40mifqn.lambda-url.us-east-1.on.aws\",\"hint\":\"RCM Source Type\",\"id\":\"rcmsourcetype{iter}\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"},{\"type\":\"sf-i-uploader\",\"size\":\"large\",\"label\":\"RCM Document {iter}\",\"hint\":\"Document of the contract\",\"id\":\"documents{iter}\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"1peg5170d3\",\"allowedextensions\":\"["jpg","png","pdf","xls","xlsx","doc","docx"]\",\"extract\":\"no\",\"maxselect\":\"1\",\"maxsize\":\"10242880\",\"allowdownload\":\"yes\",\"displayinhistory\":\"yes\",\"customreporting\":\"yes\"}]]"
|
|
68
68
|
getConfigJson = () => {
|
|
69
69
|
// @ts-ignore: JSON is global in browser/Node.js
|
|
70
70
|
return JSON.parse(this.configjson)
|
|
@@ -1319,7 +1319,28 @@ export class SfIReporting extends LitElement {
|
|
|
1319
1319
|
let formObj = formContainer.querySelector('#' + childElement.id) as SfIForm
|
|
1320
1320
|
console.log("selected", formObj, childElement.id)
|
|
1321
1321
|
for (let dataElement of this.dataModel) {
|
|
1322
|
-
if (dataElement
|
|
1322
|
+
if (isAddButtonObject(dataElement)) {
|
|
1323
|
+
for (let childElementsArr of dataElement.children) {
|
|
1324
|
+
for (let childFormElement of childElementsArr) {
|
|
1325
|
+
if (childFormElement.id == childElement.id) {
|
|
1326
|
+
let valObj: any = {}
|
|
1327
|
+
let selectedObj = formObj.selectedEntireValues()
|
|
1328
|
+
valObj.id = selectedObj.id
|
|
1329
|
+
let cols = JSON.parse(selectedObj.fields?.cols ?? '[]')
|
|
1330
|
+
let data = JSON.parse(selectedObj.fields?.data ?? '[]')
|
|
1331
|
+
for (let [i, col] of cols.entries()) {
|
|
1332
|
+
valObj[col] = data[i]
|
|
1333
|
+
}
|
|
1334
|
+
if (childFormElement.savenameseparate == "yes") {
|
|
1335
|
+
console.log('populating dataelement', valObj)
|
|
1336
|
+
childFormElement.value = [valObj.name + ';' + valObj.id];
|
|
1337
|
+
} else {
|
|
1338
|
+
childFormElement.value = valObj
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
} else if (dataElement.id == childElement.id) {
|
|
1323
1344
|
let valObj: any = {}
|
|
1324
1345
|
let selectedObj = formObj.selectedEntireValues()
|
|
1325
1346
|
valObj.id = selectedObj.id
|
|
@@ -3112,7 +3133,7 @@ export class SfIReporting extends LitElement {
|
|
|
3112
3133
|
// this.prepopulateValJson = JSON.stringify(element)
|
|
3113
3134
|
// this.populateDataModel()
|
|
3114
3135
|
// this.prepopulateValues(false)
|
|
3115
|
-
|
|
3136
|
+
console.log('adding element', element);
|
|
3116
3137
|
await this.submitNew(element)
|
|
3117
3138
|
}
|
|
3118
3139
|
this.hideLoader();
|
|
@@ -3127,30 +3148,65 @@ export class SfIReporting extends LitElement {
|
|
|
3127
3148
|
|
|
3128
3149
|
csvToJson = async (file: File): Promise<any> => {
|
|
3129
3150
|
const text = await file.text();
|
|
3130
|
-
const lines = text.split(/\r?\n/).filter(line => line.trim() !== "");
|
|
3131
|
-
const headers = lines[0].split(",");
|
|
3132
3151
|
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3152
|
+
const rows: string[][] = [];
|
|
3153
|
+
let current = "";
|
|
3154
|
+
let insideQuotes = false;
|
|
3155
|
+
let row: string[] = [];
|
|
3156
|
+
|
|
3157
|
+
for (let i = 0; i < text.length; i++) {
|
|
3158
|
+
const char = text[i];
|
|
3159
|
+
const nextChar = text[i + 1];
|
|
3136
3160
|
|
|
3161
|
+
if (char === '"') {
|
|
3162
|
+
if (insideQuotes && nextChar === '"') {
|
|
3163
|
+
// Escaped quote ("")
|
|
3164
|
+
current += '"';
|
|
3165
|
+
i++;
|
|
3166
|
+
} else {
|
|
3167
|
+
insideQuotes = !insideQuotes;
|
|
3168
|
+
}
|
|
3169
|
+
} else if (char === "," && !insideQuotes) {
|
|
3170
|
+
row.push(current);
|
|
3171
|
+
current = "";
|
|
3172
|
+
} else if ((char === "\n" || char === "\r") && !insideQuotes) {
|
|
3173
|
+
if (current || row.length > 0) {
|
|
3174
|
+
row.push(current);
|
|
3175
|
+
rows.push(row);
|
|
3176
|
+
}
|
|
3177
|
+
row = [];
|
|
3178
|
+
current = "";
|
|
3179
|
+
// handle \r\n (Windows newlines)
|
|
3180
|
+
if (char === "\r" && nextChar === "\n") i++;
|
|
3181
|
+
} else {
|
|
3182
|
+
current += char;
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3186
|
+
// push last value if file doesn’t end with newline
|
|
3187
|
+
if (current || row.length > 0) {
|
|
3188
|
+
row.push(current);
|
|
3189
|
+
rows.push(row);
|
|
3190
|
+
}
|
|
3191
|
+
|
|
3192
|
+
const headers = rows[0];
|
|
3193
|
+
return rows.slice(1).map((cols) => {
|
|
3194
|
+
const obj: Record<string, any> = {};
|
|
3137
3195
|
headers.forEach((header, i) => {
|
|
3138
|
-
let value =
|
|
3196
|
+
let value = cols[i] ?? "";
|
|
3139
3197
|
|
|
3140
|
-
//
|
|
3141
|
-
if (value
|
|
3198
|
+
// Trim outer quotes & unescape double quotes
|
|
3199
|
+
if (value.startsWith('"') && value.endsWith('"')) {
|
|
3142
3200
|
value = value.slice(1, -1).replace(/""/g, '"');
|
|
3143
3201
|
}
|
|
3144
3202
|
|
|
3145
|
-
// Try
|
|
3203
|
+
// Try parse JSON-like values
|
|
3146
3204
|
try {
|
|
3147
|
-
|
|
3148
|
-
obj[header] = parsed;
|
|
3205
|
+
obj[header] = JSON.parse(value);
|
|
3149
3206
|
} catch {
|
|
3150
3207
|
obj[header] = value;
|
|
3151
3208
|
}
|
|
3152
3209
|
});
|
|
3153
|
-
|
|
3154
3210
|
return obj;
|
|
3155
3211
|
});
|
|
3156
3212
|
}
|