@codezee/sixtify-brahma 0.2.78 → 0.2.80
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/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerMenuItemList.d.ts +3 -1
- package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerMenuItemList.d.ts.map +1 -1
- package/packages/shared-components/dist/Drawer/CloseDrawer/CloseDrawerMenuItemList.js +1 -2
- package/packages/shared-components/dist/Drawer/Drawer.d.ts +1 -1
- package/packages/shared-components/dist/Drawer/Drawer.d.ts.map +1 -1
- package/packages/shared-components/dist/Drawer/Drawer.js +6 -1
- package/packages/shared-components/dist/Timeline/Timeline.js +2 -2
- package/packages/shared-components/dist/Timeline/TimelineTrackSegments.d.ts.map +1 -1
- package/packages/shared-components/dist/Timeline/TimelineTrackSegments.js +29 -16
- package/packages/shared-components/dist/utils/colorVariant.d.ts +3 -3
- package/packages/shared-components/dist/utils/colorVariant.d.ts.map +1 -1
- package/packages/shared-components/dist/utils/colorVariant.js +6 -1
package/package.json
CHANGED
|
@@ -2,7 +2,9 @@ import type { MenuItem } from "../Drawer";
|
|
|
2
2
|
type CloseDrawerMenuItemListProps = {
|
|
3
3
|
menuItems: MenuItem[];
|
|
4
4
|
currentPathname: string;
|
|
5
|
+
anchorEl: HTMLDivElement | null;
|
|
6
|
+
setAnchorEl: (anchorEl: HTMLDivElement | null) => void;
|
|
5
7
|
};
|
|
6
|
-
export declare const CloseDrawerMenuItemList: ({ menuItems, currentPathname, }: CloseDrawerMenuItemListProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const CloseDrawerMenuItemList: ({ menuItems, currentPathname, anchorEl, setAnchorEl, }: CloseDrawerMenuItemListProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export {};
|
|
8
10
|
//# sourceMappingURL=CloseDrawerMenuItemList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloseDrawerMenuItemList.d.ts","sourceRoot":"","sources":["../../../src/Drawer/CloseDrawer/CloseDrawerMenuItemList.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAQ1C,KAAK,4BAA4B,GAAG;IAClC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"CloseDrawerMenuItemList.d.ts","sourceRoot":"","sources":["../../../src/Drawer/CloseDrawer/CloseDrawerMenuItemList.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAQ1C,KAAK,4BAA4B,GAAG;IAClC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,wDAKrC,4BAA4B,4CAkF9B,CAAC"}
|
|
@@ -10,8 +10,7 @@ const urlToNestedObject_1 = require("../../utils/urlToNestedObject");
|
|
|
10
10
|
const CloseDrawerMenuItem_1 = require("./CloseDrawerMenuItem");
|
|
11
11
|
const CloseDrawerSubMenuItemList_1 = require("./CloseDrawerSubMenuItemList");
|
|
12
12
|
const Popper_1 = require("./Popper");
|
|
13
|
-
const CloseDrawerMenuItemList = ({ menuItems, currentPathname, }) => {
|
|
14
|
-
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
13
|
+
const CloseDrawerMenuItemList = ({ menuItems, currentPathname, anchorEl, setAnchorEl, }) => {
|
|
15
14
|
const [currentMenuItem, setCurrentMenuItem] = (0, react_1.useState)();
|
|
16
15
|
const [currentMenuIndex, setCurrentMenuIndex] = (0, react_1.useState)(0);
|
|
17
16
|
const [currentPathMenuOpen, setCurrentPathMenuOpen] = (0, react_1.useState)({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACrE,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,uCAIpB,WAAW,4CAgCb,CAAC"}
|
|
@@ -8,6 +8,7 @@ exports.Drawer = void 0;
|
|
|
8
8
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
9
|
const material_1 = require("@mui/material");
|
|
10
10
|
const List_1 = __importDefault(require("@mui/material/List"));
|
|
11
|
+
const react_1 = require("react");
|
|
11
12
|
const PadBox_1 = require("../PadBox");
|
|
12
13
|
const AppLogoMedium_1 = require("../Svgs/AppLogo/AppLogoMedium");
|
|
13
14
|
const AppLogoSmall_1 = require("../Svgs/AppLogo/AppLogoSmall");
|
|
@@ -15,6 +16,10 @@ const CloseDrawerMenuItemList_1 = require("./CloseDrawer/CloseDrawerMenuItemList
|
|
|
15
16
|
const Drawer_styled_1 = require("./Drawer.styled");
|
|
16
17
|
const OpenDrawerMenuItemList_1 = require("./OpenDrawer/OpenDrawerMenuItemList");
|
|
17
18
|
const Drawer = ({ menuItems = [], open, currentPathname, }) => {
|
|
18
|
-
|
|
19
|
+
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
20
|
+
const handleClose = () => {
|
|
21
|
+
setAnchorEl(null);
|
|
22
|
+
};
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(Drawer_styled_1.StyledDrawer, { variant: "permanent", open: open, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { textAlign: "center", children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingTop: "1.5rem" }, children: open ? (0, jsx_runtime_1.jsx)(AppLogoMedium_1.AppLogoMedium, {}) : (0, jsx_runtime_1.jsx)(AppLogoSmall_1.AppLogoSmall, {}) }) }), (0, jsx_runtime_1.jsx)(List_1.default, { component: "nav", onMouseLeave: handleClose, children: open ? ((0, jsx_runtime_1.jsx)(OpenDrawerMenuItemList_1.OpenDrawerMenuItemList, { menuItems: menuItems, currentPathname: currentPathname })) : ((0, jsx_runtime_1.jsx)(CloseDrawerMenuItemList_1.CloseDrawerMenuItemList, { menuItems: menuItems, currentPathname: currentPathname, anchorEl: anchorEl, setAnchorEl: setAnchorEl })) })] }));
|
|
19
24
|
};
|
|
20
25
|
exports.Drawer = Drawer;
|
|
@@ -46,13 +46,13 @@ const Timeline = ({ totalDots, highlightedIntervals, shiftStartTime, shiftEndTim
|
|
|
46
46
|
position: "absolute",
|
|
47
47
|
top: "12px",
|
|
48
48
|
zIndex: 2,
|
|
49
|
-
left: `${(((getArrowPosition(shiftStartTime, shiftEndTime, "START") - slotStartTime) % totalDots) /
|
|
49
|
+
left: `${(((getArrowPosition(shiftStartTime, shiftEndTime, "START") - slotStartTime) % totalDots) / totalDots) * 100}%`,
|
|
50
50
|
}, children: (0, jsx_runtime_1.jsx)(ArrowUp_1.ArrowUp, {}) }) }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: `Shift End: ${(0, date_1.getTimeInHHmm)(shiftEndTime)}`, arrow: true, placement: "top", children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
51
51
|
cursor: "pointer",
|
|
52
52
|
position: "absolute",
|
|
53
53
|
top: "12px",
|
|
54
54
|
zIndex: 2,
|
|
55
|
-
left: `${(((getArrowPosition(shiftStartTime, shiftEndTime, "END") - slotStartTime) % totalDots) / (totalDots - 0.
|
|
55
|
+
left: `${(((getArrowPosition(shiftStartTime, shiftEndTime, "END") - slotStartTime) % totalDots) / (totalDots - 0.6)) * 100}%`,
|
|
56
56
|
}, children: (0, jsx_runtime_1.jsx)(ArrowUp_1.ArrowUp, {}) }) }), (0, jsx_runtime_1.jsx)(material_1.Slider, { disabled: true, valueLabelDisplay: "off", marks: marks, max: totalDots - 1, step: 1, value: [], sx: {
|
|
57
57
|
zIndex: 1,
|
|
58
58
|
"& .MuiSlider-track": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimelineTrackSegments.d.ts","sourceRoot":"","sources":["../../src/Timeline/TimelineTrackSegments.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimelineTrackSegments.d.ts","sourceRoot":"","sources":["../../src/Timeline/TimelineTrackSegments.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAErE,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,0CAInC,0BAA0B,4CAwI5B,CAAC"}
|
|
@@ -4,24 +4,32 @@ exports.TimelineTrackSegments = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
6
|
const luxon_1 = require("luxon");
|
|
7
|
-
const
|
|
8
|
-
const date_1 = require("../utils/date");
|
|
7
|
+
const utils_1 = require("../utils");
|
|
9
8
|
const Timeline_1 = require("./Timeline");
|
|
10
9
|
const TimelineTrackSegments = ({ totalDots, intervals, startTimeline, }) => {
|
|
11
10
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "relative", width: "100%", height: 4 }, children: intervals?.map((interval, index) => {
|
|
12
|
-
const inTime = (0,
|
|
13
|
-
const outTime = (0,
|
|
11
|
+
const inTime = (0, utils_1.getTimeInHHmm)(interval.in_time);
|
|
12
|
+
const outTime = (0, utils_1.getTimeInHHmm)(interval.out_time);
|
|
14
13
|
const intervalInTime = luxon_1.DateTime.fromISO(interval.in_time);
|
|
15
14
|
const intervalOutTime = luxon_1.DateTime.fromISO(interval.out_time);
|
|
16
15
|
const shiftHours = intervalOutTime
|
|
17
16
|
.diff(intervalInTime, ["hours", "minutes"])
|
|
18
17
|
.toFormat("hh:mm");
|
|
19
18
|
let in_time = (0, Timeline_1.getArrowValue)(inTime);
|
|
20
|
-
in_time = in_time < startTimeline ? in_time + totalDots : in_time;
|
|
21
19
|
let out_time = (0, Timeline_1.getArrowValue)(outTime);
|
|
22
|
-
out_time = out_time < in_time ? out_time + totalDots : out_time;
|
|
23
20
|
const isValidInTime = !isNaN(in_time);
|
|
24
21
|
const isValidOutTime = !isNaN(out_time);
|
|
22
|
+
if (isValidInTime && in_time < startTimeline) {
|
|
23
|
+
in_time += totalDots;
|
|
24
|
+
}
|
|
25
|
+
if (isValidOutTime) {
|
|
26
|
+
if (out_time < startTimeline) {
|
|
27
|
+
out_time += totalDots;
|
|
28
|
+
}
|
|
29
|
+
if (isValidInTime && out_time < in_time) {
|
|
30
|
+
out_time += totalDots;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
25
33
|
let inTimeLabel = "";
|
|
26
34
|
let outTimeLabel = "";
|
|
27
35
|
if (isValidInTime) {
|
|
@@ -30,18 +38,23 @@ const TimelineTrackSegments = ({ totalDots, intervals, startTimeline, }) => {
|
|
|
30
38
|
if (isValidOutTime) {
|
|
31
39
|
outTimeLabel = `Out time : ${outTime} ${!isValidInTime ? "/ Missing punch" : ""}`;
|
|
32
40
|
}
|
|
33
|
-
const startPercent = (((in_time - startTimeline) % totalDots) / (totalDots - 1)) * 100;
|
|
34
|
-
const endPercent = (((out_time - startTimeline) % totalDots) / (totalDots - 1)) * 100;
|
|
35
41
|
const labelText = interval?.name ??
|
|
36
|
-
`In/Out: ${(0,
|
|
37
|
-
const color = interval?.color ?? (0,
|
|
42
|
+
`In/Out: ${(0, utils_1.getTimeInHHmm)(interval.in_time)} - ${(0, utils_1.getTimeInHHmm)(interval.out_time)} (${shiftHours})`;
|
|
43
|
+
const color = interval?.color ?? (0, utils_1.getColorByVariant)(interval.status_type);
|
|
44
|
+
const startDot = isValidInTime
|
|
45
|
+
? ((in_time - startTimeline) / totalDots) * 100
|
|
46
|
+
: 0;
|
|
47
|
+
const endDot = isValidOutTime
|
|
48
|
+
? ((out_time - startTimeline) / totalDots) * 100
|
|
49
|
+
: 0;
|
|
50
|
+
const widthDot = isValidInTime && isValidOutTime ? Math.max(endDot - startDot, 0) : 0;
|
|
38
51
|
return (
|
|
39
52
|
// eslint-disable-next-line sonarjs/no-array-index-key
|
|
40
53
|
(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", children: [isValidInTime && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { arrow: true, title: inTimeLabel, placement: "top", children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
41
54
|
height: 8,
|
|
42
55
|
width: 8,
|
|
43
56
|
position: "absolute",
|
|
44
|
-
left: `${
|
|
57
|
+
left: `${startDot}%`,
|
|
45
58
|
boxShadow: "none",
|
|
46
59
|
backgroundColor: color,
|
|
47
60
|
borderRadius: "50%",
|
|
@@ -50,19 +63,19 @@ const TimelineTrackSegments = ({ totalDots, intervals, startTimeline, }) => {
|
|
|
50
63
|
"&:focus, &:hover, &:active": {
|
|
51
64
|
boxShadow: "none",
|
|
52
65
|
},
|
|
53
|
-
} }) })), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { arrow: true, title: labelText, placement: "top", children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
66
|
+
} }) })), isValidInTime && isValidOutTime && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { arrow: true, title: labelText, placement: "top", children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
54
67
|
position: "absolute",
|
|
55
|
-
left: `${
|
|
56
|
-
width: `${
|
|
68
|
+
left: `${startDot}%`,
|
|
69
|
+
width: `${widthDot}%`,
|
|
57
70
|
height: 3.5,
|
|
58
71
|
top: "17.5px",
|
|
59
72
|
backgroundColor: color,
|
|
60
73
|
zIndex: 2,
|
|
61
|
-
} }) }), isValidOutTime && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { arrow: true, title: outTimeLabel, placement: "top", children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
74
|
+
} }) })), isValidOutTime && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { arrow: true, title: outTimeLabel, placement: "top", children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
62
75
|
height: 8,
|
|
63
76
|
width: 8,
|
|
64
77
|
position: "absolute",
|
|
65
|
-
|
|
78
|
+
left: `${endDot}%`,
|
|
66
79
|
boxShadow: "none",
|
|
67
80
|
backgroundColor: color,
|
|
68
81
|
borderRadius: "50%",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type WorkDayType = "present" | "holiday" | "weekly_off" | "working" | "first_half_off" | "second_half_off" | "full_day_weekly_off" | "first_half_weekly_off" | "second_half_weekly_off" | "paid_leave" | "absent" | "late_in_early_out" | "unpaid_leave" | "loss_of_pay" | "penalty" | "first_half_paid_leave" | "second_half_paid_leave" | "full_day_paid_leave" | "first_half_unpaid_leave" | "second_half_unpaid_leave" | "full_day_unpaid_leave" | "leave";
|
|
2
|
-
export type WorkDayTypeShort = "P" | "H" | "WO" | "HO" | "FHWO" | "SHWO" | "PL" | "A" | "LIEO" | "UPL" | "PEN" | "LOP" | "L";
|
|
1
|
+
export type WorkDayType = "present" | "holiday" | "weekly_off" | "working" | "first_half_off" | "second_half_off" | "full_day_weekly_off" | "first_half_weekly_off" | "second_half_weekly_off" | "paid_leave" | "absent" | "late_in_early_out" | "unpaid_leave" | "loss_of_pay" | "penalty" | "first_half_paid_leave" | "second_half_paid_leave" | "full_day_paid_leave" | "first_half_unpaid_leave" | "second_half_unpaid_leave" | "full_day_unpaid_leave" | "leave" | "overtime";
|
|
2
|
+
export type WorkDayTypeShort = "P" | "H" | "WO" | "HO" | "FHWO" | "SHWO" | "PL" | "A" | "LIEO" | "UPL" | "PEN" | "LOP" | "L" | "OT";
|
|
3
3
|
export declare const serverityOptions: Record<WorkDayType, WorkDayTypeShort>;
|
|
4
4
|
export declare const getColorByVariant: (variant: WorkDayType, type?: string) => string;
|
|
5
|
-
export declare const getStatusLabel: (status: WorkDayType) => "Present" | "Absent" | "Weekly Off" | "Working" | "Holiday" | "Paid Leave" | "Unpaid Leave" | "First Half Weekly Off" | "Second Half Weekly Off" | "First Half Off" | "Second Half Off" | "Late In/Early Out" | "Loss of Pay" | "Penalty" | "First Half Paid Leave" | "Second Half Paid Leave" | "Full Day Paid Leave" | "First Half Unpaid Leave" | "Second Half Unpaid Leave" | "Full Day Unpaid Leave" | "Leave";
|
|
5
|
+
export declare const getStatusLabel: (status: WorkDayType) => "Present" | "Absent" | "Weekly Off" | "Working" | "Holiday" | "Paid Leave" | "Unpaid Leave" | "First Half Weekly Off" | "Second Half Weekly Off" | "First Half Off" | "Second Half Off" | "Late In/Early Out" | "Loss of Pay" | "Penalty" | "First Half Paid Leave" | "Second Half Paid Leave" | "Full Day Paid Leave" | "First Half Unpaid Leave" | "Second Half Unpaid Leave" | "Full Day Unpaid Leave" | "Leave" | "Overtime";
|
|
6
6
|
//# sourceMappingURL=colorVariant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorVariant.d.ts","sourceRoot":"","sources":["../../src/utils/colorVariant.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,SAAS,GACT,YAAY,GACZ,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,qBAAqB,GACrB,uBAAuB,GACvB,wBAAwB,GACxB,YAAY,GACZ,QAAQ,GACR,mBAAmB,GACnB,cAAc,GACd,aAAa,GACb,SAAS,GACT,uBAAuB,GACvB,wBAAwB,GACxB,qBAAqB,GACrB,yBAAyB,GACzB,0BAA0B,GAC1B,uBAAuB,GACvB,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"colorVariant.d.ts","sourceRoot":"","sources":["../../src/utils/colorVariant.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,SAAS,GACT,YAAY,GACZ,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,qBAAqB,GACrB,uBAAuB,GACvB,wBAAwB,GACxB,YAAY,GACZ,QAAQ,GACR,mBAAmB,GACnB,cAAc,GACd,aAAa,GACb,SAAS,GACT,uBAAuB,GACvB,wBAAwB,GACxB,qBAAqB,GACrB,yBAAyB,GACzB,0BAA0B,GAC1B,uBAAuB,GACvB,OAAO,GACP,UAAU,CAAC;AAEf,MAAM,MAAM,gBAAgB,GACxB,GAAG,GACH,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,MAAM,GACN,IAAI,GACJ,GAAG,GACH,MAAM,GACN,KAAK,GACL,KAAK,GACL,KAAK,GACL,GAAG,GACH,IAAI,CAAC;AAET,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,WAAW,EAAE,gBAAgB,CAwBlE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,SAAS,WAAW,EAAE,aAAa,WAsFpE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,QAAQ,WAAW,qaA0EjD,CAAC"}
|
|
@@ -25,10 +25,11 @@ exports.serverityOptions = {
|
|
|
25
25
|
second_half_unpaid_leave: "L",
|
|
26
26
|
full_day_unpaid_leave: "L",
|
|
27
27
|
leave: "L",
|
|
28
|
+
overtime: "OT",
|
|
28
29
|
};
|
|
29
30
|
const getColorByVariant = (variant, type = "dark") => {
|
|
30
31
|
const theme = (0, material_1.useTheme)();
|
|
31
|
-
const { darkMint, sapphireBlue, darkOrange, orchid, lipstickRed, deepAqua } = theme.palette.app.color;
|
|
32
|
+
const { darkMint, sapphireBlue, darkOrange, orchid, lipstickRed, deepAqua, slate, } = theme.palette.app.color;
|
|
32
33
|
// eslint-disable-next-line sonarjs/no-nested-conditional
|
|
33
34
|
const index = type === "dark" ? (variant === "penalty" ? 800 : 900) : 600;
|
|
34
35
|
switch (variant) {
|
|
@@ -74,6 +75,8 @@ const getColorByVariant = (variant, type = "dark") => {
|
|
|
74
75
|
return deepAqua[index];
|
|
75
76
|
case "full_day_unpaid_leave":
|
|
76
77
|
return deepAqua[index];
|
|
78
|
+
case "overtime":
|
|
79
|
+
return slate[index];
|
|
77
80
|
default:
|
|
78
81
|
return lipstickRed[index];
|
|
79
82
|
}
|
|
@@ -125,6 +128,8 @@ const getStatusLabel = (status) => {
|
|
|
125
128
|
return "Full Day Unpaid Leave";
|
|
126
129
|
case "leave":
|
|
127
130
|
return "Leave";
|
|
131
|
+
case "overtime":
|
|
132
|
+
return "Overtime";
|
|
128
133
|
default:
|
|
129
134
|
return "Absent";
|
|
130
135
|
}
|