l-min-components 1.0.701 → 1.0.708
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/AppMainLayout/index.jsx +26 -2
- package/src/components/deactivated/index.jsx +137 -0
- package/src/components/deactivated/modal/img/book.jsx +77 -0
- package/src/components/deactivated/modal/img/removeUser.png +0 -0
- package/src/components/deactivated/modal/index.styled.js +222 -0
- package/src/components/deactivated/modal/subscription-expired-modal.jsx +210 -0
- package/src/components/deactivated/useAccount.js +39 -0
- package/src/components/fileRightBar/enterpriseRightBar/index.jsx +64 -65
- package/src/components/fileRightBar/enterpriseRightBar/upgrade.jsx +5 -3
- package/src/components/fileRightBar/styles/index.jsx +268 -250
- package/src/components/header/getHeaderDetails.js +46 -1
- package/src/components/sideBar/sideMenu/index.jsx +5 -2
- package/src/components/sideBar/sideMenu/styles/index.jsx +39 -1
|
@@ -154,6 +154,46 @@ const handleGetNotificationMarkRead = async () => {
|
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
+
// current plan
|
|
158
|
+
const [{ ...userPlanData }, getUserPlan] = useAxios(
|
|
159
|
+
{
|
|
160
|
+
url: `/payment/v1/current_plan/`,
|
|
161
|
+
method: "GET",
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
{
|
|
165
|
+
manual: true,
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
const handleGetUserPlan = async () => {
|
|
170
|
+
try {
|
|
171
|
+
await getUserPlan();
|
|
172
|
+
} catch (err) {
|
|
173
|
+
console.log(err);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
//GET current subscription
|
|
178
|
+
const [{ ...getCurrentSubscriptionData }, getCurrentSubscription] = useAxios(
|
|
179
|
+
{
|
|
180
|
+
method: "GET",
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
manual: true,
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
const handleCurrentSubscription = async () => {
|
|
188
|
+
try {
|
|
189
|
+
await getCurrentSubscription({
|
|
190
|
+
url: `/payment/v1/current_subscription/`,
|
|
191
|
+
});
|
|
192
|
+
} catch (err) {
|
|
193
|
+
console.log(err);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
157
197
|
return {
|
|
158
198
|
handleGetUserDetails,
|
|
159
199
|
userDetails,
|
|
@@ -170,7 +210,12 @@ const handleGetNotificationMarkRead = async () => {
|
|
|
170
210
|
notificationMarkReadData,
|
|
171
211
|
handleGetNotificationMarkRead,
|
|
172
212
|
notificationData,
|
|
173
|
-
handleGetNotification
|
|
213
|
+
handleGetNotification,
|
|
214
|
+
|
|
215
|
+
userPlanData,
|
|
216
|
+
handleGetUserPlan,
|
|
217
|
+
getCurrentSubscriptionData,
|
|
218
|
+
handleCurrentSubscription
|
|
174
219
|
};
|
|
175
220
|
};
|
|
176
221
|
export default useHeader;
|
|
@@ -26,9 +26,11 @@ const SideMenu = ({
|
|
|
26
26
|
setIsOpen,
|
|
27
27
|
affiliatesActive,
|
|
28
28
|
setRightComponent,
|
|
29
|
+
planState
|
|
29
30
|
}) => {
|
|
30
31
|
console.log("user type", userType);
|
|
31
32
|
// const [isOpen, setIsOpen] = useState(false);
|
|
33
|
+
const [gracePeriod, setGracePeriod] = useState(true)
|
|
32
34
|
|
|
33
35
|
const { setGeneralData, generalData } = useContext(OutletContext);
|
|
34
36
|
const onToggle = () => {
|
|
@@ -258,6 +260,7 @@ const SideMenu = ({
|
|
|
258
260
|
};
|
|
259
261
|
const active = handlePathCheck();
|
|
260
262
|
|
|
263
|
+
|
|
261
264
|
return (
|
|
262
265
|
<NavigationItemContainer
|
|
263
266
|
onClick={() => {
|
|
@@ -289,7 +292,7 @@ const SideMenu = ({
|
|
|
289
292
|
}}
|
|
290
293
|
// to={route.path}
|
|
291
294
|
key={index}
|
|
292
|
-
className={cx(`${route.text} ${active ? "active" : ""}`)}
|
|
295
|
+
className={cx(`${route.text} ${active && planState !== "GRACE PERIOD" ? "active" : active && planState === "GRACE PERIOD" ? "grace_period_active" : "grace_period"}`)}
|
|
293
296
|
minimal={isOpen}
|
|
294
297
|
>
|
|
295
298
|
<IconContainer active={active}>
|
|
@@ -308,7 +311,7 @@ const SideMenu = ({
|
|
|
308
311
|
};
|
|
309
312
|
|
|
310
313
|
return (
|
|
311
|
-
<SideMenuContainer isOpen={isOpen}>
|
|
314
|
+
<SideMenuContainer isOpen={isOpen} className={planState === "GRACE PERIOD" ? "grace_period disabled" : ""}>
|
|
312
315
|
<UserCard user={user} isOpen={isOpen} />
|
|
313
316
|
|
|
314
317
|
<NavigationContainer>
|
|
@@ -18,6 +18,11 @@ export const SideMenuContainer = styled.div`
|
|
|
18
18
|
border-radius: 30px;
|
|
19
19
|
margin-left: 77px;
|
|
20
20
|
|
|
21
|
+
&.disabled {
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
.toggle {
|
|
22
27
|
width: 20px;
|
|
23
28
|
height: 20px;
|
|
@@ -31,6 +36,13 @@ export const SideMenuContainer = styled.div`
|
|
|
31
36
|
right: -13px;
|
|
32
37
|
color: #fdcf04;
|
|
33
38
|
}
|
|
39
|
+
|
|
40
|
+
/* GRACE PERIOD AND DEACTIVATE */
|
|
41
|
+
&.grace_period {
|
|
42
|
+
border-radius: 30px;
|
|
43
|
+
background: var(--Neutral-30, #c6cccc);
|
|
44
|
+
/* color: #fff; */
|
|
45
|
+
}
|
|
34
46
|
`;
|
|
35
47
|
|
|
36
48
|
export const NavigationContainer = styled.div`
|
|
@@ -49,7 +61,9 @@ export const NavigationItemContainer = styled.p`
|
|
|
49
61
|
position: relative;
|
|
50
62
|
padding: ${({ minimal }) => (minimal ? "12px 16px" : "12px 12px")};
|
|
51
63
|
color: ${({ active }) =>
|
|
52
|
-
active
|
|
64
|
+
active
|
|
65
|
+
? "rgb(255, 255, 255) !important"
|
|
66
|
+
: "rgba(255, 255, 255, 0.625) !important"};
|
|
53
67
|
&:hover {
|
|
54
68
|
color: #ffffff !important;
|
|
55
69
|
background-color: #31cdcd;
|
|
@@ -75,6 +89,30 @@ export const NavigationItemContainer = styled.p`
|
|
|
75
89
|
background: #febf10;
|
|
76
90
|
}
|
|
77
91
|
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
/* GRACE PERIOD AND DEACTIVATED */
|
|
95
|
+
&.grace_period{
|
|
96
|
+
background: var(--Neutral-40, #ADB2B2);
|
|
97
|
+
margin: 2px 0px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&.grace_period_active {
|
|
101
|
+
background: var(--Neutral-50, #949999);
|
|
102
|
+
color: #ffffff;
|
|
103
|
+
margin: 2px 0px;
|
|
104
|
+
&::before {
|
|
105
|
+
content: "";
|
|
106
|
+
height: 110%;
|
|
107
|
+
width: 5px;
|
|
108
|
+
border-radius: 0 10px 10px 0;
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: -5%;
|
|
111
|
+
left: 0;
|
|
112
|
+
display: block;
|
|
113
|
+
background: #949999;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
78
116
|
`;
|
|
79
117
|
|
|
80
118
|
export const IconContainer = styled.div`
|