Invesment
Add - _master/status-transaction.ts - investment/[id]/(transaction-flow)/success.tsx - investment/[id]/(transaction-flow)/failed.tsx Fix: - lib/dummy-data/_master/status.tsx Component: - components/Badge/BadgeCustom.tsx: Penambahan custom color ## No Issue
This commit is contained in:
@@ -287,7 +287,16 @@ export default function UserLayout() {
|
|||||||
name="investment/[id]/(transaction-flow)/invoice"
|
name="investment/[id]/(transaction-flow)/invoice"
|
||||||
options={{
|
options={{
|
||||||
title: "Invoice",
|
title: "Invoice",
|
||||||
headerLeft: () => <BackButton />,
|
headerLeft: () => (
|
||||||
|
<Ionicons
|
||||||
|
name="close"
|
||||||
|
size={ICON_SIZE_SMALL}
|
||||||
|
color={MainColor.yellow}
|
||||||
|
onPress={() =>
|
||||||
|
router.navigate(`/investment/(tabs)/transaction`)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
@@ -299,11 +308,27 @@ export default function UserLayout() {
|
|||||||
name="close"
|
name="close"
|
||||||
size={ICON_SIZE_SMALL}
|
size={ICON_SIZE_SMALL}
|
||||||
color={MainColor.yellow}
|
color={MainColor.yellow}
|
||||||
onPress={() => router.navigate(`/investment/(tabs)/transaction`)}
|
onPress={() =>
|
||||||
|
router.navigate(`/investment/(tabs)/transaction`)
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<Stack.Screen
|
||||||
|
name="investment/[id]/(transaction-flow)/success"
|
||||||
|
options={{
|
||||||
|
title: "Transaksi Berhasil",
|
||||||
|
headerLeft: () => <BackButton />,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Stack.Screen
|
||||||
|
name="investment/[id]/(transaction-flow)/failed"
|
||||||
|
options={{
|
||||||
|
title: "Transaksi Gagal",
|
||||||
|
headerLeft: () => <BackButton />,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
{/* ========== End Investment Section ========= */}
|
{/* ========== End Investment Section ========= */}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import {
|
import {
|
||||||
BoxWithHeaderSection,
|
BoxWithHeaderSection,
|
||||||
Grid,
|
Grid,
|
||||||
ScrollableCustom,
|
ScrollableCustom,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom
|
TextCustom
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||||
import { masterStatus } from "@/lib/dummy-data/_master/status";
|
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
export default function EventStatus() {
|
export default function EventStatus() {
|
||||||
@@ -23,7 +23,7 @@ export default function EventStatus() {
|
|||||||
|
|
||||||
const scrollComponent = (
|
const scrollComponent = (
|
||||||
<ScrollableCustom
|
<ScrollableCustom
|
||||||
data={masterStatus.map((e, i) => ({
|
data={dummyMasterStatus.map((e, i) => ({
|
||||||
id: i,
|
id: i,
|
||||||
label: e.label,
|
label: e.label,
|
||||||
value: e.value,
|
value: e.value,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ScrollableCustom, ViewWrapper } from "@/components";
|
import { ScrollableCustom, ViewWrapper } from "@/components";
|
||||||
import { masterStatus } from "@/lib/dummy-data/_master/status";
|
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
||||||
import Investment_StatusBox from "@/screens/Invesment/StatusBox";
|
import Investment_StatusBox from "@/screens/Invesment/StatusBox";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ export default function InvestmentPortofolio() {
|
|||||||
|
|
||||||
const scrollComponent = (
|
const scrollComponent = (
|
||||||
<ScrollableCustom
|
<ScrollableCustom
|
||||||
data={masterStatus.map((e, i) => ({
|
data={dummyMasterStatus.map((e, i) => ({
|
||||||
id: i,
|
id: i,
|
||||||
label: e.label,
|
label: e.label,
|
||||||
value: e.value,
|
value: e.value,
|
||||||
|
|||||||
@@ -6,15 +6,43 @@ import {
|
|||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
|
import { dummyMasterStatusTransaction } from "@/lib/dummy-data/_master/status-transaction";
|
||||||
import { GStyles } from "@/styles/global-styles";
|
import { GStyles } from "@/styles/global-styles";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import { router } from "expo-router";
|
||||||
import { View } from "react-native";
|
import { View } from "react-native";
|
||||||
|
|
||||||
export default function InvestmentTransaction() {
|
export default function InvestmentTransaction() {
|
||||||
|
const randomStatusData = Array.from({ length: 10 }, () => {
|
||||||
|
const randomIndex = Math.floor(
|
||||||
|
Math.random() * dummyMasterStatusTransaction.length
|
||||||
|
);
|
||||||
|
return dummyMasterStatusTransaction[randomIndex];
|
||||||
|
});
|
||||||
|
|
||||||
|
const handlePress = (value: string) => {
|
||||||
|
if (value === "menunggu") {
|
||||||
|
router.push(`/investment/${value}/(transaction-flow)/invoice`);
|
||||||
|
} else if (value === "proses") {
|
||||||
|
router.push(`/investment/${value}/(transaction-flow)/process`);
|
||||||
|
} else if (value === "berhasil") {
|
||||||
|
router.push(`/investment/${value}/(transaction-flow)/success`);
|
||||||
|
} else if (value === "gagal") {
|
||||||
|
router.push(`/investment/${value}/(transaction-flow)/failed`);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ViewWrapper hideFooter>
|
<ViewWrapper hideFooter>
|
||||||
{Array.from({ length: 10 }).map((_, i) => (
|
{randomStatusData.map((item, i) => (
|
||||||
<BaseBox key={i} paddingTop={7} paddingBottom={7}>
|
<BaseBox
|
||||||
|
key={i}
|
||||||
|
paddingTop={7}
|
||||||
|
paddingBottom={7}
|
||||||
|
onPress={() => {
|
||||||
|
handlePress(item.value);
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.Col span={6}>
|
<Grid.Col span={6}>
|
||||||
<StackCustom gap={"xs"}>
|
<StackCustom gap={"xs"}>
|
||||||
@@ -38,10 +66,10 @@ export default function InvestmentTransaction() {
|
|||||||
</TextCustom>
|
</TextCustom>
|
||||||
<BadgeCustom
|
<BadgeCustom
|
||||||
variant="light"
|
variant="light"
|
||||||
color="success"
|
color={item.color}
|
||||||
style={GStyles.alignSelfFlexEnd}
|
style={GStyles.alignSelfFlexEnd}
|
||||||
>
|
>
|
||||||
Berhasil
|
{item.label}
|
||||||
</BadgeCustom>
|
</BadgeCustom>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
import { BaseBox, Grid, Spacing, StackCustom, TextCustom, ViewWrapper } from "@/components";
|
||||||
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { GStyles } from "@/styles/global-styles";
|
||||||
|
import { FontAwesome6 } from "@expo/vector-icons";
|
||||||
|
|
||||||
|
export default function InvestmentFailed() {
|
||||||
|
return (
|
||||||
|
<ViewWrapper>
|
||||||
|
<StackCustom>
|
||||||
|
<BaseBox>
|
||||||
|
<StackCustom>
|
||||||
|
<TextCustom bold align="center">
|
||||||
|
Transaksi anda gagal karena bukti transfer tidak sesuai dengan
|
||||||
|
data kami. Jika ini masalah khusus silahkan hubungi pada kontak
|
||||||
|
whatsapp kami.
|
||||||
|
</TextCustom>
|
||||||
|
|
||||||
|
<FontAwesome6
|
||||||
|
name="whatsapp"
|
||||||
|
size={50}
|
||||||
|
color={MainColor.green}
|
||||||
|
style={GStyles.alignSelfCenter}
|
||||||
|
/>
|
||||||
|
</StackCustom>
|
||||||
|
</BaseBox>
|
||||||
|
|
||||||
|
<BaseBox>
|
||||||
|
<TextCustom bold align="center" size="large">
|
||||||
|
Detail Transaksi
|
||||||
|
</TextCustom>
|
||||||
|
|
||||||
|
<Spacing />
|
||||||
|
|
||||||
|
<StackCustom>
|
||||||
|
{listData.map((item, i) => (
|
||||||
|
<Grid key={i}>
|
||||||
|
<Grid.Col span={5}>
|
||||||
|
<TextCustom bold>{item.label}</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={7}>
|
||||||
|
<TextCustom style={{ paddingLeft: 10 }}>
|
||||||
|
{item.value}
|
||||||
|
</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
))}
|
||||||
|
</StackCustom>
|
||||||
|
</BaseBox>
|
||||||
|
</StackCustom>
|
||||||
|
</ViewWrapper>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const listData = [
|
||||||
|
{
|
||||||
|
label: "Bank",
|
||||||
|
value: " BCA",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Rekening Penerima",
|
||||||
|
value: "Himpunan Pengusaha Muda Indonesia",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "No Rekening",
|
||||||
|
value: "2304235678854332",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Jumlah",
|
||||||
|
value: "Rp. 1.000.000",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Tanggal",
|
||||||
|
value: "2022-01-01",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Lembar Terbeli",
|
||||||
|
value: "100",
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
import {
|
import {
|
||||||
BaseBox,
|
BaseBox,
|
||||||
ButtonCenteredOnly,
|
ButtonCenteredOnly,
|
||||||
ButtonCustom,
|
ButtonCustom,
|
||||||
Grid,
|
Grid,
|
||||||
InformationBox,
|
InformationBox,
|
||||||
Spacing,
|
Spacing,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
|
|
||||||
export default function InvestmentInvoice() {
|
export default function InvestmentInvoice() {
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewWrapper>
|
<ViewWrapper>
|
||||||
@@ -84,19 +84,26 @@ export default function InvestmentInvoice() {
|
|||||||
<BaseBox>
|
<BaseBox>
|
||||||
<StackCustom>
|
<StackCustom>
|
||||||
<TextCustom>Upload bukti transfer anda.</TextCustom>
|
<TextCustom>Upload bukti transfer anda.</TextCustom>
|
||||||
<ButtonCenteredOnly onPress={() => {
|
<ButtonCenteredOnly
|
||||||
router.push("/(application)/(image)/take-picture/123")
|
onPress={() => {
|
||||||
}} icon="upload">
|
router.push("/(application)/(image)/take-picture/123");
|
||||||
|
}}
|
||||||
|
icon="upload"
|
||||||
|
>
|
||||||
Upload
|
Upload
|
||||||
</ButtonCenteredOnly>
|
</ButtonCenteredOnly>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
|
|
||||||
<ButtonCustom onPress={() => {
|
<ButtonCustom
|
||||||
router.push(`/investment/${id}/(transaction-flow)/process`)
|
onPress={() => {
|
||||||
|
router.push(`/investment/${id}/(transaction-flow)/process`);
|
||||||
}}>Saya Sudah Transfer</ButtonCustom>
|
}}
|
||||||
|
>
|
||||||
|
Saya Sudah Transfer
|
||||||
|
</ButtonCustom>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
|
<Spacing/>
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,11 +1,43 @@
|
|||||||
import { BaseBox, TextCustom, ViewWrapper } from "@/components";
|
import {
|
||||||
|
BaseBox,
|
||||||
|
Grid,
|
||||||
|
StackCustom,
|
||||||
|
TextCustom,
|
||||||
|
ViewWrapper,
|
||||||
|
} from "@/components";
|
||||||
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
|
import { ActivityIndicator } from "react-native";
|
||||||
|
|
||||||
export default function InvestmentProcess() {
|
export default function InvestmentProcess() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewWrapper>
|
<ViewWrapper>
|
||||||
<BaseBox>
|
<BaseBox>
|
||||||
<TextCustom align="center">Menunggu Konfirmasi Admin</TextCustom>
|
<StackCustom>
|
||||||
|
<TextCustom align="center" bold>
|
||||||
|
Admin sedang memproses transaksimu
|
||||||
|
</TextCustom>
|
||||||
|
<ActivityIndicator size="large" color={MainColor.yellow} />
|
||||||
|
</StackCustom>
|
||||||
|
</BaseBox>
|
||||||
|
|
||||||
|
<BaseBox>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={10} style={{justifyContent: 'center'}}>
|
||||||
|
<TextCustom size="small">
|
||||||
|
Hubungi admin jika tidak kunjung di proses! Klik pada logo
|
||||||
|
Whatsapp ini.
|
||||||
|
</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={2} style={{alignItems: "flex-end"}}>
|
||||||
|
<Ionicons
|
||||||
|
name="logo-whatsapp"
|
||||||
|
size={50}
|
||||||
|
color={MainColor.green}
|
||||||
|
/>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { BaseBox, BoxButtonOnFooter, ButtonCustom, ViewWrapper } from "@/components";
|
import {
|
||||||
|
BaseBox,
|
||||||
|
BoxButtonOnFooter,
|
||||||
|
ButtonCustom,
|
||||||
|
ViewWrapper,
|
||||||
|
} from "@/components";
|
||||||
import { RadioCustom, RadioGroup } from "@/components/Radio/RadioCustom";
|
import { RadioCustom, RadioGroup } from "@/components/Radio/RadioCustom";
|
||||||
import { dummyMasterBank } from "@/lib/dummy-data/_master/bank";
|
import { dummyMasterBank } from "@/lib/dummy-data/_master/bank";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
@@ -13,7 +18,7 @@ export default function InvestmentSelectBank() {
|
|||||||
<>
|
<>
|
||||||
<BoxButtonOnFooter>
|
<BoxButtonOnFooter>
|
||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
onPress={() => router.push(`/investment/${id}/invoice`)}
|
onPress={() => router.replace(`/investment/${id}/invoice`)}
|
||||||
>
|
>
|
||||||
Pilih
|
Pilih
|
||||||
</ButtonCustom>
|
</ButtonCustom>
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
import {
|
||||||
|
BaseBox,
|
||||||
|
Grid,
|
||||||
|
Spacing,
|
||||||
|
StackCustom,
|
||||||
|
TextCustom,
|
||||||
|
ViewWrapper,
|
||||||
|
} from "@/components";
|
||||||
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { GStyles } from "@/styles/global-styles";
|
||||||
|
import { FontAwesome6 } from "@expo/vector-icons";
|
||||||
|
|
||||||
|
export default function InvestmentSuccess() {
|
||||||
|
return (
|
||||||
|
<ViewWrapper>
|
||||||
|
<StackCustom>
|
||||||
|
<BaseBox>
|
||||||
|
<StackCustom>
|
||||||
|
<FontAwesome6
|
||||||
|
name="money-bill-wave"
|
||||||
|
size={100}
|
||||||
|
color={MainColor.green}
|
||||||
|
style={GStyles.alignSelfCenter}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextCustom bold align="center">
|
||||||
|
Terimakasih telah percaya pada kami untuk mengelola dana anda!
|
||||||
|
Info mengenai update Investasi ini bisa di lihat di kolom berita.
|
||||||
|
</TextCustom>
|
||||||
|
</StackCustom>
|
||||||
|
</BaseBox>
|
||||||
|
|
||||||
|
<BaseBox>
|
||||||
|
<TextCustom bold align="center" size="large">
|
||||||
|
Detail Transaksi
|
||||||
|
</TextCustom>
|
||||||
|
|
||||||
|
<Spacing/>
|
||||||
|
|
||||||
|
|
||||||
|
<StackCustom>
|
||||||
|
{listData.map((item, i) => (
|
||||||
|
<Grid key={i}>
|
||||||
|
<Grid.Col span={5}>
|
||||||
|
<TextCustom bold>{item.label}</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={7}>
|
||||||
|
<TextCustom style={{paddingLeft: 10}}>{item.value}</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
))}
|
||||||
|
</StackCustom>
|
||||||
|
</BaseBox>
|
||||||
|
</StackCustom>
|
||||||
|
</ViewWrapper>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const listData = [
|
||||||
|
{
|
||||||
|
label: "Bank",
|
||||||
|
value: " BCA",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Rekening Penerima",
|
||||||
|
value: "Himpunan Pengusaha Muda Indonesia",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "No Rekening",
|
||||||
|
value: "2304235678854332",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Jumlah",
|
||||||
|
value: "Rp. 1.000.000",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Tanggal",
|
||||||
|
value: "2022-01-01",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Lembar Terbeli",
|
||||||
|
value: "100",
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
BaseBox,
|
BaseBox,
|
||||||
ScrollableCustom,
|
ScrollableCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import { masterStatus } from "@/lib/dummy-data/_master/status";
|
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
||||||
import { jobDataDummy } from "@/screens/Job/listDataDummy";
|
import { jobDataDummy } from "@/screens/Job/listDataDummy";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ export default function JobStatus() {
|
|||||||
|
|
||||||
const scrollComponent = (
|
const scrollComponent = (
|
||||||
<ScrollableCustom
|
<ScrollableCustom
|
||||||
data={masterStatus.map((e, i) => ({
|
data={dummyMasterStatus.map((e, i) => ({
|
||||||
id: i,
|
id: i,
|
||||||
label: e.label,
|
label: e.label,
|
||||||
value: e.value,
|
value: e.value,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import { masterStatus } from "@/lib/dummy-data/_master/status";
|
import { dummyMasterStatus } from "@/lib/dummy-data/_master/status";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ export default function VotingStatus() {
|
|||||||
|
|
||||||
const scrollComponent = (
|
const scrollComponent = (
|
||||||
<ScrollableCustom
|
<ScrollableCustom
|
||||||
data={masterStatus.map((e, i) => ({
|
data={dummyMasterStatus.map((e, i) => ({
|
||||||
id: i,
|
id: i,
|
||||||
label: e.label,
|
label: e.label,
|
||||||
value: e.value,
|
value: e.value,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ type BadgeSize = "xs" | "sm" | "md" | "lg";
|
|||||||
interface BadgeProps extends ViewProps {
|
interface BadgeProps extends ViewProps {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
variant?: BadgeVariant;
|
variant?: BadgeVariant;
|
||||||
color?: BadgeColor;
|
color?: BadgeColor | string;
|
||||||
size?: BadgeSize;
|
size?: BadgeSize;
|
||||||
leftIcon?: React.ReactNode;
|
leftIcon?: React.ReactNode;
|
||||||
rightIcon?: React.ReactNode;
|
rightIcon?: React.ReactNode;
|
||||||
@@ -43,7 +43,8 @@ const BadgeCustom: React.FC<BadgeProps> = ({
|
|||||||
style,
|
style,
|
||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
const colors = {
|
// Daftar warna bawaan
|
||||||
|
const defaultColors = {
|
||||||
primary: "#339AF0",
|
primary: "#339AF0",
|
||||||
success: "#40C057",
|
success: "#40C057",
|
||||||
warning: "#FAB005",
|
warning: "#FAB005",
|
||||||
@@ -52,8 +53,7 @@ const BadgeCustom: React.FC<BadgeProps> = ({
|
|||||||
dark: "#212529",
|
dark: "#212529",
|
||||||
};
|
};
|
||||||
|
|
||||||
const themeColor = colors[color];
|
const themeColor = color in defaultColors ? defaultColors[color as BadgeColor] : color;
|
||||||
|
|
||||||
// Ganti bagian sizeStyles dan styles.container
|
// Ganti bagian sizeStyles dan styles.container
|
||||||
const sizeStyles = {
|
const sizeStyles = {
|
||||||
xs: {
|
xs: {
|
||||||
|
|||||||
8
lib/dummy-data/_master/status-transaction.ts
Normal file
8
lib/dummy-data/_master/status-transaction.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||||
|
|
||||||
|
export const dummyMasterStatusTransaction = [
|
||||||
|
{ value: "berhasil", label: "Berhasil", color: MainColor.green },
|
||||||
|
{ value: "proses", label: "Proses", color: AccentColor.skyblue },
|
||||||
|
{ value: "menunggu", label: "Menunggu", color: MainColor.yellow },
|
||||||
|
{ value: "gagal", label: "Gagal", color: MainColor.red },
|
||||||
|
];
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
export const masterStatus = [
|
export const dummyMasterStatus = [
|
||||||
{ value: "publish", label: "Publish" },
|
{ value: "publish", label: "Publish" },
|
||||||
{ value: "review", label: "Review" },
|
{ value: "review", label: "Review" },
|
||||||
{ value: "draft", label: "Draft" },
|
{ value: "draft", label: "Draft" },
|
||||||
|
|||||||
Reference in New Issue
Block a user