phx-react 1.3.1048 → 1.3.1050
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/cjs/components/MainWrapV3/MainWrapV3.js +121 -74
- package/dist/cjs/components/MainWrapV3/MainWrapV3.js.map +1 -1
- package/dist/cjs/components/TableStatic/PaginaitonSelected.d.ts +3 -0
- package/dist/cjs/components/TableStatic/PaginaitonSelected.js +33 -0
- package/dist/cjs/components/TableStatic/PaginaitonSelected.js.map +1 -0
- package/dist/cjs/components/TableStatic/Pagination.d.ts +3 -0
- package/dist/cjs/components/TableStatic/Pagination.js +62 -0
- package/dist/cjs/components/TableStatic/Pagination.js.map +1 -0
- package/dist/cjs/components/TableStatic/TableStatic.d.ts +4 -1
- package/dist/cjs/components/TableStatic/TableStatic.js +23 -5
- package/dist/cjs/components/TableStatic/TableStatic.js.map +1 -1
- package/dist/cjs/utils/constants.d.ts +7 -0
- package/dist/cjs/utils/constants.js +16 -1
- package/dist/cjs/utils/constants.js.map +1 -1
- package/dist/esm/components/MainWrapV3/MainWrapV3.js +122 -75
- package/dist/esm/components/MainWrapV3/MainWrapV3.js.map +1 -1
- package/dist/esm/components/TableStatic/PaginaitonSelected.d.ts +3 -0
- package/dist/esm/components/TableStatic/PaginaitonSelected.js +30 -0
- package/dist/esm/components/TableStatic/PaginaitonSelected.js.map +1 -0
- package/dist/esm/components/TableStatic/Pagination.d.ts +3 -0
- package/dist/esm/components/TableStatic/Pagination.js +59 -0
- package/dist/esm/components/TableStatic/Pagination.js.map +1 -0
- package/dist/esm/components/TableStatic/TableStatic.d.ts +4 -1
- package/dist/esm/components/TableStatic/TableStatic.js +23 -5
- package/dist/esm/components/TableStatic/TableStatic.js.map +1 -1
- package/dist/esm/utils/constants.d.ts +7 -0
- package/dist/esm/utils/constants.js +15 -0
- package/dist/esm/utils/constants.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,6 +8,9 @@ type TTableProps = {
|
|
|
8
8
|
enable: boolean;
|
|
9
9
|
title: string;
|
|
10
10
|
};
|
|
11
|
+
router?: any;
|
|
12
|
+
rowNumber?: any;
|
|
13
|
+
isPagination?: boolean;
|
|
11
14
|
};
|
|
12
|
-
export declare function PHXTableStatic({ bodyData, numericalOrder, thBody, thComponent, thHeader }: TTableProps): React.JSX.Element;
|
|
15
|
+
export declare function PHXTableStatic({ bodyData, numericalOrder, thBody, thComponent, thHeader, router, rowNumber, isPagination, }: TTableProps): React.JSX.Element;
|
|
13
16
|
export {};
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.PHXTableStatic = void 0;
|
|
5
5
|
var tslib_1 = require("tslib");
|
|
6
|
-
var react_1 = tslib_1.
|
|
6
|
+
var react_1 = tslib_1.__importStar(require("react"));
|
|
7
7
|
var EmptyRecord_1 = require("../EmptyRecord");
|
|
8
8
|
var types_1 = require("../types");
|
|
9
|
+
var PaginaitonSelected_1 = tslib_1.__importDefault(require("./PaginaitonSelected"));
|
|
10
|
+
var Pagination_1 = tslib_1.__importDefault(require("./Pagination"));
|
|
9
11
|
function PHXTableStatic(_a) {
|
|
10
|
-
var bodyData = _a.bodyData, numericalOrder = _a.numericalOrder, thBody = _a.thBody, _b = _a.thComponent, thComponent = _b === void 0 ? {} : _b, thHeader = _a.thHeader;
|
|
12
|
+
var bodyData = _a.bodyData, numericalOrder = _a.numericalOrder, thBody = _a.thBody, _b = _a.thComponent, thComponent = _b === void 0 ? {} : _b, thHeader = _a.thHeader, router = _a.router, _c = _a.rowNumber, rowNumber = _c === void 0 ? 10 : _c, _d = _a.isPagination, isPagination = _d === void 0 ? false : _d;
|
|
11
13
|
var headers = thHeader.map(function (label, index) { return ({
|
|
12
14
|
key: thBody[index],
|
|
13
15
|
label: label
|
|
@@ -19,7 +21,20 @@ function PHXTableStatic(_a) {
|
|
|
19
21
|
}
|
|
20
22
|
return value !== undefined && value !== null ? value : '--';
|
|
21
23
|
};
|
|
22
|
-
|
|
24
|
+
var params = typeof window !== 'undefined' ? new URLSearchParams(window.location.search) : new URLSearchParams();
|
|
25
|
+
var entries = Object.fromEntries(params.entries());
|
|
26
|
+
var _e = (0, react_1.useState)((entries === null || entries === void 0 ? void 0 : entries.row) ? Number(entries.row) : rowNumber), rowQuantity = _e[0], setRowQuantity = _e[1];
|
|
27
|
+
var count = bodyData === null || bodyData === void 0 ? void 0 : bodyData.length;
|
|
28
|
+
var _f = (0, react_1.useState)((entries === null || entries === void 0 ? void 0 : entries.pagi) ? Number(entries.pagi) : 1), currentPage = _f[0], setCurrentPage = _f[1];
|
|
29
|
+
var handleChangePage = function (page) {
|
|
30
|
+
if (page > 0 && page <= Math.ceil(count / rowQuantity)) {
|
|
31
|
+
setCurrentPage(page);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var paginatedData = isPagination
|
|
35
|
+
? bodyData.slice(rowQuantity * (currentPage - 1), rowQuantity * currentPage)
|
|
36
|
+
: bodyData;
|
|
37
|
+
return (react_1["default"].createElement(react_1["default"].Fragment, null, (paginatedData === null || paginatedData === void 0 ? void 0 : paginatedData.length) ? (react_1["default"].createElement("div", { className: 'rounded-lg border border-gray-300 border-opacity-70 bg-white shadow-sm' },
|
|
23
38
|
react_1["default"].createElement("div", { className: '-my-2 overflow-x-auto' },
|
|
24
39
|
react_1["default"].createElement("div", { className: 'w-full pb-2 pt-0.5 align-middle ring-black ring-opacity-5' },
|
|
25
40
|
react_1["default"].createElement("div", { className: 'relative mt-1.5 overflow-auto' },
|
|
@@ -32,9 +47,12 @@ function PHXTableStatic(_a) {
|
|
|
32
47
|
react_1["default"].createElement("p", { className: 'text-gray-800' }, header.label))) : (react_1["default"].createElement("th", { key: header.key, className: 'whitespace-nowrap px-3 py-2.5 pl-8 text-left align-top text-xs font-medium text-gray-500 lg:min-w-[135px]', scope: 'col' },
|
|
33
48
|
react_1["default"].createElement("p", { className: 'text-gray-800' }, header.label)));
|
|
34
49
|
}))),
|
|
35
|
-
react_1["default"].createElement("tbody", { className: 'divide-y divide-gray-200' },
|
|
50
|
+
react_1["default"].createElement("tbody", { className: 'divide-y divide-gray-200' }, paginatedData.map(function (item, index) { return (react_1["default"].createElement("tr", { key: index },
|
|
36
51
|
numericalOrder && numericalOrder.enable && (react_1["default"].createElement("td", { className: 'w-[80px] whitespace-nowrap pl-8 text-xs text-gray-900' }, index + 1)),
|
|
37
|
-
headers.map(function (header, indexHeader) { return (react_1["default"].createElement("td", { key: header.key, className: "whitespace-nowrap px-6 py-3 text-xs text-gray-900 ".concat(indexHeader === 0 ? 'rounded-lg sm:w-16 sm:px-8' : 'pl-8') }, renderCell(item, header.key))); }))); }))))))
|
|
52
|
+
headers.map(function (header, indexHeader) { return (react_1["default"].createElement("td", { key: header.key, className: "whitespace-nowrap px-6 py-3 text-xs text-gray-900 ".concat(indexHeader === 0 ? 'rounded-lg sm:w-16 sm:px-8' : 'pl-8') }, renderCell(item, header.key))); }))); })))))),
|
|
53
|
+
isPagination && (react_1["default"].createElement("div", { className: 'flex items-center justify-between rounded-lg rounded-tl-none rounded-tr-none border-gray-200 bg-gray-50 py-2 pl-7 pr-2' },
|
|
54
|
+
react_1["default"].createElement(PaginaitonSelected_1["default"], { rowQuantity: rowQuantity, setRowQuantity: setRowQuantity, router: router, setCurrentPage: setCurrentPage }),
|
|
55
|
+
react_1["default"].createElement(Pagination_1["default"], { count: count, currentPage: currentPage, handleChangePage: handleChangePage, router: router, rowQuantity: rowQuantity, totalPages: Math.ceil(count / rowQuantity) }))))) : (react_1["default"].createElement(EmptyRecord_1.PHXEmptyRecord, null))));
|
|
38
56
|
}
|
|
39
57
|
exports.PHXTableStatic = PHXTableStatic;
|
|
40
58
|
//# sourceMappingURL=TableStatic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableStatic.js","sourceRoot":"","sources":["../../../../src/components/TableStatic/TableStatic.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;AACZ,
|
|
1
|
+
{"version":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YACrI,iCAAC,+BAAkB,IACjB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,GAC9B;YACF,iCAAC,uBAAU,IACT,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,GAC1C,CACE,CACP,CACG,CACP,CAAC,CAAC,CAAC,CACF,iCAAC,4BAAc,OAAG,CACnB,CACA,CACJ,CAAA;AACH,CAAC;AA7HD,wCA6HC"}
|
|
@@ -52,3 +52,10 @@ export declare const LOGIN_TYPE: {
|
|
|
52
52
|
text: string;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
+
export declare const MENU_ACTIVITY_HISTORY_CHILD: {
|
|
56
|
+
name: string;
|
|
57
|
+
code: string;
|
|
58
|
+
path: string;
|
|
59
|
+
current: boolean;
|
|
60
|
+
}[];
|
|
61
|
+
export declare const PATH_ACTIVITY_HISTORY = "activity-history";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.LOGIN_TYPE = exports.requestMaxDuration = exports.SECRET_KEY = exports.IV_LENGTH = exports.KEY_COEFFICIENT_SEMESTER_II = exports.KEY_COEFFICIENT_SEMESTER_I = exports.SIZE_DEFAULT = exports.AUTHENTICATED = exports.BUS_SERVICE_TYPE_BUS = exports.BUS_SERVICE_TYPE_BTN = exports.PARENT_MOM = exports.PARENT_DAD = exports.KEY_PROFILE_TEACHER = exports.KEY_PARENT_STUDENT = exports.KEY_PROFILE_STUDENT = exports.DF_MENU_HOVER_BG_COLOR = exports.DF_MENU_ICON_ACTICE_COLOR = exports.DF_MENU_ICON_AND_TEXT_HOVER_COLOR = exports.DF_MENU_ICON_HOVER_COLOR = exports.DF_MENU_ICON_COLOR = exports.DF_MENU_BG_ACTIVE_COLOR = exports.DF_MENU_TEXT_COLOR = exports.DF_MENU_BG_COLOR = exports.DF_SEARCH_TEXT_COLOR = exports.DF_SEARCH_BORDER_HOVER_COLOR = exports.DF_SEARCH_BORDER_COLOR = exports.DF_SEARCH_BG_COLOR = exports.DF_SEARCH_ICON_COLOR = exports.DF_SKELETON_COLOR = exports.DF_HEADER_BG_COLOR = exports.DEFAULT_LOGO_DASHBOARD = exports.DEFAULT_LOGO_LOGIN = exports.DEFAULT_AVATAR = exports.ROLE_TEACHER = exports.TEACHER_TYPE_LEADER = exports.ROLE_SV = exports.KEY_QUERY_SETTING = exports.KEY_LOGIN_LOGO = exports.switchSchool = exports.superAdmin = exports.admin = exports.ROUTE_DASHBOARD = exports.loginPage = exports.COOKIE_REFRESH_TOKEN = exports.COOKIE_SESSION_SIGN_IN = void 0;
|
|
3
|
+
exports.PATH_ACTIVITY_HISTORY = exports.MENU_ACTIVITY_HISTORY_CHILD = exports.LOGIN_TYPE = exports.requestMaxDuration = exports.SECRET_KEY = exports.IV_LENGTH = exports.KEY_COEFFICIENT_SEMESTER_II = exports.KEY_COEFFICIENT_SEMESTER_I = exports.SIZE_DEFAULT = exports.AUTHENTICATED = exports.BUS_SERVICE_TYPE_BUS = exports.BUS_SERVICE_TYPE_BTN = exports.PARENT_MOM = exports.PARENT_DAD = exports.KEY_PROFILE_TEACHER = exports.KEY_PARENT_STUDENT = exports.KEY_PROFILE_STUDENT = exports.DF_MENU_HOVER_BG_COLOR = exports.DF_MENU_ICON_ACTICE_COLOR = exports.DF_MENU_ICON_AND_TEXT_HOVER_COLOR = exports.DF_MENU_ICON_HOVER_COLOR = exports.DF_MENU_ICON_COLOR = exports.DF_MENU_BG_ACTIVE_COLOR = exports.DF_MENU_TEXT_COLOR = exports.DF_MENU_BG_COLOR = exports.DF_SEARCH_TEXT_COLOR = exports.DF_SEARCH_BORDER_HOVER_COLOR = exports.DF_SEARCH_BORDER_COLOR = exports.DF_SEARCH_BG_COLOR = exports.DF_SEARCH_ICON_COLOR = exports.DF_SKELETON_COLOR = exports.DF_HEADER_BG_COLOR = exports.DEFAULT_LOGO_DASHBOARD = exports.DEFAULT_LOGO_LOGIN = exports.DEFAULT_AVATAR = exports.ROLE_TEACHER = exports.TEACHER_TYPE_LEADER = exports.ROLE_SV = exports.KEY_QUERY_SETTING = exports.KEY_LOGIN_LOGO = exports.switchSchool = exports.superAdmin = exports.admin = exports.ROUTE_DASHBOARD = exports.loginPage = exports.COOKIE_REFRESH_TOKEN = exports.COOKIE_SESSION_SIGN_IN = void 0;
|
|
4
4
|
exports.COOKIE_SESSION_SIGN_IN = 'phx_session';
|
|
5
5
|
exports.COOKIE_REFRESH_TOKEN = 'refresh_token';
|
|
6
6
|
exports.loginPage = '/login-sso';
|
|
@@ -56,4 +56,19 @@ exports.LOGIN_TYPE = {
|
|
|
56
56
|
text: 'Đăng nhập bằng Microsoft'
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
+
exports.MENU_ACTIVITY_HISTORY_CHILD = [
|
|
60
|
+
{
|
|
61
|
+
name: 'Lịch sử export/import',
|
|
62
|
+
code: 'ACTIVITY_HISTORY_LIST',
|
|
63
|
+
path: '/list',
|
|
64
|
+
current: true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'Lịch sử thao tác',
|
|
68
|
+
code: 'ACTIVITY_HISTORY_USER',
|
|
69
|
+
path: '/user',
|
|
70
|
+
current: false
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
exports.PATH_ACTIVITY_HISTORY = 'activity-history';
|
|
59
74
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,aAAa,CAAA;AACtC,QAAA,oBAAoB,GAAG,eAAe,CAAA;AAC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AG;IACxB,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,uBAAuB;KAC9B;IACD,SAAS,EAAE;QACT,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,0BAA0B;KACjC;CACF,CAAA;AACY,QAAA,2BAA2B,GAAG;IACzC;QACE,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,IAAI;KACd;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,KAAK;KACf;CACF,CAAA;AACY,QAAA,qBAAqB,GAAG,kBAAkB,CAAA"}
|
|
@@ -6,7 +6,7 @@ import React, { Fragment, useEffect, useRef, useState } from 'react';
|
|
|
6
6
|
import { PHXModal } from '../Modal';
|
|
7
7
|
import { PHXSkeleton } from '../Skeleton';
|
|
8
8
|
import Cookies from 'js-cookie';
|
|
9
|
-
import { DEFAULT_AVATAR, DEFAULT_LOGO_DASHBOARD, ROUTE_DASHBOARD, switchSchool } from '../../utils/constants';
|
|
9
|
+
import { DEFAULT_AVATAR, DEFAULT_LOGO_DASHBOARD, MENU_ACTIVITY_HISTORY_CHILD, PATH_ACTIVITY_HISTORY, ROUTE_DASHBOARD, switchSchool, } from '../../utils/constants';
|
|
10
10
|
import { ArrowLeftIcon } from '@heroicons/react/20/solid';
|
|
11
11
|
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
12
12
|
import SearchDetail from './search/search-bar';
|
|
@@ -621,6 +621,25 @@ export var PHXMainWrapV3 = function (_a) {
|
|
|
621
621
|
return pathNameSplit[1] === 'setting';
|
|
622
622
|
};
|
|
623
623
|
var checkLogoHeader = ((_d = dataInitMain.configLayout) === null || _d === void 0 ? void 0 : _d.logo_dashboard) || topMenuLogoFromEnv || DEFAULT_LOGO_DASHBOARD;
|
|
624
|
+
var isActivityHistory = function () {
|
|
625
|
+
var pathNameSplit = pathNameWithBasePath.split('/');
|
|
626
|
+
return pathNameSplit[1] === PATH_ACTIVITY_HISTORY;
|
|
627
|
+
};
|
|
628
|
+
var _y = useState(MENU_ACTIVITY_HISTORY_CHILD), activityHistoryChild = _y[0], setActivityHistoryChild = _y[1];
|
|
629
|
+
var handleClickActivityHistoryChild = function (clickedItem) {
|
|
630
|
+
var updated = activityHistoryChild.map(function (item) { return (__assign(__assign({}, item), { current: item.code === clickedItem.code })); });
|
|
631
|
+
setActivityHistoryChild(updated);
|
|
632
|
+
};
|
|
633
|
+
useEffect(function () {
|
|
634
|
+
if (basePath === PATH_ACTIVITY_HISTORY) {
|
|
635
|
+
setActivityHistoryChild(function (prev) {
|
|
636
|
+
return prev.map(function (item) { return (__assign(__assign({}, item), { current: pathNameWithBasePath.endsWith(item.path) })); });
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
setActivityHistoryChild([]);
|
|
641
|
+
}
|
|
642
|
+
}, [pathNameWithBasePath, basePath]);
|
|
624
643
|
return (React.createElement(React.Fragment, null,
|
|
625
644
|
React.createElement("div", { className: 'flex min-h-full flex-col' },
|
|
626
645
|
React.createElement(StyledCustomLayoutProps, { configLayout: dataInitMain === null || dataInitMain === void 0 ? void 0 : dataInitMain.configLayout, settingSiteCookie: getDataCookies ? (_e = decryptCookie(getDataCookies)) === null || _e === void 0 ? void 0 : _e.setting_site : null }),
|
|
@@ -711,7 +730,23 @@ export var PHXMainWrapV3 = function (_a) {
|
|
|
711
730
|
openNavName && (React.createElement("div", { className: 'h-6' },
|
|
712
731
|
React.createElement("p", { className: "mt-0.5 h-full text-[0.86rem] text-[#353A44] transition-all duration-300 ".concat(openNavName ? 'opacity-100' : 'opacity-0') }, item.name)))))))); })))))),
|
|
713
732
|
React.createElement("div", { className: classNames('border-t', navigation.length > 0 && ((_f = navigation[0]) === null || _f === void 0 ? void 0 : _f.isSchoolink) ? 'border-[#1c222b]' : 'border-indigo-100') },
|
|
714
|
-
React.createElement("div", { className: "
|
|
733
|
+
React.createElement("div", { className: " flex ".concat(openNavName ? 'w-64' : 'w-12', " overflow-hidden px-3 pb-1.5 pt-3") },
|
|
734
|
+
React.createElement("a", { className: classNames('z-0', !openNavName
|
|
735
|
+
? 'inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg'
|
|
736
|
+
: 'inline-flex h-8 min-w-full flex-shrink-0 items-center rounded-lg hover:rounded-lg hover:bg-opacity-50', isActivityHistory() && !openNavName
|
|
737
|
+
? 'setting-bg-icon-active' // màu background của icon đang active trong menu
|
|
738
|
+
: 'setting-icon-color font-medium', // màu icon
|
|
739
|
+
openNavName && isActivityHistory()
|
|
740
|
+
? 'setting-bg-icon-active rounded-lg' // màu background của icon đang active trong menu
|
|
741
|
+
: 'setting-hover-bg hover:rounded-lg hover:bg-opacity-50'), href: '/activity-history/list', onMouseOver: function () { return setOpenNavName(true); } },
|
|
742
|
+
React.createElement("span", { className: 'sr-only' }, "L\u1ECBch s\u1EED ho\u1EA1t \u0111\u1ED9ng"),
|
|
743
|
+
React.createElement("span", { className: classNames(!openNavName
|
|
744
|
+
? 'cursor-pointer hover:z-10 focus-visible:outline-none'
|
|
745
|
+
: 'flex gap-x-2 pl-[0.45rem]') },
|
|
746
|
+
React.createElement(Image, { alt: 'icon', className: classNames('h-[1.125rem] w-[1.125rem]', openNavName ? 'mt-[0.2rem]' : ''), height: 0, src: isActivityHistory() ? Icons.ACTIVITY_HISTORY_SOLID : Icons.ACTIVITY_HISTORY, width: 0 }),
|
|
747
|
+
openNavName && (React.createElement("div", { className: 'h-6' },
|
|
748
|
+
React.createElement("p", { className: "setting-text-color mt-0.5 h-full text-[0.86rem] font-normal text-[#353A44] transition-all duration-300 hover:cursor-pointer ".concat(openNavName ? 'opacity-100' : 'opacity-0') }, "L\u1ECBch s\u1EED ho\u1EA1t \u0111\u1ED9ng")))))),
|
|
749
|
+
React.createElement("div", { className: "mb-14 flex ".concat(openNavName ? 'w-64' : 'w-12', " overflow-hidden px-3 pb-3") },
|
|
715
750
|
React.createElement("a", { className: classNames('z-0', !openNavName
|
|
716
751
|
? 'inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg'
|
|
717
752
|
: 'inline-flex h-8 min-w-full flex-shrink-0 items-center rounded-lg hover:rounded-lg hover:bg-opacity-50', isSettings() && !openNavName
|
|
@@ -738,87 +773,99 @@ export var PHXMainWrapV3 = function (_a) {
|
|
|
738
773
|
React.createElement("button", { className: 'mr-1 inline-flex items-center rounded-lg border-gray-300 bg-transparent px-2 py-1 text-xs font-medium text-gray-700 hover:bg-gray-200 active:bg-gray-300 active:pb-[0.2rem] active:pt-[0.3rem] active:shadow-[0rem_0.125rem_0.1rem_0rem_#0004_inset]', onClick: function () { return handleBackMenu(); }, type: 'button' },
|
|
739
774
|
React.createElement(ArrowLeftIcon, { className: 'h-5 w-5' })),
|
|
740
775
|
React.createElement("p", { className: 'text-sm font-medium text-slate-600' }, campaignName))),
|
|
741
|
-
React.createElement("div", { className: 'flex-1 overflow-y-auto pt-3' },
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
React.createElement("
|
|
750
|
-
|
|
751
|
-
? '
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
React.createElement("
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
React.createElement(
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
776
|
+
React.createElement("div", { className: 'flex-1 overflow-y-auto pt-3' },
|
|
777
|
+
subNavigation.map(function (item, subNavIndex) {
|
|
778
|
+
var _a;
|
|
779
|
+
return (React.createElement("div", { key: subNavIndex }, ((_a = dataInitMain.roleCode) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (React.createElement(React.Fragment, null, enablePer(item.code, dataInitMain.perCode) ? (React.createElement(React.Fragment, null,
|
|
780
|
+
(item === null || item === void 0 ? void 0 : item.isMicroservice) ? (React.createElement("a", { "aria-current": (item === null || item === void 0 ? void 0 : item.current) ? 'page' : undefined, "aria-hidden": true, className: classNames((item === null || item === void 0 ? void 0 : item.current)
|
|
781
|
+
? 'rounded-lg bg-white' // màu background menu cha khi active
|
|
782
|
+
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50', // màu background khi hover vào menu cha
|
|
783
|
+
'mx-3 flex cursor-pointer border-slate-200 p-2'), href: item.path }, !dataInitMain.loadingMenu ? (React.createElement("div", { className: 'ml-1 flex items-center text-[0.84rem]' },
|
|
784
|
+
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
785
|
+
React.createElement("p", { className: classNames('leading-5', (item === null || item === void 0 ? void 0 : item.current) ? '' : 'font-normal text-[#353A44]') }, item === null || item === void 0 ? void 0 : item.name)),
|
|
786
|
+
React.createElement("p", { className: 'mt-1 text-slate-500' }, item === null || item === void 0 ? void 0 : item.description))) : (React.createElement(PHXSkeleton, { className: 'mr-3 flex-1', type: 'single' })))) : (React.createElement("div", { "aria-current": (item === null || item === void 0 ? void 0 : item.current) ? 'page' : undefined, "aria-hidden": true, className: classNames((item === null || item === void 0 ? void 0 : item.current)
|
|
787
|
+
? 'rounded-lg bg-white' // màu background menu cha khi active
|
|
788
|
+
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50', // màu background khi hover vào menu cha
|
|
789
|
+
'mx-3 flex cursor-pointer border-slate-200 p-2'), onClick: function () { return subNavigationTriggerClicked(item); } }, !dataInitMain.loadingMenu ? (React.createElement("div", { className: 'ml-1 flex items-center text-[0.84rem]' },
|
|
790
|
+
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
791
|
+
React.createElement("p", { className: classNames('leading-5', (item === null || item === void 0 ? void 0 : item.current) ? '' : 'font-normal text-[#353A44]') }, item === null || item === void 0 ? void 0 : item.name)),
|
|
792
|
+
React.createElement("p", { className: 'mt-1 text-slate-500' }, item === null || item === void 0 ? void 0 : item.description))) : (React.createElement(PHXSkeleton, { className: 'mr-3 flex-1', type: 'single' })))),
|
|
793
|
+
item.showChild && item.child && (React.createElement(React.Fragment, null, item.child.map(function (children, childIndex) { return (React.createElement("div", { key: childIndex, className: classNames('relative') },
|
|
794
|
+
React.createElement("div", { style: (children === null || children === void 0 ? void 0 : children.current)
|
|
795
|
+
? styles.childMenuActiveBefore
|
|
796
|
+
: checkChildBefore(item.child, children)
|
|
797
|
+
? styles.childMenuBefBefore
|
|
798
|
+
: {} }),
|
|
799
|
+
(children === null || children === void 0 ? void 0 : children.isMicroservice) ? (React.createElement("a", { "aria-hidden": true, className: classNames('mx-3 flex cursor-pointer border-slate-200 p-2 text-[0.84rem]', (children === null || children === void 0 ? void 0 : children.current)
|
|
800
|
+
? 'rounded-lg bg-white text-[#353A44]' // màu chữ menu con khi active
|
|
801
|
+
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50 hover:text-[#353A44]'), href: children.path, onClick: enablePer(children.code, dataInitMain.perCode)
|
|
802
|
+
? undefined
|
|
803
|
+
: function (e) { return e.preventDefault(); } },
|
|
804
|
+
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
805
|
+
React.createElement("div", { className: 'w-3' }),
|
|
806
|
+
React.createElement("p", { className: classNames('my-[0.05rem] ml-3 leading-5', !enablePer(children.code, dataInitMain.perCode)
|
|
807
|
+
? 'font-normal text-gray-300'
|
|
808
|
+
: (children === null || children === void 0 ? void 0 : children.current)
|
|
809
|
+
? ''
|
|
810
|
+
: 'font-normal text-[#353A44]') }, children.name)))) : (React.createElement("div", { "aria-hidden": true, className: classNames('mx-3 flex cursor-pointer border-slate-200 p-2 text-[0.84rem]', (children === null || children === void 0 ? void 0 : children.current)
|
|
811
|
+
? 'rounded-lg bg-white text-[#353A44]' // màu chữ menu con khi active
|
|
812
|
+
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50 hover:text-[#353A44]'), onClick: enablePer(children.code, dataInitMain.perCode)
|
|
813
|
+
? function () { return subNavigationTriggerClicked(children, item); }
|
|
814
|
+
: undefined },
|
|
815
|
+
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
816
|
+
React.createElement("div", { className: 'w-3' }),
|
|
817
|
+
React.createElement("p", { className: classNames('my-[0.05rem] ml-3 leading-5', !enablePer(children.code, dataInitMain.perCode)
|
|
818
|
+
? 'font-normal text-gray-300'
|
|
819
|
+
: (children === null || children === void 0 ? void 0 : children.current)
|
|
820
|
+
? ''
|
|
821
|
+
: 'font-normal text-[#353A44]') }, children.name)))),
|
|
822
|
+
React.createElement("div", { style: (children === null || children === void 0 ? void 0 : children.current)
|
|
823
|
+
? styles.childMenuActiveAfter
|
|
824
|
+
: checkChildBefore(item.child, children)
|
|
825
|
+
? styles.childMenuBefAfter
|
|
826
|
+
: {} }))); }))))) : (React.createElement("div", { "aria-current": (item === null || item === void 0 ? void 0 : item.current) ? 'page' : undefined, className: classNames((item === null || item === void 0 ? void 0 : item.current)
|
|
827
|
+
? 'rounded-lg bg-white '
|
|
828
|
+
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50', // hover:bg-white
|
|
829
|
+
'mx-3 flex cursor-pointer border-slate-200 p-2') }, !dataInitMain.loadingMenu ? (React.createElement("div", { className: 'ml-1 flex items-center text-[0.84rem]' },
|
|
830
|
+
React.createElement("div", { className: 'flex items-center gap-x-3 text-gray-700' },
|
|
831
|
+
React.createElement("p", { className: classNames('font-normal leading-5 text-gray-300') }, item === null || item === void 0 ? void 0 : item.name)),
|
|
832
|
+
React.createElement("p", { className: 'mt-1 text-slate-500' }, item === null || item === void 0 ? void 0 : item.description))) : (React.createElement(PHXSkeleton, { className: 'mr-3 flex-1', type: 'single' })))))) : (React.createElement(React.Fragment, null,
|
|
833
|
+
(item === null || item === void 0 ? void 0 : item.isMicroservice) ? (React.createElement("a", { "aria-current": (item === null || item === void 0 ? void 0 : item.current) ? 'page' : undefined, "aria-hidden": true, className: classNames((item === null || item === void 0 ? void 0 : item.current)
|
|
834
|
+
? 'rounded-lg bg-white' // màu background menu cha khi active
|
|
835
|
+
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50', // màu background khi hover vào menu cha
|
|
836
|
+
'mx-3 flex cursor-pointer border-slate-200 p-2'), href: item.path }, !dataInitMain.loadingMenu ? (React.createElement("div", { className: 'ml-1 flex items-center text-[0.84rem]' },
|
|
837
|
+
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
838
|
+
React.createElement("p", { className: classNames('leading-5', (item === null || item === void 0 ? void 0 : item.current) ? '' : 'font-normal text-[#353A44]') }, item === null || item === void 0 ? void 0 : item.name)),
|
|
839
|
+
React.createElement("p", { className: 'mt-1 text-slate-500' }, item === null || item === void 0 ? void 0 : item.description))) : (React.createElement(PHXSkeleton, { className: 'mr-3 flex-1', type: 'single' })))) : (React.createElement("div", { "aria-current": (item === null || item === void 0 ? void 0 : item.current) ? 'page' : undefined, "aria-hidden": true, className: classNames((item === null || item === void 0 ? void 0 : item.current)
|
|
840
|
+
? 'rounded-lg bg-white' // màu background menu cha khi active
|
|
841
|
+
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50', // màu background khi hover vào menu cha
|
|
842
|
+
'mx-3 flex cursor-pointer border-slate-200 p-2'), onClick: function () { return subNavigationTriggerClicked(item); } }, !dataInitMain.loadingMenu ? (React.createElement("div", { className: 'ml-1 flex items-center text-[0.84rem]' },
|
|
843
|
+
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
844
|
+
React.createElement("p", { className: classNames('leading-5', (item === null || item === void 0 ? void 0 : item.current) ? '' : 'font-normal text-[#353A44]') }, item === null || item === void 0 ? void 0 : item.name)),
|
|
845
|
+
React.createElement("p", { className: 'mt-1 text-slate-500' }, item === null || item === void 0 ? void 0 : item.description))) : (React.createElement(PHXSkeleton, { className: 'mr-3 flex-1', type: 'single' })))),
|
|
846
|
+
item.showChild && item.child && (React.createElement(React.Fragment, null, item.child.map(function (children, index) { return (React.createElement("div", { key: index, className: classNames('relative', (children === null || children === void 0 ? void 0 : children.current) && 'child-menu-active', checkChildBefore(item.child, children) && 'child-menu-bef') }, (children === null || children === void 0 ? void 0 : children.isMicroservice) ? (React.createElement("a", { "aria-hidden": true, className: classNames('mx-1 flex cursor-pointer border-slate-200 p-2 text-[0.84rem]', (children === null || children === void 0 ? void 0 : children.current)
|
|
847
|
+
? 'rounded-lg bg-white text-gray-900 '
|
|
848
|
+
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50 hover:text-gray-900'), href: item.path },
|
|
768
849
|
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
769
850
|
React.createElement("div", { className: 'w-3' }),
|
|
770
|
-
React.createElement("p", { className: classNames('my-[0.05rem] ml-3 leading-5',
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
? ''
|
|
774
|
-
: 'font-normal text-[#353A44]') }, children.name)))) : (React.createElement("div", { "aria-hidden": true, className: classNames('mx-3 flex cursor-pointer border-slate-200 p-2 text-[0.84rem]', (children === null || children === void 0 ? void 0 : children.current)
|
|
775
|
-
? 'rounded-lg bg-white text-[#353A44]' // màu chữ menu con khi active
|
|
776
|
-
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50 hover:text-[#353A44]'), onClick: enablePer(children.code, dataInitMain.perCode)
|
|
777
|
-
? function () { return subNavigationTriggerClicked(children, item); }
|
|
778
|
-
: undefined },
|
|
851
|
+
React.createElement("p", { className: classNames('my-[0.05rem] ml-3 leading-5', (children === null || children === void 0 ? void 0 : children.current) ? 'font-semibold' : 'font-normal text-gray-600') }, children.name)))) : (React.createElement("div", { "aria-hidden": true, className: classNames('mx-1 flex cursor-pointer border-slate-200 p-2 text-[0.84rem]', (children === null || children === void 0 ? void 0 : children.current)
|
|
852
|
+
? 'rounded-lg bg-white text-gray-900 '
|
|
853
|
+
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50 hover:text-gray-900'), onClick: function () { return subNavigationTriggerClicked(children, item); } },
|
|
779
854
|
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
780
855
|
React.createElement("div", { className: 'w-3' }),
|
|
781
|
-
React.createElement("p", { className: classNames('my-[0.05rem] ml-3 leading-5',
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
: 'font-normal text-[#353A44]') }, children.name)))),
|
|
786
|
-
React.createElement("div", { style: (children === null || children === void 0 ? void 0 : children.current)
|
|
787
|
-
? styles.childMenuActiveAfter
|
|
788
|
-
: checkChildBefore(item.child, children)
|
|
789
|
-
? styles.childMenuBefAfter
|
|
790
|
-
: {} }))); }))))) : (React.createElement("div", { "aria-current": (item === null || item === void 0 ? void 0 : item.current) ? 'page' : undefined, className: classNames((item === null || item === void 0 ? void 0 : item.current)
|
|
791
|
-
? 'rounded-lg bg-white '
|
|
792
|
-
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50', // hover:bg-white
|
|
793
|
-
'mx-3 flex cursor-pointer border-slate-200 p-2') }, !dataInitMain.loadingMenu ? (React.createElement("div", { className: 'ml-1 flex items-center text-[0.84rem]' },
|
|
794
|
-
React.createElement("div", { className: 'flex items-center gap-x-3 text-gray-700' },
|
|
795
|
-
React.createElement("p", { className: classNames('font-normal leading-5 text-gray-300') }, item === null || item === void 0 ? void 0 : item.name)),
|
|
796
|
-
React.createElement("p", { className: 'mt-1 text-slate-500' }, item === null || item === void 0 ? void 0 : item.description))) : (React.createElement(PHXSkeleton, { className: 'mr-3 flex-1', type: 'single' })))))) : (React.createElement(React.Fragment, null,
|
|
797
|
-
(item === null || item === void 0 ? void 0 : item.isMicroservice) ? (React.createElement("a", { "aria-current": (item === null || item === void 0 ? void 0 : item.current) ? 'page' : undefined, "aria-hidden": true, className: classNames((item === null || item === void 0 ? void 0 : item.current)
|
|
798
|
-
? 'rounded-lg bg-white' // màu background menu cha khi active
|
|
799
|
-
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50', // màu background khi hover vào menu cha
|
|
800
|
-
'mx-3 flex cursor-pointer border-slate-200 p-2'), href: item.path }, !dataInitMain.loadingMenu ? (React.createElement("div", { className: 'ml-1 flex items-center text-[0.84rem]' },
|
|
801
|
-
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
802
|
-
React.createElement("p", { className: classNames('leading-5', (item === null || item === void 0 ? void 0 : item.current) ? '' : 'font-normal text-[#353A44]') }, item === null || item === void 0 ? void 0 : item.name)),
|
|
803
|
-
React.createElement("p", { className: 'mt-1 text-slate-500' }, item === null || item === void 0 ? void 0 : item.description))) : (React.createElement(PHXSkeleton, { className: 'mr-3 flex-1', type: 'single' })))) : (React.createElement("div", { "aria-current": (item === null || item === void 0 ? void 0 : item.current) ? 'page' : undefined, "aria-hidden": true, className: classNames((item === null || item === void 0 ? void 0 : item.current)
|
|
856
|
+
React.createElement("p", { className: classNames('my-[0.05rem] ml-3 leading-5', (children === null || children === void 0 ? void 0 : children.current) ? 'font-semibold' : 'font-normal text-gray-600') }, children.name)))))); })))))));
|
|
857
|
+
}),
|
|
858
|
+
activityHistoryChild.map(function (item, subNavIndex) { return (React.createElement("div", { key: subNavIndex },
|
|
859
|
+
React.createElement("div", { "aria-current": (item === null || item === void 0 ? void 0 : item.current) ? 'page' : undefined, "aria-hidden": true, className: classNames((item === null || item === void 0 ? void 0 : item.current) && !dataInitMain.loadingMenu
|
|
804
860
|
? 'rounded-lg bg-white' // màu background menu cha khi active
|
|
805
861
|
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50', // màu background khi hover vào menu cha
|
|
806
|
-
'mx-3 flex cursor-pointer border-slate-200 p-2'), onClick: function () {
|
|
862
|
+
'mx-3 flex cursor-pointer border-slate-200 p-2'), onClick: function () {
|
|
863
|
+
handleClickActivityHistoryChild(item);
|
|
864
|
+
subNavigationTriggerClicked(item);
|
|
865
|
+
} }, !dataInitMain.loadingMenu ? (React.createElement("div", { className: 'ml-1 flex items-center text-[0.84rem]' },
|
|
807
866
|
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
808
867
|
React.createElement("p", { className: classNames('leading-5', (item === null || item === void 0 ? void 0 : item.current) ? '' : 'font-normal text-[#353A44]') }, item === null || item === void 0 ? void 0 : item.name)),
|
|
809
|
-
React.createElement("p", { className: 'mt-1 text-slate-500' }, item === null || item === void 0 ? void 0 : item.description))) : (
|
|
810
|
-
item.showChild && item.child && (React.createElement(React.Fragment, null, item.child.map(function (children, index) { return (React.createElement("div", { key: index, className: classNames('relative', (children === null || children === void 0 ? void 0 : children.current) && 'child-menu-active', checkChildBefore(item.child, children) && 'child-menu-bef') }, (children === null || children === void 0 ? void 0 : children.isMicroservice) ? (React.createElement("a", { "aria-hidden": true, className: classNames('mx-1 flex cursor-pointer border-slate-200 p-2 text-[0.84rem]', (children === null || children === void 0 ? void 0 : children.current)
|
|
811
|
-
? 'rounded-lg bg-white text-gray-900 '
|
|
812
|
-
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50 hover:text-gray-900'), href: item.path },
|
|
813
|
-
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
814
|
-
React.createElement("div", { className: 'w-3' }),
|
|
815
|
-
React.createElement("p", { className: classNames('my-[0.05rem] ml-3 leading-5', (children === null || children === void 0 ? void 0 : children.current) ? 'font-semibold' : 'font-normal text-gray-600') }, children.name)))) : (React.createElement("div", { "aria-hidden": true, className: classNames('mx-1 flex cursor-pointer border-slate-200 p-2 text-[0.84rem]', (children === null || children === void 0 ? void 0 : children.current)
|
|
816
|
-
? 'rounded-lg bg-white text-gray-900 '
|
|
817
|
-
: 'hover:rounded-lg hover:bg-white hover:bg-opacity-50 hover:text-gray-900'), onClick: function () { return subNavigationTriggerClicked(children, item); } },
|
|
818
|
-
React.createElement("div", { className: 'flex items-center gap-x-3' },
|
|
819
|
-
React.createElement("div", { className: 'w-3' }),
|
|
820
|
-
React.createElement("p", { className: classNames('my-[0.05rem] ml-3 leading-5', (children === null || children === void 0 ? void 0 : children.current) ? 'font-semibold' : 'font-normal text-gray-600') }, children.name)))))); })))))));
|
|
821
|
-
}))))))))),
|
|
868
|
+
React.createElement("p", { className: 'mt-1 text-slate-500' }, item === null || item === void 0 ? void 0 : item.description))) : ('')))); }))))))))),
|
|
822
869
|
React.createElement("div", { className: 'flex min-w-0 flex-1 flex-col overflow-hidden' },
|
|
823
870
|
React.createElement("main", { className: 'flex flex-1 overflow-hidden' },
|
|
824
871
|
React.createElement("section", { "aria-labelledby": 'primary-heading', className: 'flex h-full min-w-0 flex-1 flex-col lg:order-last' },
|