Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPG- 1893:: Custom UI generator with CUstom Data source values #48

Merged
merged 17 commits into from
Dec 5, 2023

Conversation

jagankumar-egov
Copy link
Collaborator

No description provided.

{
  "order": [
    "schemaCode",
    "order",
    "custom",
    "addAPI"
  ],
  "custom": [
    {
      "prefix": "WORKBENCH_UISCHEMA",
      "suffix": "",
      "fieldName": "custom.*.fieldName",
      "fieldPath": "order.*",
      "dataSource": {
        "API": "/mdms-v2/schema/v1/_search",
        "prefix": "WORKBENCH_UISCHEMA",
        "suffix": "",
        "requestBody": "{     \"SchemaDefCriteria\": {         \"tenantId\": \"pg\",         \"codes\": [             \"$DEPENDENT_1\"        ]     }     }",
        "responseJSON": "SchemaDefinitions[0].definition.properties",
        "dependentPath": [
          {

            "fieldPath": "schemaCode",
            "depdendentKey": "$DEPENDENT_1",
            "dependencyFor": "REQ_BODY"
          }
        ],
        "requestParams": "{}",
        "customFunction": "(data)=>{ return Object.keys(data?.SchemaDefinitions?.[0]?.definition?.properties); }"
      }
    },
    {
      "prefix": "WORKBENCH_UISCHEMA",
      "suffix": "",
      "fieldName": "order.*",
      "fieldPath": "custom.*.fieldPath",
      "dataSource": {
        "API": "/mdms-v2/schema/v1/_search",
        "prefix": "WORKBENCH_UISCHEMA",
        "suffix": "",
        "requestBody": "{     \"SchemaDefCriteria\": {         \"tenantId\": \"pg\",         \"codes\": [             \"$DEPENDENT_1\"         ]     }     }",
        "responseJSON": "SchemaDefinitions[0].definition.properties",
        "dependentPath": [
          {

            "fieldPath": "schemaCode",
            "depdendentKey": "$DEPENDENT_1",
            "dependencyFor": "REQ_BODY"
          }
        ],
        "requestParams": "{}",
        "customFunction": "(data)=>{ return Object.keys(data?.SchemaDefinitions?.[0]?.definition?.properties); }"
      }
    },
    {
      "prefix": "SCHEMA",
      "suffix": "",
      "fieldName": "schemaCode",
      "fieldPath": "schemaCode",
      "dataSource": {
        "API": "/mdms-v2/schema/v1/_search",
        "prefix": "SCHEMA",
        "suffix": "",
        "requestBody": "{  \"SchemaDefCriteria\": {         \"tenantId\": \"pg\",         \"limit\": 100     }}",
        "responseJSON": "SchemaDefinitions",
        "requestParams": "{}",
        "customFunction": "(data)=>{ return data?.SchemaDefinitions.map(obj=>obj.code); }"
      }
    }
  ],
  "schemaCode": "Workbench.UISchema"
}
@jagankumar-egov jagankumar-egov requested a review from a team as a code owner December 5, 2023 06:12
@jagankumar-egov jagankumar-egov merged commit 6e3a901 into develop Dec 5, 2023
1 check passed
@jagankumar-egov jagankumar-egov deleted the DPG-1893-2 branch December 5, 2023 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant