@asaleh37/ui-base 25.12.123 → 25.12.172
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.d.ts +2 -0
- package/dist/index.js +108 -108
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +112 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/administration/admin/CustomPersonGrid.tsx +361 -0
- package/src/components/administration/admin/OrgProvidedPersonGrid.tsx +347 -0
- package/src/components/administration/admin/OrganizationMemberGrid.tsx +63 -49
- package/src/components/administration/admin/PersonGrid.tsx +10 -344
- package/src/components/administration/dev/WorkflowDocumentGrid.tsx +2 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +2 -4
- package/src/components/templates/workflow/WorkflowDocumentPanel.tsx +6 -2
- package/src/layout/NavigationTree.tsx +8 -1
- package/src/layout/TopBar.tsx +72 -55
- package/src/main.tsx +2 -1
- package/src/navigationItems/Administration/adminNavigationItems.tsx +1 -1
- package/src/redux/features/common/AppInfoSlice.ts +4 -0
package/src/layout/TopBar.tsx
CHANGED
|
@@ -27,6 +27,7 @@ import AttachmentImageViewer from "../components/templates/attachment/Attachment
|
|
|
27
27
|
import NotificationButton from "./NotificationButton";
|
|
28
28
|
import { useState } from "react";
|
|
29
29
|
import ChangePasswordPanel from "../components/administration/admin/ChangePasswordPanel";
|
|
30
|
+
import { AppInfo } from "../redux/features/common/AppInfoSlice";
|
|
30
31
|
|
|
31
32
|
interface AppBarProps extends MuiAppBarProps {
|
|
32
33
|
open?: boolean;
|
|
@@ -35,6 +36,7 @@ interface AppBarProps extends MuiAppBarProps {
|
|
|
35
36
|
const AppBar = styled(MuiAppBar, {
|
|
36
37
|
shouldForwardProp: (prop) => prop !== "open",
|
|
37
38
|
})<AppBarProps>(({ theme }) => {
|
|
39
|
+
const AppInfo: AppInfo = useSelector((state: any) => state.AppInfo.value);
|
|
38
40
|
const AppLayout = useSelector((state: any) => state.AppLayout);
|
|
39
41
|
const isMobile = useIsMobile();
|
|
40
42
|
return {
|
|
@@ -109,40 +111,49 @@ const TopBar: React.FC = () => {
|
|
|
109
111
|
};
|
|
110
112
|
return (
|
|
111
113
|
<>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
114
|
+
{AppInfo.isUserProfileManaged ? (
|
|
115
|
+
<>
|
|
116
|
+
<ChangePasswordWindow>
|
|
117
|
+
<ChangePasswordPanel
|
|
118
|
+
selectedPerson={UserSession.value}
|
|
119
|
+
isSelfService={true}
|
|
120
|
+
onSuccessCallBk={() => {
|
|
121
|
+
setChangePasswordWindow(false);
|
|
122
|
+
}}
|
|
123
|
+
/>
|
|
124
|
+
</ChangePasswordWindow>
|
|
125
|
+
<Menu
|
|
126
|
+
sx={{ mt: "45px" }}
|
|
127
|
+
id="menu-appbar"
|
|
128
|
+
anchorEl={anchorElUser}
|
|
129
|
+
anchorOrigin={{
|
|
130
|
+
vertical: "top",
|
|
131
|
+
horizontal: "right",
|
|
132
|
+
}}
|
|
133
|
+
keepMounted
|
|
134
|
+
transformOrigin={{
|
|
135
|
+
vertical: "top",
|
|
136
|
+
horizontal: "right",
|
|
137
|
+
}}
|
|
138
|
+
open={Boolean(anchorElUser)}
|
|
139
|
+
onClose={handleCloseUserMenu}
|
|
140
|
+
>
|
|
141
|
+
<MenuItem
|
|
142
|
+
onClick={() => {
|
|
143
|
+
setChangePasswordWindow(true);
|
|
144
|
+
handleCloseUserMenu();
|
|
145
|
+
}}
|
|
146
|
+
>
|
|
147
|
+
<Typography sx={{ textAlign: "center" }}>
|
|
148
|
+
Change Password
|
|
149
|
+
</Typography>
|
|
150
|
+
</MenuItem>
|
|
151
|
+
</Menu>
|
|
152
|
+
</>
|
|
153
|
+
) : (
|
|
154
|
+
<></>
|
|
155
|
+
)}
|
|
156
|
+
|
|
146
157
|
<ChangeOrgWindow>
|
|
147
158
|
<ChangeOrgForm
|
|
148
159
|
successChangeCallBackFn={() => {
|
|
@@ -199,6 +210,7 @@ const TopBar: React.FC = () => {
|
|
|
199
210
|
}
|
|
200
211
|
>
|
|
201
212
|
<IconButton
|
|
213
|
+
sx={{ mx: 1 }}
|
|
202
214
|
color="inherit"
|
|
203
215
|
onClick={() => {
|
|
204
216
|
dispatch(
|
|
@@ -219,28 +231,33 @@ const TopBar: React.FC = () => {
|
|
|
219
231
|
)}
|
|
220
232
|
</IconButton>
|
|
221
233
|
</Tooltip>
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
<IconButton
|
|
230
|
-
color="inherit"
|
|
231
|
-
onClick={() => {
|
|
232
|
-
let nextLanguage = i18n.language === "ar" ? "en" : "ar";
|
|
233
|
-
changeLanguage(nextLanguage);
|
|
234
|
-
dispatch(
|
|
235
|
-
AppLayoutActions.setAppDirection(
|
|
236
|
-
nextLanguage === "ar" ? "rtl" : "ltr"
|
|
237
|
-
)
|
|
238
|
-
);
|
|
239
|
-
}}
|
|
234
|
+
{AppInfo.isLocalizationEnabled ? (
|
|
235
|
+
<Tooltip
|
|
236
|
+
title={
|
|
237
|
+
i18n.language === "ar"
|
|
238
|
+
? "Change Language To English"
|
|
239
|
+
: "Change Language To Arabic"
|
|
240
|
+
}
|
|
240
241
|
>
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
<IconButton
|
|
243
|
+
color="inherit"
|
|
244
|
+
onClick={() => {
|
|
245
|
+
let nextLanguage = i18n.language === "ar" ? "en" : "ar";
|
|
246
|
+
changeLanguage(nextLanguage);
|
|
247
|
+
dispatch(
|
|
248
|
+
AppLayoutActions.setAppDirection(
|
|
249
|
+
nextLanguage === "ar" ? "rtl" : "ltr"
|
|
250
|
+
)
|
|
251
|
+
);
|
|
252
|
+
}}
|
|
253
|
+
>
|
|
254
|
+
<FontAwesomeIcon icon="language" />
|
|
255
|
+
</IconButton>
|
|
256
|
+
</Tooltip>
|
|
257
|
+
) : (
|
|
258
|
+
<></>
|
|
259
|
+
)}
|
|
260
|
+
|
|
244
261
|
{UserSession.value?.userOrganizations &&
|
|
245
262
|
UserSession.value?.userOrganizations.length > 1 ? (
|
|
246
263
|
<Tooltip title="Change Current Organization">
|
package/src/main.tsx
CHANGED
|
@@ -7,8 +7,9 @@ createRoot(document.getElementById("root")!).render(
|
|
|
7
7
|
enableUINotifications={false}
|
|
8
8
|
appLogo={"/logo.png"}
|
|
9
9
|
appName="UI Base Library"
|
|
10
|
+
isUserProfileManaged={false}
|
|
10
11
|
loginScreenStyle={{
|
|
11
|
-
themeMode: "dark",
|
|
12
|
+
themeMode: "dark",
|
|
12
13
|
backgroundImageNameInPublicFolder: "bg.jpg",
|
|
13
14
|
}}
|
|
14
15
|
appVersion="25.12.12"
|
|
@@ -47,7 +47,7 @@ export const adminNavigationItems: TreeViewBaseItem<ExtendedTreeItemProps>[] = [
|
|
|
47
47
|
children: [
|
|
48
48
|
{
|
|
49
49
|
id: "development_admin.organization.modules",
|
|
50
|
-
label: "
|
|
50
|
+
label: "Subscribed Modules",
|
|
51
51
|
icon: "layer-group",
|
|
52
52
|
authority: "ORGANIZATION_ADMIN",
|
|
53
53
|
action: "NAVIGATION",
|
|
@@ -15,6 +15,8 @@ export type AppInfo = {
|
|
|
15
15
|
appName: string | null;
|
|
16
16
|
appVersion: string | null;
|
|
17
17
|
appLogo: any | null;
|
|
18
|
+
isUserProfileManaged?: boolean;
|
|
19
|
+
isLocalizationEnabled?: boolean;
|
|
18
20
|
businessLocals?: {
|
|
19
21
|
ar: { [key: string]: string };
|
|
20
22
|
en: { [key: string]: string };
|
|
@@ -54,6 +56,8 @@ const initialState: AppInfoProp = {
|
|
|
54
56
|
documentTitle: null,
|
|
55
57
|
apiBaseUrl: null,
|
|
56
58
|
authenticationMethod: "APP",
|
|
59
|
+
isUserProfileManaged: true,
|
|
60
|
+
isLocalizationEnabled: false,
|
|
57
61
|
appName: null,
|
|
58
62
|
appVersion: null,
|
|
59
63
|
appLogo: null,
|