diff --git a/src/views/Dashboard/DashboardProject.js b/src/views/Dashboard/DashboardProject.js index ebc5bfd..4acf02a 100644 --- a/src/views/Dashboard/DashboardProject.js +++ b/src/views/Dashboard/DashboardProject.js @@ -345,7 +345,11 @@ const DashboardProject = () => { result.data.data.kode_sortname && result.data.data.kode_sortname !== "" ) { - getIntegrationInvoice(result.data.data.kode_sortname); + if (SCURVE) { + getIntegrationInvoice(result.data.data.kode_sortname, result.data.data.id); + } else { + getIntegrationInvoice(result.data.data.kode_sortname, result.data.data.id, GANTT_ID); + } } } }; @@ -490,12 +494,16 @@ const DashboardProject = () => { } }; - const getIntegrationInvoice = async (kode_sortname) => { + const getIntegrationInvoice = async (kode_sortname, id, gantt_id = null) => { setIsReadyIntegrationInvoice(false); const URL = `${BASE_OSPRO}/api/project/get-integration-invoice`; - const payload = { + let payload = { search: kode_sortname, + id: id }; + if (gantt_id) { + payload.gantt_id = gantt_id; + } const result = await axios .post(URL, payload, HEADER) .then((res) => res)