Skip to content

Commit

Permalink
Merge pull request #1050 from upyog/UM-6756
Browse files Browse the repository at this point in the history
Um 6756
  • Loading branch information
chinmoy-eGov authored Apr 8, 2024
2 parents 80038ea + 69dc5ab commit b03aacf
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publishAllPackages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Node.js Publish UI Packages

on:
push:
branches: [ 'digit2.9-merge' ]
branches: [ 'UM-6756' ]
paths:
- 'frontend/micro-ui/web/micro-ui-internals/**'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@upyog/digit-ui-module-mcollect": "1.7.3",
"@upyog/digit-ui-module-noc": "1.7.3",
"@upyog/digit-ui-module-obps": "1.7.2",
"@upyog/digit-ui-module-pgr": "1.7.5",
"@upyog/digit-ui-module-pgr": "1.7.7",
"@upyog/digit-ui-module-pt": "1.7.4",
"@upyog/digit-ui-module-receipts": "1.7.3",
"@upyog/digit-ui-module-tl": "1.7.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MdmsService } from "../elements/MDMS";
import { MdmsServiceV2 } from "../elements/MDMSV2";
import { Storage } from "../atoms/Utils/Storage";

export const GetServiceDefinitions = {
Expand All @@ -20,7 +21,7 @@ export const GetServiceDefinitions = {
},
};

const serviceDefs = await MdmsService.getDataByCriteria(tenantId, criteria, "PGR");
const serviceDefs = await MdmsServiceV2.getDataByCriteria(tenantId, criteria, "PGR");
Storage.set("serviceDefinitions", serviceDefs);
return serviceDefs;
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@upyog/digit-ui-module-pgr",
"version": "1.7.5",
"version": "1.7.7",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const SelectComplaintType = ({ t, config, onSelect, value }) => {

function selectedValue(value) {
setComplaintType(value);
// SessionStorage.set("complaintType", value);
window.Digit.SessionStorage.set("complaintType", value);
}
return (
<TypeSelectCard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const SelectSubType = ({ t, config, onSelect, value }) => {

const configNew = {
...config.texts,
...{ headerCaption: t(`SERVICEDEFS.${complaintType.key.toUpperCase()}`) },
...{ headerCaption: t(`SERVICEDEFS.${complaintType?.key.toUpperCase()}`) },
...{ menu: menu },
...{ optionsKey: "name" },
...{ selected: selectedValue },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const config = {
cardText: "CS_COMPLAINT_TYPE_TEXT",
submitBarLabel: "CS_COMMON_NEXT",
},
nextStep: "map",
nextStep: "sub-type",
},
"sub-type": {
component: SelectSubType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const CreateComplaint = () => {
const [params, setParams, clearParams] = Digit.Hooks.useSessionStorage(PGR_CITIZEN_CREATE_COMPLAINT, {});
// const [customConfig, setConfig] = Digit.Hooks.useSessionStorage(PGR_CITIZEN_COMPLAINT_CONFIG, {});
const config = useMemo(() => defaultConfig);
console.log(defaultConfig,"defaultConfig")

const [paramState, setParamState] = useState(params);
const [nextStep, setNextStep] = useState("");
Expand Down Expand Up @@ -66,7 +65,8 @@ export const CreateComplaint = () => {
submitComplaint();
}
};
const submitComplaint = async () => {

const submitComplaint = async () => {debugger
if (paramState?.complaintType) {
const { city_complaint, locality_complaint, uploadedImages, complaintType, subType, details, ...values } = paramState;
const { code: cityCode, name: city } = city_complaint;
Expand All @@ -81,7 +81,7 @@ export const CreateComplaint = () => {

const data = {
...values,
complaintType: subType.key,
complaintType: subType?.key,
cityCode,
city,
description: details,
Expand All @@ -106,10 +106,8 @@ export const CreateComplaint = () => {
let c = JSON.parse(sessionStorage.getItem("complaintType"))
if(data?.subType)
{

let data2 ={"complaintType":c}
console.log("handleSelect",data,data2)
setParams({ ...params, ...data ,...data2 });
setParams({ ...params, ...data });
goNext();
}
else {
Expand All @@ -123,7 +121,6 @@ export const CreateComplaint = () => {
};

if (isLoading) return null;

return (
<Switch>
{Object.keys(config.routes).map((route, index) => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/micro-ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@upyog/digit-ui-module-commonpt":"1.7.2",
"@upyog/digit-ui-module-obps": "1.7.2",
"@upyog/digit-ui-module-noc": "1.7.3",
"@upyog/digit-ui-module-pgr": "1.7.5",
"@upyog/digit-ui-module-pgr": "1.7.7",
"@upyog/digit-ui-module-pt": "1.7.4",
"@upyog/digit-ui-module-receipts": "1.7.3",
"@upyog/digit-ui-module-tl": "1.7.2",
Expand Down

0 comments on commit b03aacf

Please sign in to comment.