|
|
|
@ -415,6 +415,7 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
"akhir_proyek", |
|
|
|
|
"company_id", |
|
|
|
|
"deleted_at", |
|
|
|
|
"value_proyek", |
|
|
|
|
"deleted_by_id" |
|
|
|
|
], |
|
|
|
|
joins: [ |
|
|
|
@ -712,6 +713,7 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
|
|
|
|
|
const handleOpenReport = async (data) => { |
|
|
|
|
setOpenDialogRA(true); |
|
|
|
|
setProyekName(data.nama); |
|
|
|
|
setProjectId(data.id); |
|
|
|
|
} |
|
|
|
|
const handleCloseReport = async (data) => { |
|
|
|
@ -1420,13 +1422,12 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
orders: { columns: ["id"], ascending: false }, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
if (all_project !== null && all_project === true) { |
|
|
|
|
if (role_name !== 'Super Admin' && all_project === 'true') { |
|
|
|
|
payload.columns.push( |
|
|
|
|
{ name: "company_id", logic_operator: "like", value: company_id, operator: "AND" } |
|
|
|
|
{ name: "company_id", logic_operator: "like", value: parseInt(company_id), operator: "AND" } |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (role_name !== 'Super Admin') { |
|
|
|
|
if (role_name !== 'Super Admin' && all_project === 'false' || role_name !== 'Super Admin' && all_project === 'null') { |
|
|
|
|
payload.columns.push( |
|
|
|
|
{ name: "created_by_id", logic_operator: "IN", value: [JSON.parse(hierarchy)], operator: "AND" } |
|
|
|
|
); |
|
|
|
@ -1536,12 +1537,12 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
orders: { columns: ["nama"], ascending: true }, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
if (all_project !== null && all_project === true) { |
|
|
|
|
if (role_name !== 'Super Admin' && all_project === 'true') { |
|
|
|
|
payload.columns.push( |
|
|
|
|
{ name: "company_id", logic_operator: "like", value: company_id, operator: "AND" } |
|
|
|
|
{ name: "company_id", logic_operator: "like", value: parseInt(company_id), operator: "AND" } |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
if (role_name !== 'Super Admin') { |
|
|
|
|
if (role_name !== 'Super Admin' && all_project === 'false' || role_name !== 'Super Admin' && all_project === 'null') { |
|
|
|
|
payload.columns.push( |
|
|
|
|
{ name: "created_by_id", logic_operator: "IN", value: [JSON.parse(hierarchy)], operator: "AND" } |
|
|
|
|
); |
|
|
|
@ -1828,7 +1829,15 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
}] : []), |
|
|
|
|
{ title: "Project Name", dataIndex: "nama", key: "nama" }, |
|
|
|
|
{ |
|
|
|
|
title: "Budget", |
|
|
|
|
title: "Nilai Kontrak", |
|
|
|
|
dataIndex: "value_proyek", |
|
|
|
|
key: "value_proyek", |
|
|
|
|
render: (text, record) => { |
|
|
|
|
return "Rp " + (record.value_proyek == null ? 0 : record.value_proyek); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "Anggaran Biaya", |
|
|
|
|
dataIndex: "rencana_biaya", |
|
|
|
|
key: "rencana_biaya", |
|
|
|
|
render: (text, record) => { |
|
|
|
@ -2039,6 +2048,7 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
idTask={idTask} |
|
|
|
|
proyekName={proyekName} |
|
|
|
|
dataK3={dataK3} |
|
|
|
|
token={token} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
[openDialogAssignK3, dataK3] |
|
|
|
@ -2091,6 +2101,7 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
closeDialog={handleCloseReport} |
|
|
|
|
toggleDialog={toggleAddDialogRA} |
|
|
|
|
projectId={projectId} |
|
|
|
|
proyekName={proyekName} |
|
|
|
|
/> |
|
|
|
|
), |
|
|
|
|
[openDialogRA] |
|
|
|
|