Compare commits

..

No commits in common. 'd39f415a5b832472dc87efef93168419383077e8' and '968c0fee11ac6095b49094c8c24a3f49a260bc7a' have entirely different histories.

  1. 40
      src/views/Dashboard/DashboardBOD.js
  2. 9
      src/views/SimproV2/CreatedProyek/ViewProject.js
  3. 14
      src/views/SimproV2/CreatedProyek/index.js

40
src/views/Dashboard/DashboardBOD.js

@ -61,7 +61,7 @@ const DashboardBOD = (props) => {
const [READY_TABLE_DETAIL_EXPENDITURE, SET_READY_TABLE_DETAIL_EXPENDITURE] = useState(false); const [READY_TABLE_DETAIL_EXPENDITURE, SET_READY_TABLE_DETAIL_EXPENDITURE] = useState(false);
const [DATA_DETAIL_EXPENDITURE, SET_DATA_DETAIL_EXPENDITURE] = useState([]); const [DATA_DETAIL_EXPENDITURE, SET_DATA_DETAIL_EXPENDITURE] = useState([]);
useEffect(() => { useEffect(() => {
// actualProgressProject(); actualProgressProject();
getCompanyCashFlow(); // expenditure getCompanyCashFlow(); // expenditure
getCompanyExpenditureColor(); // expenditure Color getCompanyExpenditureColor(); // expenditure Color
getCompanyFinancialHealthColor(); // financial health Color getCompanyFinancialHealthColor(); // financial health Color
@ -472,34 +472,7 @@ const DashboardBOD = (props) => {
y: { y: {
ticks: { ticks: {
autoSkip: false, autoSkip: false,
stepSize: 2, stepSize: 2
maxRotation: 0,
minRotation: 0,
callback: function (value) {
const label = this.getLabelForValue(value);
const maxLength = 30;
const splitLabel = (label) => {
if (label.length <= maxLength) {
return [label];
}
const words = label.split(' ');
let lines = [];
let currentLine = '';
words.forEach((word) => {
if (currentLine.length + word.length + 1 <= maxLength) {
currentLine += word + ' ';
} else {
lines.push(currentLine.trim());
currentLine = word + ' ';
}
});
if (currentLine.length > 0) {
lines.push(currentLine.trim());
}
return lines;
};
return splitLabel(label);
},
} }
} }
}, },
@ -520,8 +493,8 @@ const DashboardBOD = (props) => {
data={{ data={{
labels: [ labels: [
`Target Pendapatan ${moment().format('YYYY')}`, `Target Pendapatan ${moment().format('YYYY')}`,
'Total Nilai Kontrak Yang Sedang Berjalan', 'Income Year',
'Target Pendapatan Berdasarkan Kontrak 2024' 'Total Nilai Proyek',
// 'Anggaran Biaya', // 'Anggaran Biaya',
// 'Realisasi Anggaran Biaya', // 'Realisasi Anggaran Biaya',
// 'Laba' // 'Laba'
@ -537,8 +510,8 @@ const DashboardBOD = (props) => {
// PROJECT_EXPENDITURE?.total_paid_invoice || 0, // PROJECT_EXPENDITURE?.total_paid_invoice || 0,
// PROJECT_EXPENDITURE?.total_paid_invoice || 0 // PROJECT_EXPENDITURE?.total_paid_invoice || 0
98000000000, 98000000000,
PROJECT_EXPENDITURE?.total_value_proyek || 0, PROJECT_EXPENDITURE?.total_income_year || 0,
PROJECT_EXPENDITURE?.total_income_year || 0 PROJECT_EXPENDITURE?.total_value_proyek || 0
], ],
borderColor: [ borderColor: [
PROJECT_EXPENDITURE_COLOR?.total_budget || '#480ca8', PROJECT_EXPENDITURE_COLOR?.total_budget || '#480ca8',
@ -562,6 +535,7 @@ const DashboardBOD = (props) => {
], ],
}} }}
/> />
: :
<NoDataChart /> <NoDataChart />
: :

9
src/views/SimproV2/CreatedProyek/ViewProject.js

@ -25,7 +25,6 @@ const ViewProject = ({ idTask, openDialog, closeDialog, toggleDialog, projectCha
const [durasi, setDurasiProyek] = useState("") const [durasi, setDurasiProyek] = useState("")
const [mulaiProyek, setMulaiProyek] = useState("") const [mulaiProyek, setMulaiProyek] = useState("")
const [valueProyek, setValueProyek] = useState("") const [valueProyek, setValueProyek] = useState("")
const [incomeYearly, setIncomeYearly] = useState("")
const [scoupeProyek, setScoupeProyek] = useState("") const [scoupeProyek, setScoupeProyek] = useState("")
const [sponsorProyek, setSponsorProyek] = useState("") const [sponsorProyek, setSponsorProyek] = useState("")
const [lateProyek, setLateConsequenceProyek] = useState("") const [lateProyek, setLateConsequenceProyek] = useState("")
@ -68,7 +67,6 @@ const ViewProject = ({ idTask, openDialog, closeDialog, toggleDialog, projectCha
setDurasiProyek("") setDurasiProyek("")
setMulaiProyek("") setMulaiProyek("")
setValueProyek("") setValueProyek("")
setIncomeYearly("")
setScoupeProyek("") setScoupeProyek("")
setSponsorProyek("") setSponsorProyek("")
setLateConsequenceProyek("") setLateConsequenceProyek("")
@ -101,7 +99,6 @@ const ViewProject = ({ idTask, openDialog, closeDialog, toggleDialog, projectCha
setDurasiProyek(projectCharter.durasi_proyek); setDurasiProyek(projectCharter.durasi_proyek);
setMulaiProyek(projectCharter.mulai_proyek); setMulaiProyek(projectCharter.mulai_proyek);
setValueProyek(projectCharter.value_proyek); setValueProyek(projectCharter.value_proyek);
setIncomeYearly(projectCharter.income_year);
setScoupeProyek(projectCharter.scoupe_of_work); setScoupeProyek(projectCharter.scoupe_of_work);
setSponsorProyek(projectCharter.nama_divisi); setSponsorProyek(projectCharter.nama_divisi);
setLateConsequenceProyek(projectCharter.late_consequence); setLateConsequenceProyek(projectCharter.late_consequence);
@ -497,7 +494,7 @@ const ViewProject = ({ idTask, openDialog, closeDialog, toggleDialog, projectCha
<p style={pStyle}>Nilai Kontrak</p> <p style={pStyle}>Nilai Kontrak</p>
</td> </td>
<td colSpan="2" style={tdStyle}> <td colSpan="2" style={tdStyle}>
<p>&nbsp;{currency}. {formatThousand(budget)}</p> <p style={{ ...pStyle, fontWeight: 'normal' }}>{currency}. {formatThousand(budget)}</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -505,7 +502,7 @@ const ViewProject = ({ idTask, openDialog, closeDialog, toggleDialog, projectCha
<p style={pStyle}>Pendapatan Pertahun</p> <p style={pStyle}>Pendapatan Pertahun</p>
</td> </td>
<td colSpan="2" style={tdStyle}> <td colSpan="2" style={tdStyle}>
<p>&nbsp;{currency}. {formatThousand(incomeYearly) ?? '-'}</p> <p>&nbsp;{valueProyek ?? '-'}</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -513,7 +510,7 @@ const ViewProject = ({ idTask, openDialog, closeDialog, toggleDialog, projectCha
<p style={pStyle}>Anggaran Biaya</p> <p style={pStyle}>Anggaran Biaya</p>
</td> </td>
<td colSpan="2" style={tdStyle}> <td colSpan="2" style={tdStyle}>
<p>&nbsp;{currency}. {formatThousand(valueProyek) ?? '-'}</p> <p>&nbsp;{valueProyek ?? '-'}</p>
</td> </td>
</tr> </tr>
<tr> <tr>

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

@ -671,8 +671,8 @@ const CreatedProyek = ({ params, ...props }) => {
.catch((error) => error.response); .catch((error) => error.response);
if (result && result.data && result.data.code == 200) { if (result && result.data && result.data.code == 200) {
const { value_proyek, area_kerja, scoupe_of_work, kode_sortname, nama, mulai_proyek, rencana_biaya, keterangan, durasi_proyek, project_objectives, potential_risk, currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when, income_year } = result.data.data; const { value_proyek, area_kerja, scoupe_of_work, kode_sortname, nama, mulai_proyek, rencana_biaya, keterangan, durasi_proyek, project_objectives, potential_risk, currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when } = result.data.data;
const dataToSend = { value_proyek, area_kerja, scoupe_of_work, kode_sortname, nama, mulai_proyek, rencana_biaya, keterangan, durasi_proyek, project_objectives, potential_risk, currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when, income_year }; const dataToSend = { value_proyek, area_kerja, scoupe_of_work, kode_sortname, nama, mulai_proyek, rencana_biaya, keterangan, durasi_proyek, project_objectives, potential_risk, currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when };
setProjectCharter(dataToSend); setProjectCharter(dataToSend);
} else { } else {
NotificationManager.error("Gagal Mengambil Data!!", "Failed"); NotificationManager.error("Gagal Mengambil Data!!", "Failed");
@ -1476,11 +1476,11 @@ const CreatedProyek = ({ params, ...props }) => {
const data = resData.map((elt) => [ const data = resData.map((elt) => [
elt.nama, elt.nama,
`Rp. ${formatThousand(elt.rencana_biaya)}`, `Rp. ${formatThousand(elt.rencana_biaya)}`,
`Rp. ${formatThousand(elt.income_year)}`,
`Rp. ${formatThousand(elt.value_proyek)}`,
elt.join_second_name, elt.join_second_name,
elt.join_first_name, elt.join_first_name,
`${moment(elt.mulai_proyek).format(format)} - ${moment(elt.akhir_proyek).format(format)}`, `${moment(elt.mulai_proyek).format(format)} - ${moment(
elt.akhir_proyek
).format(format)}`,
]); ]);
// Or use javascript directly: // Or use javascript directly:
doc.text(4, 15, "Project Charter"); doc.text(4, 15, "Project Charter");
@ -1741,7 +1741,7 @@ const CreatedProyek = ({ params, ...props }) => {
}, },
}, },
{ {
title: "Anggaran Biaya", dataIndex: "value_proyek", title: "Nilai Kontrak", dataIndex: "value_proyek",
key: "value_proyek", key: "value_proyek",
render: (text, record) => { render: (text, record) => {
const valueProyek = text ?? '-'; const valueProyek = text ?? '-';
@ -1751,7 +1751,7 @@ const CreatedProyek = ({ params, ...props }) => {
}, },
}, },
{ {
title: "Nilai Kontrak", title: "Anggaran Biaya",
dataIndex: "rencana_biaya", dataIndex: "rencana_biaya",
key: "rencana_biaya", key: "rencana_biaya",
render: (text, record) => { render: (text, record) => {

Loading…
Cancel
Save