hi-tm 0.15.3 → 0.15.5
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.
|
@@ -136,6 +136,7 @@ const HeaderLayout = ({ appVersion, branchName, userFirstName, sidebarHandler, u
|
|
|
136
136
|
logoName: "",
|
|
137
137
|
subBranch: [],
|
|
138
138
|
});
|
|
139
|
+
const [expandSubBranch, setIsExpandSubBranch] = (0, react_1.useState)(false);
|
|
139
140
|
const modalCloseRefPC = (0, react_1.useRef)(null);
|
|
140
141
|
const modalCloseRefMobile = (0, react_1.useRef)(null);
|
|
141
142
|
const modalCloseRefuserBranchesPC = (0, react_1.useRef)(null);
|
|
@@ -159,6 +160,7 @@ const HeaderLayout = ({ appVersion, branchName, userFirstName, sidebarHandler, u
|
|
|
159
160
|
}
|
|
160
161
|
}, [userBranchesData]);
|
|
161
162
|
const selectItemBranchHandler = (branch) => {
|
|
163
|
+
setIsExpandSubBranch(true);
|
|
162
164
|
if (userBranchesData !== undefined && userBranchesData.length > 1) {
|
|
163
165
|
setBranchNameSelected(branch);
|
|
164
166
|
selectBranchHandler(branch);
|
|
@@ -309,15 +311,8 @@ const HeaderLayout = ({ appVersion, branchName, userFirstName, sidebarHandler, u
|
|
|
309
311
|
: "scale-y-0 opacity-0"} origin-top` },
|
|
310
312
|
react_1.default.createElement("ul", { className: "flex h-auto w-full flex-col items-start justify-center gap-3 bg-inherit p-3" }, userBranchesData &&
|
|
311
313
|
userBranchesData.map((item) => (react_1.default.createElement("li", { onClick: () => selectItemBranchHandler(item), key: item?.id, className: "customTransition flex w-full flex-row items-center justify-end gap-2 rounded-tiny px-5 py-2 text-text-color-primary hover:bg-gray-primary" },
|
|
312
|
-
item?.subBranch?.length > 0 && (
|
|
313
|
-
|
|
314
|
-
// alt="arrowLeft"
|
|
315
|
-
// src={"/icons/arrow-left.svg"}
|
|
316
|
-
// width={10}
|
|
317
|
-
// height={10}
|
|
318
|
-
// />
|
|
319
|
-
react_1.default.createElement("svg", { width: "30", height: "30", viewBox: "0 0 24 24", fill: "black", xmlns: "http://www.w3.org/2000/svg", className: "transition-transform" },
|
|
320
|
-
react_1.default.createElement("path", { d: "M8 5L15 12L8 19", stroke: "black", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }))),
|
|
314
|
+
item?.subBranch?.length > 0 && (react_1.default.createElement("svg", { width: "30", height: "30", viewBox: "0 0 24 24", fill: "black", xmlns: "http://www.w3.org/2000/svg", className: "transition-transform" },
|
|
315
|
+
react_1.default.createElement("path", { d: "M15 5L8 12L15 19", stroke: "rgba(0, 0, 0, 0.40)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }))),
|
|
321
316
|
react_1.default.createElement(image_1.default, { src: item.logoName
|
|
322
317
|
? `${baseUrlCDN}/${item.urlName || branchName}/${item.logoName}`
|
|
323
318
|
: imageDefaultSRC, alt: "logo.svg", width: 16, height: 16, className: "rounded-xl" }),
|
|
@@ -12,7 +12,7 @@ export interface HeaderLayoutProps {
|
|
|
12
12
|
iconsSRC: iconsSRC;
|
|
13
13
|
cdnURL: string | undefined;
|
|
14
14
|
imageDefaultSRC: string;
|
|
15
|
-
userBranchesData: userBranchesDataType[];
|
|
15
|
+
userBranchesData: userBranchesDataType[] | [];
|
|
16
16
|
selectBranchHandler: (item: userBranchesDataType) => void | userBranchesDataType;
|
|
17
17
|
sidebarData: SideBarItem[];
|
|
18
18
|
searchIconSRC: string;
|