l-min-components 1.0.598 → 1.0.604
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 +1 -1
- package/src/components/AdminRolesPermission/assets/images/avatar.png +0 -0
- package/src/components/AdminRolesPermission/assets/images/roles_img.png +0 -0
- package/src/components/AdminRolesPermission/assets/svg/backArrow.jsx +30 -0
- package/src/components/AdminRolesPermission/create/admins.jsx +88 -0
- package/src/components/AdminRolesPermission/create/data.js +129 -0
- package/src/components/AdminRolesPermission/create/index.jsx +42 -0
- package/src/components/AdminRolesPermission/create/index.styled.js +346 -0
- package/src/components/AdminRolesPermission/create/permissions.jsx +59 -0
- package/src/components/AdminRolesPermission/create/role-name.jsx +92 -0
- package/src/components/AdminRolesPermission/index.jsx +44 -0
- package/src/components/AdminRolesPermission/index.styled.js +76 -0
- package/src/components/AdminRolesPermission/main.jsx +11 -0
- package/src/components/AdminSecuritySettings/2fa/index.jsx +221 -0
- package/src/components/AdminSecuritySettings/2fa/index.styled.js +198 -0
- package/src/components/AdminSecuritySettings/assets/images/qr_code.png +0 -0
- package/src/components/AdminSecuritySettings/assets/images/shield.png +0 -0
- package/src/components/AdminSecuritySettings/assets/images/shield_big.png +0 -0
- package/src/components/AdminSecuritySettings/assets/images/subtract.png +0 -0
- package/src/components/AdminSecuritySettings/assets/images/twofa.png +0 -0
- package/src/components/AdminSecuritySettings/assets/svg/backArrow.jsx +30 -0
- package/src/components/AdminSecuritySettings/index.jsx +89 -0
- package/src/components/AdminSecuritySettings/index.styled.js +97 -0
- package/src/components/AdminSecuritySettings/modals/index.styled.js +356 -0
- package/src/components/AdminSecuritySettings/modals/opt-out-modal.jsx +88 -0
- package/src/components/AdminSecuritySettings/modals/otp-password-modal.jsx +158 -0
- package/src/components/AdminSecuritySettings/modals/security-question-modal.jsx +93 -0
- package/src/components/AdminSecuritySettings/modals/success-modal.jsx +75 -0
- package/src/components/AdminSecuritySettings/password/change-password.jsx +79 -0
- package/src/components/AdminSecuritySettings/password/index.jsx +28 -0
- package/src/components/AdminSecuritySettings/password/index.styled.js +41 -0
- package/src/components/index.js +1 -1
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export const BackArrowIcon = () => {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
width="24"
|
|
8
|
+
height="25"
|
|
9
|
+
viewBox="0 0 24 25"
|
|
10
|
+
fill="none"
|
|
11
|
+
>
|
|
12
|
+
<g clipPath="url(#clip0_3085_48537)">
|
|
13
|
+
<path
|
|
14
|
+
d="M20 11.5H7.83L13.42 5.91L12 4.5L4 12.5L12 20.5L13.41 19.09L7.83 13.5H20V11.5Z"
|
|
15
|
+
fill="#323232"
|
|
16
|
+
/>
|
|
17
|
+
</g>
|
|
18
|
+
<defs>
|
|
19
|
+
<clipPath id="clip0_3085_48537">
|
|
20
|
+
<rect
|
|
21
|
+
width="24"
|
|
22
|
+
height="24"
|
|
23
|
+
fill="white"
|
|
24
|
+
transform="translate(0 0.5)"
|
|
25
|
+
/>
|
|
26
|
+
</clipPath>
|
|
27
|
+
</defs>
|
|
28
|
+
</svg>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { AdminsContainer } from "./index.styled";
|
|
3
|
+
import ButtonComponent from "../../button";
|
|
4
|
+
import { adminList } from "./data";
|
|
5
|
+
import Checkbox from "../../checkBoxes/checkbox/index2";
|
|
6
|
+
import avatar from "../assets/images/avatar.png";
|
|
7
|
+
import { IoFilterSharp } from "react-icons/io5";
|
|
8
|
+
import SearchBar from "../../searchBar";
|
|
9
|
+
|
|
10
|
+
const Admins = () => {
|
|
11
|
+
const [open, setOpen] = useState(false);
|
|
12
|
+
const handleChange = (newValue) => {
|
|
13
|
+
setChecked(newValue);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<AdminsContainer>
|
|
18
|
+
<div className="ad_header">
|
|
19
|
+
<p className="ad_title">Admins</p>
|
|
20
|
+
<ButtonComponent
|
|
21
|
+
text={"Save & Add"}
|
|
22
|
+
styles={{ width: "120px", padding: 10, height: 40 }}
|
|
23
|
+
onClick={(e) => {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
}}
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div className="ad_filter_row">
|
|
30
|
+
<SearchBar
|
|
31
|
+
placeholder="Search Admins"
|
|
32
|
+
outlineColor="transparent"
|
|
33
|
+
heightSize="44px"
|
|
34
|
+
widthSize="100%"
|
|
35
|
+
border="1px solid #ADB2B2"
|
|
36
|
+
// onSubmit={setSearch}
|
|
37
|
+
/>
|
|
38
|
+
|
|
39
|
+
<div className="ad_drop_filter">
|
|
40
|
+
<div className="ad_filter_box" onClick={() => setOpen(!open)}>
|
|
41
|
+
<IoFilterSharp />
|
|
42
|
+
All
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
{open && (
|
|
46
|
+
<div className="ad_filter_body">
|
|
47
|
+
<p className="afb_item"> Manager</p>
|
|
48
|
+
<p className="afb_item"> IT</p>
|
|
49
|
+
<p className="afb_item"> Security </p>
|
|
50
|
+
<p className="afb_item"> CMS </p>
|
|
51
|
+
<p className="afb_item"> Unassigned </p>
|
|
52
|
+
<p className="afb_item"> Undefined</p>
|
|
53
|
+
</div>
|
|
54
|
+
)}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div className="ad_body">
|
|
59
|
+
{adminList?.map((item, idx) => (
|
|
60
|
+
<div className="ad_list_row" key={idx}>
|
|
61
|
+
<div className="adl_box">
|
|
62
|
+
<Checkbox
|
|
63
|
+
label=""
|
|
64
|
+
color="#ff9900"
|
|
65
|
+
defaultValue={item.selection}
|
|
66
|
+
onChange={handleChange}
|
|
67
|
+
className="adm_check"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div className="adl_wrapper">
|
|
72
|
+
<div className="adl_img">
|
|
73
|
+
<img src={item?.image} alt="" />
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div>
|
|
77
|
+
<p className="adl_title">{item?.name}</p>
|
|
78
|
+
<span className="adl_stat"> {item?.status}</span>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
))}
|
|
83
|
+
</div>
|
|
84
|
+
</AdminsContainer>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default Admins;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import avatar from "../assets/images/avatar.png"
|
|
2
|
+
|
|
3
|
+
export const permissionsData = [
|
|
4
|
+
{
|
|
5
|
+
title: "Skill Test",
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
title: "Lesson",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
title: "Manage Content",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: "Flagged Content",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: "Jet Fuel",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: "Settings",
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export const roleList = [
|
|
25
|
+
{
|
|
26
|
+
name: "Statistics",
|
|
27
|
+
level: 3
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "CMS",
|
|
31
|
+
level: 3
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "Support",
|
|
35
|
+
level: 3
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "Admin",
|
|
39
|
+
level: 3
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "Statistics",
|
|
43
|
+
level: 3
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "Statistics",
|
|
47
|
+
level: 3
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "Statistics",
|
|
51
|
+
level: 3
|
|
52
|
+
},
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
export const adminList = [
|
|
57
|
+
{
|
|
58
|
+
name: "Acme Co.",
|
|
59
|
+
status: "Unassigned",
|
|
60
|
+
image: avatar,
|
|
61
|
+
selection: false,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "Acme Co.",
|
|
65
|
+
status: "Unassigned",
|
|
66
|
+
image: avatar,
|
|
67
|
+
selection: false,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "Acme Co.",
|
|
71
|
+
status: "Unassigned",
|
|
72
|
+
image: avatar,
|
|
73
|
+
selection: false,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "Acme Co.",
|
|
77
|
+
status: "Unassigned",
|
|
78
|
+
image: avatar,
|
|
79
|
+
selection: false,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "Acme Co.",
|
|
83
|
+
status: "Unassigned",
|
|
84
|
+
image: avatar,
|
|
85
|
+
selection: false,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "Acme Co.",
|
|
89
|
+
status: "Unassigned",
|
|
90
|
+
image: avatar,
|
|
91
|
+
selection: false,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "Acme Co.",
|
|
95
|
+
status: "Unassigned",
|
|
96
|
+
image: avatar,
|
|
97
|
+
selection: false,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "Acme Co.",
|
|
101
|
+
status: "Unassigned",
|
|
102
|
+
image: avatar,
|
|
103
|
+
selection: false,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "Acme Co.",
|
|
107
|
+
status: "Unassigned",
|
|
108
|
+
image: avatar,
|
|
109
|
+
selection: false,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "Acme Co.",
|
|
113
|
+
status: "Unassigned",
|
|
114
|
+
image: avatar,
|
|
115
|
+
selection: false,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "Acme Co.",
|
|
119
|
+
status: "Unassigned",
|
|
120
|
+
image: avatar,
|
|
121
|
+
selection: false,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "Acme Co.",
|
|
125
|
+
status: "Unassigned",
|
|
126
|
+
image: avatar,
|
|
127
|
+
selection: false,
|
|
128
|
+
},
|
|
129
|
+
]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { AdminRolesCreateContainer } from "./index.styled";
|
|
3
|
+
import { BackArrowIcon } from "../assets/svg/backArrow";
|
|
4
|
+
import RoleName from "./role-name";
|
|
5
|
+
import Permissions from "./permissions";
|
|
6
|
+
import Admins from "./admins";
|
|
7
|
+
|
|
8
|
+
const AdminRolesCreate = () => {
|
|
9
|
+
const [type, setType] = useState("permissions");
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<AdminRolesCreateContainer>
|
|
13
|
+
<div className="arp_header">
|
|
14
|
+
<p className="arp_title">
|
|
15
|
+
<span onClick={() => navigate(-1)}>
|
|
16
|
+
<BackArrowIcon />
|
|
17
|
+
</span>
|
|
18
|
+
Create New Role{" "}
|
|
19
|
+
</p>
|
|
20
|
+
<p className="arp_ref">
|
|
21
|
+
Settings <span className="slash">/</span> Roles&permissions{" "}
|
|
22
|
+
<span className="slash">/</span> <span>Create New</span>
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div className="arp_create_row">
|
|
27
|
+
<div className="arp_detail_one">
|
|
28
|
+
<RoleName />
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div className="hr_line"></div>
|
|
32
|
+
|
|
33
|
+
<div className="arp_role_list">
|
|
34
|
+
{type === "permissions" && <Admins />}
|
|
35
|
+
{type === "permissions" && <Permissions />}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</AdminRolesCreateContainer>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default AdminRolesCreate;
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const AdminRolesCreateContainer = styled.div`
|
|
4
|
+
.hr_line {
|
|
5
|
+
border-radius: 31px;
|
|
6
|
+
background: #d9d9d9;
|
|
7
|
+
height: 100vh;
|
|
8
|
+
width: 1px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.arp_header {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
margin-bottom: 20px;
|
|
16
|
+
|
|
17
|
+
.arp_title {
|
|
18
|
+
color: #1c2434;
|
|
19
|
+
font-size: 18px;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 10px;
|
|
24
|
+
span {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.arp_ref {
|
|
31
|
+
color: #64748b;
|
|
32
|
+
font-size: 16px;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
line-height: normal;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 8px;
|
|
38
|
+
|
|
39
|
+
span {
|
|
40
|
+
color: #3c50e0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.slash {
|
|
44
|
+
color: #64748b;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.arp_create_row {
|
|
50
|
+
display: flex;
|
|
51
|
+
width: 100%;
|
|
52
|
+
|
|
53
|
+
.arp_detail_one {
|
|
54
|
+
width: 40%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.arp_role_list {
|
|
58
|
+
width: 58%;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
export const RoleNameContainer = styled.div`
|
|
64
|
+
padding-right: 31px;
|
|
65
|
+
|
|
66
|
+
.rl_title {
|
|
67
|
+
color: #c6cccc;
|
|
68
|
+
font-size: 40px;
|
|
69
|
+
font-weight: 700;
|
|
70
|
+
margin-bottom: 20px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.rl_perm_txt {
|
|
74
|
+
color: #4a4d4d;
|
|
75
|
+
font-size: 20px;
|
|
76
|
+
font-weight: 600;
|
|
77
|
+
letter-spacing: 0.4px;
|
|
78
|
+
margin-bottom: 6px;
|
|
79
|
+
}
|
|
80
|
+
.rl_perm_subtxt {
|
|
81
|
+
color: #adb2b2;
|
|
82
|
+
font-size: 16px;
|
|
83
|
+
font-weight: 400;
|
|
84
|
+
letter-spacing: 0.32px;
|
|
85
|
+
margin-bottom: 16px;
|
|
86
|
+
}
|
|
87
|
+
.role_list_row {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: 10px;
|
|
91
|
+
margin-bottom: 16px;
|
|
92
|
+
|
|
93
|
+
.rlr_col {
|
|
94
|
+
padding: 8px;
|
|
95
|
+
height: 28px;
|
|
96
|
+
border-radius: 44px;
|
|
97
|
+
border: 1px solid #099;
|
|
98
|
+
background: rgba(0, 194, 194, 0.1);
|
|
99
|
+
display: flex;
|
|
100
|
+
gap: 10px;
|
|
101
|
+
align-items: center;
|
|
102
|
+
color: #099;
|
|
103
|
+
font-size: 12px;
|
|
104
|
+
font-weight: 500;
|
|
105
|
+
letter-spacing: 0.24px;
|
|
106
|
+
|
|
107
|
+
span {
|
|
108
|
+
border-radius: 100%;
|
|
109
|
+
background: #00c2c2;
|
|
110
|
+
width: 16px;
|
|
111
|
+
height: 16px;
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
color: #fff;
|
|
116
|
+
font-size: 12px;
|
|
117
|
+
font-weight: 500;
|
|
118
|
+
letter-spacing: 0.24px;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.rlr_others {
|
|
123
|
+
margin-left: 6px;
|
|
124
|
+
color: #099;
|
|
125
|
+
font-size: 15px;
|
|
126
|
+
font-weight: 700;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.admins_row {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 6px;
|
|
136
|
+
margin-bottom: 16px;
|
|
137
|
+
|
|
138
|
+
.adm_others {
|
|
139
|
+
margin-left: 6px;
|
|
140
|
+
color: #00c2c2;
|
|
141
|
+
font-size: 16px;
|
|
142
|
+
font-weight: 600;
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.adm_img_group {
|
|
148
|
+
position: relative;
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
max-width: 90px;
|
|
152
|
+
width: 100%;
|
|
153
|
+
|
|
154
|
+
.adr_img {
|
|
155
|
+
width: 38px;
|
|
156
|
+
height: 38px;
|
|
157
|
+
border-radius: 100%;
|
|
158
|
+
border: 1px solid #c6cccc;
|
|
159
|
+
background: #c6cccc;
|
|
160
|
+
|
|
161
|
+
&:nth-child(2) {
|
|
162
|
+
position: absolute;
|
|
163
|
+
left: 26px;
|
|
164
|
+
}
|
|
165
|
+
&:nth-child(3) {
|
|
166
|
+
position: absolute;
|
|
167
|
+
left: 53px;
|
|
168
|
+
}
|
|
169
|
+
img {
|
|
170
|
+
width: 100%;
|
|
171
|
+
border-radius: 100%;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
`;
|
|
177
|
+
|
|
178
|
+
export const PermissionsContainer = styled.div`
|
|
179
|
+
padding-left: 25px;
|
|
180
|
+
|
|
181
|
+
.pm_header {
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
justify-content: space-between;
|
|
185
|
+
gap: 24px;
|
|
186
|
+
margin-bottom: 26px;
|
|
187
|
+
|
|
188
|
+
.pm_title {
|
|
189
|
+
color: #4a4d4d;
|
|
190
|
+
font-size: 24px;
|
|
191
|
+
font-weight: 700;
|
|
192
|
+
line-height: normal;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
`;
|
|
196
|
+
|
|
197
|
+
export const PermissionsAccordion = styled.div`
|
|
198
|
+
border-radius: 12px;
|
|
199
|
+
background: #f5f7f7;
|
|
200
|
+
padding: 12px;
|
|
201
|
+
margin-bottom: 20px;
|
|
202
|
+
transition: 0.3 all;
|
|
203
|
+
|
|
204
|
+
.rc-accordion-toggle {
|
|
205
|
+
position: relative;
|
|
206
|
+
display: flex;
|
|
207
|
+
justify-content: space-between;
|
|
208
|
+
color: #636666;
|
|
209
|
+
align-items: center;
|
|
210
|
+
font-size: 16px;
|
|
211
|
+
font-weight: 700;
|
|
212
|
+
|
|
213
|
+
span {
|
|
214
|
+
display: flex;
|
|
215
|
+
align-items: center;
|
|
216
|
+
justify-content: center;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.rc-collapse {
|
|
221
|
+
position: relative;
|
|
222
|
+
height: 0;
|
|
223
|
+
overflow: hidden;
|
|
224
|
+
transition: height 0.35s ease;
|
|
225
|
+
}
|
|
226
|
+
.rc-collapse.show {
|
|
227
|
+
height: auto;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.rc-accordion-toggle.active .rc-accordion-icon {
|
|
231
|
+
transform: rotate(180deg);
|
|
232
|
+
}
|
|
233
|
+
`;
|
|
234
|
+
|
|
235
|
+
export const AdminsContainer = styled.div`
|
|
236
|
+
padding-left: 25px;
|
|
237
|
+
|
|
238
|
+
.ad_header {
|
|
239
|
+
display: flex;
|
|
240
|
+
align-items: center;
|
|
241
|
+
justify-content: space-between;
|
|
242
|
+
gap: 24px;
|
|
243
|
+
margin-bottom: 26px;
|
|
244
|
+
|
|
245
|
+
.ad_title {
|
|
246
|
+
color: #4a4d4d;
|
|
247
|
+
font-size: 24px;
|
|
248
|
+
font-weight: 700;
|
|
249
|
+
line-height: normal;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.ad_filter_row {
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
gap: 11px;
|
|
257
|
+
width: 100%;
|
|
258
|
+
justify-content: space-between;
|
|
259
|
+
|
|
260
|
+
.ad_drop_filter {
|
|
261
|
+
position: relative;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.ad_filter_box {
|
|
265
|
+
border-radius: 12px;
|
|
266
|
+
border: 1px solid #c6cccc;
|
|
267
|
+
background: #fff;
|
|
268
|
+
min-width: 170px;
|
|
269
|
+
height: 44px;
|
|
270
|
+
padding: 10px 20px;
|
|
271
|
+
display: flex;
|
|
272
|
+
gap: 10px;
|
|
273
|
+
align-items: center;
|
|
274
|
+
color: #636666;
|
|
275
|
+
font-size: 14px;
|
|
276
|
+
font-weight: 600;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.ad_filter_body {
|
|
280
|
+
position: absolute;
|
|
281
|
+
top: 50px;
|
|
282
|
+
left: 0;
|
|
283
|
+
min-width: 170px;
|
|
284
|
+
border-radius: 8px;
|
|
285
|
+
background: #fff;
|
|
286
|
+
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.1);
|
|
287
|
+
height: 236px;
|
|
288
|
+
padding: 8px;
|
|
289
|
+
.afb_item {
|
|
290
|
+
padding: 8px;
|
|
291
|
+
color: #1c1c1c;
|
|
292
|
+
font-family: "Inter";
|
|
293
|
+
font-size: 14px;
|
|
294
|
+
font-weight: 400;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.ad_body {
|
|
300
|
+
.ad_list_row {
|
|
301
|
+
display: flex;
|
|
302
|
+
padding: 14px 0;
|
|
303
|
+
align-items: center;
|
|
304
|
+
border-bottom: 1px solid #dfe5e5;
|
|
305
|
+
|
|
306
|
+
.adl_box {
|
|
307
|
+
margin-right: 16px;
|
|
308
|
+
.adm_check > span {
|
|
309
|
+
border-radius: 8px;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.adl_wrapper {
|
|
314
|
+
display: flex;
|
|
315
|
+
gap: 8px;
|
|
316
|
+
align-items: center;
|
|
317
|
+
.adl_img {
|
|
318
|
+
width: 38px;
|
|
319
|
+
height: 38px;
|
|
320
|
+
background: #c6cccc;
|
|
321
|
+
border-radius: 100%;
|
|
322
|
+
img {
|
|
323
|
+
width: 100%;
|
|
324
|
+
border-radius: 100%;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.adl_title {
|
|
329
|
+
color: #03091d;
|
|
330
|
+
font-size: 16px;
|
|
331
|
+
font-weight: 600;
|
|
332
|
+
margin-bottom: 2px;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.adl_stat {
|
|
336
|
+
padding: 1px 6px;
|
|
337
|
+
border-radius: 37px;
|
|
338
|
+
background: #f5f7f7;
|
|
339
|
+
color: #949999;
|
|
340
|
+
font-size: 12px;
|
|
341
|
+
font-weight: 600;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
`;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { useState, useRef } from "react";
|
|
2
|
+
import { PermissionsAccordion, PermissionsContainer } from "./index.styled";
|
|
3
|
+
import ButtonComponent from "../../button";
|
|
4
|
+
import { permissionsData } from "./data";
|
|
5
|
+
import { IoChevronDown } from "react-icons/io5";
|
|
6
|
+
|
|
7
|
+
const Permissions = () => {
|
|
8
|
+
const contentEl = useRef();
|
|
9
|
+
const [active, setActive] = useState(null);
|
|
10
|
+
|
|
11
|
+
const handleToggle = (index) => {
|
|
12
|
+
if (active === index) {
|
|
13
|
+
setActive(null);
|
|
14
|
+
} else {
|
|
15
|
+
setActive(index);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return (
|
|
19
|
+
<PermissionsContainer>
|
|
20
|
+
<div className="pm_header">
|
|
21
|
+
<p className="pm_title">Permissions</p>
|
|
22
|
+
<ButtonComponent
|
|
23
|
+
text={"Save & Add"}
|
|
24
|
+
styles={{ width: "120px", padding: 10, height: 40 }}
|
|
25
|
+
onClick={(e) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div className="pm_body">
|
|
32
|
+
{permissionsData?.map((item, idx) => (
|
|
33
|
+
<PermissionsAccordion key={idx}>
|
|
34
|
+
<div
|
|
35
|
+
className={`rc-accordion-toggle ${
|
|
36
|
+
active === idx ? "active" : ""
|
|
37
|
+
}`}
|
|
38
|
+
onClick={() => handleToggle(idx)}
|
|
39
|
+
>
|
|
40
|
+
{item?.title}
|
|
41
|
+
|
|
42
|
+
<span className="rc-accordion-icon">
|
|
43
|
+
<IoChevronDown />
|
|
44
|
+
</span>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div
|
|
48
|
+
ref={contentEl}
|
|
49
|
+
className={`rc-collapse ${active === idx ? "show" : ""}`}
|
|
50
|
+
style={active === idx ? { height: "auto" } : { height: "0px" }}
|
|
51
|
+
></div>
|
|
52
|
+
</PermissionsAccordion>
|
|
53
|
+
))}
|
|
54
|
+
</div>
|
|
55
|
+
</PermissionsContainer>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default Permissions;
|