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:
@@ -3,7 +3,7 @@ import {
|
||||
apiInvestmentDelete,
|
||||
apiInvestmentUpdateStatus,
|
||||
} from "@/service/api-client/api-investment";
|
||||
import { deleteImageService } from "@/service/upload-service";
|
||||
import { deleteFileService } from "@/service/upload-service";
|
||||
import { router } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import Toast from "react-native-toast-message";
|
||||
@@ -138,7 +138,7 @@ export default function Investment_ButtonStatusSection({
|
||||
|
||||
console.log("[RESPONSE]", JSON.stringify(response, null, 2));
|
||||
if (response.success) {
|
||||
const deleteImage = await deleteImageService({
|
||||
const deleteImage = await deleteFileService({
|
||||
id: response?.data?.imageId as string,
|
||||
});
|
||||
|
||||
@@ -150,7 +150,7 @@ export default function Investment_ButtonStatusSection({
|
||||
return;
|
||||
}
|
||||
|
||||
const deleteFile = await deleteImageService({
|
||||
const deleteFile = await deleteFileService({
|
||||
id: response?.data?.prospektusFileId as string,
|
||||
});
|
||||
|
||||
|
||||
@@ -11,11 +11,14 @@ import { Ionicons } from "@expo/vector-icons";
|
||||
|
||||
export default function Invesment_ComponentBoxOnBottomDetail({
|
||||
id,
|
||||
prospectusId,
|
||||
status,
|
||||
}: {
|
||||
id: string;
|
||||
prospectusId: string;
|
||||
status: string;
|
||||
}) {
|
||||
|
||||
return (
|
||||
<>
|
||||
{status === "publish" ? (
|
||||
@@ -94,7 +97,7 @@ export default function Invesment_ComponentBoxOnBottomDetail({
|
||||
<BaseBox
|
||||
backgroundColor={AccentColor.blue}
|
||||
style={{ borderColor: AccentColor.softblue, borderWidth: 1 }}
|
||||
href={`/(file)/${id}`}
|
||||
href={`/(file)/${prospectusId}`}
|
||||
>
|
||||
<StackCustom>
|
||||
<TextCustom align="center">Prospektus</TextCustom>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { BoxButtonOnFooter, ButtonCustom } from "@/components";
|
||||
import DIRECTORY_ID from "@/constants/directory-id";
|
||||
import { apiPortofolioCreate } from "@/service/api-client/api-portofolio";
|
||||
import { uploadImageService } from "@/service/upload-service";
|
||||
import { uploadFileService } from "@/service/upload-service";
|
||||
import { router } from "expo-router";
|
||||
import Toast from "react-native-toast-message";
|
||||
|
||||
@@ -72,7 +72,7 @@ export default function Portofolio_ButtonCreate({
|
||||
setIsLoadingCreate(true);
|
||||
let fileId = "";
|
||||
if (imageUri) {
|
||||
const response = await uploadImageService({
|
||||
const response = await uploadFileService({
|
||||
imageUri: imageUri,
|
||||
dirId: DIRECTORY_ID.portofolio_logo,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user