redesign aplikasi
Deskripsi: - update tema mode light dan dark pada fitur banner, lembaga desa, jabatan, anggota, dan diskusi umum
This commit is contained in:
@@ -56,7 +56,7 @@ export default function HeaderRightAnnouncementDetail({ id }: Props) {
|
||||
}}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
|
||||
@@ -39,13 +39,13 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress,
|
||||
onPressOut={() => setIsTap(false)}
|
||||
style={({ pressed }) => [
|
||||
borderType == 'bottom'
|
||||
? [Styles.wrapItemBorderBottom, { borderBottomColor: colors.icon }]
|
||||
? [Styles.wrapItemBorderBottom, { borderBottomColor: colors.icon + '20' }]
|
||||
: borderType == 'all'
|
||||
? [Styles.wrapItemBorderAll, { borderColor: colors.icon }]
|
||||
? [Styles.wrapItemBorderAll, { borderColor: colors.icon + '20' }]
|
||||
: Styles.wrapItemBorderNone,
|
||||
{ backgroundColor: bgColor },
|
||||
bgColor == "transparent" ? { backgroundColor: 'transparent' } : { backgroundColor: colors.card },
|
||||
// efek warna saat ditekan (sementara)
|
||||
isTap && colorPress && ColorsStatus.pressedGray,
|
||||
isTap && colorPress && { backgroundColor: colors.icon + '20' },
|
||||
]}
|
||||
>
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
@@ -75,13 +75,13 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress,
|
||||
<View style={[rightBottomInfo && !leftBottomInfo ? Styles.rowSpaceBetweenReverse : Styles.rowSpaceBetween, Styles.mt05]}>
|
||||
{
|
||||
typeof leftBottomInfo == 'string' ?
|
||||
<Text style={[Styles.textInformation, Styles.cGray]}>{leftBottomInfo}</Text>
|
||||
<Text style={[Styles.textInformation, { color: colors.dimmed }]}>{leftBottomInfo}</Text>
|
||||
:
|
||||
leftBottomInfo
|
||||
}
|
||||
{
|
||||
typeof rightBottomInfo == 'string' ?
|
||||
<Text style={[Styles.textInformation, Styles.cGray]}>{rightBottomInfo}</Text>
|
||||
<Text style={[Styles.textInformation, {color: colors.dimmed }]}>{rightBottomInfo}</Text>
|
||||
:
|
||||
rightBottomInfo
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@ export default function BorderBottomItem2({ title, subtitle, icon, desc, onPress
|
||||
onPressOut={() => setIsTap(false)}
|
||||
style={({ pressed }) => [
|
||||
borderType == 'bottom'
|
||||
? [Styles.wrapItemBorderBottom, { borderBottomColor: colors.icon }]
|
||||
? [Styles.wrapItemBorderBottom, { borderBottomColor: colors.icon + '20' }]
|
||||
: borderType == 'all'
|
||||
? [Styles.wrapItemBorderAll, { borderColor: colors.icon }]
|
||||
? [Styles.wrapItemBorderAll, { borderColor: colors.icon + '20' }]
|
||||
: Styles.wrapItemBorderNone,
|
||||
bgColor && bgColor == 'white' && { backgroundColor: colors.card },
|
||||
// efek warna saat ditekan (sementara)
|
||||
@@ -153,7 +153,7 @@ export default function BorderBottomItem2({ title, subtitle, icon, desc, onPress
|
||||
{dataFile.map((item, index) => (
|
||||
<Pressable
|
||||
key={index}
|
||||
style={[Styles.rowItemsCenter, Styles.borderAll, Styles.round10, Styles.ph05, Styles.pv03, Styles.mr05, { borderColor: colors.icon }]}
|
||||
style={[Styles.rowItemsCenter, Styles.borderAll, Styles.round05, Styles.ph05, Styles.pv03, Styles.mr05, { borderColor: colors.icon }]}
|
||||
onPress={() => {
|
||||
isImageFile(item.extension) ?
|
||||
handleChooseFile(item)
|
||||
@@ -164,7 +164,7 @@ export default function BorderBottomItem2({ title, subtitle, icon, desc, onPress
|
||||
name={isImageFile(item.extension) ? "file-image-outline" : "file-document-outline"}
|
||||
size={18}
|
||||
color={colors.icon} />
|
||||
<Text style={[Styles.textInformation, Styles.cGray]}>{item.name}.{item.extension}</Text>
|
||||
<Text style={[Styles.textInformation]}>{item.name}.{item.extension}</Text>
|
||||
</Pressable>
|
||||
))}
|
||||
</ScrollView>
|
||||
|
||||
@@ -9,7 +9,7 @@ export default function ButtonMenuHeader({ onPress }: Props) {
|
||||
return (
|
||||
<>
|
||||
<ButtonHeader
|
||||
item={<Feather name="menu" size={20} color="white" />}
|
||||
item={<Feather name="menu" size={25} color="white" />}
|
||||
onPress={() => onPress()}
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function ButtonSaveHeader({ category, onPress, disable }: Props)
|
||||
return (
|
||||
<>
|
||||
<ButtonHeader
|
||||
item={<Feather name="check" size={20} color={disable ? "grey" : "white"} />}
|
||||
item={<Feather name="check" size={25} color={disable ? "grey" : "white"} />}
|
||||
onPress={() => {
|
||||
if (!disable) {
|
||||
AlertKonfirmasi({
|
||||
|
||||
@@ -22,7 +22,7 @@ export default function ButtonSelect({ value, onPress, round, error, errorText }
|
||||
Styles.inputRoundFormRight,
|
||||
round && Styles.round30,
|
||||
Styles.pv10,
|
||||
{ borderColor: colors.icon, backgroundColor: colors.card },
|
||||
{ borderColor: colors.icon + '20', backgroundColor: colors.input },
|
||||
error && { borderColor: "red" }
|
||||
]}>
|
||||
<Feather name="arrow-right-circle" size={20} color={colors.text} />
|
||||
|
||||
@@ -51,7 +51,7 @@ export default function HeaderRightCalendarDetail({ id, idReminder }: Props) {
|
||||
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={setVisible} title="Menu">
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={<MaterialIcons name="groups" color={colors.text} size={25} />}
|
||||
icon={<MaterialCommunityIcons name="account-group-outline" color={colors.text} size={25} />}
|
||||
title="Tambah Anggota"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
@@ -67,7 +67,7 @@ export default function HeaderRightCalendarDetail({ id, idReminder }: Props) {
|
||||
}}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
|
||||
@@ -61,7 +61,7 @@ export default function HeaderRightDiscussionGeneralDetail({ id, active, status
|
||||
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={setVisible} title="Menu">
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={<MaterialIcons name="groups" color={colors.text} size={25} />}
|
||||
icon={<MaterialCommunityIcons name="account-group-outline" color={colors.text} size={25} />}
|
||||
title="Anggota"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function HeaderDiscussionGeneral() {
|
||||
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={setVisible} title="Menu">
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={<AntDesign name="pluscircle" color={colors.text} size={25} />}
|
||||
icon={<AntDesign name="pluscircleo" color={colors.text} size={25} />}
|
||||
title="Tambah Diskusi"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
|
||||
@@ -45,9 +45,9 @@ export default function DrawerBottom({ isVisible, setVisible, title, children, a
|
||||
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
|
||||
keyboardVerticalOffset={0}
|
||||
>
|
||||
<View style={[Styles.modalContentNew, { height: tinggiFix, backgroundColor: colors.background }]}>
|
||||
<View style={[Styles.titleContainerNew, { borderBottomColor: colors.icon + '20' }]}>
|
||||
<Text numberOfLines={1} ellipsizeMode='tail' style={[Styles.textDefault, Styles.w90]}>{title}</Text>
|
||||
<View style={[Styles.modalContentNew, { height: tinggiFix, backgroundColor: colors.modalBackground }]}>
|
||||
<View style={[Styles.titleContainerNew]}>
|
||||
<Text numberOfLines={1} ellipsizeMode='tail' style={[Styles.textDefaultSemiBold, Styles.w90]}>{title}</Text>
|
||||
<Pressable onPress={() => setVisible(false)}>
|
||||
<MaterialIcons name="close" color={colors.text} size={22} />
|
||||
</Pressable>
|
||||
@@ -58,9 +58,9 @@ export default function DrawerBottom({ isVisible, setVisible, title, children, a
|
||||
</View>
|
||||
</KeyboardAvoidingView>
|
||||
:
|
||||
<View style={[Styles.modalContentNew, { height: tinggiFix, backgroundColor: colors.background }]}>
|
||||
<View style={[Styles.titleContainerNew, { borderBottomColor: colors.icon + '20' }]}>
|
||||
<Text numberOfLines={1} ellipsizeMode='tail' style={[Styles.textDefault, Styles.w90]}>{title}</Text>
|
||||
<View style={[Styles.modalContentNew, { height: tinggiFix, backgroundColor: colors.modalBackground }]}>
|
||||
<View style={[Styles.titleContainerNew]}>
|
||||
<Text numberOfLines={1} ellipsizeMode='tail' style={[Styles.textDefaultSemiBold, Styles.w90]}>{title}</Text>
|
||||
<Pressable onPress={() => setVisible(false)}>
|
||||
<MaterialIcons name="close" color={colors.text} size={22} />
|
||||
</Pressable>
|
||||
|
||||
@@ -64,7 +64,7 @@ export default function HeaderRightGroupList() {
|
||||
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={() => setVisible(false)} title="Menu">
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={<AntDesign name="pluscircle" color={colors.text} size={25} />}
|
||||
icon={<AntDesign name="pluscircleo" color={colors.text} size={25} />}
|
||||
title="Tambah Lembaga"
|
||||
onPress={() => {
|
||||
setVisible(false);
|
||||
@@ -88,7 +88,7 @@ export default function HeaderRightGroupList() {
|
||||
placeholder="Nama Lembaga Desa"
|
||||
required label="Lembaga Desa"
|
||||
error={error.title}
|
||||
bg={colors.card}
|
||||
bg={"transparent"}
|
||||
errorText="Lembaga Desa tidak boleh kosong & minimal 3 karakter"
|
||||
onChange={(val) => { validationForm(val, 'title') }}
|
||||
/>
|
||||
|
||||
@@ -34,9 +34,9 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
|
||||
<View style={[mb && Styles.mb10]}>
|
||||
{
|
||||
label != undefined && (
|
||||
<Text style={[{ marginBottom: 5, textTransform: "capitalize", color: colors.text }, error && Styles.cError]}>
|
||||
<Text style={[{ marginBottom: 5, textTransform: "capitalize", color: colors.text }, error && { color: colors.error }]}>
|
||||
{label}
|
||||
{required && (<Text style={Styles.cError}>*</Text>)}
|
||||
{required && (<Text style={{ color: colors.error }}>*</Text>)}
|
||||
</Text>
|
||||
)
|
||||
}
|
||||
@@ -46,12 +46,9 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
|
||||
multiline && { alignItems: 'flex-end' },
|
||||
round && Styles.round30,
|
||||
{
|
||||
backgroundColor: bg
|
||||
? (bg === 'white' ? (colors.background === '#151718' ? '#2d2e2f' : 'white') : bg)
|
||||
: 'transparent',
|
||||
borderColor: colors.icon
|
||||
backgroundColor: bg=="transparent" ? "transparent" : colors.input,
|
||||
},
|
||||
error && { borderColor: "red" },
|
||||
error ? { borderColor: colors.error } : { borderColor: colors.icon + '20' },
|
||||
Platform.OS == 'ios' ? { paddingVertical: 10 } : { paddingVertical: 0, minHeight: 40 },
|
||||
{ alignItems: 'center' },
|
||||
multiline
|
||||
@@ -65,7 +62,7 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
|
||||
placeholder={placeholder}
|
||||
keyboardType={type}
|
||||
onChangeText={onChange}
|
||||
placeholderTextColor={colors.icon}
|
||||
placeholderTextColor={colors.dimmed}
|
||||
multiline={multiline}
|
||||
numberOfLines={3}
|
||||
style={[
|
||||
@@ -76,7 +73,7 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
|
||||
]}
|
||||
/>
|
||||
</View>
|
||||
{error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}
|
||||
{error && (<Text style={[Styles.textInformation, { color: colors.error }, Styles.mt05]}>{errorText}</Text>)}
|
||||
{info != undefined && (<Text style={[Styles.textInformation, { color: colors.icon }, Styles.mt05]}>{info}</Text>)}
|
||||
</View>
|
||||
)
|
||||
@@ -88,9 +85,9 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
|
||||
<View style={[Styles.mb10]}>
|
||||
{
|
||||
label != undefined && (
|
||||
<Text style={[Styles.mb05, error && Styles.cError, { color: colors.text }]}>
|
||||
<Text style={[Styles.mb05, error && { color: colors.error }, { color: colors.text }]}>
|
||||
{label}
|
||||
{required && (<Text style={Styles.cError}>*</Text>)}
|
||||
{required && (<Text style={{ color: colors.error }}>*</Text>)}
|
||||
</Text>
|
||||
)
|
||||
}
|
||||
@@ -102,19 +99,16 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
|
||||
style={[
|
||||
Styles.inputRoundForm,
|
||||
Platform.OS == 'ios' ? { paddingVertical: 11 } : { paddingVertical: 6 },
|
||||
error && { borderColor: "red" },
|
||||
error ? { borderColor: colors.error } : { borderColor: colors.icon + '20' },
|
||||
round && Styles.round30,
|
||||
{
|
||||
backgroundColor: bg
|
||||
? (bg === 'white' ? (colors.background === '#151718' ? '#2d2e2f' : 'white') : bg)
|
||||
: 'transparent',
|
||||
borderColor: colors.icon
|
||||
backgroundColor: bg=="transparent" ? "transparent" : colors.input,
|
||||
},
|
||||
{ color: colors.text },
|
||||
multiline && { height: 150, textAlignVertical: 'top' }
|
||||
]}
|
||||
onChangeText={onChange}
|
||||
placeholderTextColor={colors.icon}
|
||||
placeholderTextColor={colors.dimmed}
|
||||
multiline={multiline}
|
||||
numberOfLines={multiline ? 5 : undefined}
|
||||
/>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import { Feather } from "@expo/vector-icons";
|
||||
import { InputForm } from "./inputForm";
|
||||
|
||||
export default function InputSearch({ onChange, width, value }: { onChange?: (val: string) => void, width?: number, value?: string }) {
|
||||
const { colors } = useTheme();
|
||||
return (
|
||||
<InputForm
|
||||
type="default"
|
||||
placeholder="Pencarian"
|
||||
round
|
||||
itemLeft={<Feather name="search" size={20} color="grey" />}
|
||||
itemLeft={<Feather name="search" size={20} color={colors.dimmed} />}
|
||||
onChange={onChange}
|
||||
width={width}
|
||||
bg="white"
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function LabelStatus({ category, text, size, style }: Props) {
|
||||
success: colors.success,
|
||||
warning: colors.warning,
|
||||
error: colors.error,
|
||||
secondary: colors.dimmed,
|
||||
secondary: 'gray',
|
||||
}[category] || 'gray'; // Removed ColorsStatus[category]?.backgroundColor as ColorsStatus is removed
|
||||
|
||||
return (
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function HeaderMemberList() {
|
||||
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={() => setVisible(false)} title="Menu">
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={<AntDesign name="pluscircle" color={colors.text} size={25} />}
|
||||
icon={<AntDesign name="pluscircleo" color={colors.text} size={25} />}
|
||||
title="Tambah Anggota"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
|
||||
@@ -2,6 +2,7 @@ import Styles from "@/constants/Styles"
|
||||
import { apiGetGroup, apiGetTahunProject, apiGetTahunTask } from "@/lib/api"
|
||||
import { setEntityFilterGroup } from "@/lib/filterSlice"
|
||||
import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import { useTheme } from "@/providers/ThemeProvider"
|
||||
import { router } from "expo-router"
|
||||
import { useEffect, useState } from "react"
|
||||
import { ScrollView, TouchableOpacity, View } from "react-native"
|
||||
@@ -40,6 +41,7 @@ export default function ModalFilter({ open, close, page, category, valueGroup, v
|
||||
const [chooseYear, setChooseYear] = useState(valueYear || '')
|
||||
const [dataTahun, setDataTahun] = useState<{ id: string, name: string }[]>([])
|
||||
const [passingData, setPassingData] = useState(dataPassing)
|
||||
const { colors } = useTheme()
|
||||
|
||||
async function handleLoad() {
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
@@ -80,9 +82,9 @@ export default function ModalFilter({ open, close, page, category, valueGroup, v
|
||||
key={index}
|
||||
style={[
|
||||
Styles.chip,
|
||||
chooseGroup == item.id && Styles.chipSelected,
|
||||
{ borderColor: colors.dimmed },
|
||||
chooseGroup == item.id && { backgroundColor: colors.primary },
|
||||
]}
|
||||
activeOpacity={0.8}
|
||||
onPress={() => { setChooseGroup(item.id) }}
|
||||
>
|
||||
{/* {chooseGroup == item.id && (
|
||||
@@ -94,6 +96,7 @@ export default function ModalFilter({ open, close, page, category, valueGroup, v
|
||||
<Text
|
||||
style={[
|
||||
Styles.chipText,
|
||||
{ color: colors.text },
|
||||
chooseGroup == item.id && Styles.chipTextSelected,
|
||||
]}
|
||||
>
|
||||
@@ -113,7 +116,8 @@ export default function ModalFilter({ open, close, page, category, valueGroup, v
|
||||
key={index}
|
||||
style={[
|
||||
Styles.chip,
|
||||
chooseGroup == item.id && Styles.chipSelected,
|
||||
{ borderColor: colors.dimmed },
|
||||
chooseGroup == item.id && { backgroundColor: colors.primary },
|
||||
]}
|
||||
activeOpacity={0.8}
|
||||
onPress={() => { setChooseGroup(item.id) }}
|
||||
@@ -127,6 +131,7 @@ export default function ModalFilter({ open, close, page, category, valueGroup, v
|
||||
<Text
|
||||
style={[
|
||||
Styles.chipText,
|
||||
{ color: colors.text },
|
||||
chooseGroup == item.id && Styles.chipTextSelected,
|
||||
]}
|
||||
>
|
||||
@@ -155,7 +160,8 @@ export default function ModalFilter({ open, close, page, category, valueGroup, v
|
||||
key={index}
|
||||
style={[
|
||||
Styles.chip,
|
||||
chooseYear == item.id && Styles.chipSelected,
|
||||
{ borderColor: colors.dimmed },
|
||||
chooseGroup == item.id && { backgroundColor: colors.primary },
|
||||
]}
|
||||
activeOpacity={0.8}
|
||||
onPress={() => { setChooseYear(item.id) }}
|
||||
@@ -163,6 +169,7 @@ export default function ModalFilter({ open, close, page, category, valueGroup, v
|
||||
<Text
|
||||
style={[
|
||||
Styles.chipText,
|
||||
{ color: colors.text },
|
||||
chooseYear == item.id && Styles.chipTextSelected,
|
||||
]}
|
||||
>
|
||||
|
||||
@@ -23,7 +23,7 @@ export default function HeaderRightPositionList() {
|
||||
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={setVisible} title="Menu">
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={<AntDesign name="pluscircle" color={colors.text} size={25} />}
|
||||
icon={<AntDesign name="pluscircleo" color={colors.text} size={25} />}
|
||||
title="Tambah Jabatan"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
|
||||
@@ -97,6 +97,7 @@ export default function ModalFormCreatePosition({ onClose }: { onClose: () => vo
|
||||
}}
|
||||
error={error.idGroup}
|
||||
errorText="Lembaga Desa harus diisi"
|
||||
bg="transparent"
|
||||
/>
|
||||
}
|
||||
<InputForm
|
||||
@@ -106,7 +107,7 @@ export default function ModalFormCreatePosition({ onClose }: { onClose: () => vo
|
||||
label="Jabatan"
|
||||
onChange={(value) => { validationForm(value, 'name') }}
|
||||
error={error.name}
|
||||
bg={colors.card}
|
||||
bg={"transparent"}
|
||||
errorText="Nama jabatan harus diisi"
|
||||
value={dataForm.name}
|
||||
/>
|
||||
|
||||
@@ -119,7 +119,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
entityUser.role != "user" && entityUser.role != "coadmin" &&
|
||||
<>
|
||||
<MenuItemRow
|
||||
icon={<MaterialIcons name="groups" color={colors.text} size={25} />}
|
||||
icon={<MaterialCommunityIcons name="account-group-outline" color={colors.text} size={25} />}
|
||||
title="Tambah Anggota"
|
||||
onPress={() => {
|
||||
if (status == 3) return
|
||||
@@ -148,7 +148,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
status == 3
|
||||
?
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
|
||||
@@ -179,7 +179,7 @@ export default function SectionFile({ status, member, refreshing }: { status: nu
|
||||
!member && (entityUser.role == "user" || entityUser.role == "coadmin") ? <></>
|
||||
:
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus"
|
||||
disabled={status == 3}
|
||||
onPress={() => {
|
||||
|
||||
@@ -116,7 +116,7 @@ export default function SectionLink({ status, member, refreshing }: { status: nu
|
||||
!member && (entityUser.role == "user" || entityUser.role == "coadmin") ? <></>
|
||||
:
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus"
|
||||
disabled={status == 3}
|
||||
onPress={() => {
|
||||
|
||||
@@ -60,7 +60,7 @@ export default function SectionListAddTask() {
|
||||
>
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus Tugas"
|
||||
onPress={() => { handleDelete() }}
|
||||
/>
|
||||
|
||||
@@ -211,7 +211,7 @@ export default function SectionTanggalTugasProject({ status, member, refreshing
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt15]}>
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus Tugas"
|
||||
onPress={() => {
|
||||
setModal(false)
|
||||
|
||||
@@ -25,9 +25,9 @@ export default function SelectForm({ label, value, placeholder, onPress, info, e
|
||||
<View style={[Styles.mb10]}>
|
||||
{
|
||||
label != undefined && (
|
||||
<Text style={[Styles.mb05, { textTransform: "capitalize" }, error && Styles.cError]}>
|
||||
<Text style={[Styles.mb05, { textTransform: "capitalize" }, error && { color: colors.error }]}>
|
||||
{label}
|
||||
{required && (<Text style={Styles.cError}>*</Text>)}
|
||||
{required && (<Text style={{ color: colors.error }}>*</Text>)}
|
||||
</Text>
|
||||
)
|
||||
}
|
||||
@@ -35,22 +35,22 @@ export default function SelectForm({ label, value, placeholder, onPress, info, e
|
||||
<View style={[
|
||||
Styles.inputRoundForm,
|
||||
Styles.inputRoundFormRight,
|
||||
error && { borderColor: "red" },
|
||||
error ? { borderColor: colors.error } : { borderColor: colors.icon + '20' },
|
||||
round && Styles.round30,
|
||||
Styles.pv10,
|
||||
{ backgroundColor: bg ? bg : 'transparent', borderColor: colors.icon }
|
||||
{ backgroundColor: bg == 'transparent' ? 'transparent' : colors.input }
|
||||
]}>
|
||||
<Feather name="chevron-right" size={20} color={colors.icon} />
|
||||
{
|
||||
value ? (
|
||||
<Text numberOfLines={1} ellipsizeMode='tail' style={[Styles.w90]}>{value}</Text>
|
||||
) : (
|
||||
<Text numberOfLines={1} ellipsizeMode='tail' style={[{ color: colors.icon }, Styles.w90]}>{placeholder}</Text>
|
||||
<Text numberOfLines={1} ellipsizeMode='tail' style={[{ color: colors.dimmed }, Styles.w90]}>{placeholder}</Text>
|
||||
)
|
||||
}
|
||||
</View>
|
||||
</Pressable >
|
||||
{error && (<Text style={[Styles.textInformation, Styles.mt05, Styles.cError]}>{errorText}</Text>)
|
||||
{error && (<Text style={[Styles.textInformation, Styles.mt05, { color: colors.error } ]}>{errorText}</Text>)
|
||||
}
|
||||
{info != undefined && (<Text style={[Styles.textInformation, Styles.mt05, { color: colors.icon }]}>{info}</Text>)}
|
||||
</View >
|
||||
|
||||
@@ -124,7 +124,7 @@ export default function HeaderRightTaskDetail({ id, division, status, isAdminDiv
|
||||
&&
|
||||
<>
|
||||
<MenuItemRow
|
||||
icon={<MaterialIcons name="groups" color={colors.text} size={25} />}
|
||||
icon={<MaterialCommunityIcons name="account-group-outline" color={colors.text} size={25} />}
|
||||
title="Tambah Anggota"
|
||||
onPress={() => {
|
||||
if (status == 3) return
|
||||
@@ -154,7 +154,7 @@ export default function HeaderRightTaskDetail({ id, division, status, isAdminDiv
|
||||
status == 3
|
||||
?
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
|
||||
@@ -170,7 +170,7 @@ export default function SectionFileTask({ refreshing, isMemberDivision }: { refr
|
||||
(entityUser.role != "user" && entityUser.role != "coadmin") || isMemberDivision
|
||||
?
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus"
|
||||
onPress={() => {
|
||||
setModal(false)
|
||||
|
||||
@@ -108,7 +108,7 @@ export default function SectionLinkTask({ refreshing, isMemberDivision }: { refr
|
||||
(entityUser.role != "user" && entityUser.role != "coadmin") || isMemberDivision
|
||||
?
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus"
|
||||
onPress={() => {
|
||||
setModal(false)
|
||||
|
||||
@@ -207,7 +207,7 @@ export default function SectionTanggalTugasTask({ refreshing, isMemberDivision }
|
||||
?
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt15]}>
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
icon={<Ionicons name="trash-outline" color={colors.text} size={25} />}
|
||||
title="Hapus Tugas"
|
||||
onPress={() => {
|
||||
setModal(false)
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import Styles from "@/constants/Styles";
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import { View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import Text from "./Text";
|
||||
|
||||
export default function ToastCustom({ position }: { position?: 'top' | 'bottom' }) {
|
||||
const { colors } = useTheme()
|
||||
return (
|
||||
<Toast autoHide onPress={() => Toast.hide()} visibilityTime={1500} position={position || 'bottom'} config={{
|
||||
small: ({ text1 }) => (
|
||||
<View style={[Styles.toastContainer]}>
|
||||
<View style={[Styles.toastContainer, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
|
||||
<Text style={{ fontSize: 12 }}>{text1}</Text>
|
||||
</View>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user