upd: redesign

Deskripsi:
- fitur ganti mode tema
- penerapan tema pada semua fitur

NO Issues
This commit is contained in:
2026-02-09 17:49:25 +08:00
parent ddfee00410
commit d3802ca26c
157 changed files with 1278 additions and 692 deletions

View File

@@ -8,6 +8,7 @@ import Styles from "@/constants/Styles"
import { apiAddFileProject, apiCheckFileProject } from "@/lib/api"
import { setUpdateProject } from "@/lib/projectUpdate"
import { useAuthSession } from "@/providers/AuthProvider"
import { useTheme } from "@/providers/ThemeProvider"
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons"
import * as DocumentPicker from "expo-document-picker"
import { router, Stack, useLocalSearchParams } from "expo-router"
@@ -17,6 +18,7 @@ import Toast from "react-native-toast-message"
import { useDispatch, useSelector } from "react-redux"
export default function ProjectAddFile() {
const { colors } = useTheme();
const { id } = useLocalSearchParams<{ id: string }>()
const [fileForm, setFileForm] = useState<any[]>([])
const [listFile, setListFile] = useState<any[]>([])
@@ -127,7 +129,7 @@ export default function ProjectAddFile() {
return (
<SafeAreaView>
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<Stack.Screen
options={{
// headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
@@ -153,20 +155,20 @@ export default function ProjectAddFile() {
)
}}
/>
<ScrollView>
<ScrollView style={{ backgroundColor: colors.background }}>
<View style={[Styles.p15, Styles.mb100]}>
<ButtonSelect value="Upload File" onPress={pickDocumentAsync} />
{
listFile.length > 0 && (
<View style={[Styles.mb15]}>
<Text style={[Styles.textDefaultSemiBold, Styles.mv05]}>File</Text>
<View style={[Styles.wrapPaper]}>
<View style={[Styles.wrapPaper, { backgroundColor: colors.card, borderColor: colors.background }]}>
{
listFile.map((item, index) => (
<BorderBottomItem
key={index}
borderType="all"
icon={<MaterialCommunityIcons name="file-outline" size={25} color="black" />}
icon={<MaterialCommunityIcons name="file-outline" size={25} color={colors.text} />}
title={item}
titleWeight="normal"
onPress={() => { setIndexDelFile(index); setModal(true) }}
@@ -188,7 +190,7 @@ export default function ProjectAddFile() {
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title="Menu">
<View style={Styles.rowItemsCenter}>
<MenuItemRow
icon={<Ionicons name="trash" color="black" size={25} />}
icon={<Ionicons name="trash" color={colors.text} size={25} />}
title="Hapus"
onPress={() => { deleteFile(indexDelFile) }}
/>

View File

@@ -9,6 +9,7 @@ import Styles from "@/constants/Styles";
import { apiAddMemberProject, apiGetProjectOne, apiGetUser } from "@/lib/api";
import { setUpdateProject } from "@/lib/projectUpdate";
import { useAuthSession } from "@/providers/AuthProvider";
import { useTheme } from "@/providers/ThemeProvider";
import { AntDesign } from "@expo/vector-icons";
import { router, Stack, useLocalSearchParams } from "expo-router";
import { useEffect, useState } from "react";
@@ -23,6 +24,7 @@ type Props = {
}
export default function AddMemberProject() {
const { colors } = useTheme();
const dispatch = useDispatch()
const update = useSelector((state: any) => state.projectUpdate)
const { token, decryptToken } = useAuthSession()
@@ -127,7 +129,7 @@ export default function AddMemberProject() {
)
}}
/>
<View style={[Styles.p15, { flex: 1 }]}>
<View style={[Styles.p15, { flex: 1, backgroundColor: colors.background }]}>
<InputSearch onChange={(val) => handleSearch(val)} value={search} />
{
selectMember.length > 0
@@ -152,7 +154,7 @@ export default function AddMemberProject() {
}
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
style={[Styles.h100, { backgroundColor: colors.background }]}
>
{
data.length > 0 ?
@@ -178,7 +180,7 @@ export default function AddMemberProject() {
</View>
</View>
{
selectMember.some((i: any) => i.idUser == item.id) && <AntDesign name="check" size={20} color={'black'} />
selectMember.some((i: any) => i.idUser == item.id) && <AntDesign name="check" size={20} color={colors.text} />
}
</Pressable>
)

View File

@@ -9,6 +9,7 @@ import { formatDateOnly } from "@/lib/fun_formatDateOnly";
import { getDatesInRange } from "@/lib/fun_getDatesInRange";
import { setUpdateProject } from "@/lib/projectUpdate";
import { useAuthSession } from "@/providers/AuthProvider";
import { useTheme } from "@/providers/ThemeProvider";
import { useHeaderHeight } from '@react-navigation/elements';
import { router, Stack, useLocalSearchParams } from "expo-router";
import 'intl';
@@ -30,6 +31,7 @@ import DateTimePicker, {
import { useDispatch, useSelector } from "react-redux";
export default function ProjectAddTask() {
const { colors } = useTheme();
const headerHeight = useHeaderHeight();
const { token, decryptToken } = useAuthSession()
const dispatch = useDispatch()
@@ -133,7 +135,7 @@ export default function ProjectAddTask() {
}
return (
<SafeAreaView>
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<Stack.Screen
options={{
// headerLeft: () => (
@@ -158,11 +160,11 @@ export default function ProjectAddTask() {
showBack={true}
onPressLeft={() => router.back()}
right={
<ButtonSaveHeader
disable={disable || loading}
category="create"
onPress={() => { handleCreate() }}
/>
<ButtonSaveHeader
disable={disable || loading}
category="create"
onPress={() => { handleCreate() }}
/>
}
/>
)
@@ -172,9 +174,9 @@ export default function ProjectAddTask() {
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
keyboardVerticalOffset={headerHeight}
>
<ScrollView>
<ScrollView style={{ backgroundColor: colors.background }}>
<View style={[Styles.p15, Styles.mb100]}>
<View style={[Styles.wrapPaper, Styles.p10]}>
<View style={[Styles.wrapPaper, Styles.p10, { backgroundColor: colors.card, borderColor: colors.background }]}>
<DateTimePicker
mode="range"
startDate={range.startDate}
@@ -184,13 +186,13 @@ export default function ProjectAddTask() {
selected: Styles.selectedDate,
selected_label: Styles.cWhite,
range_fill: Styles.selectRangeDate,
month_label: Styles.cBlack,
month_selector_label: Styles.cBlack,
year_label: Styles.cBlack,
year_selector_label: Styles.cBlack,
day_label: Styles.cBlack,
time_label: Styles.cBlack,
weekday_label: Styles.cBlack,
month_label: { color: colors.text },
month_selector_label: { color: colors.text },
year_label: { color: colors.text },
year_selector_label: { color: colors.text },
day_label: { color: colors.text },
time_label: { color: colors.text },
weekday_label: { color: colors.text },
}}
/>
</View>
@@ -200,7 +202,7 @@ export default function ProjectAddTask() {
<Text style={[Styles.mb05]}>
Tanggal Mulai <Text style={Styles.cError}>*</Text>
</Text>
<View style={[Styles.wrapPaper, Styles.p10]}>
<View style={[Styles.wrapPaper, Styles.p10, { backgroundColor: colors.card, borderColor: colors.background }]}>
<Text style={{ textAlign: "center" }}>{from}</Text>
</View>
</View>
@@ -208,7 +210,7 @@ export default function ProjectAddTask() {
<Text style={[Styles.mb05]}>
Tanggal Berakhir <Text style={Styles.cError}>*</Text>
</Text>
<View style={[Styles.wrapPaper, Styles.p10]}>
<View style={[Styles.wrapPaper, Styles.p10, { backgroundColor: colors.card, borderColor: colors.background }]}>
<Text style={{ textAlign: "center" }}>{to}</Text>
</View>
</View>
@@ -229,7 +231,7 @@ export default function ProjectAddTask() {
type="default"
placeholder="Judul Tugas"
required
bg="white"
bg={colors.card}
value={title}
error={error.title}
errorText="Judul tidak boleh kosong"

View File

@@ -5,6 +5,7 @@ import Styles from "@/constants/Styles";
import { apiCancelProject } from "@/lib/api";
import { setUpdateProject } from "@/lib/projectUpdate";
import { useAuthSession } from "@/providers/AuthProvider";
import { useTheme } from "@/providers/ThemeProvider";
import { router, Stack, useLocalSearchParams } from "expo-router";
import React, { useEffect, useState } from "react";
import { SafeAreaView, ScrollView, View } from "react-native";
@@ -12,6 +13,7 @@ import Toast from "react-native-toast-message";
import { useDispatch, useSelector } from "react-redux";
export default function ProjectCancel() {
const { colors } = useTheme();
const { token, decryptToken } = useAuthSession();
const { id } = useLocalSearchParams<{ id: string }>();
const dispatch = useDispatch();
@@ -65,7 +67,7 @@ export default function ProjectCancel() {
}
return (
<SafeAreaView>
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<Stack.Screen
options={{
// headerLeft: () => (
@@ -106,7 +108,7 @@ export default function ProjectCancel() {
/>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
style={[Styles.h100, { backgroundColor: colors.background }]}
>
<View style={[Styles.p15]}>
<InputForm
@@ -114,7 +116,7 @@ export default function ProjectCancel() {
type="default"
placeholder="Alasan Pembatalan"
required
bg="white"
bg={colors.card}
error={error}
errorText="Alasan pembatalan harus diisi"
onChange={(val) => onValidation(val)}

View File

@@ -5,6 +5,7 @@ import Styles from "@/constants/Styles";
import { apiEditProject, apiGetProjectOne } from "@/lib/api";
import { setUpdateProject } from "@/lib/projectUpdate";
import { useAuthSession } from "@/providers/AuthProvider";
import { useTheme } from "@/providers/ThemeProvider";
import { router, Stack, useLocalSearchParams } from "expo-router";
import { useEffect, useState } from "react";
import { SafeAreaView, ScrollView, View } from "react-native";
@@ -12,6 +13,7 @@ import Toast from "react-native-toast-message";
import { useDispatch, useSelector } from "react-redux";
export default function EditProject() {
const { colors } = useTheme();
const { token, decryptToken } = useAuthSession();
const { id } = useLocalSearchParams<{ id: string }>();
const dispatch = useDispatch()
@@ -86,7 +88,7 @@ export default function EditProject() {
return (
<SafeAreaView>
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<Stack.Screen
options={{
// headerLeft: () => (
@@ -121,14 +123,14 @@ export default function EditProject() {
)
}}
/>
<ScrollView>
<ScrollView style={{ backgroundColor: colors.background }}>
<View style={[Styles.p15, Styles.mb100]}>
<InputForm
label="Judul Kegiatan"
type="default"
placeholder="Judul Kegiatan"
required
bg="white"
bg={colors.card}
value={judul}
onChange={(val) => { onValidation(val) }}
error={error}

View File

@@ -10,6 +10,7 @@ import SectionProgress from "@/components/sectionProgress";
import Styles from "@/constants/Styles";
import { apiGetProjectOne } from "@/lib/api";
import { useAuthSession } from "@/providers/AuthProvider";
import { useTheme } from "@/providers/ThemeProvider";
import { router, Stack, useLocalSearchParams } from "expo-router";
import React, { useEffect, useState } from "react";
import { RefreshControl, SafeAreaView, ScrollView, View } from "react-native";
@@ -32,6 +33,7 @@ type Props = {
export default function DetailProject() {
const { token, decryptToken } = useAuthSession()
const { colors } = useTheme();
const { id } = useLocalSearchParams<{ id: string }>();
const [data, setData] = useState<Props>()
const [progress, setProgress] = useState(0)
@@ -91,7 +93,7 @@ export default function DetailProject() {
};
return (
<SafeAreaView>
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<Stack.Screen
options={{
// headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
@@ -111,10 +113,12 @@ export default function DetailProject() {
}}
/>
<ScrollView
style={{ backgroundColor: colors.background }}
refreshControl={
<RefreshControl
refreshing={refreshing}
onRefresh={handleRefresh}
tintColor={colors.primary}
/>
}
>

View File

@@ -5,6 +5,7 @@ import Styles from "@/constants/Styles";
import { apiGetProjectOne, apiReportProject } from "@/lib/api";
import { setUpdateProject } from "@/lib/projectUpdate";
import { useAuthSession } from "@/providers/AuthProvider";
import { useTheme } from "@/providers/ThemeProvider";
import { router, Stack, useLocalSearchParams } from "expo-router";
import { useEffect, useState } from "react";
import { SafeAreaView, ScrollView, View } from "react-native";
@@ -12,6 +13,7 @@ import Toast from "react-native-toast-message";
import { useDispatch, useSelector } from "react-redux";
export default function ReportProject() {
const { colors } = useTheme();
const { token, decryptToken } = useAuthSession();
const { id } = useLocalSearchParams<{ id: string }>();
const dispatch = useDispatch()
@@ -86,7 +88,7 @@ export default function ReportProject() {
return (
<SafeAreaView>
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<Stack.Screen
options={{
// headerLeft: () => (
@@ -123,7 +125,7 @@ export default function ReportProject() {
/>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
style={[Styles.h100, { backgroundColor: colors.background }]}
>
<View style={[Styles.p15]}>
<InputForm
@@ -131,7 +133,7 @@ export default function ReportProject() {
type="default"
placeholder="Laporan Kegiatan"
required
bg="white"
bg={colors.card}
value={laporan}
onChange={(val) => { onValidation(val) }}
error={error}