diff --git a/app/(application)/announcement/create.tsx b/app/(application)/announcement/create.tsx index b9b2c81..1fcd2ad 100644 --- a/app/(application)/announcement/create.tsx +++ b/app/(application)/announcement/create.tsx @@ -149,7 +149,7 @@ export default function CreateAnnouncement() { {item.name} { item.Division.map((division: any, i: any) => ( - + {division.name} diff --git a/app/(application)/announcement/edit/[id].tsx b/app/(application)/announcement/edit/[id].tsx index 011c22e..f6083f5 100644 --- a/app/(application)/announcement/edit/[id].tsx +++ b/app/(application)/announcement/edit/[id].tsx @@ -193,7 +193,7 @@ export default function EditAnnouncement() { {item.name} { item.Division.map((division: any, i: any) => ( - + {division.name} diff --git a/app/(application)/banner/[id].tsx b/app/(application)/banner/[id].tsx index e6e91a4..998e14b 100644 --- a/app/(application)/banner/[id].tsx +++ b/app/(application)/banner/[id].tsx @@ -43,8 +43,6 @@ export default function EditBanner() { if (!result.canceled) { setSelectedImage(result.assets[0].uri); setImgForm(result.assets[0]); - } else { - alert("Tidak ada gambar yang dipilih"); } }; diff --git a/app/(application)/banner/create.tsx b/app/(application)/banner/create.tsx index 1b491fa..760cf6a 100644 --- a/app/(application)/banner/create.tsx +++ b/app/(application)/banner/create.tsx @@ -42,8 +42,6 @@ export default function CreateBanner() { if (result.assets?.[0].uri) { setSelectedImage(result.assets[0].uri); setImgForm(result.assets[0]); - } else { - alert("Tidak ada gambar yang dipilih"); } } }; diff --git a/app/(application)/banner/index.tsx b/app/(application)/banner/index.tsx index a1f0e4a..bb15f77 100644 --- a/app/(application)/banner/index.tsx +++ b/app/(application)/banner/index.tsx @@ -155,7 +155,7 @@ export default function BannerList() { /> } - title="Lihat File" + title="Lihat / Share" onPress={() => { openFile() }} /> Informasi + { loading ? diff --git a/app/(application)/member/create.tsx b/app/(application)/member/create.tsx index f0c5ff4..651d395 100644 --- a/app/(application)/member/create.tsx +++ b/app/(application)/member/create.tsx @@ -201,9 +201,6 @@ export default function CreateMember() { if (!result.canceled) { setSelectedImage(result.assets[0].uri); setImgForm(result.assets[0]); - - } else { - alert("Tidak ada gambar yang dipilih"); } }; diff --git a/app/(application)/member/edit/[id].tsx b/app/(application)/member/edit/[id].tsx index 16642bf..98f54d3 100644 --- a/app/(application)/member/edit/[id].tsx +++ b/app/(application)/member/edit/[id].tsx @@ -228,7 +228,6 @@ export default function EditMember() { setSelectedImage(result.assets[0].uri); setImgForm(result.assets[0]); } else { - alert("Tidak ada gambar yang dipilih"); setErrorImg(false) } }; diff --git a/components/division/fileDivisionDetail.tsx b/components/division/fileDivisionDetail.tsx index 6a72315..a576c5e 100644 --- a/components/division/fileDivisionDetail.tsx +++ b/components/division/fileDivisionDetail.tsx @@ -51,7 +51,7 @@ export default function FileDivisionDetail() { const openFile = (item: Props) => { - setLoadingOpen(true) + if (Platform.OS == 'android') setLoadingOpen(true) let remoteUrl = 'https://wibu-storage.wibudev.com/api/files/' + item.idStorage; const fileName = item.name + '.' + item.extension; let localPath = `${FileSystem.documentDirectory}/${fileName}`; @@ -59,6 +59,7 @@ export default function FileDivisionDetail() { FileSystem.downloadAsync(remoteUrl, localPath).then(async ({ uri }) => { const contentURL = await FileSystem.getContentUriAsync(uri); + setLoadingOpen(false) try { if (Platform.OS == 'android') { // open with android intent @@ -79,7 +80,7 @@ export default function FileDivisionDetail() { } catch (error) { Alert.alert('INFO', 'Gagal membuka file, tidak ada aplikasi yang dapat membuka file ini'); } finally { - setLoadingOpen(false) + if (Platform.OS == 'android') setLoadingOpen(false) } }); }; diff --git a/components/inputForm.tsx b/components/inputForm.tsx index 57524e5..dded8b6 100644 --- a/components/inputForm.tsx +++ b/components/inputForm.tsx @@ -78,11 +78,11 @@ export function InputForm({ label, value, placeholder, onChange, info, disable, placeholder={placeholder} keyboardType={type} editable={!disable} - style={[Styles.inputRoundForm, error && { borderColor: "red" }, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }, { color: 'black' }, multiline && { height: 100, textAlignVertical: 'top' }]} + style={[Styles.inputRoundForm, error && { borderColor: "red" }, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }, { color: 'black' }, multiline && { height: 150, textAlignVertical: 'top' }]} onChangeText={onChange} placeholderTextColor={'gray'} multiline={multiline} - numberOfLines={multiline ? 4 : undefined} + numberOfLines={multiline ? 5 : undefined} /> {error && ({errorText})} {info != undefined && ({info})} diff --git a/components/labelStatus.tsx b/components/labelStatus.tsx index 84a330d..6ab5d10 100644 --- a/components/labelStatus.tsx +++ b/components/labelStatus.tsx @@ -10,7 +10,7 @@ type Props = { } export default function LabelStatus({ category, text, size }: Props) { return ( - + {text} ) diff --git a/components/project/sectionFile.tsx b/components/project/sectionFile.tsx index 24caa18..524b560 100644 --- a/components/project/sectionFile.tsx +++ b/components/project/sectionFile.tsx @@ -173,7 +173,7 @@ export default function SectionFile({ status, member, refreshing }: { status: nu } - title="Lihat File" + title="Lihat / Share" onPress={() => { openFile() }} diff --git a/components/task/sectionFileTask.tsx b/components/task/sectionFileTask.tsx index 2d35b6d..68bedc0 100644 --- a/components/task/sectionFileTask.tsx +++ b/components/task/sectionFileTask.tsx @@ -157,7 +157,7 @@ export default function SectionFileTask({refreshing}: {refreshing: boolean}) { } - title="Lihat File" + title="Lihat / Share" onPress={() => { openFile() // setModal(false)