Compare commits

..

30 Commits

Author SHA1 Message Date
7442d01551 upd: text error login 2025-09-22 17:43:07 +08:00
180fbeede9 fix: project
Deskripsi:
- fix fungsi tambah project saat user role selain developer dan supadmin

No Issues
2025-09-22 17:33:24 +08:00
d0d40cb1a7 fix : tampilan
Deskripsi:
- update tampilan diskusi item > judul melebihi container

No Issues
2025-09-22 17:22:32 +08:00
8a25c2f672 Merge pull request 'amalia/12-sept-25' (#38) from amalia/12-sept-25 into join
Reviewed-on: bip/mobile-darmasaba#38
2025-09-12 18:23:44 +08:00
d31c3677c9 upd: icon gambar 2025-09-12 16:35:56 +08:00
19b02ffc01 upd: easignore 2025-09-11 14:43:10 +08:00
b9b615636b fix: calendar
Deskripsi:
- tinggi scroll pada tambah data
- tinggi scroll pada edit tambah anggota
- checked anggota pada edit tambah anggota
- on press disable saat user telah menjadi anggota pada edit tambah anggota

No Issues
2025-09-11 11:44:34 +08:00
d3e7ef9623 Merge pull request 'amalia/09-sept-25' (#37) from amalia/09-sept-25 into join
Reviewed-on: bip/mobile-darmasaba#37
2025-09-09 17:26:53 +08:00
d52453c530 upd: ios 2025-09-09 16:40:26 +08:00
1853cb573c upd : modal filter
Deskripsi:
- update refresh modal filter saat ada perubahan data grup

No Issues
2025-09-09 14:35:45 +08:00
83291676d3 upd : scroll view
Deskripsi:
- horizontal view hide
- vertical view hide
- scroll view height

No Issues
2025-09-09 12:30:40 +08:00
1509d1b702 upd: version app 2025-09-09 12:05:24 +08:00
8d6a0d3981 fixx :api tambah pengumuman 2025-09-09 12:05:04 +08:00
d20307fc0b upd: refresh division detail home
Deskripsi:
- refresh load pada halaman home detail division

No Issues
2025-09-09 11:57:33 +08:00
060f96e7b2 upd : home page
Deskripsi:
- load refresh pada halaman home

No Issues
2025-09-09 11:49:13 +08:00
a15724756e fix: diskusi divisi
Deskripsi:
- multiline input deskripsi pada tambah dan edit diskusi divisi

No Issues
2025-09-09 11:15:49 +08:00
c8de5d185a fix : notification page
Deskripsi:
- load refresh notification page

No Issues
2025-09-09 11:09:19 +08:00
5fa364be24 fix: pencarian
Deskripsi:
- scroll height
- tanpa wrap
- pake scroll map

No Issues
2025-09-09 11:05:37 +08:00
4768007df3 fix:tinggi scroll profile 2025-09-09 10:47:43 +08:00
89bf659598 Merge pull request 'upd: kode verification' (#36) from amalia/04-sept-25 into join
Reviewed-on: bip/mobile-darmasaba#36
2025-09-04 18:39:14 +08:00
9793794ff2 upd: kode verification
Deskripsi:
- update logo pda page kode otp
- update text wa

No Issues
2025-09-04 18:38:19 +08:00
c435eb1503 Merge pull request 'amalia/04-sept-25' (#35) from amalia/04-sept-25 into join
Reviewed-on: bip/mobile-darmasaba#35
2025-09-04 18:19:35 +08:00
d0aaa5561c upd: ios 2025-09-04 18:17:41 +08:00
90042d13dd upd: android dan ios 2025-09-04 17:46:30 +08:00
596565ba8e upd: gitignore 2025-09-04 17:33:16 +08:00
22663acaae upd: icon small 2025-09-04 17:30:02 +08:00
d3354e3e74 upd: android dan ios 2025-09-04 17:29:45 +08:00
c3ab4d05ae upd
: update icon

Deskirpsi:
- ganti logo dan icon dan nama aplikasi

Mo Issues
2025-09-04 16:46:57 +08:00
75c95b5c92 Merge pull request 'amalia/03-sept-25' (#34) from amalia/03-sept-25 into join
Reviewed-on: bip/mobile-darmasaba#34
2025-09-03 17:37:36 +08:00
bc590b8cb5 Merge pull request 'amalia/01-sept-25' (#33) from amalia/01-sept-25 into join
Reviewed-on: bip/mobile-darmasaba#33
2025-09-01 17:30:53 +08:00
107 changed files with 532 additions and 344 deletions

View File

@@ -38,6 +38,4 @@ yarn-error.*
app-example
x.ts
x.sh
/android
/ios
x.sh

1
.gitignore vendored
View File

@@ -45,3 +45,4 @@ x.sh
google-services.json
service-account.json

View File

@@ -0,0 +1,4 @@
kotlin version: 2.0.21
error message: The daemon has terminated unexpectedly on startup attempt #1 with error code: 0. The daemon process output:
1. Kotlin compile daemon is ready

View File

@@ -92,8 +92,8 @@ android {
applicationId 'mobiledarmasaba.app'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0.0"
versionCode 6
versionName "1.0.2"
}
signingConfigs {
debug {

View File

@@ -1,6 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -1,5 +1,5 @@
<resources>
<string name="app_name">mobile-darmasaba</string>
<string name="app_name">Desa+</string>
<string name="expo_system_ui_user_interface_style" translatable="false">automatic</string>
<string name="expo_splash_screen_resize_mode" translatable="false">contain</string>
<string name="expo_splash_screen_status_bar_translucent" translatable="false">false</string>

View File

@@ -31,7 +31,7 @@ extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
}
expoAutolinking.useExpoModules()
rootProject.name = 'mobile-darmasaba'
rootProject.name = 'Desa+'
expoAutolinking.useExpoVersionCatalog()

View File

@@ -2,12 +2,12 @@ import 'dotenv/config';
export default {
expo: {
name: "mobile-darmasaba",
name: "Desa+",
slug: "mobile-darmasaba",
version: "1.0.2",
version: "1.0.4",
jsEngine: "jsc",
orientation: "portrait",
icon: "./assets/images/icon.png",
icon: "./assets/images/logo-icon-small.png",
scheme: "myapp",
userInterfaceStyle: "automatic",
newArchEnabled: false,
@@ -15,15 +15,16 @@ export default {
supportsTablet: true,
bundleIdentifier: "mobiledarmasaba.app",
infoPlist: {
ITSAppUsesNonExemptEncryption: false
ITSAppUsesNonExemptEncryption: false,
CFBundleDisplayName: "Desa+"
},
googleServicesFile: "./ios/mobiledarmasaba/GoogleService-Info.plist"
googleServicesFile: process.env.IOS_GOOGLE_SERVICES_FILE
},
android: {
package: "mobiledarmasaba.app",
versionCode: 6,
versionCode: 8,
adaptiveIcon: {
foregroundImage: "./assets/images/splash-icon.png",
foregroundImage: "./assets/images/logo-icon-small.png",
backgroundColor: "#ffffff"
},
googleServicesFile: "./google-services.json",
@@ -45,7 +46,7 @@ export default {
[
"expo-splash-screen",
{
image: "./assets/images/splash-icon.png",
image: "./assets/images/logo-icon-small.png",
imageWidth: 200,
resizeMode: "contain",
backgroundColor: "#ffffff"
@@ -58,7 +59,7 @@ export default {
"@react-native-firebase/app",
{
ios: {
googleServicesFile: "./ios/mobiledarmasaba/GoogleService-Info.plist"
googleServicesFile: process.env.IOS_GOOGLE_SERVICES_FILE
}
}
]

View File

@@ -8,7 +8,7 @@ import { useAuthSession } from "@/providers/AuthProvider";
import { Entypo, MaterialIcons } from "@expo/vector-icons";
import { router, Stack, useLocalSearchParams } from "expo-router";
import React, { useEffect, useState } from "react";
import { Dimensions, SafeAreaView, ScrollView, View } from "react-native";
import { Dimensions, RefreshControl, SafeAreaView, ScrollView, View } from "react-native";
import RenderHTML from 'react-native-render-html';
import { useSelector } from "react-redux";
@@ -28,6 +28,7 @@ export default function DetailAnnouncement() {
const contentWidth = Dimensions.get('window').width
const [loading, setLoading] = useState(true)
const arrSkeleton = Array.from({ length: 2 }, (_, index) => index)
const [refreshing, setRefreshing] = useState(false)
async function handleLoad(loading: boolean) {
try {
@@ -56,6 +57,13 @@ export default function DetailAnnouncement() {
return htmlRegex.test(text);
};
const handleRefresh = async () => {
setRefreshing(true)
handleLoad(false)
await new Promise(resolve => setTimeout(resolve, 2000));
setRefreshing(false)
};
return (
<SafeAreaView>
<Stack.Screen
@@ -66,7 +74,16 @@ export default function DetailAnnouncement() {
headerRight: () => entityUser.role != 'user' && entityUser.role != 'coadmin' ? <HeaderRightAnnouncementDetail id={id} /> : <></>,
}}
/>
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
refreshControl={
<RefreshControl
refreshing={refreshing}
onRefresh={() => handleRefresh()}
/>
}
>
<View style={[Styles.p15]}>
<View style={[Styles.wrapPaper]}>
{

View File

@@ -110,8 +110,11 @@ export default function CreateAnnouncement() {
),
}}
/>
<ScrollView>
<View style={[Styles.p15, Styles.mb100]}>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
>
<View style={[Styles.p15]}>
<InputForm
label="Judul"
type="default"

View File

@@ -153,8 +153,11 @@ export default function EditAnnouncement() {
),
}}
/>
<ScrollView>
<View style={[Styles.p15, Styles.mb100]}>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
>
<View style={[Styles.p15]}>
<InputForm
label="Judul"
type="default"

View File

@@ -130,7 +130,7 @@ export default function EditBanner() {
category="update" />,
}}
/>
<ScrollView>
<ScrollView showsVerticalScrollIndicator={false} style={[Styles.h100]}>
<View style={[Styles.p15, Styles.mb100]}>
<View style={[Styles.mb15]}>
{selectedImage != undefined ? (

View File

@@ -117,8 +117,8 @@ export default function CreateBanner() {
),
}}
/>
<ScrollView>
<View style={[Styles.p15, Styles.mb100]}>
<ScrollView showsVerticalScrollIndicator={false} style={[Styles.h100]}>
<View style={[Styles.p15]}>
<View style={[Styles.mb15]}>
{selectedImage != undefined ? (
<Pressable onPress={pickImageAsync}>

View File

@@ -139,7 +139,7 @@ export default function DetailDiscussionGeneral() {
}}
/>
<View style={{ flex: 1 }}>
<ScrollView>
<ScrollView showsVerticalScrollIndicator={false}>
<View style={[Styles.p15, Styles.mb100]}>
{
loading ?

View File

@@ -116,7 +116,7 @@ export default function AddMemberDiscussionDetail() {
selectMember.length > 0
?
<View>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]}>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]} showsHorizontalScrollIndicator={false}>
{
selectMember.map((item: any, index: any) => (
<ImageWithLabel
@@ -133,7 +133,9 @@ export default function AddMemberDiscussionDetail() {
:
<Text style={[Styles.textDefault, Styles.cGray, Styles.pv05, { textAlign: 'center' }]}>Tidak ada member yang dipilih</Text>
}
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
>
{
data.length > 0 ?

View File

@@ -142,7 +142,7 @@ export default function CreateDiscussionGeneral() {
),
}}
/>
<ScrollView>
<ScrollView showsVerticalScrollIndicator={false} style={[Styles.h100]}>
<View style={[Styles.p15, Styles.mb100]}>
{
(entityUser.role == "supadmin" ||

View File

@@ -119,7 +119,7 @@ export default function EditDiscussionGeneral() {
),
}}
/>
<ScrollView>
<ScrollView showsVerticalScrollIndicator={false} style={[Styles.h100]}>
<View style={[Styles.p15]}>
<InputForm
label="Judul"

View File

@@ -123,7 +123,7 @@ export default function AddMemberCalendarEvent() {
selectMember.length > 0
?
<View>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]}>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]} showsHorizontalScrollIndicator={false}>
{
selectMember.map((item: any, index: any) => (
<ImageWithLabel
@@ -140,7 +140,10 @@ export default function AddMemberCalendarEvent() {
:
<Text style={[Styles.textDefault, Styles.cGray, Styles.pv05, { textAlign: 'center' }]}>Tidak ada member yang dipilih</Text>
}
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
>
{
data.length > 0 ?
data.map((item: any, index: any) => {
@@ -151,7 +154,6 @@ export default function AddMemberCalendarEvent() {
style={[Styles.itemSelectModal]}
onPress={() => {
!found && onChoose(item.idUser, item.name, item.img)
onChoose(item.idUser, item.name, item.img)
}}
>
<View style={[Styles.rowItemsCenter]}>
@@ -164,7 +166,7 @@ export default function AddMemberCalendarEvent() {
</View>
</View>
{
selectMember.some((i: any) => i.idUser == item.id) && <AntDesign name="check" size={20} color={'black'} />
selectMember.some((i: any) => i.idUser == item.idUser) && <AntDesign name="check" size={20} color={'black'} />
}
</Pressable>
)

View File

@@ -112,7 +112,7 @@ export default function CreateCalendarAddMember() {
selectMember.length > 0
?
<View>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]}>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]} showsHorizontalScrollIndicator={false}>
{
selectMember.map((item: any, index: any) => (
<ImageWithLabel
@@ -129,7 +129,10 @@ export default function CreateCalendarAddMember() {
:
<Text style={[Styles.textDefault, Styles.cGray, Styles.pv05, { textAlign: 'center' }]}>Tidak ada member yang dipilih</Text>
}
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
>
{
data.length > 0 ?

View File

@@ -93,6 +93,7 @@ export default function DiscussionDivisionEdit() {
required
value={data}
onChange={setData}
multiline
/>
</View>
</ScrollView>

View File

@@ -56,7 +56,14 @@ export default function CreateDiscussionDivision() {
/>
<ScrollView>
<View style={[Styles.p15, Styles.mb100]}>
<InputForm label="Diskusi" type="default" placeholder="Hal yang didiskusikan" required onChange={setDesc} />
<InputForm
label="Diskusi"
type="default"
placeholder="Hal yang didiskusikan"
required
onChange={setDesc}
multiline
/>
</View>
</ScrollView>
</SafeAreaView>

View File

@@ -118,7 +118,7 @@ export default function AddMemberTask() {
selectMember.length > 0
?
<View>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]}>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]} showsHorizontalScrollIndicator={false}>
{
selectMember.map((item: any, index: any) => (
<ImageWithLabel
@@ -135,7 +135,9 @@ export default function AddMemberTask() {
:
<Text style={[Styles.textDefault, Styles.cGray, Styles.pv05, { textAlign: 'center' }]}>Tidak ada member yang dipilih</Text>
}
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
>
{
data.length > 0 ?

View File

@@ -88,7 +88,7 @@ export default function AddMemberCreateTask() {
selectMember.length > 0
?
<View>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]}>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]} showsHorizontalScrollIndicator={false}>
{
selectMember.map((item: any, index: any) => (
<ImageWithLabel
@@ -105,7 +105,9 @@ export default function AddMemberCreateTask() {
:
<Text style={[Styles.textDefault, Styles.cGray, Styles.pv05, { textAlign: 'center' }]}>Tidak ada member yang dipilih</Text>
}
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
>
{
data.length > 0 ?

View File

@@ -106,7 +106,7 @@ export default function ListTask() {
return (
<View style={[Styles.p15, { flex: 1 }]}>
<View>
<ScrollView horizontal style={[Styles.mb10]}>
<ScrollView horizontal style={[Styles.mb10]} showsHorizontalScrollIndicator={false}>
<ButtonTab
active={statusFix}
value="0"

View File

@@ -119,7 +119,7 @@ export default function AddMemberDivision() {
selectMember.length > 0
?
<View>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]}>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]} showsHorizontalScrollIndicator={false}>
{
selectMember.map((item: any, index: any) => (
<ImageWithLabel
@@ -136,7 +136,9 @@ export default function AddMemberDivision() {
:
<Text style={[Styles.textDefault, Styles.cGray, Styles.pv05, { textAlign: 'center' }]}>Tidak ada member yang dipilih</Text>
}
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
>
{
data.length > 0 ?

View File

@@ -10,7 +10,7 @@ import { apiGetDivisionOneDetail } from "@/lib/api"
import { useAuthSession } from "@/providers/AuthProvider"
import { router, Stack, useLocalSearchParams } from "expo-router"
import { useEffect, useState } from "react"
import { SafeAreaView, ScrollView, View } from "react-native"
import { RefreshControl, SafeAreaView, ScrollView, View } from "react-native"
type Props = {
id: string,
@@ -26,11 +26,12 @@ export default function DetailDivisionFitur() {
const { id } = useLocalSearchParams<{ id: string }>()
const [data, setData] = useState<Props>()
const [loading, setLoading] = useState(true)
const [refreshing, setRefreshing] = useState(false)
async function handleLoad() {
async function handleLoad(loading: boolean) {
try {
setLoading(true)
setLoading(loading)
const hasil = await decryptToken(String(token?.current))
const response = await apiGetDivisionOneDetail({ user: hasil, id })
setData(response.data.division)
@@ -42,9 +43,16 @@ export default function DetailDivisionFitur() {
}
useEffect(() => {
handleLoad()
handleLoad(true)
}, [])
const handleRefresh = async () => {
setRefreshing(true)
handleLoad(false)
await new Promise(resolve => setTimeout(resolve, 2000));
setRefreshing(false)
};
return (
<SafeAreaView>
<Stack.Screen
@@ -55,13 +63,21 @@ export default function DetailDivisionFitur() {
headerRight: () => <HeaderRightDivisionDetail id={id} />,
}}
/>
<ScrollView>
<CaraouselHome />
<ScrollView
refreshControl={
<RefreshControl
refreshing={refreshing}
onRefresh={handleRefresh}
/>
}
showsVerticalScrollIndicator={false}
>
<CaraouselHome refreshing={refreshing} />
<View style={[Styles.ph15, Styles.mb100]}>
<FiturDivisionDetail />
<TaskDivisionDetail />
<FileDivisionDetail />
<DiscussionDivisionDetail />
<FiturDivisionDetail refreshing={refreshing}/>
<TaskDivisionDetail refreshing={refreshing}/>
<FileDivisionDetail refreshing={refreshing}/>
<DiscussionDivisionDetail refreshing={refreshing}/>
</View>
</ScrollView>
</SafeAreaView>

View File

@@ -81,7 +81,7 @@ export default function CreateDivisionAddMember() {
selectMember.length > 0
?
<View>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]}>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]} showsHorizontalScrollIndicator={false}>
{
selectMember.map((item: any, index: any) => (
<ImageWithLabel
@@ -98,7 +98,9 @@ export default function CreateDivisionAddMember() {
:
<Text style={[Styles.textDefault, Styles.cGray, Styles.pv05, { textAlign: 'center' }]}>Tidak ada member yang dipilih</Text>
}
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
>
{
data.length > 0 ?

View File

@@ -13,8 +13,8 @@ import { apiGetProfile } from "@/lib/api";
import { setEntities } from "@/lib/entitiesSlice";
import { useAuthSession } from "@/providers/AuthProvider";
import { Stack } from "expo-router";
import { useEffect } from "react";
import { Platform, SafeAreaView, ScrollView, View } from "react-native";
import { useEffect, useState } from "react";
import { Platform, RefreshControl, SafeAreaView, ScrollView, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { useDispatch, useSelector } from "react-redux";
@@ -24,6 +24,7 @@ export default function Home() {
const dispatch = useDispatch()
const { token, decryptToken, signOut } = useAuthSession()
const insets = useSafeAreaInsets()
const [refreshing, setRefreshing] = useState(false)
useEffect(() => {
handleUserLogin()
@@ -38,6 +39,13 @@ export default function Home() {
});
}
const handleRefresh = async () => {
setRefreshing(true)
handleUserLogin()
await new Promise(resolve => setTimeout(resolve, 2000));
setRefreshing(false)
};
return (
<SafeAreaView>
<Stack.Screen
@@ -52,16 +60,24 @@ export default function Home() {
),
}}
/>
<ScrollView>
<CaraouselHome />
<ScrollView
refreshControl={
<RefreshControl
refreshing={refreshing}
onRefresh={handleRefresh}
/>
}
showsVerticalScrollIndicator={false}
>
<CaraouselHome refreshing={refreshing}/>
<View style={[Styles.ph15, Styles.mb100]}>
<FiturHome />
<ProjectHome />
<DivisionHome />
<ChartProgresHome />
<ChartDokumenHome />
<EventHome />
<DisccussionHome />
<ProjectHome refreshing={refreshing}/>
<DivisionHome refreshing={refreshing}/>
<ChartProgresHome refreshing={refreshing}/>
<ChartDokumenHome refreshing={refreshing}/>
<EventHome refreshing={refreshing}/>
<DisccussionHome refreshing={refreshing}/>
</View>
</ScrollView>
</SafeAreaView>

View File

@@ -231,7 +231,7 @@ export default function CreateMember() {
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
keyboardVerticalOffset={headerHeight}
>
<ScrollView>
<ScrollView showsVerticalScrollIndicator={false}>
<View style={[Styles.p15]}>
<View style={{ justifyContent: "center", alignItems: "center" }}>
{selectedImage != undefined ? (

View File

@@ -264,8 +264,8 @@ export default function EditMember() {
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
keyboardVerticalOffset={headerHeight}
>
<ScrollView>
<View style={[Styles.p15, Styles.mb100]}>
<ScrollView showsVerticalScrollIndicator={false} style={[Styles.h100]}>
<View style={[Styles.p15]}>
<View style={{ justifyContent: "center", alignItems: "center" }}>
{
errorImg ?

View File

@@ -9,7 +9,7 @@ import { pushToPage } from "@/lib/pushToPage";
import { useAuthSession } from "@/providers/AuthProvider";
import { Feather } from "@expo/vector-icons";
import { useEffect, useState } from "react";
import { SafeAreaView, View, VirtualizedList } from "react-native";
import { RefreshControl, SafeAreaView, View, VirtualizedList } from "react-native";
import { useDispatch, useSelector } from "react-redux";
type Props = {
@@ -31,6 +31,7 @@ export default function Notification() {
const arrSkeleton = Array.from({ length: 5 }, (_, index) => index)
const dispatch = useDispatch()
const updateNotification = useSelector((state: any) => state.notificationUpdate)
const [refreshing, setRefreshing] = useState(false)
async function handleLoad(loading: boolean, thisPage: number) {
try {
@@ -88,33 +89,12 @@ export default function Notification() {
}
}
// function pushToPage(category: string, idContent: string) {
// const cat = category.split('/')
// if (cat.length > 1) {
// if (cat[2] == 'calendar') {
// router.push(`/division/${cat[1]}/calendar/${idContent}`)
// } else if (cat[2] == 'discussion') {
// router.push(`/division/${cat[1]}/discussion/${idContent}`)
// } else if (cat[2] == 'document') {
// router.push(`/division/${cat[1]}/document/${idContent}`)
// } else if (cat[2] == 'task') {
// router.push(`/division/${cat[1]}/task/${idContent}`)
// }
// } else {
// if (cat[0] == 'announcement') {
// router.push(`/announcement/${idContent}`)
// } else if (cat[0] == 'discussion-general') {
// router.push(`/discussion/${idContent}`)
// } else if (cat[0] == 'division') {
// router.push(`/division/${idContent}`)
// } else if (cat[0] == 'member') {
// router.push(`/member/${idContent}`)
// } else if (cat[0] == 'project') {
// router.push(`/project/${idContent}`)
// }
// }
// }
const handleRefresh = async () => {
setRefreshing(true)
handleLoad(false, 1)
await new Promise(resolve => setTimeout(resolve, 2000));
setRefreshing(false)
};
return (
<SafeAreaView>
@@ -156,6 +136,12 @@ export default function Notification() {
onEndReached={loadMoreData}
onEndReachedThreshold={0.5}
showsVerticalScrollIndicator={false}
refreshControl={
<RefreshControl
refreshing={refreshing}
onRefresh={handleRefresh}
/>
}
/>
:
<Text style={[Styles.textDefault, Styles.cGray, { textAlign: 'center' }]}>Tidak ada data</Text>

View File

@@ -38,7 +38,7 @@ export default function Profile() {
/>
}}
/>
<ScrollView>
<ScrollView style={[Styles.h100]}>
<View style={{ flexDirection: 'column' }}>
<View style={[Styles.wrapHeadViewMember]}>
<Image

View File

@@ -117,7 +117,7 @@ export default function AddMemberProject() {
selectMember.length > 0
?
<View>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]}>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]} showsHorizontalScrollIndicator={false}>
{
selectMember.map((item: any, index: any) => (
<ImageWithLabel
@@ -134,35 +134,43 @@ export default function AddMemberProject() {
:
<Text style={[Styles.textDefault, Styles.cGray, Styles.pv05, { textAlign: 'center' }]}>Tidak ada member yang dipilih</Text>
}
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
>
{
data.length > 0 ?
data.map((item: any, index: any) => {
const found = dataOld.some((i: any) => i.idUser == item.id)
return (
<Pressable
key={index}
style={[Styles.itemSelectModal]}
onPress={() => {
!found && onChoose(item.id, item.name, item.img)
}}
>
<View style={[Styles.rowItemsCenter, Styles.w80]}>
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} border />
<View style={[Styles.ml10]}>
<Text style={[Styles.textDefault]} numberOfLines={1}>{item.name}</Text>
<View style={[Styles.mb100]}>
{
data.map((item: any, index: any) => {
const found = dataOld.some((i: any) => i.idUser == item.id)
return (
<Pressable
key={index}
style={[Styles.itemSelectModal]}
onPress={() => {
!found && onChoose(item.id, item.name, item.img)
}}
>
<View style={[Styles.rowItemsCenter, Styles.w80]}>
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} border />
<View style={[Styles.ml10]}>
<Text style={[Styles.textDefault]} numberOfLines={1}>{item.name}</Text>
{
found && <Text style={[Styles.textInformation, Styles.cGray]}>sudah menjadi anggota</Text>
}
</View>
</View>
{
found && <Text style={[Styles.textInformation, Styles.cGray]}>sudah menjadi anggota</Text>
selectMember.some((i: any) => i.idUser == item.id) && <AntDesign name="check" size={20} color={'black'} />
}
</View>
</View>
{
selectMember.some((i: any) => i.idUser == item.id) && <AntDesign name="check" size={20} color={'black'} />
}
</Pressable>
)
}
)
</Pressable>
)
}
)
}
</View>
:
<Text style={[Styles.textDefault, { textAlign: 'center' }]}>Tidak ada data</Text>
}

View File

@@ -88,8 +88,11 @@ export default function ProjectCancel() {
),
}}
/>
<ScrollView>
<View style={[Styles.p15, Styles.mb100]}>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
>
<View style={[Styles.p15]}>
<InputForm
label="Alasan Pembatalan"
type="default"
@@ -99,6 +102,7 @@ export default function ProjectCancel() {
error={error}
errorText="Alasan pembatalan harus diisi"
onChange={(val) => onValidation(val)}
multiline
/>
</View>
</ScrollView>

View File

@@ -107,8 +107,11 @@ export default function ReportProject() {
),
}}
/>
<ScrollView>
<View style={[Styles.p15, Styles.mb100]}>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
>
<View style={[Styles.p15]}>
<InputForm
label="Laporan Kegiatan"
type="default"

View File

@@ -42,6 +42,7 @@ export default function CreateProject() {
const taskCreate = useSelector((state: any) => state.taskCreate);
const update = useSelector((state: any) => state.projectUpdate)
const entityUser = useSelector((state: any) => state.user);
const userLogin = useSelector((state: any) => state.entities)
const [fileForm, setFileForm] = useState<any[]>([])
const [indexDelFile, setIndexDelFile] = useState<number>(0)
const [disableBtn, setDisableBtn] = useState(true)
@@ -86,7 +87,7 @@ export default function CreateProject() {
} else {
setError(error => ({ ...error, title: false }))
}
} else if (cat == "task" && hitung > 1) {
} else if (cat == "task" && hitung > 2) {
if (taskCreate.length == 0) {
setError(error => ({ ...error, task: true }))
} else {
@@ -114,6 +115,13 @@ export default function CreateProject() {
validationForm('task', '');
}, [taskCreate]);
useEffect(() => {
if (entityUser.role != "supadmin" && entityUser.role != "developer") {
validationForm('group', userLogin.idGroup, userLogin.group);
}
}, []);
async function handleCreate() {
try {
setLoading(true)
@@ -205,8 +213,11 @@ export default function CreateProject() {
),
}}
/>
<ScrollView>
<View style={[Styles.p15, Styles.mb100]}>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
>
<View style={[Styles.p15]}>
{
(entityUser.role == "supadmin" || entityUser.role == "developer")
&&

View File

@@ -95,7 +95,7 @@ export default function AddMemberCreateProject() {
selectMember.length > 0
?
<View>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]}>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]} showsHorizontalScrollIndicator={false}>
{
selectMember.map((item: any, index: any) => (
<ImageWithLabel
@@ -112,7 +112,9 @@ export default function AddMemberCreateProject() {
:
<Text style={[Styles.textDefault, Styles.cGray, Styles.pv05, { textAlign: 'center' }]}>Tidak ada member yang dipilih</Text>
}
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
>
{
data.length > 0 ?

View File

@@ -120,7 +120,7 @@ export default function ListProject() {
return (
<View style={[Styles.p15, { flex: 1 }]}>
<View>
<ScrollView horizontal style={[Styles.mb10]}>
<ScrollView horizontal style={[Styles.mb10]} showsHorizontalScrollIndicator={false}>
<ButtonTab
active={statusFix}
value="0"

View File

@@ -1,5 +1,6 @@
import BorderBottomItem from "@/components/borderBottomItem";
import ButtonBackHeader from "@/components/buttonBackHeader";
import ImageUser from "@/components/imageNew";
import InputSearch from "@/components/inputSearch";
import Text from '@/components/Text';
import { ColorsStatus } from "@/constants/ColorsStatus";
@@ -9,8 +10,8 @@ import { apiGetSearch } from "@/lib/api";
import { useAuthSession } from "@/providers/AuthProvider";
import { AntDesign, MaterialIcons } from "@expo/vector-icons";
import { router, Stack } from "expo-router";
import { useState } from "react";
import { FlatList, Image, SafeAreaView, View } from "react-native";
import React, { useState } from "react";
import { RefreshControl, SafeAreaView, ScrollView, View } from "react-native";
import Toast from "react-native-toast-message";
type PropsUser = {
@@ -40,10 +41,13 @@ export default function Search() {
const [dataUser, setDataUser] = useState<PropsUser[]>([])
const [dataDivisi, setDataDivisi] = useState<PropDivisi[]>([])
const [dataProject, setDataProject] = useState<PropProject[]>([])
const [refreshing, setRefreshing] = useState(false)
const [search, setSearch] = useState('')
async function handleSearch(cari: string) {
try {
if (cari.length > 3) {
setSearch(cari)
if (cari.length >= 3) {
const user = await decryptToken(String(token?.current))
const hasil = await apiGetSearch({ text: cari, user: user })
if (hasil.success) {
@@ -65,6 +69,14 @@ export default function Search() {
}
const handleRefresh = async () => {
setRefreshing(true)
handleSearch(search)
await new Promise(resolve => setTimeout(resolve, 2000));
setRefreshing(false)
};
return (
<>
<SafeAreaView>
@@ -80,41 +92,44 @@ export default function Search() {
{
dataProject.length + dataDivisi.length + dataUser.length > 0
?
<View style={[Styles.wrapPaper, Styles.mb100]}>
<ScrollView
style={[Styles.h100]}
refreshControl={
<RefreshControl
refreshing={refreshing}
onRefresh={handleRefresh}
/>
}
>
{
dataUser.length > 0 &&
<View style={[Styles.mb05]}>
<View style={[Styles.mv05, Styles.p10]}>
<Text>ANGGOTA</Text>
<FlatList
data={dataUser}
keyExtractor={(item) => String(item.id)}
renderItem={({ item }) => (
{
dataUser.map((item, index) => (
<BorderBottomItem
key={index}
borderType="bottom"
icon={<Image
source={{ uri: `${ConstEnv.url_storage}/files/${item.img}` }}
style={[Styles.userProfileSmall]}
/>}
icon={<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} />}
title={item.name}
subtitle={`${item.group}-${item.position}`}
onPress={() => {
router.push(`/member/${item.id}`)
}}
/>
)}
/>
))
}
</View>
}
{
dataDivisi.length > 0 &&
<View style={[Styles.mb05]}>
<View style={[Styles.mv05, Styles.p10]}>
<Text>DIVISI</Text>
<FlatList
data={dataDivisi}
keyExtractor={(item) => String(item.id)}
renderItem={({ item }) => (
{
dataDivisi.map((item, index) => (
<BorderBottomItem
key={index}
borderType="bottom"
icon={
<View style={[Styles.iconContent, ColorsStatus.primary]}>
@@ -127,21 +142,20 @@ export default function Search() {
router.push(`/division/${item.id}`)
}}
/>
)}
/>
))
}
</View>
}
{
dataProject.length > 0 &&
<View style={[Styles.mb10]}>
<View style={[Styles.mv05, Styles.p10]}>
<Text>KEGIATAN</Text>
<FlatList
data={dataProject}
keyExtractor={(item) => String(item.id)}
renderItem={({ item }) => (
{
dataProject.map((item, index) => (
<BorderBottomItem
key={index}
borderType="bottom"
icon={
<View style={[Styles.iconContent, ColorsStatus.primary]}>
@@ -154,13 +168,11 @@ export default function Search() {
router.push(`/project/${item.id}`)
}}
/>
)}
/>
))
}
</View>
}
</View>
</ScrollView>
:
<View style={[Styles.contentItemCenter, Styles.mt10]}>
<Text style={[Styles.textInformation, Styles.cGray]}>Tidak ada data</Text>

View File

@@ -27,10 +27,12 @@ export default function Index() {
<View style={Styles.wrapLogin} >
<View style={{ alignItems: "center", marginVertical: 50 }}>
<Image
source={require("../assets/images/splash-icon.png")}
style={{ width: 130, height: 130 }}
source={require("../assets/images/logo.png")}
style={[{ width: 300, height: 150 }]}
width={270}
height={110}
/>
<Text style={[Styles.textSubtitle]}>PERBEKEL DARMASABA</Text>
{/* <Text style={[Styles.textSubtitle]}>PERBEKEL DARMASABA</Text> */}
</View>
<View style={[Styles.mb30]}>
<Text style={[Styles.textDefaultSemiBold]}>Verifikasi Nomor Telepon</Text>

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
assets/images/logo-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
assets/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -42,7 +42,7 @@ export default function ViewLogin({ onValidate }: Props) {
return Toast.show({ type: 'small', text1: response.message, position: 'top' })
}
} 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 {
setLoadingLogin(false)
}
@@ -53,12 +53,14 @@ export default function ViewLogin({ onValidate }: Props) {
<StatusBar style={Platform.OS === 'ios' ? 'auto' : 'light'} translucent={false} backgroundColor="black" />
<ToastCustom />
<View style={[Styles.p20, Styles.h100]}>
<View style={{ alignItems: "center", marginVertical: 50 }}>
<View style={{ alignItems: "center", marginTop: 70, marginBottom: 50 }}>
<Image
source={require("../../assets/images/splash-icon.png")}
style={{ width: 130, height: 130 }}
source={require("../../assets/images/logo.png")}
style={[{ width: 300, height: 150 }]}
width={270}
height={110}
/>
<Text style={[Styles.textSubtitle]}>PERBEKEL DARMASABA</Text>
{/* <Text style={[Styles.textSubtitle2]}>Digitalisasi Desa Transparansi Kerja</Text> */}
</View>
<InputForm
onChange={(val) => {

View File

@@ -57,15 +57,17 @@ export default function ViewVerification({ phone, otp }: Props) {
return (
<>
<StatusBar style={Platform.OS === 'ios' ? 'auto' : 'light'} translucent={false} backgroundColor="black"/>
<StatusBar style={Platform.OS === 'ios' ? 'auto' : 'light'} translucent={false} backgroundColor="black" />
<ToastCustom />
<View style={Styles.wrapLogin} >
<View style={{ alignItems: "center", marginVertical: 50 }}>
<View style={{ alignItems: "center", marginTop: 70, marginBottom: 50 }}>
<Image
source={require("../../assets/images/splash-icon.png")}
style={{ width: 130, height: 130 }}
source={require("../../assets/images/logo.png")}
style={[{ width: 300, height: 150 }]}
width={270}
height={110}
/>
<Text style={[Styles.textSubtitle]}>PERBEKEL DARMASABA</Text>
{/* <Text style={[Styles.textSubtitle]}>PERBEKEL DARMASABA</Text> */}
</View>
<View style={[Styles.mb30]}>
<Text style={[Styles.textDefaultSemiBold]}>Verifikasi Nomor Telepon</Text>

View File

@@ -15,7 +15,9 @@ export default function DiscussionItem({ title, user, date, onPress }: Props) {
<Pressable style={[Styles.wrapItemDiscussion]} onPress={onPress}>
<View style={[Styles.rowItemsCenter, Styles.mb10]}>
<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 style={Styles.rowSpaceBetween}>
<View style={Styles.rowItemsCenter}>

View File

@@ -16,15 +16,15 @@ type Props = {
date: string;
};
export default function DiscussionDivisionDetail() {
export default function DiscussionDivisionDetail({ refreshing }: { refreshing: boolean }) {
const { token, decryptToken } = useAuthSession();
const { id } = useLocalSearchParams<{ id: string }>();
const [data, setData] = useState<Props[]>([]);
const [loading, setLoading] = useState(true)
async function handleLoad() {
async function handleLoad(loading: boolean) {
try {
setLoading(true)
setLoading(loading)
const hasil = await decryptToken(String(token?.current));
const response = await apiGetDivisionOneFeature({
user: hasil,
@@ -40,8 +40,15 @@ export default function DiscussionDivisionDetail() {
}
useEffect(() => {
handleLoad();
}, []);
if (refreshing)
handleLoad(false)
}, [refreshing])
useEffect(() => {
handleLoad(true)
}, [])
return (
<View style={[Styles.mb15]}>
<Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Diskusi</Text>

View File

@@ -24,7 +24,7 @@ type Props = {
idStorage: string
}
export default function FileDivisionDetail() {
export default function FileDivisionDetail({ refreshing }: { refreshing: boolean }) {
const ref = React.useRef<ICarouselInstance>(null);
const width = Dimensions.get("window").width;
const [data, setData] = useState<Props[]>([])
@@ -33,9 +33,9 @@ export default function FileDivisionDetail() {
const [loading, setLoading] = useState(true)
const [loadingOpen, setLoadingOpen] = useState(false)
async function handleLoad() {
async function handleLoad(loading: boolean) {
try {
setLoading(true)
setLoading(loading)
const hasil = await decryptToken(String(token?.current))
const response = await apiGetDivisionOneFeature({ user: hasil, id, cat: 'new-file' })
setData(response.data)
@@ -47,7 +47,12 @@ export default function FileDivisionDetail() {
}
useEffect(() => {
handleLoad()
if (refreshing)
handleLoad(false)
}, [refreshing])
useEffect(() => {
handleLoad(true)
}, [])

View File

@@ -16,7 +16,7 @@ type Props = {
kalender: number
}
export default function FiturDivisionDetail() {
export default function FiturDivisionDetail({ refreshing }: { refreshing: boolean }) {
const { token, decryptToken } = useAuthSession()
const { id } = useLocalSearchParams<{ id: string }>()
const [data, setData] = useState<Props>({
@@ -36,7 +36,10 @@ export default function FiturDivisionDetail() {
}
}
useEffect(() => {
if (refreshing)
handleLoad()
}, [refreshing])
useEffect(() => {
handleLoad()

View File

@@ -18,7 +18,7 @@ type Props = {
projectTitle: string
}
export default function TaskDivisionDetail() {
export default function TaskDivisionDetail({ refreshing }: { refreshing: boolean }) {
const { token, decryptToken } = useAuthSession()
const { id } = useLocalSearchParams<{ id: string }>()
const [data, setData] = useState<Props[]>([])
@@ -26,9 +26,9 @@ export default function TaskDivisionDetail() {
const width = Dimensions.get("window").width;
const [loading, setLoading] = useState(true)
async function handleLoad() {
async function handleLoad(loading: boolean) {
try {
setLoading(true)
setLoading(loading)
const hasil = await decryptToken(String(token?.current))
const response = await apiGetDivisionOneFeature({ user: hasil, id, cat: 'today-task' })
setData(response.data)
@@ -40,7 +40,12 @@ export default function TaskDivisionDetail() {
}
useEffect(() => {
handleLoad()
if (refreshing)
handleLoad(false)
}, [refreshing])
useEffect(() => {
handleLoad(true)
}, [])
return (

View File

@@ -11,7 +11,7 @@ import Carousel, { ICarouselInstance } from "react-native-reanimated-carousel";
import { useDispatch, useSelector } from "react-redux";
import Text from "../Text";
export default function CaraouselHome() {
export default function CaraouselHome({ refreshing }: { refreshing: boolean }) {
const { decryptToken, token } = useAuthSession()
const ref = React.useRef<ICarouselInstance>(null);
const width = Dimensions.get("window").width;
@@ -37,6 +37,11 @@ export default function CaraouselHome() {
dispatch(setEntityUser({ role: response.data.idUserRole, admin: false }))
}
useEffect(() => {
if (refreshing)
handleBannerView()
}, [refreshing]);
useEffect(() => {
handleBannerView()
}, [dispatch]);

View File

@@ -13,7 +13,7 @@ type Props = {
frontColor: string;
}[]
export default function ChartDokumenHome() {
export default function ChartDokumenHome({ refreshing }: { refreshing: boolean }) {
const [loading, setLoading] = useState(true)
const { decryptToken, token } = useAuthSession()
const [data, setData] = useState<Props>([])
@@ -25,9 +25,9 @@ export default function ChartDokumenHome() {
const width = Dimensions.get("window").width;
async function handleData() {
async function handleData(loading: boolean) {
try {
setLoading(true)
setLoading(loading)
const hasil = await decryptToken(String(token?.current))
const response = await apiGetDataHome({ cat: "dokumen", user: hasil })
const maxValue = response.data.reduce((max: number, obj: { value: number; }) => Math.max(max, obj.value), -Infinity);
@@ -47,7 +47,12 @@ export default function ChartDokumenHome() {
}
useEffect(() => {
handleData()
if (refreshing)
handleData(false)
}, [refreshing]);
useEffect(() => {
handleData(true)
}, []);
return (

View File

@@ -13,14 +13,14 @@ type Props = {
color: string;
}[]
export default function ChartProgresHome() {
export default function ChartProgresHome({ refreshing }: { refreshing: boolean }) {
const { decryptToken, token } = useAuthSession()
const [data, setData] = useState<Props>([])
const [loading, setLoading] = useState(true)
async function handleData() {
async function handleData(loading: boolean) {
try {
setLoading(true)
setLoading(loading)
const hasil = await decryptToken(String(token?.current))
const response = await apiGetDataHome({ cat: "progress", user: hasil })
const convertedArray = response.data.map((item: { color: any; text: any; value: any; }) => ({
@@ -37,7 +37,12 @@ export default function ChartProgresHome() {
}
useEffect(() => {
handleData()
if (refreshing)
handleData(false)
}, [refreshing]);
useEffect(() => {
handleData(true)
}, []);
return (

View File

@@ -17,15 +17,15 @@ type Props = {
user: string
}
export default function DisccussionHome() {
export default function DisccussionHome({ refreshing }: { refreshing: boolean }) {
const { decryptToken, token } = useAuthSession()
const [data, setData] = useState<Props[]>([])
const [loading, setLoading] = useState(true)
async function handleData() {
async function handleData(loading: boolean) {
try {
setLoading(true)
setLoading(loading)
const hasil = await decryptToken(String(token?.current))
const response = await apiGetDataHome({ cat: "discussion", user: hasil })
setData(response.data)
@@ -37,7 +37,12 @@ export default function DisccussionHome() {
}
useEffect(() => {
handleData()
if (refreshing)
handleData(false)
}, [refreshing]);
useEffect(() => {
handleData(true)
}, []);
return (

View File

@@ -15,7 +15,7 @@ type Props = {
jumlah: number
}
export default function DivisionHome() {
export default function DivisionHome({ refreshing }: { refreshing: boolean }) {
const { decryptToken, token } = useAuthSession()
const ref = React.useRef<ICarouselInstance>(null)
const width = Dimensions.get("window").width
@@ -23,9 +23,9 @@ export default function DivisionHome() {
const [loading, setLoading] = useState(true)
const arrSkeleton = Array.from({ length: 2 }, (_, index) => index)
async function handleData() {
async function handleData(loading: boolean) {
try {
setLoading(true)
setLoading(loading)
const hasil = await decryptToken(String(token?.current))
const response = await apiGetDataHome({ cat: "division", user: hasil })
setData(response.data)
@@ -37,14 +37,19 @@ export default function DivisionHome() {
}
useEffect(() => {
handleData()
if (refreshing)
handleData(false)
}, [refreshing]);
useEffect(() => {
handleData(true)
}, []);
return (
<View style={[Styles.mb15]}>
<Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Divisi Teraktif</Text>
<Text style={[Styles.textDefaultSemiBold, Styles.mb10]}>Divisi Teraktif</Text>
{
loading ?
arrSkeleton.map((item, index) => (

View File

@@ -22,14 +22,14 @@ type Props = {
user_name: string
}
export default function EventHome() {
export default function EventHome({ refreshing }: { refreshing: boolean }) {
const { decryptToken, token } = useAuthSession()
const [data, setData] = useState<Props[]>([])
const [loading, setLoading] = useState(true)
async function handleData() {
async function handleData(loading: boolean) {
try {
setLoading(true)
setLoading(loading)
const hasil = await decryptToken(String(token?.current))
const response = await apiGetDataHome({ cat: "event", user: hasil })
setData(response.data)
@@ -41,7 +41,12 @@ export default function EventHome() {
}
useEffect(() => {
handleData()
if (refreshing)
handleData(false)
}, [refreshing]);
useEffect(() => {
handleData(true)
}, []);
return (

View File

@@ -20,16 +20,16 @@ type Props = {
createdAt: string
}
export default function ProjectHome() {
export default function ProjectHome({ refreshing }: { refreshing: boolean }) {
const { decryptToken, token } = useAuthSession()
const ref = React.useRef<ICarouselInstance>(null);
const width = Dimensions.get("window").width;
const [data, setData] = useState<Props[]>([])
const [loading, setLoading] = useState(true)
async function handleData() {
async function handleData(loading: boolean) {
try {
setLoading(true)
setLoading(loading)
const hasil = await decryptToken(String(token?.current))
const response = await apiGetDataHome({ cat: "kegiatan", user: hasil })
setData(response.data)
@@ -41,12 +41,17 @@ export default function ProjectHome() {
}
useEffect(() => {
handleData()
if (refreshing)
handleData(false)
}, [refreshing]);
useEffect(() => {
handleData(true)
}, []);
return (
<View style={[Styles.mb15]}>
<Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Kegiatan Terupdate</Text>
<Text style={[Styles.textDefaultSemiBold, Styles.mb10]}>Kegiatan Terupdate</Text>
{
loading ? (<Skeleton width={100} height={150} borderRadius={10} widthType="percent" />)
:

View File

@@ -33,6 +33,7 @@ export default function ModalFilter({ open, close, page, category }: Props) {
const { token, decryptToken } = useAuthSession()
const dispatch = useDispatch()
const entities = useSelector((state: any) => state.filterGroup)
const update = useSelector((state: any) => state.groupUpdate)
const [chooseGroup, setChooseGroup] = useState('')
async function handleLoad() {
@@ -42,10 +43,8 @@ export default function ModalFilter({ open, close, page, category }: Props) {
}
useEffect(() => {
if (entities.length == 0) {
handleLoad()
}
}, [dispatch]);
}, [dispatch, update]);

View File

@@ -135,7 +135,7 @@ export default function ModalSelect({ open, close, title, category, idParent, on
selectMember.length > 0
?
<View>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]}>
<ScrollView horizontal style={[Styles.mb10, Styles.pv10]} showsHorizontalScrollIndicator={false}>
{
selectMember.map((item: any, index: any) => (
<ImageWithLabel
@@ -154,7 +154,7 @@ export default function ModalSelect({ open, close, title, category, idParent, on
}
</>
}
<ScrollView>
<ScrollView showsVerticalScrollIndicator={false}>
<View>
{
category != 'status-task' ?

View File

@@ -44,6 +44,9 @@ const Styles = StyleSheet.create({
fontSize: 20,
fontWeight: 'bold',
},
textSubtitle2: {
fontSize: 20,
},
textLink: {
fontSize: 14,
color: '#0a7ea4',

File diff suppressed because one or more lines are too long

View File

@@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "mobiledarmasaba.app"
BlueprintName = "mobiledarmasaba"
ReferencedContainer = "container:mobiledarmasaba.xcodeproj">
BuildableName = "Desa.app"
BlueprintName = "Desa"
ReferencedContainer = "container:Desa.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -33,9 +33,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "mobiledarmasabaTests.xctest"
BlueprintName = "mobiledarmasabaTests"
ReferencedContainer = "container:mobiledarmasaba.xcodeproj">
BuildableName = "DesaTests.xctest"
BlueprintName = "DesaTests"
ReferencedContainer = "container:Desa.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
@@ -55,9 +55,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "mobiledarmasaba.app"
BlueprintName = "mobiledarmasaba"
ReferencedContainer = "container:mobiledarmasaba.xcodeproj">
BuildableName = "Desa.app"
BlueprintName = "Desa"
ReferencedContainer = "container:Desa.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
@@ -72,9 +72,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "mobiledarmasaba.app"
BlueprintName = "mobiledarmasaba"
ReferencedContainer = "container:mobiledarmasaba.xcodeproj">
BuildableName = "Desa.app"
BlueprintName = "Desa"
ReferencedContainer = "container:Desa.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>

View File

@@ -2,7 +2,7 @@
<Workspace
version = "1.0">
<FileRef
location = "group:mobiledarmasaba.xcodeproj">
location = "group:Desa.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
<dict/>
</plist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -7,7 +7,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>mobile-darmasaba</string>
<string>Desa+</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<string>1.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -53,6 +53,14 @@
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your camera</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your microphone</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to save photos</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your photos</string>
<key>NSUserActivityTypes</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>

Some files were not shown because too many files have changed in this diff Show More