Browse Source

fix(project information): update header table & add Nilai Kontrak

pull/1/head
Watiah11 8 months ago
parent
commit
3ec6759f96
  1. 27
      src/views/SimproV2/CreatedProyek/index.js

27
src/views/SimproV2/CreatedProyek/index.js

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

Loading…
Cancel
Save