fix ( upload image )

deksripsi:
- fix upload image investasi dan file prospektus
This commit is contained in:
2025-01-15 10:25:41 +08:00
parent d0680f2743
commit 1855b6df32
24 changed files with 725 additions and 859 deletions

View File

@@ -3,6 +3,7 @@ import { MainColor } from "@/app_modules/_global/color/color_pallet";
import {
ComponentGlobal_BoxInformation,
ComponentGlobal_BoxUploadImage,
ComponentGlobal_ButtonUploadFileImage,
ComponentGlobal_CardStyles,
} from "@/app_modules/_global/component";
import { MAX_SIZE } from "@/app_modules/_global/lib";
@@ -131,7 +132,7 @@ export default function InvestasiCreateNew() {
{/* Upload Image */}
<Stack spacing={0}>
<Box mb={"sm"}>
<ComponentGlobal_BoxInformation informasi="Gambar investasi bisa berupa ilustrasi, poster atau foto terkait investasi" />
<ComponentGlobal_BoxInformation informasi="Gambar investasi bisa berupa ilustrasi, poster atau foto terkait investasi." />
</Box>
<ComponentGlobal_BoxUploadImage>
{isLoadingImg ? (
@@ -155,7 +156,13 @@ export default function InvestasiCreateNew() {
</ComponentGlobal_BoxUploadImage>
{/* Upload Foto */}
<Group position="center">
<Center>
<ComponentGlobal_ButtonUploadFileImage
onSetFile={setFileImage}
onSetImage={setImg}
/>
</Center>
{/* <Group position="center">
<FileButton
onChange={async (files: any) => {
try {
@@ -196,12 +203,12 @@ export default function InvestasiCreateNew() {
</Button>
)}
</FileButton>
</Group>
</Group> */}
</Stack>
{/* Upload File */}
<Stack spacing={"sm"}>
<ComponentGlobal_BoxInformation informasi="File prospektus wajib untuk diupload, agar calon investor paham dengan prospek investasi yang akan anda jalankan kedepan !" />
<ComponentGlobal_BoxInformation informasi="File prospektus wajib untuk diupload, agar calon investor paham dengan prospek investasi yang akan anda jalankan kedepannya." />
<ComponentGlobal_CardStyles marginBottom={"0px"}>
{isLoadingPdf ? (
<Stack justify="center" align="center" h={"100%"}>
@@ -228,7 +235,16 @@ export default function InvestasiCreateNew() {
)}
</ComponentGlobal_CardStyles>
<Group position="center">
<Center>
<ComponentGlobal_ButtonUploadFileImage
onSetFile={setFilePdf}
onSetImage={setFPdf}
accept={"application/pdf"}
text="Upload File"
icon={<IconFileTypePdf size={20} />}
/>
</Center>
{/* <Group position="center">
<FileButton
accept={"application/pdf"}
onChange={async (files: any) => {
@@ -269,7 +285,7 @@ export default function InvestasiCreateNew() {
</Button>
)}
</FileButton>
</Group>
</Group> */}
</Stack>
<Stack>
@@ -283,7 +299,7 @@ export default function InvestasiCreateNew() {
},
input: {
backgroundColor: MainColor.white,
}
},
}}
withAsterisk
label="Judul Investasi"
@@ -307,7 +323,7 @@ export default function InvestasiCreateNew() {
},
input: {
backgroundColor: MainColor.white,
}
},
}}
icon={<Text fw={"bold"}>Rp.</Text>}
min={0}
@@ -350,7 +366,7 @@ export default function InvestasiCreateNew() {
},
input: {
backgroundColor: MainColor.white,
}
},
}}
icon={<Text fw={"bold"}>Rp.</Text>}
min={0}
@@ -403,7 +419,7 @@ export default function InvestasiCreateNew() {
},
input: {
backgroundColor: MainColor.white,
}
},
}}
/>
@@ -417,7 +433,7 @@ export default function InvestasiCreateNew() {
},
input: {
backgroundColor: MainColor.white,
}
},
}}
rightSection={
<Text fw={"bold"} c={"gray"}>