impaktapps-ui-builder 0.0.101-alpha.334 → 0.0.101-alpha.335

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.101-alpha.334",
3
+ "version": "0.0.101-alpha.335",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -89,19 +89,19 @@ export default (funcParams: funcParamsProps) => {
89
89
  }))
90
90
  }
91
91
  const config = pageData?.config;
92
- const programId = JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")?.value || "programID";
93
- const queryParams = new URLSearchParams(location.search);;
94
- console.log("queryParams ",queryParams)
95
- if(queryParams?.get("ProgramID") !== programId+"")
96
- {
97
- funcParams.store.setSearchParams({...queryParams, ProgramID: programId})
98
- funcParams.store.navigate(
99
- 0
100
- );
101
- }
102
- if(programId !== "programID"){
103
- funcParams.store.setFormdata((pre)=>({...pre,programId: programId}))
104
- }
92
+ // const programId = JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")?.value || "programID";
93
+ // const queryParams = new URLSearchParams(location.search);;
94
+ // console.log("queryParams ",queryParams)
95
+ // if(queryParams?.get("ProgramID") !== programId+"")
96
+ // {
97
+ // funcParams.store.setSearchParams({...queryParams, ProgramID: programId})
98
+ // funcParams.store.navigate(
99
+ // 0
100
+ // );
101
+ // }
102
+ // if(programId !== "programID"){
103
+ // funcParams.store.setFormdata((pre)=>({...pre,programId: programId}))
104
+ // }
105
105
 
106
106
  // const pathParts = funcParams.store.location.pathname.split("/");
107
107
  // const programId = JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")?.value || "programID";
@@ -117,6 +117,22 @@ export default (funcParams: funcParamsProps) => {
117
117
  // }
118
118
  // }
119
119
  const uiSchema = pageData?.uiSchema;
120
+
121
+ if (config?.programIdRequired) {
122
+ const programId =
123
+ JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")?.value ||
124
+ "programID";
125
+ const queryParams = new URLSearchParams(location.search);
126
+ console.log("queryParams ", queryParams);
127
+ if (queryParams?.get("ProgramID") !== programId + "") {
128
+ funcParams.store.setSearchParams({ ...queryParams, ProgramID: programId });
129
+ funcParams.store.navigate(0);
130
+ }
131
+ if (programId !== "programID") {
132
+ funcParams.store.setFormdata((pre) => ({ ...pre, programId: programId }));
133
+ }
134
+ }
135
+
120
136
  const event = new CustomEvent('pageNameChanged', {
121
137
  detail: { pageName: config.label }
122
138
  });