Fix notifikasi
Deskripsi: - Fix notifikasi investasi
This commit is contained in:
@@ -60,15 +60,26 @@ export async function adminInvestasi_funAcceptTransaksiById({
|
||||
lembarTerbeli: resultLembarTerbeli.toString(),
|
||||
progress: resultProgres,
|
||||
},
|
||||
include: {
|
||||
MasterStatusInvestasi: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!updateInvestasi)
|
||||
return { status: 400, message: "Gagal Update Data Investasi" };
|
||||
|
||||
const newData = updateInvestasi;
|
||||
|
||||
const allData = {
|
||||
dataInvestasi: updateInvestasi,
|
||||
dataInvestor: updt,
|
||||
};
|
||||
|
||||
revalidatePath(RouterAdminInvestasi.detail_publish);
|
||||
return {
|
||||
status: 200,
|
||||
message: "Update Berhasil",
|
||||
data: allData,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,6 @@ export async function adminInvestasi_funRejectInvoiceById({
|
||||
}: {
|
||||
invoiceId: string;
|
||||
}) {
|
||||
|
||||
|
||||
|
||||
const updt = await prisma.investasi_Invoice.update({
|
||||
where: {
|
||||
id: invoiceId,
|
||||
@@ -19,12 +16,19 @@ export async function adminInvestasi_funRejectInvoiceById({
|
||||
data: {
|
||||
statusInvoiceId: "4",
|
||||
},
|
||||
select: {
|
||||
StatusInvoice: true,
|
||||
authorId: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!updt) return { status: 400, message: "Gagal Update" };
|
||||
if (!updt)
|
||||
return { status: 400, message: "Gagal Melakukan Reject", statusName: "" , userId: ""};
|
||||
revalidatePath(RouterAdminInvestasi.detail_publish);
|
||||
return {
|
||||
status: 200,
|
||||
message: "Update Berhasil",
|
||||
message: "Reject Berhasil",
|
||||
statusName: updt.StatusInvoice?.name,
|
||||
userId: updt.authorId,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user