Component

Fix: fix nama upload dan delete file service

Invesment:
Fix:
- Edit data dan edit prospektus
- View file dengan metode react-native-webview

### No issue
This commit is contained in:
2025-09-30 17:30:07 +08:00
parent 3d8d8568a3
commit 5f05d1f7f0
21 changed files with 292 additions and 113 deletions

View File

@@ -44,7 +44,7 @@ export async function apiInvestmentUpdateStatus({
id: string;
status: "publish" | "draft" | "review" | "reject";
}) {
console.log("[DATA FETCH]", JSON.stringify({ id, status }, null, 2));
try {
const response = await apiConfig.put(`/mobile/investment/${id}/${status}`);
return response.data;
@@ -65,12 +65,15 @@ export async function apiInvestmentDelete({ id }: { id: string }) {
export async function apiInvestmentUpdateData({
id,
data,
category,
}: {
id: string;
data: any;
category: "data" | "prospectus";
}) {
try {
const response = await apiConfig.put(`/mobile/investment/${id}`, {
const response = await apiConfig.put(`/mobile/investment/${id}?category=${category}`, {
data: data,
});
return response.data;