Update Versi 1.5.27 #32

Merged
bagasbanuna merged 1009 commits from staging into main 2025-12-17 12:22:28 +08:00
131 changed files with 4594 additions and 659 deletions
Showing only changes of commit 2c5c075fb0 - Show all commits

View File

@@ -89,7 +89,7 @@ export default function DrawerKatalogNew({ opened, close, userRoleId, userId }:
))}
<Component_ButtonLogout userId={userId} />
{userRoleId != "1" && (
{userRoleId != "1" && userRoleId != "" && (
<Stack align="center" spacing={"xs"}>
<ActionIcon
variant="transparent"

View File

@@ -15,9 +15,11 @@ export default function LayoutKatalogNew({ children }: { children: any }) {
const [userRoleId, setUserRoleId] = useState("")
const [userLoginId, setUserLoginId] = useState("")
const [opened, { open, close }] = useDisclosure()
const [loading, setLoading] = useState(true);
async function getProfile() {
try {
setLoading(true)
const response = await apiGetUserProfile(`?profile=${param.id}`)
const response2 = await funGetUserIdByToken()
if (response.success) {
@@ -27,6 +29,8 @@ export default function LayoutKatalogNew({ children }: { children: any }) {
}
} catch (error) {
console.error(error);
} finally {
setLoading(false)
}
}
@@ -41,13 +45,15 @@ export default function LayoutKatalogNew({ children }: { children: any }) {
<UIGlobal_LayoutHeaderTamplate
title="KATALOG"
customButtonRight={
authorId !== userLoginId ? (
<ActionIcon disabled variant="transparent"></ActionIcon>
) : (
<ActionIcon c="white" variant="transparent" onClick={() => open()}>
<IconDotsVertical />
</ActionIcon>
)
loading ?
<ActionIcon disabled variant="transparent"></ActionIcon> :
authorId == userLoginId ? (
<ActionIcon c="white" variant="transparent" onClick={() => open()}>
<IconDotsVertical />
</ActionIcon>
) : (
<ActionIcon disabled variant="transparent"></ActionIcon>
)
}
/>
}