upd: project
Deskripsi: - load page project - pencarian project - filter group project - update label status pada project home No Issues
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { ColorsStatus } from "@/constants/ColorsStatus";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetDataHome } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
@@ -6,6 +5,7 @@ import { router } from "expo-router";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Dimensions, Text, View } from "react-native";
|
||||
import Carousel, { ICarouselInstance } from "react-native-reanimated-carousel";
|
||||
import LabelStatus from "../labelStatus";
|
||||
import PaperGridContent from "../paperGridContent";
|
||||
import ProgressBar from "../progressBar";
|
||||
|
||||
@@ -55,26 +55,26 @@ export default function ProjectHome() {
|
||||
vertical={false}
|
||||
renderItem={({ index }) => (
|
||||
<PaperGridContent content="carousel" onPress={() => { router.push(`/project/${data[index].id}`) }} title={data[index].title} headerColor="primary">
|
||||
<ProgressBar value={data[index].progress}/>
|
||||
<ProgressBar value={data[index].progress} category="carousel" />
|
||||
<View style={[Styles.rowSpaceBetween]}>
|
||||
<Text style={[Styles.textDefault, Styles.cGray]}>{data[index].createdAt}</Text>
|
||||
<View style={[Styles.labelStatus,
|
||||
data[index].status === 0 ? ColorsStatus.primary :
|
||||
data[index].status === 1 ? ColorsStatus.warning :
|
||||
data[index].status === 2 ? ColorsStatus.success :
|
||||
data[index].status === 3 ? ColorsStatus.error :
|
||||
ColorsStatus.primary
|
||||
]}>
|
||||
<Text style={[Styles.textMediumSemiBold, Styles.cWhite]}>
|
||||
{
|
||||
data[index].status === 0 ? 'SEGERA' :
|
||||
data[index].status === 1 ? 'DIKERJAKAN' :
|
||||
data[index].status === 2 ? 'SELESAI' :
|
||||
data[index].status === 3 ? 'DIBATALKAN' :
|
||||
"SEGERA"
|
||||
}
|
||||
</Text>
|
||||
</View>
|
||||
<LabelStatus
|
||||
size="default"
|
||||
category={
|
||||
data[index].status === 0 ? 'primary' :
|
||||
data[index].status === 1 ? 'warning' :
|
||||
data[index].status === 2 ? 'success' :
|
||||
data[index].status === 3 ? 'error' :
|
||||
'primary'
|
||||
}
|
||||
text={
|
||||
data[index].status === 0 ? 'SEGERA' :
|
||||
data[index].status === 1 ? 'DIKERJAKAN' :
|
||||
data[index].status === 2 ? 'SELESAI' :
|
||||
data[index].status === 3 ? 'DIBATALKAN' :
|
||||
'SEGERA'
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
</PaperGridContent>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user