upd: refactor style

This commit is contained in:
2026-02-19 15:27:02 +08:00
parent 77f478b7ca
commit 6770d40b41
45 changed files with 195 additions and 136 deletions

View File

@@ -129,7 +129,7 @@ export default function ProjectAddFile() {
return (
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
<Stack.Screen
options={{
// headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
@@ -155,7 +155,7 @@ export default function ProjectAddFile() {
)
}}
/>
<ScrollView style={{ backgroundColor: colors.background }}>
<ScrollView style={[Styles.h100, { backgroundColor: colors.background }]}>
<View style={[Styles.p15, Styles.mb100]}>
<ButtonSelect value="Upload File" onPress={pickDocumentAsync} />
{

View File

@@ -135,7 +135,7 @@ export default function ProjectAddTask() {
}
return (
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
<Stack.Screen
options={{
// headerLeft: () => (
@@ -174,7 +174,7 @@ export default function ProjectAddTask() {
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
keyboardVerticalOffset={headerHeight}
>
<ScrollView style={{ backgroundColor: colors.background }}>
<ScrollView style={[Styles.h100, { backgroundColor: colors.background }]}>
<View style={[Styles.p15, Styles.mb100]}>
<View style={[Styles.wrapPaper, Styles.p10, { backgroundColor: colors.card, borderColor: colors.background }]}>
<DateTimePicker
@@ -198,20 +198,20 @@ export default function ProjectAddTask() {
</View>
<View style={[Styles.mv10]}>
<View style={[Styles.rowSpaceBetween]}>
<View style={[{ width: "48%" }]}>
<View style={[Styles.w48]}>
<Text style={[Styles.mb05]}>
Tanggal Mulai <Text style={{ color: colors.error }}>*</Text>
</Text>
<View style={[Styles.wrapPaper, Styles.noShadow, Styles.borderAll, Styles.p10, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
<Text style={{ textAlign: "center" }}>{from}</Text>
<Text style={Styles.textCenter}>{from}</Text>
</View>
</View>
<View style={[{ width: "48%" }]}>
<View style={[Styles.w48]}>
<Text style={[Styles.mb05]}>
Tanggal Berakhir <Text style={{ color: colors.error }}>*</Text>
</Text>
<View style={[Styles.wrapPaper, Styles.noShadow, Styles.borderAll, Styles.p10, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
<Text style={{ textAlign: "center" }}>{to}</Text>
<Text style={Styles.textCenter}>{to}</Text>
</View>
</View>
</View>

View File

@@ -67,7 +67,7 @@ export default function ProjectCancel() {
}
return (
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
<Stack.Screen
options={{
// headerLeft: () => (

View File

@@ -88,7 +88,7 @@ export default function EditProject() {
return (
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
<Stack.Screen
options={{
// headerLeft: () => (
@@ -123,7 +123,7 @@ export default function EditProject() {
)
}}
/>
<ScrollView style={{ backgroundColor: colors.background }}>
<ScrollView style={[Styles.h100, { backgroundColor: colors.background }]}>
<View style={[Styles.p15, Styles.mb100]}>
<InputForm
label="Judul Kegiatan"

View File

@@ -93,7 +93,7 @@ export default function DetailProject() {
};
return (
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
<Stack.Screen
options={{
// headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
@@ -113,7 +113,7 @@ export default function DetailProject() {
}}
/>
<ScrollView
style={{ backgroundColor: colors.background }}
style={[Styles.h100, { backgroundColor: colors.background }]}
refreshControl={
<RefreshControl
refreshing={refreshing}

View File

@@ -88,7 +88,7 @@ export default function ReportProject() {
return (
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
<Stack.Screen
options={{
// headerLeft: () => (

View File

@@ -192,7 +192,7 @@ export default function CreateProject() {
return (
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
<Stack.Screen
options={{
// headerLeft: () => (

View File

@@ -105,7 +105,7 @@ export default function AddMemberCreateProject() {
)
}}
/>
<View style={[Styles.p15, { flex: 1, backgroundColor: colors.background }]}>
<View style={[Styles.p15, Styles.flex1, { backgroundColor: colors.background }]}>
<InputSearch onChange={(val) => setSearch(val)} value={search} />
{
@@ -127,11 +127,11 @@ export default function AddMemberCreateProject() {
</View>
:
<Text style={[Styles.textDefault, { textAlign: 'center', color: colors.dimmed }, Styles.pv05]}>Tidak ada member yang dipilih</Text>
<Text style={[Styles.textDefault, Styles.textCenter, { color: colors.dimmed }, Styles.pv05]}>Tidak ada member yang dipilih</Text>
}
<ScrollView
showsVerticalScrollIndicator={false}
style={{ backgroundColor: colors.background }}
style={[Styles.h100, Styles.flex1, { backgroundColor: colors.background }]}
>
{
@@ -159,7 +159,7 @@ export default function AddMemberCreateProject() {
}
)
:
<Text style={[Styles.textDefault, { textAlign: 'center' }]}>Tidak ada data</Text>
<Text style={[Styles.textDefault, Styles.textCenter]}>Tidak ada data</Text>
}
</ScrollView>
</View>

View File

@@ -121,7 +121,7 @@ export default function CreateProjectAddTask() {
}
return (
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
<Stack.Screen
options={{
// headerLeft: () => (
@@ -160,7 +160,7 @@ export default function CreateProjectAddTask() {
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
keyboardVerticalOffset={headerHeight}
>
<ScrollView style={{ backgroundColor: colors.background }}>
<ScrollView style={[Styles.h100, { backgroundColor: colors.background }]}>
<View style={[Styles.p15, Styles.mb100]}>
<View style={[Styles.wrapPaper, Styles.p10, { backgroundColor: colors.card, borderColor: colors.background }]}>
<DateTimePicker
@@ -189,7 +189,7 @@ export default function CreateProjectAddTask() {
Tanggal Mulai <Text style={{ color: colors.error }}>*</Text>
</Text>
<View style={[Styles.wrapPaper, Styles.noShadow, Styles.borderAll, Styles.p10, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
<Text style={{ textAlign: "center" }}>{from}</Text>
<Text style={Styles.textCenter}>{from}</Text>
</View>
</View>
<View style={[{ width: "48%" }]}>
@@ -197,7 +197,7 @@ export default function CreateProjectAddTask() {
Tanggal Berakhir <Text style={{ color: colors.error }}>*</Text>
</Text>
<View style={[Styles.wrapPaper, Styles.noShadow, Styles.borderAll, Styles.p10, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
<Text style={{ textAlign: "center" }}>{to}</Text>
<Text style={Styles.textCenter}>{to}</Text>
</View>
</View>
</View>

View File

@@ -126,7 +126,7 @@ export default function ListProject() {
})
return (
<View style={[Styles.p15, { flex: 1, backgroundColor: colors.background }]}>
<View style={[Styles.p15, Styles.flex1, { backgroundColor: colors.background }]}>
<View>
<WrapTab>
<ScrollView horizontal showsHorizontalScrollIndicator={false} style={[Styles.round20]}>
@@ -189,7 +189,7 @@ export default function ListProject() {
</ScrollView>
</WrapTab>
<View style={[Styles.rowSpaceBetween, { alignItems: 'center' }]}>
<View style={[Styles.rowSpaceBetween, Styles.rowItemsCenter]}>
<InputSearch width={68} onChange={setSearch} />
<Pressable
onPress={() => {
@@ -203,21 +203,21 @@ export default function ListProject() {
/>
</Pressable>
</View>
<View style={[Styles.mv05]}>
<View style={[Styles.mt10]}>
{
// entityUser.role != 'cosupadmin' && entityUser.role != 'admin' &&
<View style={[Styles.rowOnly]}>
<Text style={[Styles.mr05]}>Filter :</Text>
{
(entityUser.role == "supadmin" || entityUser.role == "developer") &&
<LabelStatus size="small" category="secondary" text={nameGroup} style={{ marginRight: 5 }} />
<LabelStatus size="small" category="secondary" text={nameGroup} style={[Styles.mr05]} />
}
{
(entityUser.role == 'user' || entityUser.role == 'coadmin')
? (cat == 'null' || cat == 'undefined' || cat == undefined || cat == '' || cat == 'data-saya') ? <LabelStatus size="small" category="secondary" text="Kegiatan Saya" style={{ marginRight: 5 }} /> : <LabelStatus size="small" category="secondary" text="Semua Kegiatan" style={{ marginRight: 5 }} />
? (cat == 'null' || cat == 'undefined' || cat == undefined || cat == '' || cat == 'data-saya') ? <LabelStatus size="small" category="secondary" text="Kegiatan Saya" style={[Styles.mr05]} /> : <LabelStatus size="small" category="secondary" text="Semua Kegiatan" style={[Styles.mr05]} />
: ''
}
<LabelStatus size="small" category="secondary" text={isYear} style={{ marginRight: 5 }} />
<LabelStatus size="small" category="secondary" text={isYear} style={[Styles.mr05]} />
{/* {
(entityUser.role == 'user' || entityUser.role == 'coadmin')
? (cat == 'null' || cat == 'undefined' || cat == undefined || cat == '' || cat == 'data-saya') ? <LabelStatus size="small" category="primary" text="Kegiatan Saya" /> : <LabelStatus size="small" category="primary" text="Semua Kegiatan" />
@@ -227,7 +227,7 @@ export default function ListProject() {
}
</View>
</View>
<View style={[{ flex: 2 }]}>
<View style={[Styles.flex2, Styles.mt10]}>
{
loading ?
isList ?
@@ -399,7 +399,7 @@ export default function ListProject() {
)
:
<View style={[Styles.mt15]}>
<Text style={[Styles.textDefault, { textAlign: 'center', color: colors.dimmed }]}>Tidak ada kegiatan</Text>
<Text style={[Styles.textDefault, Styles.textCenter, { color: colors.dimmed }]}>Tidak ada kegiatan</Text>
</View>
}
</View>

View File

@@ -172,7 +172,7 @@ export default function UpdateProjectTask() {
}, [range])
return (
<SafeAreaView style={{ flex: 1, backgroundColor: colors.background }}>
<SafeAreaView style={[Styles.flex1, { backgroundColor: colors.background }]}>
<Stack.Screen
options={{
// headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
@@ -203,7 +203,7 @@ export default function UpdateProjectTask() {
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
keyboardVerticalOffset={headerHeight}
>
<ScrollView style={{ backgroundColor: colors.background }}>
<ScrollView style={[Styles.h100, { backgroundColor: colors.background }]}>
<View style={[Styles.p15, Styles.mb100]}>
<View style={[Styles.wrapPaper, Styles.p10, { backgroundColor: colors.card, borderColor: colors.background }]}>
{
@@ -237,13 +237,13 @@ export default function UpdateProjectTask() {
<View style={[{ width: '48%' }]}>
<Text style={[Styles.mb05]}>Tanggal Mulai <Text style={{ color: colors.error }}>*</Text></Text>
<View style={[Styles.wrapPaper, Styles.noShadow, Styles.borderAll, Styles.p10, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
<Text style={{ textAlign: 'center' }}>{from}</Text>
<Text style={Styles.textCenter}>{from}</Text>
</View>
</View>
<View style={[{ width: '48%' }]}>
<Text style={[Styles.mb05]}>Tanggal Berakhir <Text style={{ color: colors.error }}>*</Text></Text>
<View style={[Styles.wrapPaper, Styles.noShadow, Styles.borderAll, Styles.p10, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
<Text style={{ textAlign: 'center' }}>{to}</Text>
<Text style={Styles.textCenter}>{to}</Text>
</View>
</View>
</View>