Admin App Information
Add: - app-information/information-bank ### No Issue
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
import {
|
||||||
|
BoxButtonOnFooter,
|
||||||
|
ButtonCustom,
|
||||||
|
StackCustom,
|
||||||
|
TextInputCustom,
|
||||||
|
ViewWrapper,
|
||||||
|
} from "@/components";
|
||||||
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
|
import { router } from "expo-router";
|
||||||
|
|
||||||
|
export default function AdminAppInformation_BusinessFieldDetail() {
|
||||||
|
const buttonSubmit = (
|
||||||
|
<BoxButtonOnFooter>
|
||||||
|
<ButtonCustom
|
||||||
|
onPress={() => router.back()}
|
||||||
|
>
|
||||||
|
Update
|
||||||
|
</ButtonCustom>
|
||||||
|
</BoxButtonOnFooter>
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ViewWrapper footerComponent={buttonSubmit}>
|
||||||
|
<StackCustom>
|
||||||
|
<AdminBackButtonAntTitle title="Update Bidang Bisnis" />
|
||||||
|
|
||||||
|
<TextInputCustom
|
||||||
|
label="Nama Bidang Bisnis"
|
||||||
|
placeholder="Masukan Nama Bidang Bisnis"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</StackCustom>
|
||||||
|
</ViewWrapper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import {
|
||||||
|
BoxButtonOnFooter,
|
||||||
|
ButtonCustom,
|
||||||
|
StackCustom,
|
||||||
|
TextInputCustom,
|
||||||
|
ViewWrapper,
|
||||||
|
} from "@/components";
|
||||||
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
|
import { router } from "expo-router";
|
||||||
|
|
||||||
|
export default function AdminAppInformation_BusinessFieldCreate() {
|
||||||
|
const buttonSubmit = (
|
||||||
|
<BoxButtonOnFooter>
|
||||||
|
<ButtonCustom
|
||||||
|
onPress={() => router.back()}
|
||||||
|
>
|
||||||
|
Tambah
|
||||||
|
</ButtonCustom>
|
||||||
|
</BoxButtonOnFooter>
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ViewWrapper footerComponent={buttonSubmit}>
|
||||||
|
<StackCustom>
|
||||||
|
<AdminBackButtonAntTitle title="Tambah Bidang Bisnis" />
|
||||||
|
|
||||||
|
<TextInputCustom
|
||||||
|
label="Nama Bidang Bisnis"
|
||||||
|
placeholder="Masukan Nama Bidang Bisnis"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</StackCustom>
|
||||||
|
</ViewWrapper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -59,7 +59,13 @@ export default function AdminInformation() {
|
|||||||
<Ionicons name="add" size={ICON_SIZE_SMALL} color="black" />
|
<Ionicons name="add" size={ICON_SIZE_SMALL} color="black" />
|
||||||
}
|
}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
router.push("/admin/app-information/information-bank/create");
|
if (activeCategory === "bank") {
|
||||||
|
router.push("/admin/app-information/information-bank/create");
|
||||||
|
} else if (activeCategory === "business") {
|
||||||
|
router.push("/admin/app-information/business-field/create");
|
||||||
|
} else if (activeCategory === "sticker") {
|
||||||
|
router.push("/admin/app-information/sticker/create");
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -6,14 +6,12 @@ import {
|
|||||||
ViewWrapper
|
ViewWrapper
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import { Ionicons } from "@expo/vector-icons";
|
|
||||||
import { router } from "expo-router";
|
import { router } from "expo-router";
|
||||||
|
|
||||||
export default function AdminAppInformation_BankCreate() {
|
export default function AdminAppInformation_BankCreate() {
|
||||||
const buttonSubmit = (
|
const buttonSubmit = (
|
||||||
<BoxButtonOnFooter>
|
<BoxButtonOnFooter>
|
||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
iconLeft={<Ionicons name="add" size={16} color="black" />}
|
|
||||||
onPress={() => router.back()}
|
onPress={() => router.back()}
|
||||||
>
|
>
|
||||||
Tambah
|
Tambah
|
||||||
|
|||||||
@@ -1,9 +1,83 @@
|
|||||||
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
import {
|
||||||
|
ActionIcon,
|
||||||
|
Grid,
|
||||||
|
StackCustom,
|
||||||
|
TextCustom
|
||||||
|
} from "@/components";
|
||||||
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
|
import dummyMasterBidangBisnis from "@/lib/dummy-data/master-bidang-bisnis";
|
||||||
|
import { FontAwesome5 } from "@expo/vector-icons";
|
||||||
|
import { router } from "expo-router";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { View } from "react-native";
|
||||||
|
import { Divider, Switch } from "react-native-paper";
|
||||||
|
|
||||||
export default function AdminAppInformation_BusinessFieldSection() {
|
export default function AdminAppInformation_BusinessFieldSection() {
|
||||||
|
const [value, setValue] = useState(false);
|
||||||
|
const [selectedBusinessField, setSelectedBusinessField] = useState<any>(null);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AdminComp_BoxTitle title="Bidang Bisnis" />
|
<>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={3} style={{ alignItems: "center" }}>
|
||||||
|
<TextCustom bold>Aksi</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={3} style={{ alignItems: "center" }}>
|
||||||
|
<TextCustom bold>Status</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<TextCustom bold>Nama Bidang Bisnis</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Divider />
|
||||||
|
|
||||||
|
|
||||||
|
<StackCustom>
|
||||||
|
{dummyMasterBidangBisnis.map((e, i) => (
|
||||||
|
<View key={i}>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={3} style={{ alignItems: "center" }}>
|
||||||
|
<ActionIcon
|
||||||
|
icon={
|
||||||
|
<FontAwesome5
|
||||||
|
name="edit"
|
||||||
|
size={ICON_SIZE_BUTTON}
|
||||||
|
color="black"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
onPress={() => {
|
||||||
|
router.push(`/admin/app-information/business-field/${i}`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col
|
||||||
|
span={3}
|
||||||
|
style={{ alignItems: "center", justifyContent: "center" }}
|
||||||
|
>
|
||||||
|
<Switch
|
||||||
|
value={i === selectedBusinessField}
|
||||||
|
onValueChange={() => {
|
||||||
|
setValue(!value);
|
||||||
|
setSelectedBusinessField(i);
|
||||||
|
}}
|
||||||
|
theme={{
|
||||||
|
colors: {
|
||||||
|
primary: MainColor.yellow,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={6} style={{ justifyContent: "center" }}>
|
||||||
|
<TextCustom>{e.name}</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
<Divider />
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</StackCustom>
|
||||||
|
</>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,18 @@
|
|||||||
import { ActionIcon, BaseBox, Divider, Grid, TextCustom } from "@/components";
|
import { ActionIcon, Grid, StackCustom, TextCustom } from "@/components";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import {
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
ICON_SIZE_BUTTON
|
|
||||||
} from "@/constants/constans-value";
|
|
||||||
import { dummyMasterBank } from "@/lib/dummy-data/_master/bank";
|
import { dummyMasterBank } from "@/lib/dummy-data/_master/bank";
|
||||||
import { FontAwesome5 } from "@expo/vector-icons";
|
import { FontAwesome5 } from "@expo/vector-icons";
|
||||||
import { router } from "expo-router";
|
import { router } from "expo-router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { View } from "react-native";
|
import { View } from "react-native";
|
||||||
import { Switch } from "react-native-paper";
|
import { Divider, Switch } from "react-native-paper";
|
||||||
|
|
||||||
export default function AdminAppInformation_Bank() {
|
export default function AdminAppInformation_Bank() {
|
||||||
const [value, setValue] = useState(false);
|
const [value, setValue] = useState(false);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<>
|
||||||
<BaseBox>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.Col span={3} style={{ alignItems: "center" }}>
|
<Grid.Col span={3} style={{ alignItems: "center" }}>
|
||||||
<TextCustom bold>Aksi</TextCustom>
|
<TextCustom bold>Aksi</TextCustom>
|
||||||
@@ -30,47 +27,51 @@ export default function AdminAppInformation_Bank() {
|
|||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
{dummyMasterBank.map((e, i) => (
|
<StackCustom>
|
||||||
<View key={i}>
|
{dummyMasterBank.map((e, i) => (
|
||||||
<Grid>
|
<View key={i}>
|
||||||
<Grid.Col span={3} style={{ alignItems: "center" }}>
|
<Grid>
|
||||||
<ActionIcon
|
<Grid.Col span={3} style={{ alignItems: "center" }}>
|
||||||
icon={
|
<ActionIcon
|
||||||
<FontAwesome5
|
icon={
|
||||||
name="edit"
|
<FontAwesome5
|
||||||
size={ICON_SIZE_BUTTON}
|
name="edit"
|
||||||
color="black"
|
size={ICON_SIZE_BUTTON}
|
||||||
/>
|
color="black"
|
||||||
}
|
/>
|
||||||
onPress={() => {
|
}
|
||||||
router.push(`/admin/app-information/information-bank/${i}`);
|
onPress={() => {
|
||||||
}}
|
router.push(
|
||||||
/>
|
`/admin/app-information/information-bank/${i}`
|
||||||
</Grid.Col>
|
);
|
||||||
<Grid.Col
|
}}
|
||||||
span={3}
|
/>
|
||||||
style={{ alignItems: "center", justifyContent: "center" }}
|
</Grid.Col>
|
||||||
>
|
<Grid.Col
|
||||||
<Switch
|
span={3}
|
||||||
value={value}
|
style={{ alignItems: "center", justifyContent: "center" }}
|
||||||
onValueChange={() => {
|
>
|
||||||
setValue(!value);
|
<Switch
|
||||||
}}
|
value={value}
|
||||||
theme={{
|
onValueChange={() => {
|
||||||
colors: {
|
setValue(!value);
|
||||||
primary: MainColor.yellow,
|
}}
|
||||||
},
|
theme={{
|
||||||
}}
|
colors: {
|
||||||
/>
|
primary: MainColor.yellow,
|
||||||
</Grid.Col>
|
},
|
||||||
<Grid.Col span={6} style={{ justifyContent: "center" }}>
|
}}
|
||||||
<TextCustom>{e.code}</TextCustom>
|
/>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
</Grid>
|
<Grid.Col span={6} style={{ justifyContent: "center" }}>
|
||||||
<Divider />
|
<TextCustom>{e.code}</TextCustom>
|
||||||
</View>
|
</Grid.Col>
|
||||||
))}
|
</Grid>
|
||||||
</BaseBox>
|
<Divider />
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</StackCustom>
|
||||||
|
</>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,5 +13,5 @@
|
|||||||
"**/*.tsx",
|
"**/*.tsx",
|
||||||
".expo/types/**/*.ts",
|
".expo/types/**/*.ts",
|
||||||
"expo-env.d.ts"
|
"expo-env.d.ts"
|
||||||
]
|
, "app/(application)/admin/app-information/business-field/[id]" ]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user