feat: redesign section progress, report, link, file, dan cancel pada project & division/task
- SectionProgress: progress bar animated, badge persentase, label status, task count - SectionReport: header ikon, left accent border, TextExpandable dengan label Indonesia - SectionLink: tap langsung buka URL, ikon per domain, long press untuk hapus - SectionFile: icon container konsisten 30×30 di semua section - SectionCancel: card subtle dengan warna error, konsisten dengan visual language baru - TextExpandable: fix bug show/hide tidak muncul setelah content diupdate - Tambah 14 style class baru di Styles.ts untuk menggantikan inline style - Terapkan semua perubahan ke fitur division/task - Fix menu "Edit Tugas" di sectionTanggalTugasTask yang terpotong karena overflow Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import Styles from "@/constants/Styles";
|
||||
import { apiGetTaskOne } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { View } from "react-native";
|
||||
@@ -9,7 +10,6 @@ import { useSelector } from "react-redux";
|
||||
import Text from "../Text";
|
||||
import TextExpandable from "../textExpandable";
|
||||
|
||||
|
||||
export default function SectionReportTask({ refreshing }: { refreshing: boolean }) {
|
||||
const { colors } = useTheme()
|
||||
const update = useSelector((state: any) => state.taskUpdate)
|
||||
@@ -27,29 +27,30 @@ export default function SectionReportTask({ refreshing }: { refreshing: boolean
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
handleLoad()
|
||||
}, [update.report])
|
||||
|
||||
useEffect(() => {
|
||||
if (refreshing)
|
||||
handleLoad();
|
||||
}, [refreshing]);
|
||||
useEffect(() => { handleLoad() }, [update.report])
|
||||
useEffect(() => { if (refreshing) handleLoad() }, [refreshing])
|
||||
|
||||
if (!data || data === "") return null;
|
||||
|
||||
return (
|
||||
<>
|
||||
{
|
||||
data != "" && data != null &&
|
||||
<View style={[Styles.mb15, Styles.mt10]}>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.mv05]}>
|
||||
Laporan Kegiatan
|
||||
</Text>
|
||||
<View style={[Styles.wrapPaper, { backgroundColor: colors.card, borderColor: colors.background }]}>
|
||||
<TextExpandable content={data} maxLines={2} />
|
||||
</View>
|
||||
<View style={[
|
||||
Styles.wrapPaper,
|
||||
Styles.mb15,
|
||||
Styles.sectionCard,
|
||||
{ backgroundColor: colors.card, borderColor: colors.icon + '18' },
|
||||
]}>
|
||||
<View style={Styles.sectionHeader}>
|
||||
<View style={[Styles.sectionIconBox, Styles.mr10, { backgroundColor: colors.tabActive + '18' }]}>
|
||||
<MaterialCommunityIcons name="text-box-outline" size={18} color={colors.tabActive} />
|
||||
</View>
|
||||
}
|
||||
</>
|
||||
<Text style={[Styles.textDefaultSemiBold, { color: colors.text }]}>
|
||||
Laporan Kegiatan
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
<View style={[Styles.reportContent, { borderLeftColor: colors.tabActive + '50' }]}>
|
||||
<TextExpandable content={data} maxLines={2} />
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user