To create a form, the user must select a domain and a workType. The backend should support the following workflow:
POST Request: The user initiates form creation by sending a request to POST /v1/domain/{domain}/work. This request is used to create a new work entry within the specified domain.
GET Request: To retrieve all the necessary form fields, including Lists of Values (LOVs) for dropdowns, the user sends a request to GET /v1/domain/{domain}/work-type/{work-type}. This request should return the form configuration and LOVs needed to populate the form fields.
Expected Response Format for fields with LOVs:
{
"domain": "tec", // Current domain selected by the user
"domainName": "TEC", // Display name for the domain
"sharedLOVs": { // LOVs that are shared across all domains
"project": ["CBXFEL", "DASEL", "FACET", "LCLS"],
"urgency": ["Scheduled", "Immediate", "Downtime", "Priority"]
},
"domainSpecificLOVs": { // LOVs specific to the selected domain
"location": ["ACR", "BDE", "BSY"],
"shopGroup": ["ACS", "ADSO"]
},
"fields": [ // List of form fields with configurations
{
"id": "urgency", // Unique identifier for the field
"name": "urgency", // Field name
"label": "Urgency", // Display label for the field
"group": "scheduling", // Group category for display purposes
"description": "Select the urgency level", // Description of the field
"type": "LOV", // Type of field
"options": "sharedLOVs.urgency", // Reference to shared LOVs source
"currentValue": "Scheduled" // Current selected value
},
{
"id": "location", // Unique identifier for the field
"name": "location", // Field name
"label": "Location", // Display label for the field
"group": "scheduling", // Group category for display purposes
"description": "Select a location", // Description of the field
"type": "LOV", // Type of field
"options": "domainSpecificLOVs.location", // Reference to domain-specific LOVs source
"currentValue": "Location 1" // Current selected value
}
]
}
To create a form, the user must select a domain and a workType. The backend should support the following workflow:
POST Request: The user initiates form creation by sending a request to POST /v1/domain/{domain}/work. This request is used to create a new work entry within the specified domain.
GET Request: To retrieve all the necessary form fields, including Lists of Values (LOVs) for dropdowns, the user sends a request to GET /v1/domain/{domain}/work-type/{work-type}. This request should return the form configuration and LOVs needed to populate the form fields.
Expected Response Format for fields with LOVs: { "domain": "tec", // Current domain selected by the user "domainName": "TEC", // Display name for the domain "sharedLOVs": { // LOVs that are shared across all domains "project": ["CBXFEL", "DASEL", "FACET", "LCLS"], "urgency": ["Scheduled", "Immediate", "Downtime", "Priority"] }, "domainSpecificLOVs": { // LOVs specific to the selected domain "location": ["ACR", "BDE", "BSY"], "shopGroup": ["ACS", "ADSO"] }, "fields": [ // List of form fields with configurations { "id": "urgency", // Unique identifier for the field "name": "urgency", // Field name "label": "Urgency", // Display label for the field "group": "scheduling", // Group category for display purposes "description": "Select the urgency level", // Description of the field "type": "LOV", // Type of field "options": "sharedLOVs.urgency", // Reference to shared LOVs source "currentValue": "Scheduled" // Current selected value }, { "id": "location", // Unique identifier for the field "name": "location", // Field name "label": "Location", // Display label for the field "group": "scheduling", // Group category for display purposes "description": "Select a location", // Description of the field "type": "LOV", // Type of field "options": "domainSpecificLOVs.location", // Reference to domain-specific LOVs source "currentValue": "Location 1" // Current selected value } ] }