upd: project
Deskripsi: - delete project yg telah dibatalkan - akses fitur by user role - tampilan text yg panjang No Issues
This commit is contained in:
@@ -22,8 +22,9 @@ type Props = {
|
||||
position: string;
|
||||
};
|
||||
|
||||
export default function SectionMember() {
|
||||
export default function SectionMember({ status }: { status: number | undefined }) {
|
||||
const dispatch = useDispatch()
|
||||
const entityUser = useSelector((state: any) => state.user)
|
||||
const update = useSelector((state: any) => state.projectUpdate)
|
||||
const [isModal, setModal] = useState(false);
|
||||
const { token, decryptToken } = useAuthSession();
|
||||
@@ -89,9 +90,8 @@ export default function SectionMember() {
|
||||
borderType="bottom"
|
||||
icon={<ImageUser src={`https://wibu-storage.wibudev.com/api/files/${item.img}`} />}
|
||||
title={item.name}
|
||||
subtitle={item.position}
|
||||
rightTopInfo="Anggota"
|
||||
onPress={() => {
|
||||
if (status == 3) return
|
||||
setMemberChoose({
|
||||
id: item.idUser,
|
||||
name: item.name,
|
||||
@@ -128,24 +128,26 @@ export default function SectionMember() {
|
||||
router.push(`/member/${memberChoose.id}`);
|
||||
}}
|
||||
/>
|
||||
|
||||
<MenuItemRow
|
||||
icon={
|
||||
<MaterialCommunityIcons
|
||||
name="account-remove"
|
||||
color="black"
|
||||
size={25}
|
||||
/>
|
||||
}
|
||||
title="Keluarkan"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
title: "Konfirmasi",
|
||||
desc: "Apakah Anda yakin ingin mengeluarkan anggota?",
|
||||
onPress: () => { handleDeleteMember() },
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{
|
||||
entityUser.role != "user" && entityUser.role != "coadmin" &&
|
||||
<MenuItemRow
|
||||
icon={
|
||||
<MaterialCommunityIcons
|
||||
name="account-remove"
|
||||
color="black"
|
||||
size={25}
|
||||
/>
|
||||
}
|
||||
title="Keluarkan"
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
title: "Konfirmasi",
|
||||
desc: "Apakah Anda yakin ingin mengeluarkan anggota?",
|
||||
onPress: () => { handleDeleteMember() },
|
||||
});
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</View>
|
||||
</DrawerBottom>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user