feat: tambah fitur approval task pada project dan divisi
- tambah komponen ModalRiwayatApproval dan ModalTolakApproval - update itemSectionTanggalTugas untuk mendukung status menunggu persetujuan - update sectionTanggalTugas (project) dan sectionTanggalTugasTask (divisi) dengan alur approval lengkap - tambah API approval project task dan division task di lib/api.ts - tambah toggle approver di headerMemberDetail dan tampilkan badge approver di detail member - update carouselHome untuk dispatch isApprover ke Redux - update drawerBottom untuk mendukung scroll pada modal - ganti label 'Belum dimulai' menjadi 'Belum ada tugas yang diselesaikan'
This commit is contained in:
@@ -36,7 +36,7 @@ export default function CaraouselHome({ refreshing }: { refreshing: boolean }) {
|
||||
async function handleUser() {
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
const response = await apiGetProfile({ id: hasil })
|
||||
dispatch(setEntityUser({ role: response.data.idUserRole, admin: false }))
|
||||
dispatch(setEntityUser({ role: response.data.idUserRole, admin: false, isApprover: response.data.isApprover ?? false }))
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -59,7 +59,7 @@ export default function CaraouselHome2({ refreshing }: { refreshing: boolean })
|
||||
// Sync User Role to Redux
|
||||
useEffect(() => {
|
||||
if (profile) {
|
||||
dispatch(setEntityUser({ role: profile.idUserRole, admin: false }))
|
||||
dispatch(setEntityUser({ role: profile.idUserRole, admin: false, isApprover: profile.isApprover ?? false }))
|
||||
}
|
||||
}, [profile, dispatch])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user