upd: tampilan

Deskripsi:
- list diskusi pda dashboard dan detail divisi home
- ukuran banner dan stretch
- detail anggota > nama
- detail diskusi umum > judul kepotong
- detail pengumuman > deskripsi tidak keliatan warna putih

No Issues
This commit is contained in:
2025-10-23 13:17:42 +08:00
parent a0d1b90662
commit c458504da2
8 changed files with 26 additions and 14 deletions

View File

@@ -117,6 +117,7 @@ export default function DetailAnnouncement() {
<RenderHTML
contentWidth={contentWidth}
source={{ html: data?.desc }}
baseStyle={{ color: 'black' }}
/>
:
<Text>{data?.desc}</Text>

View File

@@ -154,7 +154,7 @@ export default function EditBanner() {
>
<Entypo name="image" size={50} color={"#aeaeae"} />
<Text style={[Styles.textInformation, Styles.mt05]}>
Mohon unggah gambar dalam resolusi 1535 x 450 piksel untuk
Mohon unggah gambar dalam resolusi 1650 x 720 pixel untuk
memastikan
</Text>
</View>

View File

@@ -137,7 +137,7 @@ export default function CreateBanner() {
>
<Entypo name="image" size={50} color={"#aeaeae"} />
<Text style={[Styles.textInformation, Styles.mt05]}>
Mohon unggah gambar dalam resolusi 1535 x 450 pixel untuk
Mohon unggah gambar dalam resolusi 1650 x 720 pixel untuk
memastikan
</Text>
</View>

View File

@@ -222,7 +222,8 @@ export default function DetailDiscussionGeneral() {
<MaterialIcons name="chat" size={25} color={'#384288'} />
</View>
}
title={data?.title + " " + data?.createdAt}
title={data?.title}
titleShowAll={true}
subtitle={
!data?.isActive ?
<LabelStatus category='warning' text='ARSIP' size="small" />

View File

@@ -12,6 +12,7 @@ import { apiGetProfile } from "@/lib/api";
import { router, Stack, useLocalSearchParams } from "expo-router";
import { useEffect, useState } from "react";
import { RefreshControl, SafeAreaView, ScrollView, View } from "react-native";
import Toast from "react-native-toast-message";
import { useSelector } from "react-redux";
type Props = {
@@ -42,10 +43,15 @@ export default function MemberDetail() {
try {
setLoading(loading)
const response = await apiGetProfile({ id: id })
setData(response.data)
setEdit(valueRoleUser.filter((v) => v.login == entityUser.role)[0]?.data.some((i: any) => i.id == response.data.idUserRole))
if (response.success) {
setData(response.data)
setEdit(valueRoleUser.filter((v) => v.login == entityUser.role)[0]?.data.some((i: any) => i.id == response.data.idUserRole))
} else {
Toast.show({ type: 'small', text1: response.message })
}
} catch (error) {
console.error(error)
Toast.show({ type: 'small', text1: 'Gagal mengambil data' })
} finally {
setLoading(false)
}
@@ -84,7 +90,7 @@ export default function MemberDetail() {
/>
}
>
<View style={[Styles.wrapHeadViewMember,]}>
<View style={[Styles.wrapHeadViewMember]}>
{
loading ?
<>

View File

@@ -21,9 +21,10 @@ type Props = {
descEllipsize?: boolean
textColor?: string,
colorPress?: boolean
titleShowAll?: boolean
}
export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, onLongPress, rightTopInfo, borderType, leftBottomInfo, rightBottomInfo, titleWeight, bgColor, width, descEllipsize, textColor, colorPress }: Props) {
export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, onLongPress, rightTopInfo, borderType, leftBottomInfo, rightBottomInfo, titleWeight, bgColor, width, descEllipsize, textColor, colorPress, titleShowAll }: Props) {
const lebarDim = Dimensions.get("window").width;
const lebar = width ? lebarDim * width / 100 : 'auto';
const textColorFix = textColor ? textColor : 'black';
@@ -49,7 +50,7 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress,
{icon}
<View style={[Styles.rowSpaceBetween, width ? { width: lebar } : { width: '88%' }]}>
<View style={[Styles.ml10, rightTopInfo ? { width: '70%' } : { width: '90%' }]}>
<Text style={[titleWeight == 'normal' ? Styles.textDefault : Styles.textDefaultSemiBold, { color: textColorFix }]} numberOfLines={1} ellipsizeMode='tail'>{title}</Text>
<Text style={[titleWeight == 'normal' ? Styles.textDefault : Styles.textDefaultSemiBold, { color: textColorFix }]} numberOfLines={titleShowAll ? 0 : 1} ellipsizeMode='tail'>{title}</Text>
{
subtitle &&
typeof subtitle == "string"

View File

@@ -15,16 +15,16 @@ 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} />
<View style={[{flex:1}]}>
<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 style={[Styles.rowSpaceBetween]}>
<View style={[Styles.rowItemsCenter, { flex: 1 }]}>
<Feather name="user" size={18} color="grey" style={Styles.mr05} />
<Text style={[Styles.textInformation]}>{user}</Text>
<Text style={[Styles.textInformation]} numberOfLines={1} ellipsizeMode="tail">{user}</Text>
</View>
<View style={Styles.rowItemsCenter}>
<View style={[Styles.rowItemsCenter, { flex: 1, justifyContent: 'flex-end' }]}>
<Feather name="clock" size={18} color="grey" style={Styles.mr05} />
<Text style={[Styles.textInformation]}>{date}</Text>
</View>

View File

@@ -343,7 +343,9 @@ const Styles = StyleSheet.create({
borderRadius: 15,
backgroundColor: '#19345E',
display: 'flex',
width: '92%'
width: '92%',
resizeMode: 'stretch',
overflow: 'hidden',
},
wrapGridContent: {
shadowColor: '#171717',
@@ -473,6 +475,7 @@ const Styles = StyleSheet.create({
wrapHeadViewMember: {
backgroundColor: '#19345E',
paddingVertical: 30,
paddingHorizontal: 15,
alignItems: 'center',
borderBottomLeftRadius: 25,
borderBottomRightRadius: 25