fix : tampilan
deskripsi: - detail divisi > on klik pda file - update project dan tugas divisi tidak perlu loading judul project - tampilan notifikasi top right info No Issues
This commit is contained in:
@@ -104,7 +104,7 @@ export default function AddMemberTask() {
|
||||
)
|
||||
}}
|
||||
/>
|
||||
<View style={[Styles.p15]}>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<InputSearch onChange={(val) => setSearch(val)} value={search} />
|
||||
|
||||
{
|
||||
@@ -142,10 +142,10 @@ export default function AddMemberTask() {
|
||||
!found && onChoose(item.idUser, item.name, item.img)
|
||||
}}
|
||||
>
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
<View style={[Styles.rowItemsCenter, Styles.w80]}>
|
||||
<ImageUser src={`https://wibu-storage.wibudev.com/api/files/${item.img}`} border />
|
||||
<View style={[Styles.ml10]}>
|
||||
<Text style={[Styles.textDefault]}>{item.name}</Text>
|
||||
<Text style={[Styles.textDefault]} numberOfLines={1}>{item.name}</Text>
|
||||
{
|
||||
found && <Text style={[Styles.textInformation, Styles.cGray]}>sudah menjadi anggota</Text>
|
||||
}
|
||||
|
||||
@@ -31,14 +31,16 @@ export default function DetailTaskDivision() {
|
||||
const update = useSelector((state: any) => state.taskUpdate)
|
||||
|
||||
|
||||
async function handleLoad() {
|
||||
async function handleLoad(cat: 'data' | 'progress') {
|
||||
try {
|
||||
setLoading(true)
|
||||
if (cat == 'data') setLoading(true)
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
const response = await apiGetTaskOne({ id: detail, user: hasil, cat: 'data' })
|
||||
setData(response.data)
|
||||
const responseProgress = await apiGetTaskOne({ id: detail, user: hasil, cat: 'progress' })
|
||||
setProgress(responseProgress.data.progress)
|
||||
const response = await apiGetTaskOne({ id: detail, user: hasil, cat: cat })
|
||||
if (cat == 'data') {
|
||||
setData(response.data)
|
||||
} else {
|
||||
setProgress(response.data.progress)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
@@ -47,8 +49,12 @@ export default function DetailTaskDivision() {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
handleLoad()
|
||||
}, [update.progress, update.data])
|
||||
handleLoad('data')
|
||||
}, [update.data])
|
||||
|
||||
useEffect(() => {
|
||||
handleLoad('progress')
|
||||
}, [update.progress])
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
@@ -57,7 +63,7 @@ export default function DetailTaskDivision() {
|
||||
headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: loading ? 'Loading... ' : data?.title,
|
||||
headerTitleAlign: 'center',
|
||||
headerRight: () => <HeaderRightTaskDetail id={detail} division={id} status={data?.status}/>,
|
||||
headerRight: () => <HeaderRightTaskDetail id={detail} division={id} status={data?.status} />,
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
|
||||
Reference in New Issue
Block a user