fix : ios
Deskripsi: - title home align left - nama file pada view banner - modal crash pada group dan jabatan No Issues
This commit is contained in:
@@ -23,7 +23,7 @@ import { useDispatch, useSelector } from "react-redux"
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
title: string
|
||||||
extension: string
|
extension: string
|
||||||
image: string
|
image: string
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ export default function BannerList() {
|
|||||||
setModal(false)
|
setModal(false)
|
||||||
setLoadingOpen(true)
|
setLoadingOpen(true)
|
||||||
let remoteUrl = 'https://wibu-storage.wibudev.com/api/files/' + selectFile?.image;
|
let remoteUrl = 'https://wibu-storage.wibudev.com/api/files/' + selectFile?.image;
|
||||||
const fileName = selectFile?.name + '.' + selectFile?.extension;
|
const fileName = selectFile?.title + '.' + selectFile?.extension;
|
||||||
let localPath = `${FileSystem.documentDirectory}/${fileName}`;
|
let localPath = `${FileSystem.documentDirectory}/${fileName}`;
|
||||||
const mimeType = mime.lookup(fileName)
|
const mimeType = mime.lookup(fileName)
|
||||||
|
|
||||||
@@ -81,7 +81,6 @@ export default function BannerList() {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
if (Platform.OS == 'android') {
|
if (Platform.OS == 'android') {
|
||||||
// open with android intent
|
|
||||||
await startActivityAsync(
|
await startActivityAsync(
|
||||||
'android.intent.action.VIEW',
|
'android.intent.action.VIEW',
|
||||||
{
|
{
|
||||||
@@ -90,9 +89,6 @@ export default function BannerList() {
|
|||||||
type: mimeType as string,
|
type: mimeType as string,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// or
|
|
||||||
// Sharing.shareAsync(localPath);
|
|
||||||
|
|
||||||
} else if (Platform.OS == 'ios') {
|
} else if (Platform.OS == 'ios') {
|
||||||
Sharing.shareAsync(localPath);
|
Sharing.shareAsync(localPath);
|
||||||
}
|
}
|
||||||
@@ -123,6 +119,7 @@ export default function BannerList() {
|
|||||||
onRefresh={handleRefresh}
|
onRefresh={handleRefresh}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
style={[{height:'100%'}]}
|
||||||
>
|
>
|
||||||
<View style={[Styles.p15, Styles.mb100]}>
|
<View style={[Styles.p15, Styles.mb100]}>
|
||||||
{entities.map((index: any, key: number) => (
|
{entities.map((index: any, key: number) => (
|
||||||
@@ -146,7 +143,7 @@ export default function BannerList() {
|
|||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title="Menu">
|
<DrawerBottom animation="slide" isVisible={isModal} setVisible={() => setModal(false)} title="Menu">
|
||||||
<View style={Styles.rowItemsCenter}>
|
<View style={Styles.rowItemsCenter}>
|
||||||
<MenuItemRow
|
<MenuItemRow
|
||||||
icon={<MaterialCommunityIcons name="pencil-outline" color="black" size={25} />}
|
icon={<MaterialCommunityIcons name="pencil-outline" color="black" size={25} />}
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ export default function Index() {
|
|||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title={titleChoose}>
|
<DrawerBottom animation="slide" isVisible={isModal} setVisible={() => setModal(false)} title={titleChoose}>
|
||||||
<View style={Styles.rowItemsCenter}>
|
<View style={Styles.rowItemsCenter}>
|
||||||
<MenuItemRow
|
<MenuItemRow
|
||||||
icon={<MaterialCommunityIcons name="toggle-switch-off-outline" color="black" size={25} />}
|
icon={<MaterialCommunityIcons name="toggle-switch-off-outline" color="black" size={25} />}
|
||||||
@@ -195,13 +195,15 @@ export default function Index() {
|
|||||||
title="Edit"
|
title="Edit"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setModal(false)
|
setModal(false)
|
||||||
setVisibleEdit(true)
|
setTimeout(() => {
|
||||||
|
setVisibleEdit(true)
|
||||||
|
}, 600);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</DrawerBottom>
|
</DrawerBottom>
|
||||||
|
|
||||||
<DrawerBottom animation="none" height={30} isVisible={isVisibleEdit} setVisible={setVisibleEdit} title="Edit Lembaga Desa">
|
<DrawerBottom animation="none" height={30} isVisible={isVisibleEdit} setVisible={() => setVisibleEdit(false)} title="Edit Lembaga Desa">
|
||||||
<View style={{ flex: 1 }}>
|
<View style={{ flex: 1 }}>
|
||||||
<View>
|
<View>
|
||||||
<InputForm type="default" placeholder="Nama Lembaga Desa" required label="Lembaga Desa" value={titleChoose} onChange={setTitleChoose} />
|
<InputForm type="default" placeholder="Nama Lembaga Desa" required label="Lembaga Desa" value={titleChoose} onChange={setTitleChoose} />
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default function Home() {
|
|||||||
/>
|
/>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<CaraouselHome />
|
<CaraouselHome />
|
||||||
<View style={[Styles.ph15]}>
|
<View style={[Styles.ph15, Styles.mb100]}>
|
||||||
<FiturHome />
|
<FiturHome />
|
||||||
<ProjectHome />
|
<ProjectHome />
|
||||||
<DivisionHome />
|
<DivisionHome />
|
||||||
|
|||||||
@@ -131,12 +131,14 @@ export default function Index() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SafeAreaView>
|
<SafeAreaView>
|
||||||
<ScrollView refreshControl={
|
<ScrollView
|
||||||
<RefreshControl
|
style={{ height: '100%' }}
|
||||||
refreshing={refreshing}
|
refreshControl={
|
||||||
onRefresh={handleRefresh}
|
<RefreshControl
|
||||||
/>
|
refreshing={refreshing}
|
||||||
}>
|
onRefresh={handleRefresh}
|
||||||
|
/>
|
||||||
|
}>
|
||||||
<View style={[Styles.p15]}>
|
<View style={[Styles.p15]}>
|
||||||
<View style={[Styles.wrapBtnTab]}>
|
<View style={[Styles.wrapBtnTab]}>
|
||||||
<ButtonTab
|
<ButtonTab
|
||||||
@@ -194,7 +196,7 @@ export default function Index() {
|
|||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title={chooseData.name}>
|
<DrawerBottom animation="slide" isVisible={isModal} setVisible={() => setModal(false)} title={chooseData.name}>
|
||||||
<View style={Styles.rowItemsCenter}>
|
<View style={Styles.rowItemsCenter}>
|
||||||
<MenuItemRow
|
<MenuItemRow
|
||||||
icon={<MaterialCommunityIcons name="toggle-switch-off-outline" color="black" size={25} />}
|
icon={<MaterialCommunityIcons name="toggle-switch-off-outline" color="black" size={25} />}
|
||||||
@@ -213,14 +215,16 @@ export default function Index() {
|
|||||||
title="Edit"
|
title="Edit"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setModal(false)
|
setModal(false)
|
||||||
setVisibleEdit(true)
|
setTimeout(() => {
|
||||||
|
setVisibleEdit(true)
|
||||||
|
}, 600)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</DrawerBottom>
|
</DrawerBottom>
|
||||||
|
|
||||||
|
|
||||||
<DrawerBottom animation="none" height={30} backdropPressable={false} isVisible={isVisibleEdit} setVisible={setVisibleEdit} title="Edit Jabatan">
|
<DrawerBottom animation="none" height={30} backdropPressable={false} isVisible={isVisibleEdit} setVisible={() => setVisibleEdit(false)} title="Edit Jabatan">
|
||||||
<View style={{ justifyContent: 'space-between', flex: 1 }}>
|
<View style={{ justifyContent: 'space-between', flex: 1 }}>
|
||||||
<View>
|
<View>
|
||||||
<InputForm
|
<InputForm
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export default function HeaderRightBannerList() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ButtonMenuHeader onPress={() => { setVisible(true) }} />
|
<ButtonMenuHeader onPress={() => { setVisible(true) }} />
|
||||||
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={setVisible} title="Menu">
|
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={() => setVisible(false)} title="Menu">
|
||||||
<View style={Styles.rowItemsCenter}>
|
<View style={Styles.rowItemsCenter}>
|
||||||
<MenuItemRow
|
<MenuItemRow
|
||||||
icon={<AntDesign name="pluscircle" color="black" size={25} />}
|
icon={<AntDesign name="pluscircle" color="black" size={25} />}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress,
|
|||||||
{icon}
|
{icon}
|
||||||
<View style={[Styles.rowSpaceBetween, width ? { width: lebar } : { width: '88%' }]}>
|
<View style={[Styles.rowSpaceBetween, width ? { width: lebar } : { width: '88%' }]}>
|
||||||
<View style={[Styles.ml10, rightTopInfo ? { width: lebar } : { width: '90%' },]}>
|
<View style={[Styles.ml10, rightTopInfo ? { width: lebar } : { width: '90%' },]}>
|
||||||
<Text style={[titleWeight == 'normal' ? Styles.textDefault : Styles.textDefaultSemiBold]} numberOfLines={1} ellipsizeMode='tail'>{title}</Text>
|
<Text style={[titleWeight == 'normal' ? Styles.textDefault : Styles.textDefaultSemiBold, { color: textColorFix }]} numberOfLines={1} ellipsizeMode='tail'>{title}</Text>
|
||||||
{
|
{
|
||||||
subtitle &&
|
subtitle &&
|
||||||
typeof subtitle == "string"
|
typeof subtitle == "string"
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export default function HeaderRightGroupList() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ButtonMenuHeader onPress={() => { setVisible(true) }} />
|
<ButtonMenuHeader onPress={() => { setVisible(true) }} />
|
||||||
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={setVisible} title="Menu">
|
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={() => setVisible(false)} title="Menu">
|
||||||
<View style={Styles.rowItemsCenter}>
|
<View style={Styles.rowItemsCenter}>
|
||||||
<MenuItemRow
|
<MenuItemRow
|
||||||
icon={<AntDesign name="pluscircle" color="black" size={25} />}
|
icon={<AntDesign name="pluscircle" color="black" size={25} />}
|
||||||
@@ -70,7 +70,7 @@ export default function HeaderRightGroupList() {
|
|||||||
() => {
|
() => {
|
||||||
setVisibleTambah(true)
|
setVisibleTambah(true)
|
||||||
},
|
},
|
||||||
100,
|
600,
|
||||||
);
|
);
|
||||||
|
|
||||||
}}
|
}}
|
||||||
@@ -78,7 +78,7 @@ export default function HeaderRightGroupList() {
|
|||||||
</View>
|
</View>
|
||||||
</DrawerBottom>
|
</DrawerBottom>
|
||||||
|
|
||||||
<DrawerBottom animation="none" height={30} isVisible={isVisibleTambah} setVisible={setVisibleTambah} title="Tambah Lembaga Desa">
|
<DrawerBottom animation="none" height={30} isVisible={isVisibleTambah} setVisible={() => setVisibleTambah(false)} title="Tambah Lembaga Desa">
|
||||||
<View style={{ flex: 1 }}>
|
<View style={{ flex: 1 }}>
|
||||||
<View>
|
<View>
|
||||||
<InputForm
|
<InputForm
|
||||||
|
|||||||
@@ -102,7 +102,9 @@ export default function HeaderRightPositionList() {
|
|||||||
title="Tambah Jabatan"
|
title="Tambah Jabatan"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setVisible(false)
|
setVisible(false)
|
||||||
setVisibleTambah(true)
|
setTimeout(() => {
|
||||||
|
setVisibleTambah(true)
|
||||||
|
}, 600)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{
|
{
|
||||||
@@ -112,14 +114,16 @@ export default function HeaderRightPositionList() {
|
|||||||
title="Filter"
|
title="Filter"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setVisible(false)
|
setVisible(false)
|
||||||
setFilter(true)
|
setTimeout(() => {
|
||||||
|
setFilter(true)
|
||||||
|
}, 600)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</View>
|
</View>
|
||||||
</DrawerBottom>
|
</DrawerBottom>
|
||||||
|
|
||||||
<DrawerBottom animation="slide" height={45} isVisible={isVisibleTambah} setVisible={setVisibleTambah} title="Tambah Jabatan">
|
<DrawerBottom animation="slide" height={45} isVisible={isVisibleTambah} setVisible={() => setVisibleTambah(false)} title="Tambah Jabatan">
|
||||||
<View style={{ flex: 1, justifyContent: 'space-between' }}>
|
<View style={{ flex: 1, justifyContent: 'space-between' }}>
|
||||||
<View>
|
<View>
|
||||||
{
|
{
|
||||||
@@ -131,7 +135,9 @@ export default function HeaderRightPositionList() {
|
|||||||
required
|
required
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setVisibleTambah(false)
|
setVisibleTambah(false)
|
||||||
setSelect(true)
|
setTimeout(() => {
|
||||||
|
setSelect(true)
|
||||||
|
}, 600)
|
||||||
}}
|
}}
|
||||||
error={error.idGroup}
|
error={error.idGroup}
|
||||||
errorText="Lembaga Desa harus diisi"
|
errorText="Lembaga Desa harus diisi"
|
||||||
@@ -166,7 +172,9 @@ export default function HeaderRightPositionList() {
|
|||||||
validationForm(value.val, 'idGroup')
|
validationForm(value.val, 'idGroup')
|
||||||
setChoose(value)
|
setChoose(value)
|
||||||
setSelect(false)
|
setSelect(false)
|
||||||
setVisibleTambah(true)
|
setTimeout(() => {
|
||||||
|
setVisibleTambah(true)
|
||||||
|
}, 600)
|
||||||
}}
|
}}
|
||||||
title="Lembaga Desa"
|
title="Lembaga Desa"
|
||||||
open={isSelect}
|
open={isSelect}
|
||||||
|
|||||||
Reference in New Issue
Block a user