Compare commits
18 Commits
amalia/19-
...
amalia/02-
| Author | SHA1 | Date | |
|---|---|---|---|
| e135c9dc11 | |||
| 144db584d0 | |||
| 90551399a5 | |||
| 0d46d76c70 | |||
| e3d2752a4c | |||
| 4dcfcbb7a7 | |||
| f27707eb74 | |||
| e4e8b44c45 | |||
| 79c9c9046c | |||
| f6122fb35a | |||
| 2ae88ff2e3 | |||
| fbf25bdd59 | |||
| 600218cb11 | |||
| 18eea92cfd | |||
| 1c3aa308d1 | |||
| c21d928701 | |||
| d8a50cbc75 | |||
| 59459e2c22 |
@@ -92,8 +92,8 @@ android {
|
||||
applicationId 'mobiledarmasaba.app'
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 16
|
||||
versionName "2.1.0"
|
||||
versionCode 17
|
||||
versionName "2.2.0"
|
||||
}
|
||||
signingConfigs {
|
||||
debug {
|
||||
|
||||
@@ -1,9 +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.READ_MEDIA_IMAGES" tools:node="remove"/>
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove"/>
|
||||
<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"/>
|
||||
|
||||
@@ -4,7 +4,7 @@ export default {
|
||||
expo: {
|
||||
name: "Desa+",
|
||||
slug: "mobile-darmasaba",
|
||||
version: "2.1.0", // Versi aplikasi (App Store)
|
||||
version: "2.2.0", // Versi aplikasi (App Store)
|
||||
jsEngine: "jsc",
|
||||
orientation: "portrait",
|
||||
icon: "./assets/images/logo-icon-small.png",
|
||||
@@ -14,7 +14,7 @@ export default {
|
||||
ios: {
|
||||
supportsTablet: true,
|
||||
bundleIdentifier: "mobiledarmasaba.app",
|
||||
buildNumber: "9",
|
||||
buildNumber: "10",
|
||||
infoPlist: {
|
||||
ITSAppUsesNonExemptEncryption: false,
|
||||
CFBundleDisplayName: "Desa+"
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
},
|
||||
android: {
|
||||
package: "mobiledarmasaba.app",
|
||||
versionCode: 16,
|
||||
versionCode: 19,
|
||||
adaptiveIcon: {
|
||||
foregroundImage: "./assets/images/logo-icon-small.png",
|
||||
backgroundColor: "#ffffff"
|
||||
@@ -32,9 +32,7 @@ export default {
|
||||
permissions: [
|
||||
"READ_EXTERNAL_STORAGE",
|
||||
"WRITE_EXTERNAL_STORAGE",
|
||||
"READ_MEDIA_IMAGES", // Android 13+
|
||||
"READ_MEDIA_VIDEO", // Android 13+
|
||||
"READ_MEDIA_AUDIO" // Android 13+
|
||||
"READ_MEDIA_AUDIO"
|
||||
]
|
||||
},
|
||||
web: {
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import AppHeader from "@/components/AppHeader";
|
||||
import BorderBottomItem from "@/components/borderBottomItem";
|
||||
import DrawerBottom from "@/components/drawerBottom";
|
||||
import ImageUser from "@/components/imageNew";
|
||||
import MenuItemRow from "@/components/menuItemRow";
|
||||
import ModalConfirmation from "@/components/ModalConfirmation";
|
||||
import SkeletonTwoItem from "@/components/skeletonTwoItem";
|
||||
import Text from '@/components/Text';
|
||||
import { ColorsStatus } from "@/constants/ColorsStatus";
|
||||
import { ConstEnv } from "@/constants/ConstEnv";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiDeleteMemberDiscussionGeneral, apiGetDiscussionGeneralOne } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import { Feather, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { SafeAreaView, ScrollView, View } from "react-native";
|
||||
import { Pressable, SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
@@ -25,6 +22,8 @@ type Props = {
|
||||
img: string
|
||||
}
|
||||
|
||||
const SKELETON_COUNT = 5
|
||||
|
||||
export default function MemberDiscussionDetail() {
|
||||
const { token, decryptToken } = useAuthSession()
|
||||
const { colors } = useTheme();
|
||||
@@ -35,13 +34,12 @@ export default function MemberDiscussionDetail() {
|
||||
const [chooseUser, setChooseUser] = useState({ idUser: '', name: '', img: '' })
|
||||
const update = useSelector((state: any) => state.discussionGeneralDetailUpdate)
|
||||
const [loading, setLoading] = useState(true)
|
||||
const arrSkeleton = Array.from({ length: 5 }, (_, index) => index)
|
||||
const [showDeleteModal, setShowDeleteModal] = useState(false)
|
||||
const canManage = entityUser.role !== "user" && entityUser.role !== "coadmin"
|
||||
|
||||
|
||||
async function handleLoad(loading: boolean) {
|
||||
async function handleLoad(showLoadingIndicator: boolean) {
|
||||
try {
|
||||
setLoading(loading)
|
||||
setLoading(showLoadingIndicator)
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
const response = await apiGetDiscussionGeneralOne({ id: id, user: hasil, cat: 'anggota' })
|
||||
setData(response.data)
|
||||
@@ -52,26 +50,18 @@ export default function MemberDiscussionDetail() {
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
handleLoad(false)
|
||||
}, [update]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
handleLoad(true)
|
||||
}, []);
|
||||
useEffect(() => { handleLoad(false) }, [update]);
|
||||
useEffect(() => { handleLoad(true) }, []);
|
||||
|
||||
async function handleDeleteUser() {
|
||||
try {
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
await apiDeleteMemberDiscussionGeneral({ user: hasil, idUser: chooseUser.idUser }, id)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengeluarkan anggota dari diskusi', })
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengeluarkan anggota dari diskusi' })
|
||||
handleLoad(false)
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
const message = error?.response?.data?.message || "Gagal mengeluarkan anggota"
|
||||
|
||||
Toast.show({ type: 'small', text1: message })
|
||||
Toast.show({ type: 'small', text1: error?.response?.data?.message || "Gagal mengeluarkan anggota" })
|
||||
} finally {
|
||||
setModal(false)
|
||||
}
|
||||
@@ -81,9 +71,6 @@ export default function MemberDiscussionDetail() {
|
||||
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
// headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Anggota Diskusi',
|
||||
headerTitleAlign: 'center',
|
||||
header: () => (
|
||||
<AppHeader
|
||||
title="Anggota Diskusi"
|
||||
@@ -93,49 +80,82 @@ export default function MemberDiscussionDetail() {
|
||||
)
|
||||
}}
|
||||
/>
|
||||
<ScrollView style={[Styles.h100, Styles.flex1, { backgroundColor: colors.background }]}>
|
||||
<View style={[Styles.p15]}>
|
||||
<Text style={[Styles.textDefault, Styles.mv05]}>{data.length} Anggota</Text>
|
||||
<View style={[Styles.wrapPaper, { backgroundColor: colors.card, borderColor: colors.background }]}>
|
||||
{
|
||||
entityUser.role != "user" && entityUser.role != "coadmin" &&
|
||||
<BorderBottomItem
|
||||
onPress={() => { router.push(`/discussion/add-member/${id}`) }}
|
||||
borderType="none"
|
||||
icon={
|
||||
<View style={[Styles.iconContent, ColorsStatus.gray]}>
|
||||
<Feather name="user-plus" size={25} color={'#384288'} />
|
||||
<ScrollView showsVerticalScrollIndicator={false} style={[Styles.h100, Styles.flex1, { backgroundColor: colors.background }]}>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
|
||||
{/* Tombol tambah anggota */}
|
||||
{canManage && (
|
||||
<View style={[Styles.wrapPaper, Styles.sectionCard, Styles.mb15,
|
||||
{ backgroundColor: colors.card, borderColor: colors.icon + '18' }]}>
|
||||
<Pressable
|
||||
onPress={() => router.push(`/discussion/add-member/${id}`)}
|
||||
style={Styles.sectionActionRow}
|
||||
>
|
||||
<View style={[Styles.sectionIconBox, { backgroundColor: colors.icon + '18' }]}>
|
||||
<MaterialCommunityIcons name="account-plus-outline" size={18} color={colors.icon} />
|
||||
</View>
|
||||
<View style={Styles.flex1}>
|
||||
<Text style={[Styles.textDefaultSemiBold, { color: colors.text }]}>Tambah Anggota</Text>
|
||||
</View>
|
||||
<MaterialCommunityIcons name="chevron-right" size={18} color={colors.dimmed} />
|
||||
</Pressable>
|
||||
</View>
|
||||
)}
|
||||
|
||||
{/* Full list */}
|
||||
<View style={[Styles.wrapPaper, Styles.sectionCard,
|
||||
{ backgroundColor: colors.card, borderColor: colors.icon + '18', padding: 0, overflow: 'hidden' }]}>
|
||||
<View style={[Styles.sectionActionRow, { padding: 16, borderBottomWidth: 1, borderBottomColor: colors.icon + '14' }]}>
|
||||
<View style={[Styles.sectionIconBox, { backgroundColor: colors.dimmed + '18' }]}>
|
||||
<MaterialIcons name="people" size={18} color={colors.dimmed} />
|
||||
</View>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.flex1, { color: colors.text }]}>Anggota</Text>
|
||||
{!loading && (
|
||||
<Text style={[Styles.textMediumNormal, { color: colors.dimmed }]}>{data.length} anggota</Text>
|
||||
)}
|
||||
</View>
|
||||
{loading
|
||||
? Array.from({ length: SKELETON_COUNT }).map((_, i) => (
|
||||
<View
|
||||
key={i}
|
||||
style={[Styles.rowItemsCenter, Styles.ph15,
|
||||
{ paddingVertical: 14, gap: 14, borderBottomWidth: i < SKELETON_COUNT - 1 ? 1 : 0, borderBottomColor: colors.icon + '14' }]}
|
||||
>
|
||||
<View style={[Styles.userProfileExtraSmall, { backgroundColor: colors.icon + '20', borderRadius: 100 }]} />
|
||||
<View style={{ height: 13, borderRadius: 6, flex: 1, backgroundColor: colors.icon + '20', maxWidth: 140 + (i % 3) * 30 }} />
|
||||
</View>
|
||||
))
|
||||
: data.length === 0
|
||||
? (
|
||||
<View style={[Styles.contentItemCenter, { paddingVertical: 40 }]}>
|
||||
<MaterialIcons name="people-outline" size={34} color={colors.icon + '50'} />
|
||||
<Text style={[Styles.textMediumNormal, Styles.mt10, { color: colors.dimmed }]}>Belum ada anggota</Text>
|
||||
</View>
|
||||
}
|
||||
title="Tambah Anggota"
|
||||
/>
|
||||
}
|
||||
{
|
||||
loading ?
|
||||
arrSkeleton.map((item, index) => {
|
||||
return (
|
||||
<SkeletonTwoItem key={index} />
|
||||
)
|
||||
})
|
||||
:
|
||||
data.map((item, index) => {
|
||||
return (
|
||||
<BorderBottomItem
|
||||
key={index}
|
||||
borderType="bottom"
|
||||
icon={
|
||||
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} size="sm" />
|
||||
}
|
||||
title={item.name}
|
||||
onPress={() => {
|
||||
setChooseUser(item)
|
||||
setModal(true)
|
||||
}}
|
||||
/>
|
||||
)
|
||||
})
|
||||
)
|
||||
: data.map((item, index) => (
|
||||
<Pressable
|
||||
key={index}
|
||||
onPress={() => { setChooseUser(item); setModal(true) }}
|
||||
style={({ pressed }) => [
|
||||
Styles.rowItemsCenter, Styles.ph15,
|
||||
{
|
||||
paddingVertical: 13, gap: 14,
|
||||
borderBottomWidth: index < data.length - 1 ? 1 : 0,
|
||||
borderBottomColor: colors.icon + '14',
|
||||
backgroundColor: pressed ? colors.icon + '0E' : 'transparent',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} size="xs" />
|
||||
<Text style={[Styles.textDefault, Styles.flex1, { color: colors.text }]} numberOfLines={1}>
|
||||
{item.name}
|
||||
</Text>
|
||||
<MaterialCommunityIcons name="chevron-right" size={18} color={colors.icon + '60'} />
|
||||
</Pressable>
|
||||
))
|
||||
}
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</ScrollView>
|
||||
|
||||
@@ -149,20 +169,16 @@ export default function MemberDiscussionDetail() {
|
||||
router.push(`/member/${chooseUser.idUser}`)
|
||||
}}
|
||||
/>
|
||||
{
|
||||
entityUser.role != "user" && entityUser.role != "coadmin" &&
|
||||
{canManage && (
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="account-remove" color={colors.text} size={25} />}
|
||||
title="Keluarkan"
|
||||
onPress={() => {
|
||||
setModal(false)
|
||||
setTimeout(() => {
|
||||
setShowDeleteModal(true)
|
||||
}, 600)
|
||||
setTimeout(() => setShowDeleteModal(true), 600)
|
||||
}}
|
||||
/>
|
||||
}
|
||||
|
||||
)}
|
||||
</View>
|
||||
</DrawerBottom>
|
||||
|
||||
@@ -170,10 +186,7 @@ export default function MemberDiscussionDetail() {
|
||||
visible={showDeleteModal}
|
||||
title="Konfirmasi"
|
||||
message="Apakah anda yakin ingin mengeluarkan anggota?"
|
||||
onConfirm={() => {
|
||||
setShowDeleteModal(false)
|
||||
handleDeleteUser()
|
||||
}}
|
||||
onConfirm={() => { setShowDeleteModal(false); handleDeleteUser() }}
|
||||
onCancel={() => setShowDeleteModal(false)}
|
||||
confirmText="Hapus"
|
||||
cancelText="Batal"
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
import ModalConfirmation from "@/components/ModalConfirmation"
|
||||
import AppHeader from "@/components/AppHeader"
|
||||
import BorderBottomItem from "@/components/borderBottomItem"
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import HeaderRightCalendarDetail from "@/components/calendar/headerCalendarDetail"
|
||||
import DrawerBottom from "@/components/drawerBottom"
|
||||
import HeaderRightCalendarDetail from "@/components/calendar/headerCalendarDetail"
|
||||
import ImageUser from "@/components/imageNew"
|
||||
import MenuItemRow from "@/components/menuItemRow"
|
||||
import Skeleton from "@/components/skeleton"
|
||||
import ModalConfirmation from "@/components/ModalConfirmation"
|
||||
import Text from "@/components/Text"
|
||||
import { ConstEnv } from "@/constants/ConstEnv"
|
||||
import Styles from "@/constants/Styles"
|
||||
@@ -14,7 +11,7 @@ import { apiDeleteCalendarMember, apiGetCalendarOne, apiGetDivisionOneFeature }
|
||||
import { setUpdateCalendar } from "@/lib/calendarUpdate"
|
||||
import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import { useTheme } from "@/providers/ThemeProvider"
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons"
|
||||
import { MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
|
||||
import Clipboard from "@react-native-clipboard/clipboard"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { useEffect, useState } from "react"
|
||||
@@ -156,135 +153,142 @@ export default function DetailEventCalendar() {
|
||||
setRefreshing(false)
|
||||
};
|
||||
|
||||
const canManage = !((entityUser.role === "user" || entityUser.role === "coadmin") && !isMemberDivision)
|
||||
|
||||
const repeatLabel: Record<string, string> = {
|
||||
once: 'Acara 1 Kali',
|
||||
daily: 'Setiap Hari',
|
||||
weekly: 'Mingguan',
|
||||
monthly: 'Bulanan',
|
||||
yearly: 'Tahunan',
|
||||
}
|
||||
|
||||
function InfoRow({ icon, label, value, onCopy }: { icon: string, label: string, value?: string, onCopy?: () => void }) {
|
||||
return (
|
||||
<View style={[Styles.sectionActionRow, { paddingVertical: 10, borderBottomWidth: 1, borderBottomColor: colors.icon + '14' }]}>
|
||||
<View style={[Styles.sectionIconBox, { backgroundColor: colors.dimmed + '18' }]}>
|
||||
<MaterialCommunityIcons name={icon as any} size={18} color={colors.dimmed} />
|
||||
</View>
|
||||
<View style={Styles.flex1}>
|
||||
<Text style={[Styles.textSmallSemiBold, { color: colors.dimmed, marginBottom: 2 }]}>{label}</Text>
|
||||
{loading
|
||||
? <View style={{ height: 13, borderRadius: 6, backgroundColor: colors.icon + '20', width: '70%' }} />
|
||||
: <Text style={[Styles.textDefault, { color: colors.text }]}>{value || '-'}</Text>
|
||||
}
|
||||
</View>
|
||||
{onCopy && !loading && value && (
|
||||
<Pressable onPress={onCopy} style={{ padding: 4 }}>
|
||||
<MaterialCommunityIcons name="content-copy" size={16} color={colors.dimmed} />
|
||||
</Pressable>
|
||||
)}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
|
||||
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
// headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
|
||||
headerTitle: 'Detail Acara',
|
||||
headerTitleAlign: 'center',
|
||||
// headerRight: () => (entityUser.role == "user" || entityUser.role == "coadmin") && !isMemberDivision ? <></> : <HeaderRightCalendarDetail id={String(data?.idCalendar)} idReminder={String(detail)} />
|
||||
header: () => (
|
||||
<AppHeader
|
||||
title="Detail Acara"
|
||||
showBack={true}
|
||||
onPressLeft={() => router.back()}
|
||||
right={
|
||||
(entityUser.role == "user" || entityUser.role == "coadmin") && !isMemberDivision ? <></> : <HeaderRightCalendarDetail id={String(data?.idCalendar)} idReminder={String(detail)} />
|
||||
(entityUser.role === "user" || entityUser.role === "coadmin") && !isMemberDivision
|
||||
? <></> : <HeaderRightCalendarDetail id={String(data?.idCalendar)} idReminder={String(detail)} />
|
||||
}
|
||||
/>
|
||||
)
|
||||
}}
|
||||
/>
|
||||
<ScrollView
|
||||
style={[Styles.h100]}
|
||||
refreshControl={
|
||||
<RefreshControl
|
||||
refreshing={refreshing}
|
||||
onRefresh={handleRefresh}
|
||||
tintColor={colors.icon}
|
||||
/>
|
||||
}
|
||||
showsVerticalScrollIndicator={false}
|
||||
style={Styles.h100}
|
||||
refreshControl={<RefreshControl refreshing={refreshing} onRefresh={handleRefresh} tintColor={colors.icon} />}
|
||||
>
|
||||
<View style={[Styles.p15]}>
|
||||
<View style={[Styles.wrapPaper, Styles.mb15, { backgroundColor: colors.card, borderColor: colors.background }]}>
|
||||
<View style={[Styles.rowItemsCenter, { alignItems: 'flex-start' }]}>
|
||||
<MaterialCommunityIcons name="calendar-text" size={30} color={colors.text} style={Styles.mr10} />
|
||||
{
|
||||
loading ?
|
||||
<Skeleton width={80} height={10} borderRadius={10} widthType="percent" />
|
||||
: <Text style={[Styles.textDefault, Styles.w90]}>{data?.title}</Text>
|
||||
}
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
|
||||
{/* Info acara */}
|
||||
<View style={[Styles.wrapPaper, Styles.sectionCard, Styles.noShadow, Styles.mb15,
|
||||
{ backgroundColor: colors.card, borderColor: colors.icon + '18', padding: 0, overflow: 'hidden' }]}>
|
||||
<View style={{ padding: 16, borderBottomWidth: 1, borderBottomColor: colors.icon + '14' }}>
|
||||
<View style={Styles.sectionActionRow}>
|
||||
<View style={[Styles.sectionIconBox, { backgroundColor: colors.dimmed + '18' }]}>
|
||||
<MaterialCommunityIcons name="calendar-text" size={18} color={colors.dimmed} />
|
||||
</View>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.flex1, { color: colors.text }]}>Detail Acara</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt10]}>
|
||||
<MaterialCommunityIcons name="calendar-month-outline" size={30} color={colors.text} style={Styles.mr10} />
|
||||
{
|
||||
loading ?
|
||||
<Skeleton width={80} height={10} borderRadius={10} widthType="percent" />
|
||||
:
|
||||
<Text style={[Styles.textDefault]}>{data?.dateStart}</Text>
|
||||
}
|
||||
<View style={{ paddingHorizontal: 16 }}>
|
||||
<InfoRow icon="format-title" label="Judul" value={data?.title} />
|
||||
<InfoRow icon="calendar-month-outline" label="Tanggal" value={data?.dateStart} />
|
||||
<InfoRow icon="clock-outline" label="Waktu" value={data ? `${data.timeStart} – ${data.timeEnd}` : undefined} />
|
||||
<InfoRow icon="repeat" label="Pengulangan" value={data?.repeatEventTyper ? repeatLabel[data.repeatEventTyper] : undefined} />
|
||||
<InfoRow icon="link-variant" label="Link Meet" value={data?.linkMeet} onCopy={data?.linkMeet ? () => handleCopy(data.linkMeet) : undefined} />
|
||||
<View style={[Styles.sectionActionRow, { paddingVertical: 10, alignItems: 'flex-start' }]}>
|
||||
<View style={[Styles.sectionIconBox, { backgroundColor: colors.dimmed + '18' }]}>
|
||||
<MaterialCommunityIcons name="card-text-outline" size={18} color={colors.dimmed} />
|
||||
</View>
|
||||
<View style={Styles.flex1}>
|
||||
<Text style={[Styles.textSmallSemiBold, { color: colors.dimmed, marginBottom: 2 }]}>Deskripsi</Text>
|
||||
{loading
|
||||
? <View style={{ height: 13, borderRadius: 6, backgroundColor: colors.icon + '20', width: '80%' }} />
|
||||
: <Text style={[Styles.textDefault, { color: colors.text, lineHeight: 22 }]}>{data?.desc || '-'}</Text>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt10]}>
|
||||
<MaterialCommunityIcons name="clock-outline" size={30} color={colors.text} style={Styles.mr10} />
|
||||
{
|
||||
loading ?
|
||||
<Skeleton width={80} height={10} borderRadius={10} widthType="percent" />
|
||||
:
|
||||
<Text style={[Styles.textDefault]}>{data?.timeStart} | {data?.timeEnd}</Text>
|
||||
}
|
||||
</View>
|
||||
|
||||
{/* Daftar anggota */}
|
||||
<View style={[Styles.wrapPaper, Styles.sectionCard, Styles.noShadow,
|
||||
{ backgroundColor: colors.card, borderColor: colors.icon + '18', padding: 0, overflow: 'hidden' }]}>
|
||||
|
||||
<View style={[Styles.sectionActionRow, { padding: 16, borderBottomWidth: 1, borderBottomColor: colors.icon + '14' }]}>
|
||||
<View style={[Styles.sectionIconBox, { backgroundColor: colors.dimmed + '18' }]}>
|
||||
<MaterialIcons name="people" size={18} color={colors.dimmed} />
|
||||
</View>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.flex1, { color: colors.text }]}>Anggota</Text>
|
||||
<Text style={[Styles.textMediumNormal, { color: colors.dimmed }]}>{member.length} anggota</Text>
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt10]}>
|
||||
<MaterialCommunityIcons name="repeat" size={30} color={colors.text} style={Styles.mr10} />
|
||||
{
|
||||
loading ?
|
||||
<Skeleton width={80} height={10} borderRadius={10} widthType="percent" />
|
||||
:
|
||||
<Text style={[Styles.textDefault]}>
|
||||
|
||||
{member.length === 0
|
||||
? (
|
||||
<View style={[Styles.contentItemCenter, { paddingVertical: 40 }]}>
|
||||
<MaterialIcons name="people-outline" size={34} color={colors.icon + '50'} />
|
||||
<Text style={[Styles.textMediumNormal, Styles.mt10, { color: colors.dimmed }]}>Belum ada anggota</Text>
|
||||
</View>
|
||||
)
|
||||
: member.map((item, index) => (
|
||||
<Pressable
|
||||
key={index}
|
||||
onPress={() => {
|
||||
if (!canManage) return
|
||||
setMemberChoose({ id: item.idUser, name: item.name })
|
||||
setModalMember(true)
|
||||
}}
|
||||
style={({ pressed }) => [
|
||||
Styles.rowItemsCenter, Styles.ph15,
|
||||
{
|
||||
data?.repeatEventTyper.toString() === 'once' ? 'Acara 1 Kali' :
|
||||
data?.repeatEventTyper.toString() === 'daily' ? 'Setiap Hari' :
|
||||
data?.repeatEventTyper.toString() === 'weekly' ? 'Mingguan' :
|
||||
data?.repeatEventTyper.toString() === 'monthly' ? 'Bulanan' :
|
||||
data?.repeatEventTyper.toString() === 'yearly' ? 'Tahunan' :
|
||||
''
|
||||
}
|
||||
</Text>
|
||||
}
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt10]}>
|
||||
<MaterialCommunityIcons name="link-variant" size={30} color={colors.text} style={Styles.mr10} />
|
||||
{
|
||||
loading ?
|
||||
<Skeleton width={80} height={10} borderRadius={10} widthType="percent" />
|
||||
:
|
||||
data?.linkMeet ?
|
||||
<Pressable onPress={() => { handleCopy(data.linkMeet) }}>
|
||||
<Text style={[Styles.textDefault]}>{data.linkMeet}</Text>
|
||||
</Pressable>
|
||||
: <Text style={[Styles.textDefault]}>-</Text>
|
||||
}
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt10, { alignItems: 'flex-start' }]}>
|
||||
<MaterialCommunityIcons name="card-text-outline" size={30} color={colors.text} style={Styles.mr10} />
|
||||
{
|
||||
loading ?
|
||||
<Skeleton width={80} height={10} borderRadius={10} widthType="percent" />
|
||||
:
|
||||
<Text style={[Styles.textDefault, Styles.w90]}>{data?.desc}</Text>
|
||||
}
|
||||
</View>
|
||||
paddingVertical: 12, gap: 14,
|
||||
borderBottomWidth: index < member.length - 1 ? 1 : 0,
|
||||
borderBottomColor: colors.icon + '14',
|
||||
backgroundColor: pressed && canManage ? colors.icon + '0E' : 'transparent',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} size="xs" />
|
||||
<View style={Styles.flex1}>
|
||||
<Text style={[Styles.textDefault, { color: colors.text }]} numberOfLines={1}>{item.name}</Text>
|
||||
<Text style={[Styles.textMediumNormal, { color: colors.dimmed }]} numberOfLines={1}>{item.email}</Text>
|
||||
</View>
|
||||
{canManage && <MaterialCommunityIcons name="chevron-right" size={18} color={colors.icon + '60'} />}
|
||||
</Pressable>
|
||||
))
|
||||
}
|
||||
</View>
|
||||
|
||||
<View style={[Styles.mb15]}>
|
||||
<View style={[Styles.rowSpaceBetween, Styles.mv05]}>
|
||||
<Text style={[Styles.textDefaultSemiBold]}>Anggota</Text>
|
||||
<Text style={[Styles.textDefault]}>Total {member.length} Anggota</Text>
|
||||
</View>
|
||||
|
||||
<View style={[Styles.wrapPaper, { backgroundColor: colors.card, borderColor: colors.background }]}>
|
||||
{
|
||||
member.map((item, index) => (
|
||||
<BorderBottomItem
|
||||
key={index}
|
||||
borderType="bottom"
|
||||
icon={<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} />}
|
||||
title={item.name}
|
||||
subtitle={item.email}
|
||||
onPress={() => {
|
||||
if ((entityUser.role == "user" || entityUser.role == "coadmin") && !isMemberDivision) {
|
||||
null
|
||||
} else {
|
||||
setMemberChoose({ id: item.idUser, name: item.name })
|
||||
setModalMember(true)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
))
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ export default function AddMemberDivision() {
|
||||
return (
|
||||
<Pressable
|
||||
key={index}
|
||||
style={[Styles.itemSelectModal]}
|
||||
style={[Styles.itemSelectModal, { borderBottomColor: colors.icon + '20' }]}
|
||||
onPress={() => {
|
||||
!found && onChoose(item.id, item.name, item.img)
|
||||
}}
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
import ModalConfirmation from "@/components/ModalConfirmation"
|
||||
import AppHeader from "@/components/AppHeader"
|
||||
import BorderBottomItem from "@/components/borderBottomItem"
|
||||
import HeaderRightDivisionInfo from "@/components/division/headerDivisionInfo"
|
||||
import DrawerBottom from "@/components/drawerBottom"
|
||||
import HeaderRightDivisionInfo from "@/components/division/headerDivisionInfo"
|
||||
import ImageUser from "@/components/imageNew"
|
||||
import MenuItemRow from "@/components/menuItemRow"
|
||||
import ModalConfirmation from "@/components/ModalConfirmation"
|
||||
import SectionCancel from "@/components/sectionCancel"
|
||||
import Skeleton from "@/components/skeleton"
|
||||
import SkeletonTwoItem from "@/components/skeletonTwoItem"
|
||||
import Text from "@/components/Text"
|
||||
import { ColorsStatus } from "@/constants/ColorsStatus"
|
||||
import { ConstEnv } from "@/constants/ConstEnv"
|
||||
import Styles from "@/constants/Styles"
|
||||
import { apiDeleteMemberDivision, apiGetDivisionOneDetail, apiGetDivisionOneFeature, apiUpdateStatusAdminDivision } from "@/lib/api"
|
||||
import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import { useTheme } from "@/providers/ThemeProvider"
|
||||
import { Feather, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
|
||||
import { MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { useEffect, useState } from "react"
|
||||
import { Pressable, RefreshControl, SafeAreaView, ScrollView, View } from "react-native"
|
||||
@@ -50,8 +47,8 @@ export default function InformationDivision() {
|
||||
const [dataMember, setDataMember] = useState<PropsMember[]>([])
|
||||
const [refresh, setRefresh] = useState(false)
|
||||
const update = useSelector((state: any) => state.divisionUpdate)
|
||||
const arrSkeleton = Array.from({ length: 5 }, (_, index) => index)
|
||||
const [loading, setLoading] = useState(true)
|
||||
const SKELETON_COUNT = 5
|
||||
const [isMemberDivision, setIsMemberDivision] = useState(false)
|
||||
const [isAdminDivision, setIsAdminDivision] = useState(false)
|
||||
const [dataMemberChoose, setDataMemberChoose] = useState({
|
||||
@@ -186,109 +183,123 @@ export default function InformationDivision() {
|
||||
}}
|
||||
/>
|
||||
<ScrollView
|
||||
refreshControl={
|
||||
<RefreshControl
|
||||
refreshing={refreshing}
|
||||
onRefresh={handleRefresh}
|
||||
tintColor={colors.icon}
|
||||
/>
|
||||
}
|
||||
showsVerticalScrollIndicator={false}
|
||||
refreshControl={<RefreshControl refreshing={refreshing} onRefresh={handleRefresh} tintColor={colors.icon} />}
|
||||
style={[Styles.h100, { backgroundColor: colors.background }]}
|
||||
>
|
||||
<View style={[Styles.p15]}>
|
||||
{
|
||||
dataDetail?.isActive == false && (
|
||||
<SectionCancel title={'Divisi nonaktif'} />
|
||||
)
|
||||
}
|
||||
<View style={[Styles.mb15]}>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.mb05]}>Deskripsi Divisi</Text>
|
||||
<View style={[Styles.wrapPaper, Styles.noShadow, { backgroundColor: colors.card, borderWidth: 1, borderColor: colors.icon + '20' }]}>
|
||||
{loading ?
|
||||
arrSkeleton.map((item, index) => {
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
|
||||
{dataDetail?.isActive === false && <SectionCancel title="Divisi nonaktif" />}
|
||||
|
||||
{/* Deskripsi */}
|
||||
<View style={[Styles.wrapPaper, Styles.sectionCard, Styles.noShadow, Styles.mb15,
|
||||
{ backgroundColor: colors.card, borderColor: colors.icon + '18' }]}>
|
||||
<View style={[Styles.sectionActionRow, { marginBottom: 12 }]}>
|
||||
<View style={[Styles.sectionIconBox, { backgroundColor: colors.dimmed + '18' }]}>
|
||||
<MaterialIcons name="info-outline" size={18} color={colors.dimmed} />
|
||||
</View>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.flex1, { color: colors.text }]}>Deskripsi</Text>
|
||||
</View>
|
||||
{loading
|
||||
? Array.from({ length: 3 }).map((_, i) => (
|
||||
<View key={i} style={{ height: 13, borderRadius: 6, marginBottom: 8, backgroundColor: colors.icon + '20', width: i === 2 ? '60%' : '100%' }} />
|
||||
))
|
||||
: <Text style={[Styles.textDefault, { color: colors.text, lineHeight: 22 }]}>{dataDetail?.desc}</Text>
|
||||
}
|
||||
</View>
|
||||
|
||||
{/* Tombol tambah anggota */}
|
||||
{((entityUser.role !== "user" && entityUser.role !== "coadmin") || isAdminDivision) && dataDetail?.isActive && (
|
||||
<View style={[Styles.wrapPaper, Styles.sectionCard, Styles.mb15,
|
||||
{ backgroundColor: colors.card, borderColor: colors.icon + '18' }]}>
|
||||
<Pressable
|
||||
onPress={() => router.push(`/division/${id}/add-member`)}
|
||||
style={Styles.sectionActionRow}
|
||||
>
|
||||
<View style={[Styles.sectionIconBox, { backgroundColor: colors.icon + '18' }]}>
|
||||
<MaterialCommunityIcons name="account-plus-outline" size={18} color={colors.icon} />
|
||||
</View>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.flex1, { color: colors.text }]}>Tambah Anggota</Text>
|
||||
<MaterialCommunityIcons name="chevron-right" size={18} color={colors.dimmed} />
|
||||
</Pressable>
|
||||
</View>
|
||||
)}
|
||||
|
||||
{/* Daftar anggota */}
|
||||
<View style={[Styles.wrapPaper, Styles.sectionCard,
|
||||
{ backgroundColor: colors.card, borderColor: colors.icon + '18', padding: 0, overflow: 'hidden' }]}>
|
||||
|
||||
{/* Header */}
|
||||
<View style={[Styles.sectionActionRow, { padding: 16, borderBottomWidth: 1, borderBottomColor: colors.icon + '14' }]}>
|
||||
<View style={[Styles.sectionIconBox, { backgroundColor: colors.dimmed + '18' }]}>
|
||||
<MaterialIcons name="people" size={18} color={colors.dimmed} />
|
||||
</View>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.flex1, { color: colors.text }]}>Anggota</Text>
|
||||
{!loading && (
|
||||
<Text style={[Styles.textMediumNormal, { color: colors.dimmed }]}>{dataMember.length} anggota</Text>
|
||||
)}
|
||||
</View>
|
||||
|
||||
{loading
|
||||
? Array.from({ length: SKELETON_COUNT }).map((_, i) => (
|
||||
<View key={i} style={[Styles.rowItemsCenter, Styles.ph15,
|
||||
{ paddingVertical: 14, gap: 14, borderBottomWidth: i < SKELETON_COUNT - 1 ? 1 : 0, borderBottomColor: colors.icon + '14' }]}>
|
||||
<View style={[Styles.userProfileExtraSmall, { backgroundColor: colors.icon + '20', borderRadius: 100 }]} />
|
||||
<View style={{ height: 13, borderRadius: 6, flex: 1, backgroundColor: colors.icon + '20', maxWidth: 140 + (i % 3) * 30 }} />
|
||||
</View>
|
||||
))
|
||||
: dataMember.length === 0
|
||||
? (
|
||||
<View style={[Styles.contentItemCenter, { paddingVertical: 40 }]}>
|
||||
<MaterialIcons name="people-outline" size={34} color={colors.icon + '50'} />
|
||||
<Text style={[Styles.textMediumNormal, Styles.mt10, { color: colors.dimmed }]}>Belum ada anggota</Text>
|
||||
</View>
|
||||
)
|
||||
: dataMember.map((item, index) => {
|
||||
const canPress = dataDetail?.isActive && (isAdminDivision || (entityUser.role !== "user" && entityUser.role !== "coadmin"))
|
||||
return (
|
||||
<Skeleton key={index} width={100} height={10} widthType="percent" borderRadius={10} />
|
||||
<Pressable
|
||||
key={index}
|
||||
onPress={() => canPress && handleChooseMember(item)}
|
||||
style={({ pressed }) => [
|
||||
Styles.rowItemsCenter, Styles.ph15,
|
||||
{
|
||||
paddingVertical: 13, gap: 14,
|
||||
borderBottomWidth: index < dataMember.length - 1 ? 1 : 0,
|
||||
borderBottomColor: colors.icon + '14',
|
||||
backgroundColor: pressed && canPress ? colors.icon + '0E' : 'transparent',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} size="xs" />
|
||||
<Text style={[Styles.textDefault, Styles.flex1, { color: colors.text }]} numberOfLines={1}>
|
||||
{item.name}
|
||||
</Text>
|
||||
<Text style={[Styles.textMediumNormal, { color: item.isAdmin ? colors.tabActive : colors.dimmed }]}>
|
||||
{item.isAdmin ? 'Admin' : 'Anggota'}
|
||||
</Text>
|
||||
{canPress && <MaterialCommunityIcons name="chevron-right" size={18} color={colors.icon + '60'} />}
|
||||
</Pressable>
|
||||
)
|
||||
})
|
||||
:
|
||||
<Text>{dataDetail?.desc}</Text>
|
||||
}
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
<View style={[Styles.mb15]}>
|
||||
<Text style={[Styles.textDefault, Styles.mv05]}>{dataMember.length} Anggota</Text>
|
||||
<View style={[Styles.wrapPaper, Styles.noShadow, { backgroundColor: colors.card, borderWidth: 1, borderColor: colors.icon + '20' }]}>
|
||||
{
|
||||
((entityUser.role != "user" && entityUser.role != "coadmin") || isAdminDivision) &&
|
||||
dataDetail?.isActive && (
|
||||
<BorderBottomItem
|
||||
onPress={() => { router.push(`/division/${id}/add-member`) }}
|
||||
borderType="none"
|
||||
icon={
|
||||
<View style={[Styles.iconContent]}>
|
||||
<Feather name="user-plus" size={25} color={'black'} />
|
||||
</View>
|
||||
}
|
||||
title="Tambah Anggota"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
loading ?
|
||||
arrSkeleton.map((item, index) => {
|
||||
return (
|
||||
<SkeletonTwoItem key={index} />
|
||||
)
|
||||
})
|
||||
:
|
||||
dataMember.map((item, index) => {
|
||||
return (
|
||||
<BorderBottomItem
|
||||
key={index}
|
||||
borderType="bottom"
|
||||
onPress={() => { dataDetail?.isActive && (isAdminDivision || (entityUser.role != "user" && entityUser.role != "coadmin")) && handleChooseMember(item) }}
|
||||
icon={
|
||||
<ImageUser src={`${ConstEnv.url_storage}/files/${item.img}`} size="sm" />
|
||||
}
|
||||
title={item.name}
|
||||
rightTopInfo={item.isAdmin ? "Admin" : "Anggota"}
|
||||
/>
|
||||
)
|
||||
})
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
|
||||
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title={dataMemberChoose.name}>
|
||||
<View>
|
||||
<Pressable style={[Styles.wrapItemBorderBottom]} onPress={() => { handleMemberAdmin() }}>
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
<View style={[Styles.iconContent]}>
|
||||
<MaterialIcons name="verified-user" size={25} color={'black'} />
|
||||
</View>
|
||||
<View style={[Styles.rowSpaceBetween, { width: '88%' }]}>
|
||||
<View style={[Styles.ml10]}>
|
||||
<Text style={[Styles.textDefault]}>{dataMemberChoose.isAdmin ? 'Memberhentikan sebagai admin' : 'Jadikan admin'}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</Pressable>
|
||||
|
||||
<Pressable style={[Styles.wrapItemBorderBottom]} onPress={() => { handleMemberOut() }}>
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
<View style={[Styles.iconContent, ColorsStatus.info]}>
|
||||
<MaterialCommunityIcons name="close-circle" size={25} color={colors.primary} />
|
||||
</View>
|
||||
<View style={[Styles.rowSpaceBetween, { width: '88%' }]}>
|
||||
<View style={[Styles.ml10]}>
|
||||
<Text style={[Styles.textDefault]}>Keluarkan dari divisi</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</Pressable>
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={<MaterialIcons name="verified-user" color={colors.text} size={25} />}
|
||||
title={dataMemberChoose.isAdmin ? 'Berhentikan admin' : 'Jadikan admin'}
|
||||
onPress={handleMemberAdmin}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="account-remove" color={colors.text} size={25} />}
|
||||
title="Keluarkan"
|
||||
onPress={handleMemberOut}
|
||||
/>
|
||||
</View>
|
||||
</DrawerBottom>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ type Props = {
|
||||
onError?: (val:boolean) => void
|
||||
}
|
||||
|
||||
export default function ImageUser({ src, size, border, onError }: Props) {
|
||||
export default function ImageUser({ src, size, border = true, onError }: Props) {
|
||||
const [error, setError] = useState(false)
|
||||
const { colors } = useTheme()
|
||||
return (
|
||||
|
||||
@@ -4,7 +4,7 @@ const AnnouncementStyles = StyleSheet.create({
|
||||
// list (index.tsx)
|
||||
announcementListContainer: { padding: 15, paddingBottom: 0 },
|
||||
announcementListInner: { marginTop: 10 },
|
||||
announcementListCard: { borderRadius: 10, borderWidth: 1, padding: 12 },
|
||||
announcementListCard: { borderRadius: 8, borderWidth: 1, padding: 12 },
|
||||
announcementListCardHeader: { marginBottom: 6 },
|
||||
announcementListTitleRow: { flex: 1, gap: 8, marginRight: 8, flexDirection: 'row', alignItems: 'center' },
|
||||
announcementListIconBox: { width: 28, height: 28, borderRadius: 8, alignItems: 'center', justifyContent: 'center' },
|
||||
@@ -18,11 +18,11 @@ const AnnouncementStyles = StyleSheet.create({
|
||||
|
||||
// detail ([id].tsx)
|
||||
announcementDetailContainer: { padding: 15, paddingBottom: 50, gap: 12 },
|
||||
announcementDetailCard: { borderRadius: 10 },
|
||||
announcementDetailCard: { borderRadius: 8 },
|
||||
announcementDetailSkeletonGap: { gap: 8 },
|
||||
announcementDetailSkeletonIconRow: { gap: 10, marginBottom: 2 },
|
||||
announcementDetailTitleRow: { gap: 10, marginBottom: 10 },
|
||||
announcementDetailIconBox: { width: 38, height: 38, borderRadius: 10 },
|
||||
announcementDetailIconBox: { width: 38, height: 38, borderRadius: 8 },
|
||||
announcementDetailTitleText: { fontSize: 17, lineHeight: 24, flex: 1 },
|
||||
announcementDetailSectionLabelRow: { marginBottom: 8, gap: 6 },
|
||||
announcementDetailFileCardPadding: { padding: 10 },
|
||||
@@ -33,7 +33,7 @@ const AnnouncementStyles = StyleSheet.create({
|
||||
announcementDetailGroupSeparator: { marginTop: 12, paddingTop: 12, borderTopWidth: 1 },
|
||||
announcementDetailGroupLabel: { marginBottom: 6 },
|
||||
announcementDetailDivisionRow: { gap: 8, paddingVertical: 6 },
|
||||
announcementDetailDivisionIconCircle: { width: 26, height: 26, borderRadius: 13, alignItems: 'center', justifyContent: 'center' },
|
||||
announcementDetailDivisionIconCircle: { width: 26, height: 26, borderRadius: 100, alignItems: 'center', justifyContent: 'center' },
|
||||
});
|
||||
|
||||
export default AnnouncementStyles;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { StyleSheet } from "react-native";
|
||||
|
||||
const ApprovalStyles = StyleSheet.create({
|
||||
approvalBadge: { borderRadius: 20, paddingHorizontal: 10, paddingVertical: 3, alignSelf: 'flex-start' },
|
||||
approvalItem: { borderWidth: 1, borderRadius: 10, padding: 12, marginBottom: 10 },
|
||||
approvalItem: { borderWidth: 1, borderRadius: 8, padding: 12, marginBottom: 10 },
|
||||
approvalItemHeader: { justifyContent: 'space-between', marginBottom: 8 },
|
||||
approvalIconMr: { marginRight: 6 },
|
||||
approvalNoteBox: { borderRadius: 8, padding: 8, marginTop: 4 },
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
import { StyleSheet } from "react-native";
|
||||
|
||||
const BorderStyles = StyleSheet.create({
|
||||
round05: { borderRadius: 5 },
|
||||
round04: { borderRadius: 4 },
|
||||
round05: { borderRadius: 8 },
|
||||
round08: { borderRadius: 8 },
|
||||
round10: { borderRadius: 10 },
|
||||
round12: { borderRadius: 12 },
|
||||
round15: { borderRadius: 15 },
|
||||
round20: { borderRadius: 20 },
|
||||
round30: { borderRadius: 30 },
|
||||
roundFull: { borderRadius: 100 },
|
||||
borderRight: { borderRightWidth: 1, borderRightColor: '#d6d8f6' },
|
||||
borderLeft: { borderLeftWidth: 1, borderLeftColor: '#d6d8f6' },
|
||||
borderBottom: { borderBottomWidth: 1, borderBottomColor: '#d6d8f6' },
|
||||
|
||||
@@ -2,7 +2,7 @@ import { StyleSheet } from "react-native";
|
||||
|
||||
const ButtonStyles = StyleSheet.create({
|
||||
btnIconHeader: { padding: 3 },
|
||||
btnFiturMenu: { padding: 13, borderRadius: 15, borderWidth: 1 },
|
||||
btnFiturMenu: { padding: 13, borderRadius: 20, borderWidth: 1 },
|
||||
btnRound: {
|
||||
backgroundColor: '#1F3C88',
|
||||
borderWidth: 0,
|
||||
@@ -37,8 +37,8 @@ const ButtonStyles = StyleSheet.create({
|
||||
padding: 5,
|
||||
borderWidth: 1,
|
||||
},
|
||||
labelStatus: { paddingHorizontal: 15, paddingVertical: 4, borderRadius: 10 },
|
||||
labelStatusSmall: { paddingHorizontal: 10, paddingVertical: 3, borderRadius: 10 },
|
||||
labelStatus: { paddingHorizontal: 15, paddingVertical: 4, borderRadius: 20 },
|
||||
labelStatusSmall: { paddingHorizontal: 10, paddingVertical: 3, borderRadius: 20 },
|
||||
});
|
||||
|
||||
export default ButtonStyles;
|
||||
|
||||
@@ -4,7 +4,7 @@ const CardStyles = StyleSheet.create({
|
||||
wrapPaper: {
|
||||
padding: 10,
|
||||
backgroundColor: 'white',
|
||||
borderRadius: 5,
|
||||
borderRadius: 8,
|
||||
shadowColor: '#171717',
|
||||
shadowOffset: { width: 0, height: 0 },
|
||||
shadowOpacity: 0.1,
|
||||
@@ -31,7 +31,7 @@ const CardStyles = StyleSheet.create({
|
||||
shadowOpacity: 0.1,
|
||||
shadowRadius: 5,
|
||||
elevation: 2,
|
||||
borderRadius: 5,
|
||||
borderRadius: 8,
|
||||
marginBottom: 15,
|
||||
},
|
||||
wrapGridCaraousel: {
|
||||
@@ -42,7 +42,7 @@ const CardStyles = StyleSheet.create({
|
||||
shadowOpacity: 0.1,
|
||||
shadowRadius: 5,
|
||||
elevation: 2,
|
||||
borderRadius: 5,
|
||||
borderRadius: 8,
|
||||
marginLeft: 5,
|
||||
display: 'flex',
|
||||
},
|
||||
@@ -57,27 +57,27 @@ const CardStyles = StyleSheet.create({
|
||||
paddingVertical: 25,
|
||||
paddingHorizontal: 20,
|
||||
alignItems: 'center',
|
||||
borderTopStartRadius: 5,
|
||||
borderTopEndRadius: 5,
|
||||
borderTopStartRadius: 8,
|
||||
borderTopEndRadius: 8,
|
||||
},
|
||||
contentPaperGrid: {
|
||||
height: 125,
|
||||
borderBottomEndRadius: 5,
|
||||
borderBottomStartRadius: 5,
|
||||
borderBottomEndRadius: 8,
|
||||
borderBottomStartRadius: 8,
|
||||
paddingHorizontal: 20,
|
||||
justifyContent: 'space-evenly',
|
||||
},
|
||||
contentPaperGrid2: {
|
||||
height: 100,
|
||||
borderBottomEndRadius: 5,
|
||||
borderBottomStartRadius: 5,
|
||||
borderBottomEndRadius: 8,
|
||||
borderBottomStartRadius: 8,
|
||||
paddingHorizontal: 20,
|
||||
paddingVertical: 15,
|
||||
justifyContent: 'flex-start',
|
||||
},
|
||||
wrapGridItem: {
|
||||
borderWidth: 1,
|
||||
borderRadius: 5,
|
||||
borderRadius: 8,
|
||||
padding: 10,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
@@ -88,13 +88,13 @@ const CardStyles = StyleSheet.create({
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
backgroundColor: 'transparent',
|
||||
borderRadius: 10,
|
||||
borderRadius: 8,
|
||||
borderWidth: 1,
|
||||
paddingHorizontal: 12,
|
||||
paddingVertical: 10,
|
||||
gap: 12,
|
||||
},
|
||||
sectionCard: { borderRadius: 12, padding: 16, borderWidth: 1 },
|
||||
sectionCard: { borderRadius: 8, padding: 16, borderWidth: 1 },
|
||||
sectionHeader: { flexDirection: 'row', alignItems: 'center', marginBottom: 12 },
|
||||
sectionHeaderRow: {
|
||||
flexDirection: 'row',
|
||||
@@ -110,12 +110,12 @@ const CardStyles = StyleSheet.create({
|
||||
justifyContent: 'center',
|
||||
},
|
||||
sectionActionRow: { flexDirection: 'row', alignItems: 'center', gap: 10 },
|
||||
sectionBadge: { borderRadius: 10, paddingHorizontal: 8, paddingVertical: 2 },
|
||||
sectionBadge: { borderRadius: 20, paddingHorizontal: 8, paddingVertical: 2 },
|
||||
wrapBar: { height: 20, backgroundColor: '#ccc', borderRadius: 10, margin: 0, width: '100%' },
|
||||
contentBar: { height: 20, backgroundColor: '#3B82F6', borderRadius: 10 },
|
||||
toastContainer: {
|
||||
backgroundColor: 'white',
|
||||
borderRadius: 10,
|
||||
borderRadius: 8,
|
||||
padding: 10,
|
||||
width: '90%',
|
||||
borderWidth: 1,
|
||||
@@ -135,7 +135,7 @@ const CardStyles = StyleSheet.create({
|
||||
loadingBox: {
|
||||
paddingVertical: 15,
|
||||
paddingHorizontal: 40,
|
||||
borderRadius: 5,
|
||||
borderRadius: 8,
|
||||
alignItems: 'center',
|
||||
gap: 10,
|
||||
},
|
||||
@@ -143,16 +143,16 @@ const CardStyles = StyleSheet.create({
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
marginHorizontal: 15,
|
||||
borderRadius: 15,
|
||||
borderRadius: 8,
|
||||
backgroundColor: '#19345E',
|
||||
display: 'flex',
|
||||
width: '92%',
|
||||
resizeMode: 'stretch',
|
||||
overflow: 'hidden',
|
||||
},
|
||||
wrapItemDiscussion: { padding: 15, borderRadius: 5, borderBottomWidth: 1 },
|
||||
wrapItemDiscussion: { padding: 15, borderRadius: 8, borderBottomWidth: 1 },
|
||||
wrapItemBorderBottom: { padding: 10, borderBottomWidth: 1 },
|
||||
wrapItemBorderAll: { padding: 10, borderWidth: 1, borderRadius: 5, marginBottom: 5 },
|
||||
wrapItemBorderAll: { padding: 10, borderWidth: 1, borderRadius: 8, marginBottom: 5 },
|
||||
wrapItemBorderNone: { padding: 10, marginBottom: 5 },
|
||||
});
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ const ComponentStyles = StyleSheet.create({
|
||||
userProfileExtraSmall: { width: 35, height: 35, borderRadius: 100 },
|
||||
userProfileSmall: { width: 48, height: 48, borderRadius: 100 },
|
||||
userProfileBig: { width: 100, height: 100, borderRadius: 100 },
|
||||
imgListBanner: { width: 100, height: 50, borderRadius: 5 },
|
||||
imgListBanner: { width: 100, height: 50, borderRadius: 8 },
|
||||
iconContent: { padding: 10, borderRadius: 100, backgroundColor: '#E5E7EB' },
|
||||
|
||||
// chip
|
||||
chip: {
|
||||
paddingVertical: 5,
|
||||
paddingHorizontal: 15,
|
||||
borderRadius: 5,
|
||||
borderRadius: 20,
|
||||
borderWidth: 1,
|
||||
borderColor: "transparent",
|
||||
marginRight: 10,
|
||||
@@ -26,14 +26,14 @@ const ComponentStyles = StyleSheet.create({
|
||||
top: -6,
|
||||
left: -6,
|
||||
backgroundColor: "#384288",
|
||||
borderRadius: 10,
|
||||
borderRadius: 8,
|
||||
padding: 2,
|
||||
},
|
||||
|
||||
// badge & progress
|
||||
badgeCol: { alignItems: 'center', gap: 6 },
|
||||
progressBadge: { borderRadius: 10, paddingHorizontal: 12, paddingVertical: 5, borderWidth: 1, alignItems: 'center' },
|
||||
taskCountBadge: { borderRadius: 6, paddingHorizontal: 7, paddingVertical: 2 },
|
||||
progressBadge: { borderRadius: 8, paddingHorizontal: 12, paddingVertical: 5, borderWidth: 1, alignItems: 'center' },
|
||||
taskCountBadge: { borderRadius: 8, paddingHorizontal: 7, paddingVertical: 2 },
|
||||
positionBadge: { borderRadius: 20, paddingHorizontal: 8, paddingVertical: 3 },
|
||||
textProgressPercent: { fontSize: 22, fontWeight: 'bold', lineHeight: 28 },
|
||||
progressTrack: { height: 8, borderRadius: 4, overflow: 'hidden' },
|
||||
@@ -41,11 +41,11 @@ const ComponentStyles = StyleSheet.create({
|
||||
reportContent: { borderLeftWidth: 3, paddingLeft: 12 },
|
||||
expandBtn: { flexDirection: 'row', alignItems: 'center', alignSelf: 'flex-start', marginTop: 8, gap: 4 },
|
||||
fileGrid: { flexDirection: 'row', flexWrap: 'wrap', gap: 8 },
|
||||
fileCard: { width: '48%', borderRadius: 10, borderWidth: 1, padding: 12, flexDirection: 'row', alignItems: 'center', gap: 10 },
|
||||
fileCard: { width: '48%', borderRadius: 8, borderWidth: 1, padding: 12, flexDirection: 'row', alignItems: 'center', gap: 10 },
|
||||
|
||||
// calendar
|
||||
signDate: { width: 20, height: 2, borderRadius: 3, marginTop: 3 },
|
||||
selectedDate: { backgroundColor: '#238be6', borderRadius: 5 },
|
||||
signDate: { width: 20, height: 2, borderRadius: 4, marginTop: 3 },
|
||||
selectedDate: { backgroundColor: '#238be6', borderRadius: 4 },
|
||||
selectRangeDate: { backgroundColor: '#228be61f' },
|
||||
calendarDotRow: { flexDirection: 'row', gap: 2, height: 6, marginTop: 1 },
|
||||
calendarDot: { width: 5, height: 5, borderRadius: 3 },
|
||||
@@ -55,7 +55,7 @@ const ComponentStyles = StyleSheet.create({
|
||||
villageEventBadge: { paddingHorizontal: 6, paddingVertical: 2, borderRadius: 4, marginRight: 6 },
|
||||
|
||||
// event item
|
||||
itemEvent: { padding: 10, borderRadius: 10, flexDirection: 'row', alignContent: 'stretch', marginBottom: 10 },
|
||||
itemEvent: { padding: 10, borderRadius: 8, flexDirection: 'row', alignContent: 'stretch', marginBottom: 10 },
|
||||
dividerEvent: { width: 7, borderRadius: 5, marginRight: 10 },
|
||||
|
||||
// member
|
||||
@@ -75,16 +75,16 @@ const ComponentStyles = StyleSheet.create({
|
||||
memberInfoContent: { flex: 1, marginLeft: 10 },
|
||||
|
||||
// discussion
|
||||
discussionCard: { borderRadius: 10, borderWidth: 1, padding: 14 },
|
||||
discussionIconCircle: { width: 40, height: 40, borderRadius: 20, alignItems: 'center', justifyContent: 'center', flexShrink: 0 },
|
||||
discussionIconCircleLg: { width: 44, height: 44, borderRadius: 22, alignItems: 'center', justifyContent: 'center' },
|
||||
discussionCard: { borderRadius: 8, borderWidth: 1, padding: 14 },
|
||||
discussionIconCircle: { width: 40, height: 40, borderRadius: 100, alignItems: 'center', justifyContent: 'center', flexShrink: 0 },
|
||||
discussionIconCircleLg: { width: 44, height: 44, borderRadius: 100, alignItems: 'center', justifyContent: 'center' },
|
||||
discussionStatusPill: { alignSelf: 'flex-start', marginTop: 3, paddingHorizontal: 8, paddingVertical: 2, borderRadius: 20, borderWidth: 1 },
|
||||
discussionStatusText: { fontSize: 11, fontWeight: '600' },
|
||||
discussionCardIndent: { marginLeft: 50 },
|
||||
discussionSeparator: { height: 8 },
|
||||
discussionCommentText: { fontSize: 12, marginLeft: 5 },
|
||||
discussionDateText: { fontSize: 11 },
|
||||
discussionCommentCard: { borderRadius: 10, borderWidth: 1, padding: 12, marginBottom: 8, flexDirection: 'row' },
|
||||
discussionCommentCard: { borderRadius: 8, borderWidth: 1, padding: 12, marginBottom: 8, flexDirection: 'row' },
|
||||
discussionEditedText: { fontSize: 10, fontStyle: 'italic' },
|
||||
discussionHeaderPadding: { paddingTop: 12 },
|
||||
discussionListPadding: { paddingTop: 8 },
|
||||
@@ -98,7 +98,7 @@ const ComponentStyles = StyleSheet.create({
|
||||
position: 'absolute',
|
||||
left: 24,
|
||||
right: 24,
|
||||
borderRadius: 16,
|
||||
borderRadius: 8,
|
||||
padding: 20,
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 4 },
|
||||
|
||||
@@ -2,7 +2,7 @@ import { StyleSheet } from "react-native";
|
||||
|
||||
const InputStyles = StyleSheet.create({
|
||||
inputRoundForm: {
|
||||
borderRadius: 5,
|
||||
borderRadius: 12,
|
||||
borderColor: '#d6d8f6',
|
||||
borderWidth: 1,
|
||||
paddingVertical: 10,
|
||||
@@ -25,7 +25,7 @@ const InputStyles = StyleSheet.create({
|
||||
lineHeight: 45,
|
||||
fontSize: 24,
|
||||
borderWidth: 1,
|
||||
borderRadius: 15,
|
||||
borderRadius: 12,
|
||||
borderColor: 'gray',
|
||||
textAlign: 'center',
|
||||
},
|
||||
|
||||
@@ -6,31 +6,31 @@ const ModalStyles = StyleSheet.create({
|
||||
width: '100%',
|
||||
paddingBottom: 20,
|
||||
backgroundColor: 'white',
|
||||
borderTopRightRadius: 18,
|
||||
borderTopLeftRadius: 18,
|
||||
borderTopRightRadius: 20,
|
||||
borderTopLeftRadius: 20,
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
},
|
||||
modalContentNew: {
|
||||
width: '100%',
|
||||
backgroundColor: 'white',
|
||||
borderTopRightRadius: 18,
|
||||
borderTopLeftRadius: 18,
|
||||
borderTopRightRadius: 20,
|
||||
borderTopLeftRadius: 20,
|
||||
paddingTop: 5,
|
||||
paddingBottom: 5,
|
||||
paddingHorizontal: 20,
|
||||
},
|
||||
modalFloatContent: {
|
||||
backgroundColor: 'white',
|
||||
borderRadius: 18,
|
||||
borderRadius: 20,
|
||||
paddingTop: 5,
|
||||
paddingBottom: 10,
|
||||
paddingHorizontal: 20,
|
||||
},
|
||||
titleContainer: {
|
||||
backgroundColor: 'white',
|
||||
borderTopRightRadius: 10,
|
||||
borderTopLeftRadius: 10,
|
||||
borderTopRightRadius: 20,
|
||||
borderTopLeftRadius: 20,
|
||||
paddingHorizontal: 20,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
@@ -65,7 +65,7 @@ const ModalStyles = StyleSheet.create({
|
||||
},
|
||||
modalConfirmContainer: {
|
||||
width: '80%',
|
||||
borderRadius: 14,
|
||||
borderRadius: 8,
|
||||
overflow: 'hidden',
|
||||
elevation: 2,
|
||||
shadowColor: '#000',
|
||||
@@ -92,7 +92,7 @@ const ModalStyles = StyleSheet.create({
|
||||
position: 'absolute',
|
||||
width: 300,
|
||||
height: 300,
|
||||
borderRadius: 150,
|
||||
borderRadius: 100,
|
||||
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
||||
top: -50,
|
||||
right: -50,
|
||||
|
||||
@@ -8,7 +8,7 @@ const NotificationStyles = StyleSheet.create({
|
||||
notifItemRow: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
borderRadius: 10,
|
||||
borderRadius: 8,
|
||||
borderWidth: 1,
|
||||
paddingHorizontal: 12,
|
||||
paddingVertical: 10,
|
||||
@@ -17,7 +17,7 @@ const NotificationStyles = StyleSheet.create({
|
||||
notifIconContainer: {
|
||||
width: 42,
|
||||
height: 42,
|
||||
borderRadius: 21,
|
||||
borderRadius: 100,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
flexShrink: 0,
|
||||
|
||||
@@ -394,7 +394,7 @@
|
||||
);
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = mobiledarmasaba.app;
|
||||
PRODUCT_NAME = Desa;
|
||||
PRODUCT_NAME = "Desa";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Desa/Desa-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
@@ -429,7 +429,7 @@
|
||||
);
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = mobiledarmasaba.app;
|
||||
PRODUCT_NAME = Desa;
|
||||
PRODUCT_NAME = "Desa";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Desa/Desa-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.1.0</string>
|
||||
<string>2.2.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
@@ -39,7 +39,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>9</string>
|
||||
<string>10</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
||||
Reference in New Issue
Block a user