Skip to content

Latest commit

 

History

History
125 lines (87 loc) · 7.64 KB

File metadata and controls

125 lines (87 loc) · 7.64 KB
description
Workorder/Contract UI Tech Documentation

Workorder

Overview

This module helps in creating a work order for the Project based on the estimates designed. This enables in deciding the Tendering, Quotation and Nomination. Based on the nomination, CBO is being mapped to the respective Work Order.\

This module has 5 associated screens :

  1. Create
  2. Search
  3. Modify
  4. View
  5. Inbox

MDMS Configurations

S.No.DataMDMS Link
1Role Of CBOhttps://github.com/egovernments/works-mdms-data/blob/DEV/data/pg/works/ContractCBORoles.json
2Document Confighttps://github.com/egovernments/works-mdms-data/blob/DEV/data/pg/works/DocumentConfig.json

Module enablement configuration

  1. Set module code as “Contracts” in Module.js of Contracts Module. Refer https://github.com/egovernments/works-mdms-data/blob/DEV/data/pg/tenant/citymodule.json
 {
            "module": "Contracts",
            "code": "Contracts",
            "active": true,
            "order": 5,
            "tenants": [
                {
                    "code": "pg.cityb"
                },
                {
                    "code": "pg.cityc"
                },
                {
                    "code": "pg.citya"
                }
            ]
     }


  1. Enable Module in App.js. Update the object ‘enabledModules’. Use the code “Contracts”. This code should match with the code of the cityModule.json, mentioned above.

Role-action mapping

S.NoAPI

Action ID


Roles
1

/contract-service/contract/v1/_create


66

WORK_ORDER_CREATOR


2/contract-service/contract/v1/_search68WORK_ORDER_CREATOR, WORK_ORDER_APPROVER, WORK_ORDER_VERIFIER
3/contract-service/contract/v1/_update67WORK_ORDER_CREATOR, WORK_ORDER_APPROVER, WORK_ORDER_VERIFIER
4/estimate-service/estimate/v1/_search10ESTIMATE_VERIFIER
5/pms/project/v1/_search52PROJECT_VIEWER
6/egov-hrms/employees/_search4EMPLOYEE_COMMON
7/org-services/organisation/v1/_search91ORG_ADMIN, WORK_ORDER_CREATOR, MUKTA_ADMIN
8/wms/contract/_search89WORK_ORDER_CREATOR, WORK_ORDER_VERIFIER

Sidebar configuration

S.NoScreenNavigation URL

LeftIcon Updates


Roles
1Contract Inbox

/works-ui/employee/contracts/inbox


dynamic:ContractIcon


WORK_ORDER_CREATOR, WORK_ORDER_VERIFIER, WORK_ORDER_APPROVER


2Create Contract/works-ui/employee/estimate/search-estimatedynamic:ContractIconWORK_ORDER_CREATOR
{
      "id": 58,
      "name": "CONTRACTS",
      "url": "url",
      "displayName": "Contracts Inbox",
      "orderNumber": 2,
      "parentModule": "",
      "enabled": true,
      "serviceCode": "CONTRACTS",
      "code": "null",
      "navigationURL": "/works-ui/employee/contracts/inbox",
      "path": "3CONTRACTS.Inbox",
      "leftIcon": "dynamic:ContractIcon"
   }

Screen configuration

S.NoScreenConfiguration
1Create https://github.com/egovernments/works-mdms-data/blob/DEV/data/pg/commonMuktaUiConfig/CreateWorkOrderConfig.json
2Searchhttps://github.com/egovernments/works-mdms-data/blob/DEV/data/pg/commonMuktaUiConfig/SearchContractConfig.json
3Inboxhttps://github.com/egovernments/works-mdms-data/blob/DEV/data/pg/commonMuktaUiConfig/InboxConfigContracts.json

Localization Configuration and Modules

TenantIDModule
pgrainmaker-contracts
pgrainmaker-common-masters
pgrainmaker-common
pgrainmaker-workflow
pg.cityarainmaker-pg.citya

Workflow Configuration

UI Component Name Business Service
WorkflowActions contract-approval-mukta

Customization

1. API-based Data -

  • Name of CBO - This field is being captured on the Create screen and Modify screen. Data for this field comes from the backend.
  • CBO ID - This field is being set based on the value selected in the Name Of CBO.
  • Name of Officer In Charge - This field is being populated based on the HRMS Search. Here the role is hardcoded to ‘OFFICER_IN_CHARGE’.
  • Designation of Officer In Charge - This field is being set based on the value selected in the Name of Officer in charge.
  • Work Order Amount - This field shows the calculated amount of Total Estimated Cost minus the Overheads which has ‘isWorkOrderValue’ as true. Please refer this OverHeads config for Amount calculation.
  • Role of CBO will be shown based on the calculated Work Order Amount. If the calculated Work Order Amount is less than ‘amount’ in RoleOfCBO Config, show Implementation Agency else show Implementation Partner. This logic will vary based on the updates in the RoleOfCBO config.

2. Custom Components used in Projects :

  • Document Config -
  • Based on the document config, respective documents will be rendered on the Create Screen. Please mention the validations, file type limits and file size limits in this config.
  • Work Order Terms and Conditions -
  • This Component will help input description in the table. Users can add and delete the rows. First row won't be deleted, clicking on the delete button will empty the first row. Refer Component - WOTermsAndConditions.\

3. Create Screen :

  1. Please use the common Utility “PreProcessMDMSConfig”.
  2. Pass the associated dependencies for the config.
  3. The utility will return a config which will run through FormComposer.
  4. Refer docs for Pre-Process config in Component comments.

4. Inbox / Search Screen :

  1. Please use the common utility “preProcessMDMSConfigInboxSearch”.
  2. Pass the associated dependencies for the config.
  3. The utility will return a config which will run through RenderFormFields.
  4. Refer docs for Pre-Process config in Component comments.