Merge pull request 'amalia/22-sept-25' (#39) from amalia/22-sept-25 into join
Reviewed-on: bip/mobile-darmasaba#39
This commit is contained in:
@@ -42,6 +42,7 @@ export default function CreateProject() {
|
|||||||
const taskCreate = useSelector((state: any) => state.taskCreate);
|
const taskCreate = useSelector((state: any) => state.taskCreate);
|
||||||
const update = useSelector((state: any) => state.projectUpdate)
|
const update = useSelector((state: any) => state.projectUpdate)
|
||||||
const entityUser = useSelector((state: any) => state.user);
|
const entityUser = useSelector((state: any) => state.user);
|
||||||
|
const userLogin = useSelector((state: any) => state.entities)
|
||||||
const [fileForm, setFileForm] = useState<any[]>([])
|
const [fileForm, setFileForm] = useState<any[]>([])
|
||||||
const [indexDelFile, setIndexDelFile] = useState<number>(0)
|
const [indexDelFile, setIndexDelFile] = useState<number>(0)
|
||||||
const [disableBtn, setDisableBtn] = useState(true)
|
const [disableBtn, setDisableBtn] = useState(true)
|
||||||
@@ -86,7 +87,7 @@ export default function CreateProject() {
|
|||||||
} else {
|
} else {
|
||||||
setError(error => ({ ...error, title: false }))
|
setError(error => ({ ...error, title: false }))
|
||||||
}
|
}
|
||||||
} else if (cat == "task" && hitung > 1) {
|
} else if (cat == "task" && hitung > 2) {
|
||||||
if (taskCreate.length == 0) {
|
if (taskCreate.length == 0) {
|
||||||
setError(error => ({ ...error, task: true }))
|
setError(error => ({ ...error, task: true }))
|
||||||
} else {
|
} else {
|
||||||
@@ -114,6 +115,13 @@ export default function CreateProject() {
|
|||||||
validationForm('task', '');
|
validationForm('task', '');
|
||||||
}, [taskCreate]);
|
}, [taskCreate]);
|
||||||
|
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (entityUser.role != "supadmin" && entityUser.role != "developer") {
|
||||||
|
validationForm('group', userLogin.idGroup, userLogin.group);
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
async function handleCreate() {
|
async function handleCreate() {
|
||||||
try {
|
try {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default function ViewLogin({ onValidate }: Props) {
|
|||||||
return Toast.show({ type: 'small', text1: response.message, position: 'top' })
|
return Toast.show({ type: 'small', text1: response.message, position: 'top' })
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return Toast.show({ type: 'small', text1: 'Terjadi kesalahan', position: 'top' })
|
return Toast.show({ type: 'small', text1: `Terjadi kesalahan, coba lagi`, position: 'top' })
|
||||||
} finally {
|
} finally {
|
||||||
setLoadingLogin(false)
|
setLoadingLogin(false)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ export default function DiscussionItem({ title, user, date, onPress }: Props) {
|
|||||||
<Pressable style={[Styles.wrapItemDiscussion]} onPress={onPress}>
|
<Pressable style={[Styles.wrapItemDiscussion]} onPress={onPress}>
|
||||||
<View style={[Styles.rowItemsCenter, Styles.mb10]}>
|
<View style={[Styles.rowItemsCenter, Styles.mb10]}>
|
||||||
<Ionicons name="chatbox-ellipses-outline" size={22} color="black" style={Styles.mr10} />
|
<Ionicons name="chatbox-ellipses-outline" size={22} color="black" style={Styles.mr10} />
|
||||||
<Text style={{ fontWeight: 'bold' }} numberOfLines={1} ellipsizeMode="tail">{title}</Text>
|
<View style={[{flex:1}]}>
|
||||||
|
<Text style={{ fontWeight: 'bold' }} numberOfLines={1} ellipsizeMode="tail">{title}</Text>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={Styles.rowSpaceBetween}>
|
<View style={Styles.rowSpaceBetween}>
|
||||||
<View style={Styles.rowItemsCenter}>
|
<View style={Styles.rowItemsCenter}>
|
||||||
|
|||||||
Reference in New Issue
Block a user