Skip to content

Commit

Permalink
DSS WS PGR Module adder for 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinmoy-96 committed Mar 20, 2024
1 parent 38b1f23 commit d1feec0
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 246 deletions.
4 changes: 2 additions & 2 deletions frontend/micro-ui/web/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ RUN yarn add @egovernments/digit-ui-libraries
RUN yarn add @upyog/digit-ui-module-pt
RUN yarn add @upyog/digit-ui-module-fsm
RUN yarn add @upyog/digit-ui-module-tl
RUN yarn add @egovernments/digit-ui-module-dss
RUN yarn add @upyog/digit-ui-module-dss
RUN yarn add @egovernments/digit-ui-module-mcollect
RUN yarn add @egovernments/digit-ui-module-pgr
RUN yarn add @upyog/digit-ui-module-pgr
RUN yarn add @egovernments/digit-ui-module-noc
RUN yarn add @upyog/digit-ui-module-engagement
RUN yarn add @egovernments/digit-ui-module-hrms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@egovernments/digit-ui-module-mcollect":"^1.4.0",
"@egovernments/digit-ui-module-noc":"^1.4.0",
"@upyog/digit-ui-module-obps":"^1.4.0",
"@egovernments/digit-ui-module-pgr":"^1.4.0",
"@upyog/digit-ui-module-pgr":"^1.4.0",
"@upyog/digit-ui-module-pt":"^1.4.0",
"@egovernments/digit-ui-module-receipts":"^1.4.0",
"@upyog/digit-ui-module-tl":"^1.4.0",
Expand Down
4 changes: 2 additions & 2 deletions frontend/micro-ui/web/micro-ui-internals/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"@egovernments/digit-ui-module-mcollect": "1.7.2",
"@egovernments/digit-ui-module-noc": "1.7.2",
"@upyog/digit-ui-module-obps": "1.7.2",
"@egovernments/digit-ui-module-pgr": "1.7.2",
"@upyog/digit-ui-module-pgr": "1.7.3",
"@upyog/digit-ui-module-pt": "1.7.2",
"@egovernments/digit-ui-module-receipts": "1.7.2",
"@upyog/digit-ui-module-tl": "1.7.2",
"@upyog/digit-ui-module-ws": "1.7.2",
"@upyog/digit-ui-module-ws": "1.7.3",
"@egovernments/digit-ui-module-bills": "1.7.2",
"@egovernments/digit-ui-module-commonpt": "1.7.2",
"http-proxy-middleware": "^1.0.5",
Expand Down
8 changes: 4 additions & 4 deletions frontend/micro-ui/web/micro-ui-internals/example/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import React from "react";
import ReactDOM from "react-dom";

import { initLibraries } from "@egovernments/digit-ui-libraries";
import { PGRReducers } from "@egovernments/digit-ui-module-pgr";
import { PGRReducers } from "@upyog/digit-ui-module-pgr";
import { PTModule, PTLinks, PTComponents } from "@upyog/digit-ui-module-pt";
import { MCollectModule, MCollectLinks } from "@egovernments/digit-ui-module-mcollect";
// import { TLModule, TLLinks } from "@upyog/digit-ui-module-tl";
import { initFSMComponents } from "@upyog/digit-ui-module-fsm";
import { initPGRComponents } from "@egovernments/digit-ui-module-pgr";
import { initDSSComponents } from "@egovernments/digit-ui-module-dss";
import { initPGRComponents } from "@upyog/digit-ui-module-pgr";
import { initDSSComponents } from "@upyog/digit-ui-module-dss";
import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms";
import { initReceiptsComponents, ReceiptsModule } from "@egovernments/digit-ui-module-receipts";
// import { initReportsComponents } from "@egovernments/digit-ui-module-reports";
Expand All @@ -26,7 +26,7 @@ import { initBillsComponents, BillsModule } from "@egovernments/digit-ui-module-

// import {initCustomisationComponents} from "./customisations";

// import { PGRModule, PGRLinks } from "@egovernments/digit-ui-module-pgr";
// import { PGRModule, PGRLinks } from "@upyog/digit-ui-module-pgr";
// import { Body, TopBar } from "@egovernments/digit-ui-react-components";
import "@upyog-niua/upyog-css/example/index.css";
// import * as comps from "@egovernments/digit-ui-react-components";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@egovernments/digit-ui-module-dss",
"name": "@upyog/digit-ui-module-dss",
"version": "1.7.3",
"license": "MIT",
"description": "Digit Dashboard Module",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,77 +0,0 @@

# digit-ui-module-pgr

## Install

```bash
npm install --save @egovernments/digit-ui-module-pgr
```

## Limitation

```bash
This Package is more specific to DIGIT-UI's can be used across mission's
```

## Usage

After adding the dependency make sure you have this dependency in

```bash
frontend/micro-ui/web/package.json
```

```json
"@egovernments/digit-ui-module-pgr":"^1.5.0",
```

then navigate to App.js

```bash
frontend/micro-ui/web/src/App.js
```


```jsx
/** add this import **/

import { initpgrComponents } from "@egovernments/digit-ui-module-pgr";

/** inside enabledModules add this new module key **/

const enabledModules = ["pgr"];

/** inside init Function call this function **/

const initDigitUI = () => {
initpgrComponents();
};
```




### Changelog

```bash
1.7.1 UPYOG Base version
```

### Contributors

[jagankumar-egov] [Tulika-eGov] [vamshikrishnakole-wtt-egov]

## Documentation

Documentation Site (https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui)

## Maintainer

- [jagankumar-egov](https://www.github.com/jagankumar-egov)


### Published from DIGIT Frontend
DIGIT Frontend Repo (https://github.com/upyog/UPYOG/tree/develop)


![Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-module-pgr",
"version": "1.7.2",
"name": "@upyog/digit-ui-module-pgr",
"version": "1.7.3",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand All @@ -17,7 +17,7 @@
"react": "17.0.2",
"react-router-dom": "5.3.0"
},
"dependencies": {
"dependencies": {
"@egovernments/digit-ui-react-components": "1.7.2",
"lodash.merge": "^4.6.2",
"react": "17.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,84 +14,31 @@ const SelectComplaintType = ({ t, config, onSelect, value }) => {
const { complaintType } = value;
return complaintType ? complaintType : {};
});
const [subType, setSubType] = useState(() => {
const { subType } = value;
return subType ? subType : {};
});

const goNext = () => {
console.log("complaintType",complaintType)
sessionStorage.setItem("complaintType",JSON.stringify(complaintType))
onSelect({ subType });
onSelect({ complaintType });
};

const textParams = config.texts;
const valuenew= {
key :"PropertyTax",
name :"Property Tax"}

const menu = Digit.Hooks.pgr.useComplaintTypes({ stateCode: Digit.ULBService.getCurrentTenantId() });
const cities = Digit.Hooks.pgr.useTenants();
const [subTypeMenu, setSubTypeMenu] = useState([]);
const pttype=sessionStorage.getItem("type")
useEffect(()=>{
(async()=>{
if (pttype=="PT") {
setComplaintType(valuenew);
setSubTypeMenu(await serviceDefinitions.getSubMenu("pg.citya", valuenew, t));
}
})();
},[])

function selectedSubType(value) {

console.log("selectedSubType",value)
setSubType(value);
}
const config1 = [
{
head: t("CS_COMPLAINT_DETAILS_COMPLAINT_DETAILS"),
body: [
{
label: t("CS_COMPLAINT_DETAILS_COMPLAINT_TYPE"),
isMandatory: true,
type: "dropdown",
populators: <Dropdown option={menu} optionKey="name" id="complaintType" selected={complaintType} select={selectedValue} disable={pttype}/>,
},
{
label: t("CS_COMPLAINT_DETAILS_COMPLAINT_SUBTYPE"),
isMandatory: true,
type: "dropdown",
menu: { ...subTypeMenu },
populators: <Dropdown option={subTypeMenu} optionKey="name" id="complaintSubType" selected={subType} select={selectedSubType} />,
},

],

},
];
const tenantId = window.Digit.SessionStorage.get("Digit.Citizen.tenantId");
async function selectedValue(value) {
if (value.key !== complaintType.key) {
if (value.key === "Others") {
setSubType({ name: "" });
setSubTypeMenu([{ key: "Others", name: t("SERVICEDEFS.OTHERS") }]);
} else {
setSubType({ name: "" });
setComplaintType(value);
setSubTypeMenu(await serviceDefinitions.getSubMenu("pg.citya", value, t));
}
}
}

function selectedValue(value) {
setComplaintType(value);
// SessionStorage.set("complaintType", value);
}
return (
<FormComposer
heading={t("ES_CREATECOMPLAINT_NEW_COMPLAINT")}
config={config1}
onSubmit={goNext}
isDisabled={Object.keys(complaintType).length === 0 || complaintType === null ? true : false}
label={"NEXT"}
/>
<TypeSelectCard
{...textParams}
{...{ menu: menu }}
{...{ optionsKey: "name" }}
{...{ selected: selectedValue }}
{...{ selectedOption: complaintType }}
{...{ onSave: goNext }}
{...{ t }}
disabled={Object.keys(complaintType).length === 0 || complaintType === null ? true : false}
/>
);
};

export default SelectComplaintType;
export default SelectComplaintType;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@upyog/digit-ui-module-ws",
"version": "1.7.2",
"version": "1.7.3",
"description": "",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand All @@ -19,6 +19,7 @@
},
"dependencies": {
"@egovernments/digit-ui-react-components": "1.7.2",
"microbundle-crl": "0.13.11",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-hook-form": "6.15.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ const ConnectionDetails = (_props) => {
}, [errors]);

const errorStyle = { width: "70%", marginLeft: "30%", fontSize: "12px", marginTop: "-21px" };
console.log("ffffffffffffffffffff",formData2)
return (
<div>
<div style={{ marginBottom: "16px" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ console.log("disconnectionData",disconnectionData)
</div>
);
}
console.log("disconnectionData.type?.value?.code",disconnectionData.type?.value?.code)
return (
<div style={{ margin: "16px" }}>
<Header styles={{fontSize: "32px", marginLeft: "18px"}}>{t("WS_WATER_AND_SEWERAGE_DISCONNECTION")}</Header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ const BILLSBreadCrumbs = ({ location }) => {
return <div style={window?.location.href.includes("/employee/ws/bill-amendment") || window?.location.href.includes("/employee/ws/response")? {marginLeft:"20px"} : {}}><BreadCrumb crumbs={crumbs} spanStyle={{ maxWidth: "min-content"}} /></div>;
};
const App = ({ path }) => {
console.log("ffffff",path)
const location = useLocation();

const WSDocsRequired = Digit?.ComponentRegistryService?.getComponent("WSDocsRequired");
Expand Down
Loading

0 comments on commit d1feec0

Please sign in to comment.