upd: diskusi umum

deskripsi :
- integrasi api tambah data diskusi umum
- integrasi api detail data diskusi umum file

No Issues
This commit is contained in:
2026-01-15 17:33:05 +08:00
parent bd31a2f993
commit 6f3514c80c
4 changed files with 60 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
import { ColorsStatus } from "@/constants/ColorsStatus";
import Styles from "@/constants/Styles";
import { Ionicons } from "@expo/vector-icons";
import { Ionicons, Entypo, EvilIcons } from "@expo/vector-icons";
import React, { useState } from "react";
import { Dimensions, Pressable, View } from "react-native";
import { ScrollView } from "react-native-gesture-handler";
@@ -24,9 +24,10 @@ type Props = {
textColor?: string,
colorPress?: boolean
titleShowAll?: boolean
dataFile: { id: string; idStorage: string; name: string; extension: string }[]
}
export default function BorderBottomItem2({ title, subtitle, icon, desc, onPress, onLongPress, rightTopInfo, borderType, leftBottomInfo, rightBottomInfo, titleWeight, bgColor, width, descEllipsize, textColor, colorPress, titleShowAll }: Props) {
export default function BorderBottomItem2({ title, subtitle, icon, desc, onPress, onLongPress, rightTopInfo, borderType, leftBottomInfo, rightBottomInfo, titleWeight, bgColor, width, descEllipsize, textColor, colorPress, titleShowAll, dataFile }: Props) {
const lebarDim = Dimensions.get("window").width;
const lebar = width ? lebarDim * width / 100 : 'auto';
const textColorFix = textColor ? textColor : 'black';
@@ -69,24 +70,18 @@ export default function BorderBottomItem2({ title, subtitle, icon, desc, onPress
</View>
{desc && <Text style={[Styles.textDefault, Styles.mt05, { textAlign: 'left', color: textColorFix }]} numberOfLines={descEllipsize == false ? 0 : 2} ellipsizeMode='tail'>{desc}</Text>}
<ScrollView horizontal style={[Styles.mv05]} showsHorizontalScrollIndicator={false}>
<View style={[Styles.rowItemsCenter, Styles.borderAll, Styles.round10, Styles.ph05, Styles.pv03, Styles.mr05]}>
<Ionicons name="chatbox-ellipses-outline" size={18} color="grey" style={Styles.mr05} />
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]}>Text petama.pdf</Text>
</View>
<View style={[Styles.rowItemsCenter, Styles.borderAll, Styles.round10, Styles.ph05, Styles.pv03, Styles.mr05]}>
<Ionicons name="chatbox-ellipses-outline" size={18} color="grey" style={Styles.mr05} />
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]}>Text petama.pdf</Text>
</View>
<View style={[Styles.rowItemsCenter, Styles.borderAll, Styles.round10, Styles.ph05, Styles.pv03, Styles.mr05]}>
<Ionicons name="chatbox-ellipses-outline" size={18} color="grey" style={Styles.mr05} />
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]}>Text petama.pdf</Text>
</View>
<View style={[Styles.rowItemsCenter, Styles.borderAll, Styles.round10, Styles.ph05, Styles.pv03, Styles.mr05]}>
<Ionicons name="chatbox-ellipses-outline" size={18} color="grey" style={Styles.mr05} />
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]}>Text petama.pdf</Text>
</View>
</ScrollView>
{
dataFile.length > 0 && (
<ScrollView horizontal style={[Styles.mv05]} showsHorizontalScrollIndicator={false}>
{dataFile.map((item, index) => (
<View key={index} style={[Styles.rowItemsCenter, Styles.borderAll, Styles.round10, Styles.ph05, Styles.pv03, Styles.mr05]}>
<Ionicons name="document-text" size={18} color="grey" style={Styles.mr05} />
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]}>{item.name}.{item.extension}</Text>
</View>
))}
</ScrollView>
)
}
{
(leftBottomInfo || rightBottomInfo) &&
(