Merge pull request 'upd: fiksasi' (#30) from amalia/25-feb-26 into join
Reviewed-on: #30
This commit is contained in:
@@ -252,7 +252,7 @@ export default function DetailAnnouncement() {
|
|||||||
{dataFile.map((item, index) => (
|
{dataFile.map((item, index) => (
|
||||||
<BorderBottomItem
|
<BorderBottomItem
|
||||||
key={`${item.id}-${index}`}
|
key={`${item.id}-${index}`}
|
||||||
borderType="bottom"
|
borderType={index === dataFile.length - 1 ? 'none' : 'bottom'}
|
||||||
icon={<MaterialCommunityIcons
|
icon={<MaterialCommunityIcons
|
||||||
name={isImageFile(item.extension) ? "file-image-outline" : "file-document-outline"}
|
name={isImageFile(item.extension) ? "file-image-outline" : "file-document-outline"}
|
||||||
size={25}
|
size={25}
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ export default function CreateAnnouncement() {
|
|||||||
async function handleCreate() {
|
async function handleCreate() {
|
||||||
try {
|
try {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
console.log('jalan')
|
|
||||||
const hasil = await decryptToken(String(token?.current))
|
const hasil = await decryptToken(String(token?.current))
|
||||||
const fd = new FormData()
|
const fd = new FormData()
|
||||||
|
|
||||||
@@ -91,7 +90,7 @@ export default function CreateAnnouncement() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fd.append("data", JSON.stringify(
|
fd.append("data", JSON.stringify(
|
||||||
{ user: 'apaya', groups: divisionMember, ...dataForm }
|
{ user: hasil, groups: divisionMember, ...dataForm }
|
||||||
))
|
))
|
||||||
|
|
||||||
const response = await apiCreateAnnouncement(fd)
|
const response = await apiCreateAnnouncement(fd)
|
||||||
|
|||||||
@@ -241,7 +241,6 @@ export default function ListDivision() {
|
|||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
title={item.name}
|
title={item.name}
|
||||||
titleWeight="normal"
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -319,6 +319,7 @@ export default function ListProject() {
|
|||||||
content="page"
|
content="page"
|
||||||
title={item.title}
|
title={item.title}
|
||||||
headerColor="primary"
|
headerColor="primary"
|
||||||
|
titleTail={2}
|
||||||
>
|
>
|
||||||
<ProgressBar value={item.progress} category="list" />
|
<ProgressBar value={item.progress} category="list" />
|
||||||
<View style={[Styles.rowSpaceBetween]}>
|
<View style={[Styles.rowSpaceBetween]}>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import Styles from '@/constants/Styles';
|
import Styles from '@/constants/Styles';
|
||||||
import { useTheme } from "@/providers/ThemeProvider";
|
import { useTheme } from "@/providers/ThemeProvider";
|
||||||
import { useRouter } from 'expo-router';
|
|
||||||
import { Platform, Text, View } from 'react-native';
|
import { Platform, Text, View } from 'react-native';
|
||||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||||
import ButtonBackHeader from './buttonBackHeader';
|
import ButtonBackHeader from './buttonBackHeader';
|
||||||
@@ -15,13 +14,12 @@ type Props = {
|
|||||||
|
|
||||||
export default function AppHeader({ title, right, showBack = true, onPressLeft, left }: Props) {
|
export default function AppHeader({ title, right, showBack = true, onPressLeft, left }: Props) {
|
||||||
const insets = useSafeAreaInsets();
|
const insets = useSafeAreaInsets();
|
||||||
const router = useRouter();
|
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[Styles.headerContainer, Platform.OS === 'ios' ? Styles.pb05 : Styles.pb13, { backgroundColor: colors.header, paddingTop: Platform.OS === 'ios' ? insets.top : 10 }]}>
|
<View style={[Styles.headerContainer, Platform.OS === 'ios' ? Styles.pb05 : Styles.pb13, { backgroundColor: colors.header, paddingTop: Platform.OS === 'ios' ? insets.top : 10 }]}>
|
||||||
<View style={Styles.headerApp}>
|
<View style={Styles.headerApp}>
|
||||||
<View style={[Styles.rowItemsCenter]}>
|
<View style={[Styles.rowItemsCenter, Styles.flex1]}>
|
||||||
{showBack ? (
|
{showBack ? (
|
||||||
<ButtonBackHeader onPress={onPressLeft} />
|
<ButtonBackHeader onPress={onPressLeft} />
|
||||||
) :
|
) :
|
||||||
@@ -30,7 +28,9 @@ export default function AppHeader({ title, right, showBack = true, onPressLeft,
|
|||||||
<View style={Styles.headerSide} />
|
<View style={Styles.headerSide} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Text style={[Styles.headerTitle, Styles.ml05]}>{title}</Text>
|
<Text style={[Styles.headerTitle, Styles.ml05, Styles.flex1, Styles.mr10]} numberOfLines={1} ellipsizeMode="tail">
|
||||||
|
{title ? title.charAt(0).toUpperCase() + title.slice(1) : ""}
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={Styles.headerSide}>{right}</View>
|
<View style={Styles.headerSide}>{right}</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress,
|
|||||||
{icon}
|
{icon}
|
||||||
<View style={[Styles.rowSpaceBetween, Styles.flex1]}>
|
<View style={[Styles.rowSpaceBetween, Styles.flex1]}>
|
||||||
<View style={[Styles.ml10, Styles.flex1, Styles.mr10]}>
|
<View style={[Styles.ml10, Styles.flex1, Styles.mr10]}>
|
||||||
<Text style={[titleWeight == 'normal' ? Styles.textDefault : Styles.textDefaultSemiBold, { color: textColorFix }]} numberOfLines={titleShowAll ? 0 : 1} ellipsizeMode='tail'>{title}</Text>
|
<Text style={[titleWeight == 'normal' ? Styles.textDefault : Styles.textDefaultSemiBold, { color: textColorFix }]} numberOfLines={titleShowAll ? 0 : 1} ellipsizeMode='tail'>{title ? title.charAt(0).toUpperCase() + title.slice(1) : ""}</Text>
|
||||||
{
|
{
|
||||||
subtitle &&
|
subtitle &&
|
||||||
typeof subtitle == "string"
|
typeof subtitle == "string"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export default function DiscussionItem({ title, user, date, onPress }: Props) {
|
|||||||
<View style={[Styles.rowItemsCenter, Styles.mb10]}>
|
<View style={[Styles.rowItemsCenter, Styles.mb10]}>
|
||||||
<Ionicons name="chatbox-ellipses-outline" size={22} color={colors.text} style={Styles.mr10} />
|
<Ionicons name="chatbox-ellipses-outline" size={22} color={colors.text} style={Styles.mr10} />
|
||||||
<View style={[{ flex: 1 }]}>
|
<View style={[{ flex: 1 }]}>
|
||||||
<Text style={{ fontWeight: 'bold' }} numberOfLines={1} ellipsizeMode="tail">{title}</Text>
|
<Text style={{ fontWeight: 'bold' }} numberOfLines={1} ellipsizeMode="tail">{title?.charAt(0).toUpperCase() + title?.slice(1)}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={[Styles.rowSpaceBetween]}>
|
<View style={[Styles.rowSpaceBetween]}>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ type Props = {
|
|||||||
export default function ItemFile({ category, checked, dateTime, title, onChecked, onPress, canChecked }: Props) {
|
export default function ItemFile({ category, checked, dateTime, title, onChecked, onPress, canChecked }: Props) {
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
return (
|
return (
|
||||||
<View style={[Styles.wrapItemBorderBottom, { borderColor: colors.background }]}>
|
<View style={[Styles.wrapItemBorderBottom, { borderColor: colors.icon + '20' }]}>
|
||||||
<View style={[Styles.rowItemsCenter]}>
|
<View style={[Styles.rowItemsCenter]}>
|
||||||
<Pressable onPress={onPress}>
|
<Pressable onPress={onPress}>
|
||||||
{
|
{
|
||||||
@@ -56,8 +56,8 @@ export default function ItemFile({ category, checked, dateTime, title, onChecked
|
|||||||
<Pressable onPress={onChecked}>
|
<Pressable onPress={onChecked}>
|
||||||
{
|
{
|
||||||
checked
|
checked
|
||||||
? <MaterialCommunityIcons name="checkbox-marked-circle" size={25} color={colors.text} />
|
? <MaterialCommunityIcons name="checkbox-marked-circle" size={25} color={colors.icon} />
|
||||||
: <MaterialCommunityIcons name="checkbox-blank-circle-outline" size={25} color={colors.icon} />
|
: <MaterialCommunityIcons name="checkbox-blank-circle-outline" size={25} color={colors.icon + '90'} />
|
||||||
}
|
}
|
||||||
|
|
||||||
</Pressable>
|
</Pressable>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export default function DivisionHome({ refreshing }: { refreshing: boolean }) {
|
|||||||
<Pressable style={[Styles.wrapPaper, Styles.mb05, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]} key={index} onPress={() => { router.push(`/division/${item.id}`) }}>
|
<Pressable style={[Styles.wrapPaper, Styles.mb05, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]} key={index} onPress={() => { router.push(`/division/${item.id}`) }}>
|
||||||
<View style={[Styles.rowSpaceBetween, { alignItems: 'center' }]}>
|
<View style={[Styles.rowSpaceBetween, { alignItems: 'center' }]}>
|
||||||
<View>
|
<View>
|
||||||
<Text style={[Styles.textDefaultSemiBold]}>{item.name}</Text>
|
<Text style={[Styles.textDefaultSemiBold]}>{item.name?.charAt(0).toUpperCase() + item.name?.slice(1)}</Text>
|
||||||
<Text style={[Styles.textDefault]}>{item.jumlah} Kegiatan</Text>
|
<Text style={[Styles.textDefault]}>{item.jumlah} Kegiatan</Text>
|
||||||
</View>
|
</View>
|
||||||
<Feather name="chevron-right" size={20} color={colors.text} />
|
<Feather name="chevron-right" size={20} color={colors.text} />
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export default function PaperGridContent({ content, children, title, headerColor
|
|||||||
imageStyle={{ borderTopLeftRadius: 5, borderTopRightRadius: 5 }}
|
imageStyle={{ borderTopLeftRadius: 5, borderTopRightRadius: 5 }}
|
||||||
style={[Styles.headerPaperGrid, { backgroundColor: colors.primary }]}
|
style={[Styles.headerPaperGrid, { backgroundColor: colors.primary }]}
|
||||||
>
|
>
|
||||||
<Text numberOfLines={titleTail ? titleTail : undefined} style={[Styles.textSubtitle, Styles.cWhite, { textAlign: 'center' }]}>{title}</Text>
|
<Text numberOfLines={titleTail ? titleTail : undefined} style={[Styles.textSubtitle, Styles.cWhite, { textAlign: 'center' }]}>{title.charAt(0).toUpperCase() + title.slice(1)}</Text>
|
||||||
</ImageBackground>
|
</ImageBackground>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user