l-min-components 1.0.708 → 1.0.715
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
|
@@ -222,7 +222,8 @@ const AppMainLayout = () => {
|
|
|
222
222
|
/>
|
|
223
223
|
)}
|
|
224
224
|
|
|
225
|
-
{window.location.pathname.includes("enterprise") &&
|
|
225
|
+
{window.location.pathname.includes("enterprise") &&
|
|
226
|
+
planState === "GRACE PERIOD" ? (
|
|
226
227
|
<GracePeriod
|
|
227
228
|
getCurrentSubscriptionData={getCurrentSubscriptionData}
|
|
228
229
|
handleCurrentSubscription={handleCurrentSubscription}
|
|
@@ -238,7 +239,11 @@ const AppMainLayout = () => {
|
|
|
238
239
|
{rightComponent ??
|
|
239
240
|
(window.location.pathname.includes("enterprise") &&
|
|
240
241
|
!window.location.pathname.includes("file-manager") ? (
|
|
241
|
-
<EnterpriseRightBar
|
|
242
|
+
<EnterpriseRightBar
|
|
243
|
+
gracePeriod={gracePeriod}
|
|
244
|
+
setGracePeriod={setGracePeriod}
|
|
245
|
+
planState={planState}
|
|
246
|
+
/>
|
|
242
247
|
) : window.location.pathname.includes("personal/dashboard") ? (
|
|
243
248
|
<PersonalRightBar />
|
|
244
249
|
) : window.location.pathname.includes("personal/addons") ? (
|
|
@@ -246,7 +251,7 @@ const AppMainLayout = () => {
|
|
|
246
251
|
) : window.location.pathname.includes("personal/courses") ? (
|
|
247
252
|
<InstructorRightBar personal />
|
|
248
253
|
) : window.location.pathname.includes(
|
|
249
|
-
"personal/library/selectlanguage"
|
|
254
|
+
"personal/library/selectlanguage",
|
|
250
255
|
) ? (
|
|
251
256
|
<InstructorRightBar personal />
|
|
252
257
|
) : window.location.pathname.includes("personal/library") ? (
|
|
@@ -1,51 +1,58 @@
|
|
|
1
|
-
import React, { useState } from
|
|
2
|
-
import DatePicker from
|
|
3
|
-
import { CalendarIcon } from
|
|
4
|
-
import { DownloadIcon } from
|
|
5
|
-
import CustomDatePickerHeader from
|
|
6
|
-
import { DatePickerWrapper, DateCont
|
|
7
|
-
import moment from
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import DatePicker from 'react-datepicker';
|
|
3
|
+
import { CalendarIcon } from './svg/calendar';
|
|
4
|
+
import { DownloadIcon } from './svg/download';
|
|
5
|
+
import CustomDatePickerHeader from './dateNavigation';
|
|
6
|
+
import { DatePickerWrapper, DateCont } from './style';
|
|
7
|
+
import moment from 'moment';
|
|
8
8
|
|
|
9
9
|
const DatePickerCalender = ({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
borderColor,
|
|
11
|
+
opacity,
|
|
12
|
+
dateFormat,
|
|
13
|
+
icon,
|
|
14
|
+
...props
|
|
14
15
|
}) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const [dateRange, setDateRange] = useState({
|
|
17
|
+
startDate: new Date(),
|
|
18
|
+
endDate: new Date(),
|
|
19
|
+
});
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
return (
|
|
22
|
+
<DatePickerWrapper {...props}>
|
|
23
|
+
<DateCont
|
|
24
|
+
className="datepicker__wrapper"
|
|
25
|
+
borderColor={borderColor}
|
|
26
|
+
opacity={opacity}
|
|
27
|
+
>
|
|
28
|
+
<DatePicker
|
|
29
|
+
selected={dateRange.endDate}
|
|
30
|
+
endDate={dateRange.endDate}
|
|
31
|
+
dateFormat={dateFormat ? dateFormat : 'd MMM yyyy'}
|
|
32
|
+
renderCustomHeader={({ date, decreaseMonth, increaseMonth }) => (
|
|
33
|
+
<CustomDatePickerHeader
|
|
34
|
+
selected={date}
|
|
35
|
+
onMonthChange={(value) => {
|
|
29
36
|
if (value === -1) {
|
|
30
|
-
|
|
37
|
+
decreaseMonth();
|
|
31
38
|
} else if (value === 1) {
|
|
32
|
-
|
|
39
|
+
increaseMonth();
|
|
33
40
|
}
|
|
34
|
-
|
|
35
|
-
)}
|
|
36
|
-
onChange={(dates) =>
|
|
37
|
-
setDateRange({
|
|
38
|
-
...dateRange,
|
|
39
|
-
endDate: dates,
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
calendarClassName="datepicker_style"
|
|
41
|
+
}}
|
|
43
42
|
/>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
)}
|
|
44
|
+
onChange={(dates) =>
|
|
45
|
+
setDateRange({
|
|
46
|
+
...dateRange,
|
|
47
|
+
endDate: dates,
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
calendarClassName="datepicker_style"
|
|
51
|
+
/>
|
|
52
|
+
{icon ? icon : <CalendarIcon />}
|
|
53
|
+
</DateCont>
|
|
54
|
+
</DatePickerWrapper>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
47
57
|
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export default DatePickerCalender
|
|
58
|
+
export default DatePickerCalender;
|
|
@@ -26,11 +26,11 @@ const SideMenu = ({
|
|
|
26
26
|
setIsOpen,
|
|
27
27
|
affiliatesActive,
|
|
28
28
|
setRightComponent,
|
|
29
|
-
planState
|
|
29
|
+
planState,
|
|
30
30
|
}) => {
|
|
31
31
|
console.log("user type", userType);
|
|
32
32
|
// const [isOpen, setIsOpen] = useState(false);
|
|
33
|
-
|
|
33
|
+
const [gracePeriod, setGracePeriod] = useState(true);
|
|
34
34
|
|
|
35
35
|
const { setGeneralData, generalData } = useContext(OutletContext);
|
|
36
36
|
const onToggle = () => {
|
|
@@ -52,10 +52,6 @@ const SideMenu = ({
|
|
|
52
52
|
}
|
|
53
53
|
}, [userType]);
|
|
54
54
|
|
|
55
|
-
console.log("====================================");
|
|
56
|
-
console.log(filteredRoutes, "rar");
|
|
57
|
-
console.log("====================================");
|
|
58
|
-
|
|
59
55
|
const [routeFilter, setRouteFilter] = useState();
|
|
60
56
|
useEffect(() => {
|
|
61
57
|
setRouteFilter(filteredRoutes);
|
|
@@ -260,7 +256,6 @@ const SideMenu = ({
|
|
|
260
256
|
};
|
|
261
257
|
const active = handlePathCheck();
|
|
262
258
|
|
|
263
|
-
|
|
264
259
|
return (
|
|
265
260
|
<NavigationItemContainer
|
|
266
261
|
onClick={() => {
|
|
@@ -292,7 +287,18 @@ const SideMenu = ({
|
|
|
292
287
|
}}
|
|
293
288
|
// to={route.path}
|
|
294
289
|
key={index}
|
|
295
|
-
className={cx(
|
|
290
|
+
className={cx(
|
|
291
|
+
`${route.text} ${
|
|
292
|
+
active && "active"
|
|
293
|
+
// active && planState !== "GRACE PERIOD"
|
|
294
|
+
// ? "active"
|
|
295
|
+
// : active && planState === "GRACE PERIOD"
|
|
296
|
+
// ? "grace_period_active"
|
|
297
|
+
// : !active && planState === "GRACE PERIOD"
|
|
298
|
+
// ? "grace_period"
|
|
299
|
+
// : ""
|
|
300
|
+
}`
|
|
301
|
+
)}
|
|
296
302
|
minimal={isOpen}
|
|
297
303
|
>
|
|
298
304
|
<IconContainer active={active}>
|
|
@@ -311,7 +317,10 @@ const SideMenu = ({
|
|
|
311
317
|
};
|
|
312
318
|
|
|
313
319
|
return (
|
|
314
|
-
<SideMenuContainer
|
|
320
|
+
<SideMenuContainer
|
|
321
|
+
isOpen={isOpen}
|
|
322
|
+
// className={planState === "GRACE PERIOD" ? "grace_period disabled" : ""}
|
|
323
|
+
>
|
|
315
324
|
<UserCard user={user} isOpen={isOpen} />
|
|
316
325
|
|
|
317
326
|
<NavigationContainer>
|