Browse Source

Merge pull request 'dev-wahyun' (#129) from dev-wahyun into staging

Reviewed-on: ordo/adw-frontend#129
pull/2/head
ibnu 1 year ago
parent
commit
1ef34d990a
  1. 6
      src/views/SimproV2/CreatedProyek/DialogGantt.js
  2. 6
      src/views/SimproV2/CreatedProyek/DialogHierarchy.js
  3. 4
      src/views/SimproV2/CreatedProyek/index.js

6
src/views/SimproV2/CreatedProyek/DialogGantt.js

@ -74,14 +74,16 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName
"select": ["id", "name_version", "calculation_type", "description", "created_at", "progress"],
"columns": [
{ "name": "hierarchy_ftth_id", "logic_operator": "=", "value": hierarchyId, "operator": "AND" }
]
],
"orders": { "columns": ["name_version"], "ascending": true }
}
} else {
payload = {
"select": ["id", "name_version", "calculation_type", "description", "created_at", "progress"],
"columns": [
{ "name": "proyek_id", "logic_operator": "=", "value": idTask, "operator": "AND" }
]
],
"orders": { "columns": ["name_version"], "ascending": true },
}
}
const result = await axios

6
src/views/SimproV2/CreatedProyek/DialogHierarchy.js

@ -16,6 +16,7 @@ import { useTranslation } from 'react-i18next';
import { async } from '@dabeng/react-orgchart';
import { Link } from 'react-router-dom';
import { use } from 'i18next';
import _ from 'lodash';
const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName }) => {
const token = localStorage.getItem("token")
const HEADER = {
@ -154,7 +155,8 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek
.catch((error) => error.response);
if (result && result.status == 200) {
setDataHierarchy(result.data.data);
const sortedData = _.orderBy(result.data.data, ['name'], ['asc']);
setDataHierarchy(sortedData);
} else {
NotificationManager.error(`Data gantt project gagal terload silahkan coba lagi!`, 'Failed!!');
}
@ -340,4 +342,4 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek
}
export default DialogHierarchy;
export default DialogHierarchy;

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

@ -325,7 +325,7 @@ const CreatedProyek = ({ params, ...props }) => {
},
// { "name": "subproyeks.m_subproyek", "column_join": "parent_id", "column_results": ["nama", "biaya", "color_progress", "jumlah_pekerja", "pic", "mulai_proyek", "akhir_proyek", "biaya_actual", "persentase_progress_plan", "persentase_progress_actual"] }
],
orders: { columns: ["id"], ascending: false },
orders: { columns: ["nama"], ascending: true },
paging: { start: start, length: rowsPerPage },
};
@ -1356,7 +1356,7 @@ const CreatedProyek = ({ params, ...props }) => {
},
// { "name": "subproyeks.m_subproyek", "column_join": "parent_id", "column_results": ["nama", "biaya", "color_progress", "jumlah_pekerja", "pic", "mulai_proyek", "akhir_proyek", "biaya_actual", "persentase_progress_plan", "persentase_progress_actual"] }
],
orders: { columns: ["id"], ascending: false },
orders: { columns: ["nama"], ascending: true },
};
const result = await axios

Loading…
Cancel
Save