@asaleh37/ui-base 25.6.19-2 → 25.6.19-5
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/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/common/Home.tsx +1 -2
- package/src/components/common/MyNotificationsPanel.tsx +0 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +0 -1
- package/src/components/templates/report/ExcelReportViewer.tsx +1 -2
- package/src/components/templates/report/ReportViewer.tsx +1 -2
- package/src/layout/NavigationTree.tsx +17 -15
- package/src/layout/TopBar.tsx +1 -3
package/package.json
CHANGED
|
@@ -8,8 +8,7 @@ import AttachmentPanel from "../templates/attachment/AttachmentPanel";
|
|
|
8
8
|
import { useSelector } from "react-redux";
|
|
9
9
|
|
|
10
10
|
const Home: React.FC = () => {
|
|
11
|
-
const AppInfo = useSelector((state: any) => state.AppInfo.value);
|
|
12
|
-
console.log("AppInfo", AppInfo);
|
|
11
|
+
const AppInfo = useSelector((state: any) => state.AppInfo.value);
|
|
13
12
|
return (
|
|
14
13
|
<Box
|
|
15
14
|
sx={{
|
|
@@ -186,8 +186,7 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
|
|
|
186
186
|
// Clean up
|
|
187
187
|
document.body.removeChild(link);
|
|
188
188
|
window.URL.revokeObjectURL(url);
|
|
189
|
-
}
|
|
190
|
-
console.log(response);
|
|
189
|
+
}
|
|
191
190
|
},
|
|
192
191
|
failureCallBkFn: (response) => {
|
|
193
192
|
setErrorMessage(
|
|
@@ -235,28 +235,30 @@ export default function NavigationTree() {
|
|
|
235
235
|
const dispatch = useDispatch();
|
|
236
236
|
const isMobile = useIsMobile();
|
|
237
237
|
const { isUserAuthorized } = useSession();
|
|
238
|
-
debugger;
|
|
239
238
|
const filterData = (data) => {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
239
|
+
console.log("filterDate", data);
|
|
240
|
+
const parentItems = [];
|
|
241
|
+
for (let parentItem of data) {
|
|
242
|
+
if (
|
|
243
|
+
parentItem.authority === undefined ||
|
|
244
|
+
parentItem.authority == null ||
|
|
245
|
+
isUserAuthorized(parentItem.authority)
|
|
246
|
+
) {
|
|
247
|
+
let newParentItem = structuredClone(parentItem);
|
|
248
|
+
if (parentItem?.children) {
|
|
249
|
+
newParentItem.children = filterData(parentItem.children);
|
|
250
250
|
}
|
|
251
|
-
|
|
252
|
-
}
|
|
251
|
+
parentItems.push(newParentItem);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return parentItems;
|
|
253
255
|
};
|
|
254
256
|
|
|
255
257
|
const mergedNavigationItems = [];
|
|
256
258
|
if (AppInfo.enableAdministrationModule) {
|
|
257
|
-
mergedNavigationItems.push(
|
|
259
|
+
mergedNavigationItems.push(structuredClone(NavigationItems));
|
|
258
260
|
}
|
|
259
|
-
mergedNavigationItems.push(
|
|
261
|
+
mergedNavigationItems.push(structuredClone(AppInfo.businessNavigationItems));
|
|
260
262
|
const authoriedNavigationItems = filterData(mergedNavigationItems);
|
|
261
263
|
|
|
262
264
|
return (
|
package/src/layout/TopBar.tsx
CHANGED
|
@@ -80,9 +80,7 @@ const TopBar: React.FC = () => {
|
|
|
80
80
|
const handleLogout = async () => {
|
|
81
81
|
try {
|
|
82
82
|
await handleGetRequest({ endPointURI: "api/auth/logout" });
|
|
83
|
-
} catch (error) {
|
|
84
|
-
console.log("logout error", error);
|
|
85
|
-
}
|
|
83
|
+
} catch (error) {}
|
|
86
84
|
dispatch(UserSessionActions.setUnAuthenticated());
|
|
87
85
|
};
|
|
88
86
|
const toggleSideBar = () => {
|