Invesment

Fix:
- tampilan dokumen dan file prospektus
- create & edit dokumen
- list rekap dokumen dan tampilan ( untuk non author )

### No Issue
This commit is contained in:
2025-10-01 14:40:50 +08:00
parent 5f05d1f7f0
commit 250b216a54
7 changed files with 403 additions and 90 deletions

View File

@@ -3,7 +3,6 @@ import {
apiInvestmentDelete,
apiInvestmentUpdateStatus,
} from "@/service/api-client/api-investment";
import { deleteFileService } from "@/service/upload-service";
import { router } from "expo-router";
import { useState } from "react";
import Toast from "react-native-toast-message";
@@ -136,36 +135,14 @@ export default function Investment_ButtonStatusSection({
id: id as string,
});
console.log("[RESPONSE]", JSON.stringify(response, null, 2));
console.log("[RESPONSE DELETE]", JSON.stringify(response, null, 2));
if (response.success) {
const deleteImage = await deleteFileService({
id: response?.data?.imageId as string,
});
if (!deleteImage.success) {
Toast.show({
type: "error",
text1: "Gagal Hapus Data",
});
return;
}
const deleteFile = await deleteFileService({
id: response?.data?.prospektusFileId as string,
});
if (!deleteFile.success) {
Toast.show({
type: "error",
text1: "Gagal Hapus Data",
});
return;
}
Toast.show({
type: "success",
text1: "Berhasil Hapus Data",
});
router.back();
} else {
Toast.show({