Browse Source

Merge branch 'staging' of https://git.oslog.id/ordo/adw-frontend into dev-wahyun

pull/2/head
wahyuun 1 year ago
parent
commit
12406ef8b8
  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 !== ""
) {
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)

Loading…
Cancel
Save