fix: home
Deskripsi: - data kosong pada divisi home - data kosong pada project home No Issues
This commit is contained in:
@@ -46,27 +46,30 @@ export default function DivisionHome() {
|
|||||||
{
|
{
|
||||||
loading ? <Skeleton width={100} height={150} borderRadius={10} widthType="percent" />
|
loading ? <Skeleton width={100} height={150} borderRadius={10} widthType="percent" />
|
||||||
:
|
:
|
||||||
<Carousel
|
data.length > 0 ?
|
||||||
ref={ref}
|
<Carousel
|
||||||
style={{ width: "100%" }}
|
ref={ref}
|
||||||
width={width * 0.8}
|
style={{ width: "100%" }}
|
||||||
height={235}
|
width={width * 0.8}
|
||||||
data={data}
|
height={235}
|
||||||
loop={true}
|
data={data}
|
||||||
autoPlay={false}
|
loop={true}
|
||||||
autoPlayReverse={false}
|
autoPlay={false}
|
||||||
pagingEnabled={true}
|
autoPlayReverse={false}
|
||||||
snapEnabled={true}
|
pagingEnabled={true}
|
||||||
vertical={false}
|
snapEnabled={true}
|
||||||
renderItem={({ index }) => (
|
vertical={false}
|
||||||
<PaperGridContent onPress={() => { router.push(`/division/${data[index].id}`) }} content="carousel" title={data[index].name} headerColor="warning">
|
renderItem={({ index }) => (
|
||||||
<View>
|
<PaperGridContent onPress={() => { router.push(`/division/${data[index].id}`) }} content="carousel" title={data[index].name} headerColor="warning">
|
||||||
<Text style={{ fontSize: 50, textAlign: "center", fontWeight: 'bold' }}>{data[index].jumlah}</Text>
|
<View>
|
||||||
<Text style={[Styles.textSubtitle, { textAlign: "center" }]}>KEGIATAN</Text>
|
<Text style={{ fontSize: 50, textAlign: "center", fontWeight: 'bold' }}>{data[index].jumlah}</Text>
|
||||||
</View>
|
<Text style={[Styles.textSubtitle, { textAlign: "center" }]}>KEGIATAN</Text>
|
||||||
</PaperGridContent>
|
</View>
|
||||||
)}
|
</PaperGridContent>
|
||||||
/>
|
)}
|
||||||
|
/>
|
||||||
|
:
|
||||||
|
<Text style={[Styles.textDefault, Styles.cGray, { textAlign: 'center' }]}>Tidak ada data</Text>
|
||||||
}
|
}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -49,44 +49,47 @@ export default function ProjectHome() {
|
|||||||
{
|
{
|
||||||
loading ? (<Skeleton width={100} height={150} borderRadius={10} widthType="percent" />)
|
loading ? (<Skeleton width={100} height={150} borderRadius={10} widthType="percent" />)
|
||||||
:
|
:
|
||||||
<Carousel
|
data.length > 0 ?
|
||||||
ref={ref}
|
<Carousel
|
||||||
style={{ width: "100%" }}
|
ref={ref}
|
||||||
width={width * 0.8}
|
style={{ width: "100%" }}
|
||||||
height={235}
|
width={width * 0.8}
|
||||||
data={data}
|
height={235}
|
||||||
loop={true}
|
data={data}
|
||||||
autoPlay={false}
|
loop={true}
|
||||||
autoPlayReverse={false}
|
autoPlay={false}
|
||||||
pagingEnabled={true}
|
autoPlayReverse={false}
|
||||||
snapEnabled={true}
|
pagingEnabled={true}
|
||||||
vertical={false}
|
snapEnabled={true}
|
||||||
renderItem={({ index }) => (
|
vertical={false}
|
||||||
<PaperGridContent content="carousel" onPress={() => { router.push(`/project/${data[index].id}`) }} title={data[index].title} headerColor="primary">
|
renderItem={({ index }) => (
|
||||||
<ProgressBar value={data[index].progress} category="carousel" />
|
<PaperGridContent content="carousel" onPress={() => { router.push(`/project/${data[index].id}`) }} title={data[index].title} headerColor="primary">
|
||||||
<View style={[Styles.rowSpaceBetween]}>
|
<ProgressBar value={data[index].progress} category="carousel" />
|
||||||
<Text style={[Styles.textDefault, Styles.cGray]}>{data[index].createdAt}</Text>
|
<View style={[Styles.rowSpaceBetween]}>
|
||||||
<LabelStatus
|
<Text style={[Styles.textDefault, Styles.cGray]}>{data[index].createdAt}</Text>
|
||||||
size="default"
|
<LabelStatus
|
||||||
category={
|
size="default"
|
||||||
data[index].status === 0 ? 'primary' :
|
category={
|
||||||
data[index].status === 1 ? 'warning' :
|
data[index].status === 0 ? 'primary' :
|
||||||
data[index].status === 2 ? 'success' :
|
data[index].status === 1 ? 'warning' :
|
||||||
data[index].status === 3 ? 'error' :
|
data[index].status === 2 ? 'success' :
|
||||||
'primary'
|
data[index].status === 3 ? 'error' :
|
||||||
}
|
'primary'
|
||||||
text={
|
}
|
||||||
data[index].status === 0 ? 'SEGERA' :
|
text={
|
||||||
data[index].status === 1 ? 'DIKERJAKAN' :
|
data[index].status === 0 ? 'SEGERA' :
|
||||||
data[index].status === 2 ? 'SELESAI' :
|
data[index].status === 1 ? 'DIKERJAKAN' :
|
||||||
data[index].status === 3 ? 'DIBATALKAN' :
|
data[index].status === 2 ? 'SELESAI' :
|
||||||
'SEGERA'
|
data[index].status === 3 ? 'DIBATALKAN' :
|
||||||
}
|
'SEGERA'
|
||||||
/>
|
}
|
||||||
</View>
|
/>
|
||||||
</PaperGridContent>
|
</View>
|
||||||
)}
|
</PaperGridContent>
|
||||||
/>
|
)}
|
||||||
|
/>
|
||||||
|
:
|
||||||
|
<Text style={[Styles.textDefault, Styles.cGray, { textAlign: 'center' }]}>Tidak ada data</Text>
|
||||||
}
|
}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user