Browse Source

Merge pull request 'dev-wahyu' (#157) from dev-wahyu into staging

Reviewed-on: ordo/adw-frontend#157
pull/1/head
farhantock 11 months ago
parent
commit
d26ba2ae14
  1. 4
      src/views/Dashboard/DashboardProject.js
  2. 1
      src/views/SimproV2/CreatedProyek/DialogFormAnalysis.js
  3. 34
      src/views/SimproV2/CreatedProyek/ReportAnalysis.js

4
src/views/Dashboard/DashboardProject.js

@ -1465,10 +1465,10 @@ const DashboardProject = () => {
{isReadySCurve ? ( {isReadySCurve ? (
<ProgressActualBar <ProgressActualBar
progress={ progress={
planningProgress > 100 planningProgress > 100 || actualProgress > 100
? parseFloat( ? parseFloat(
(actualProgress / planningProgress) * 100 (actualProgress / planningProgress) * 100
).toFixed(2) ).toFixed(0)
: actualProgress : actualProgress
} }
/> />

1
src/views/SimproV2/CreatedProyek/DialogFormAnalysis.js

@ -39,6 +39,7 @@ const DialogFormAnalysis = ({
] ]
const getReportActivityMaterial = async () => { const getReportActivityMaterial = async () => {
setDatatable([]);
const payload = { const payload = {
columns: [ columns: [
{ {

34
src/views/SimproV2/CreatedProyek/ReportAnalysis.js

@ -58,19 +58,40 @@ const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog, projectId }) =>
{title: "Activity", dataIndex: "name", key: "name"}, {title: "Activity", dataIndex: "name", key: "name"},
{title: "Gantt", dataIndex: "name_version", key: "name_version"}, {title: "Gantt", dataIndex: "name_version", key: "name_version"},
{title: "Assign HR", dataIndex: "user_name", key: "user_name"}, {title: "Assign HR", dataIndex: "user_name", key: "user_name"},
{title: "Volume Plan", dataIndex: "qty_planning", key: "qty_planning",
render: (text, record) =>
<>
{text ? text : 0}
</>
},
{title: "Volume Actual", dataIndex: "qty", key: "qty"},
{title: "Progress (%)", dataIndex: "persentase_progress", key: "persentase_progress"}, {title: "Progress (%)", dataIndex: "persentase_progress", key: "persentase_progress"},
{
title: 'Action',
dataIndex: '',
key: 'id',
className: "nowrap",
render: (text, record) =>
<>
<Tooltip title="Detail Activity">
<Button size={"sm"} color='primary' onClick={() => handleDetail(text)}><i className="fa fa-eye"></i></Button>
</Tooltip>{" "}
</>
,
},
] ]
const columnActivityToHr = [ const columnActivityToHr = [
{title: "Activity", dataIndex: "join_second_name", key: "join_second_name"}, {title: "Activity", dataIndex: "join_second_name", key: "join_second_name"},
{title: "Gantt", dataIndex: "join_fourth_name_version", key: "join_fourth_name_version"}, {title: "Gantt", dataIndex: "join_fourth_name_version", key: "join_fourth_name_version"},
{title: "Assign HR", dataIndex: "join_first_name", key: "join_first_name"}, {title: "Assign HR", dataIndex: "join_first_name", key: "join_first_name"},
{title: "Material Plan", dataIndex: "join_third_qty_planning", key: "join_third_qty_planning", {title: "Volume Plan", dataIndex: "join_third_qty_planning", key: "join_third_qty_planning",
render: (text, record) => render: (text, record) =>
<> <>
{text ? text : 0} {text ? text : 0}
</> </>
}, },
{title: "Volume Actual", dataIndex: "volume_actual", key: "volume_actual"},
{title: "Progress (%)", dataIndex: "join_second_persentase_progress", key: "persentase_progress"}, {title: "Progress (%)", dataIndex: "join_second_persentase_progress", key: "persentase_progress"},
{ {
title: 'Action', title: 'Action',
@ -182,6 +203,7 @@ const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog, projectId }) =>
} }
const getDataActivityToHr = async () => { const getDataActivityToHr = async () => {
setAvgActivityHr(0); setAvgActivityHr(0);
setDataTableActivityToHr([]);
let sum = 0; let sum = 0;
const payload = { const payload = {
columns: [ columns: [
@ -199,6 +221,9 @@ const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog, projectId }) =>
operator: "AND", operator: "AND",
} }
], ],
select: [
'id'
],
joins: [ joins: [
{ {
name: "m_users", name: "m_users",
@ -224,6 +249,12 @@ const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog, projectId }) =>
column_self:"id", column_self:"id",
column_results: ["name_version"] column_results: ["name_version"]
}, },
{
name1: "m_activity",
name: "report_activity_material",
column_join: "id",
column_self:"activity_id",
},
], ],
orders: { columns: ["id"], ascending: false }, orders: { columns: ["id"], ascending: false },
paging: { start: 0, length: -1 }, paging: { start: 0, length: -1 },
@ -275,6 +306,7 @@ const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog, projectId }) =>
const getDataActivity = async () => { const getDataActivity = async () => {
setAvgActivity(0); setAvgActivity(0);
setDatatable([]);
let sum = 0; let sum = 0;
const payload = { const payload = {
columns: [ columns: [

Loading…
Cancel
Save