From a7aeb3d3f9690da6f47f3e818068f31f537bae97 Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Thu, 28 Aug 2025 12:00:46 +0800 Subject: [PATCH 1/5] upd : validasi no telp Deskripsi: - validasi nomor telepon >= 9 dan <=16 - tambah anggota, edit anggota, edit profile No Issues --- app/(application)/edit-profile.tsx | 2 +- app/(application)/member/create.tsx | 2 +- app/(application)/member/edit/[id].tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/(application)/edit-profile.tsx b/app/(application)/edit-profile.tsx index e0ef9ba..c0fd456 100644 --- a/app/(application)/edit-profile.tsx +++ b/app/(application)/edit-profile.tsx @@ -122,7 +122,7 @@ export default function EditProfile() { } } else if (cat == "phone") { setData({ ...data, phone: val }); - if (val == "" || !(val.length >= 10 && val.length <= 15)) { + if (val == "" || !(val.length >= 9 && val.length <= 16)) { setError({ ...error, phone: true }); } else { setError({ ...error, phone: false }); diff --git a/app/(application)/member/create.tsx b/app/(application)/member/create.tsx index 48631d8..1fba8e9 100644 --- a/app/(application)/member/create.tsx +++ b/app/(application)/member/create.tsx @@ -117,7 +117,7 @@ export default function CreateMember() { } } else if (cat == "phone") { setDataForm({ ...dataForm, phone: val }); - if (val == "" || !(val.length >= 10 && val.length <= 15)) { + if (val == "" || !(val.length >= 9 && val.length <= 16)) { setError({ ...error, phone: true }); } else { setError({ ...error, phone: false }); diff --git a/app/(application)/member/edit/[id].tsx b/app/(application)/member/edit/[id].tsx index 55c0d9f..8d2d7e5 100644 --- a/app/(application)/member/edit/[id].tsx +++ b/app/(application)/member/edit/[id].tsx @@ -149,7 +149,7 @@ export default function EditMember() { } } else if (cat == "phone") { setData({ ...data, phone: val }); - if (val == "" || !(val.length >= 10 && val.length <= 15)) { + if (val == "" || !(val.length >= 9 && val.length <= 16)) { setError({ ...error, phone: true }); } else { setError({ ...error, phone: false }); From d0849143f29c84d982fdf11b70e4dfe46ba388f4 Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Thu, 28 Aug 2025 14:29:31 +0800 Subject: [PATCH 2/5] upd: tampilan Deskripsi: - menghilangkan new line dan tag html pada list pengumuman dan list diskusi umum - update api NO Issues --- app/(application)/announcement/index.tsx | 2 +- app/(application)/discussion/index.tsx | 30 +----------------------- components/borderBottomItem.tsx | 2 +- 3 files changed, 3 insertions(+), 31 deletions(-) diff --git a/app/(application)/announcement/index.tsx b/app/(application)/announcement/index.tsx index df24a86..75e628b 100644 --- a/app/(application)/announcement/index.tsx +++ b/app/(application)/announcement/index.tsx @@ -114,7 +114,7 @@ export default function Announcement() { } title={item.title} - desc={item.desc.replace(/<[^>]*>?/gm, '')} + desc={item.desc.replace(/<[^>]*>?/gm, '').replace(/\r?\n|\r/g, ' ')} rightTopInfo={item.createdAt} /> ) diff --git a/app/(application)/discussion/index.tsx b/app/(application)/discussion/index.tsx index 25336c7..9fc4f8c 100644 --- a/app/(application)/discussion/index.tsx +++ b/app/(application)/discussion/index.tsx @@ -153,7 +153,7 @@ export default function Discussion() { status != "false" && } rightTopInfo={item.createdAt} - desc={item.desc} + desc={item.desc.replace(/<[^>]*>?/gm, ' ').replace(/\r?\n|\r/g, ' ')} leftBottomInfo={ @@ -176,34 +176,6 @@ export default function Discussion() { /> } /> - // data.map((item: any, i: number) => { - // return ( - // { router.push(`/discussion/${item.id}`) }} - // borderType="bottom" - // icon={ - // - // - // - // } - // title={item.title} - // subtitle={ - // status != "false" && - // } - // rightTopInfo={item.createdAt} - // desc={item.desc} - // leftBottomInfo={ - // - // - // Diskusikan - // - // } - // rightBottomInfo={`${item.total_komentar} Komentar`} - - // /> - // ) - // }) : Tidak ada data } diff --git a/components/borderBottomItem.tsx b/components/borderBottomItem.tsx index 7b28062..e4aab06 100644 --- a/components/borderBottomItem.tsx +++ b/components/borderBottomItem.tsx @@ -48,7 +48,7 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, - {desc && {desc}} + {desc && {desc}} { (leftBottomInfo || rightBottomInfo) && ( From 94c48889c6fdffa92151c7b38c9d951fdc338526 Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Thu, 28 Aug 2025 14:49:56 +0800 Subject: [PATCH 3/5] upd: validasi create pengumuman Deskripsi :. - disable button form pada saat blm memilih divisi No Issues --- app/(application)/announcement/create.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(application)/announcement/create.tsx b/app/(application)/announcement/create.tsx index 458b851..92c26a1 100644 --- a/app/(application)/announcement/create.tsx +++ b/app/(application)/announcement/create.tsx @@ -99,7 +99,7 @@ export default function CreateAnnouncement() { headerTitleAlign: "center", headerRight: () => ( { divisionMember.length == 0 From 07caea8ae5cb8d4e39a65285d55a14bba17a8e34 Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Thu, 28 Aug 2025 15:47:10 +0800 Subject: [PATCH 4/5] fix : tampilan Deskripsi: - tag text warna hitam pada info division page No Issues --- app/(application)/division/[id]/info.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/(application)/division/[id]/info.tsx b/app/(application)/division/[id]/info.tsx index e384326..055ced6 100644 --- a/app/(application)/division/[id]/info.tsx +++ b/app/(application)/division/[id]/info.tsx @@ -7,6 +7,7 @@ import ImageUser from "@/components/imageNew" 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" @@ -15,7 +16,7 @@ import { useAuthSession } from "@/providers/AuthProvider" import { Feather, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons" import { router, Stack, useLocalSearchParams } from "expo-router" import { useEffect, useState } from "react" -import { Pressable, SafeAreaView, ScrollView, Text, View } from "react-native" +import { Pressable, SafeAreaView, ScrollView, View } from "react-native" import Toast from "react-native-toast-message" import { useSelector } from "react-redux" From 9607774056a7cb384861c706916b4fc9aac69ce9 Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Thu, 28 Aug 2025 16:39:03 +0800 Subject: [PATCH 5/5] fix : create division Deskripsi: - fix error form create division No Issues --- app/(application)/division/create/add-admin-division.tsx | 3 +-- lib/divisionCreate.ts | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/(application)/division/create/add-admin-division.tsx b/app/(application)/division/create/add-admin-division.tsx index 61d55eb..aa7b9b9 100644 --- a/app/(application)/division/create/add-admin-division.tsx +++ b/app/(application)/division/create/add-admin-division.tsx @@ -51,9 +51,8 @@ export default function CreateDivisionAddAdmin() { async function handleAddMember() { try { setLoading(true) - dispatch(setFormCreateDivision({ ...update, admin: selectMember })) const hasil = await decryptToken(String(token?.current)) - const response = await apiCreateDivision({ ...update, user: hasil }) + const response = await apiCreateDivision({ ...update, admin: selectMember, user: hasil }) if (response.success) { Toast.show({ type: 'small', text1: 'Berhasil membuat divisi', }) dispatch(setFormCreateDivision({ admin: [], member: [], data: { idGroup: '', name: '', desc: '' } })) diff --git a/lib/divisionCreate.ts b/lib/divisionCreate.ts index 070b4bb..9538e54 100644 --- a/lib/divisionCreate.ts +++ b/lib/divisionCreate.ts @@ -7,7 +7,9 @@ const divisionCreate = createSlice({ idGroup: "", name: "", desc: "", - }, member: [], admin: [], + }, + member: [], + admin: [], }, reducers: { setFormCreateDivision: (state, action) => {