feat: tambah fitur lampiran file pada tugas kegiatan dan tugas divisi
This commit is contained in:
@@ -26,6 +26,7 @@ type Props = {
|
||||
dateStart: string;
|
||||
dateEnd: string;
|
||||
createdAt: string;
|
||||
files?: { name: string; extension: string }[];
|
||||
};
|
||||
|
||||
export default function SectionTanggalTugasProject({ status, member, refreshing }: { status: number | undefined, member: boolean, refreshing?: boolean }) {
|
||||
@@ -144,12 +145,9 @@ export default function SectionTanggalTugasProject({ status, member, refreshing
|
||||
title={item.title}
|
||||
dateStart={item.dateStart}
|
||||
dateEnd={item.dateEnd}
|
||||
files={item.files ?? []}
|
||||
onPress={() => {
|
||||
if (status == 3 || (!member && (entityUser.role == "user" || entityUser.role == "coadmin"))) return
|
||||
setTugas({
|
||||
id: item.id,
|
||||
status: item.status
|
||||
})
|
||||
setTugas({ id: item.id, status: item.status })
|
||||
setModal(true)
|
||||
}}
|
||||
/>
|
||||
@@ -169,65 +167,54 @@ export default function SectionTanggalTugasProject({ status, member, refreshing
|
||||
>
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={
|
||||
<MaterialCommunityIcons
|
||||
name="list-status"
|
||||
color={colors.text}
|
||||
size={25}
|
||||
/>
|
||||
}
|
||||
title="Update Status"
|
||||
onPress={() => {
|
||||
setModal(false);
|
||||
setTimeout(() => {
|
||||
setSelect(true);
|
||||
}, 600)
|
||||
}}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={
|
||||
<MaterialCommunityIcons
|
||||
name="pencil-outline"
|
||||
color={colors.text}
|
||||
size={25}
|
||||
/>
|
||||
}
|
||||
title="Edit Tugas"
|
||||
onPress={() => {
|
||||
setModal(false);
|
||||
router.push(`/project/update/${tugas.id}`);
|
||||
}}
|
||||
/>
|
||||
|
||||
<MenuItemRow
|
||||
icon={
|
||||
<MaterialCommunityIcons
|
||||
name="clock-time-three-outline"
|
||||
color={colors.text}
|
||||
size={25}
|
||||
/>
|
||||
}
|
||||
icon={<MaterialCommunityIcons name="clock-time-three-outline" color={colors.text} size={25} />}
|
||||
title="Detail Waktu"
|
||||
onPress={() => {
|
||||
setModal(false);
|
||||
setTimeout(() => {
|
||||
setModalDetail(true)
|
||||
}, 600)
|
||||
setTimeout(() => setModalDetail(true), 600)
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt15]}>
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus Tugas"
|
||||
icon={<MaterialCommunityIcons name="file-multiple-outline" color={colors.text} size={25} />}
|
||||
title="File Tugas"
|
||||
onPress={() => {
|
||||
setModal(false)
|
||||
setTimeout(() => {
|
||||
setShowDeleteModal(true)
|
||||
}, 600)
|
||||
setModal(false);
|
||||
router.push(`/project/${id}/tugas-file/${tugas.id}?member=${member}`);
|
||||
}}
|
||||
/>
|
||||
{(member || (entityUser.role != "user" && entityUser.role != "coadmin")) && status != 3 && (
|
||||
<>
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="list-status" color={colors.text} size={25} />}
|
||||
title="Update Status"
|
||||
onPress={() => {
|
||||
setModal(false);
|
||||
setTimeout(() => setSelect(true), 600)
|
||||
}}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="pencil-outline" color={colors.text} size={25} />}
|
||||
title="Edit Tugas"
|
||||
onPress={() => {
|
||||
setModal(false);
|
||||
router.push(`/project/update/${tugas.id}`);
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
{(member || (entityUser.role != "user" && entityUser.role != "coadmin")) && status != 3 && (
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt15]}>
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus Tugas"
|
||||
onPress={() => {
|
||||
setModal(false)
|
||||
setTimeout(() => setShowDeleteModal(true), 600)
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
</DrawerBottom>
|
||||
|
||||
<ModalConfirmation
|
||||
|
||||
Reference in New Issue
Block a user