Browse Source

Merge pull request 'prorate total cost for gantt' (#127) from dev-wahyu into staging

Reviewed-on: ordo/adw-frontend#127
pull/2/head
ibnu 1 year ago
parent
commit
39008bcf66
  1. 14
      src/views/Dashboard/DashboardProject.js

14
src/views/Dashboard/DashboardProject.js

@ -345,7 +345,11 @@ const DashboardProject = () => {
result.data.data.kode_sortname && result.data.data.kode_sortname &&
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); setIsReadyIntegrationInvoice(false);
const URL = `${BASE_OSPRO}/api/project/get-integration-invoice`; const URL = `${BASE_OSPRO}/api/project/get-integration-invoice`;
const payload = { let payload = {
search: kode_sortname, search: kode_sortname,
id: id
}; };
if (gantt_id) {
payload.gantt_id = gantt_id;
}
const result = await axios const result = await axios
.post(URL, payload, HEADER) .post(URL, payload, HEADER)
.then((res) => res) .then((res) => res)

Loading…
Cancel
Save