Browse Source

Merge branch 'master' of https://git.oslog.id/ordo/adw-frontend into Dev-Farhan

pull/2/head
farhan048 2 years ago
parent
commit
319f942d78
  1. 1
      src/const/ApiConst.js
  2. 2
      src/views/Dashboard/DashboardProject.js
  3. 5
      src/views/SimproV2/CreatedProyek/DIalogHierarchy.js
  4. 2
      src/views/SimproV2/CreatedProyek/DialogFormGantt.js
  5. 13
      src/views/SimproV2/ResourceWorker/index.js

1
src/const/ApiConst.js

@ -236,6 +236,7 @@ export const TOOLS_CREATE = `${BASE_SIMPRO_LUMEN}/req-tools/create`
export const USER_ADD = `${BASE_SIMPRO_LUMEN}/human-resource/add`
export const USER_SEARCH = `${BASE_SIMPRO_LUMEN}/human-resource/search`
export const USER_LIST = `${BASE_SIMPRO_LUMEN}/human-resource/list`
export const USER_SYNC = `${BASE_SIMPRO_LUMEN}/human-resource/sync`
export const USER_EDIT = (id) => { return `${BASE_SIMPRO_LUMEN}/human-resource/update/${id}` }
export const USER_DELETE = (id) => { return `${BASE_SIMPRO_LUMEN}/human-resource/delete/${id}` }

2
src/views/Dashboard/DashboardProject.js

@ -116,7 +116,7 @@ const DashboardProject = () => {
])
}
fetchData()
}, [manPower, assignedHr])
}, [])
useEffect(() => {
let deviation = 0;

5
src/views/SimproV2/CreatedProyek/DIalogHierarchy.js

@ -103,6 +103,10 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek
setOpenDialogGantt(true)
}
const closeDialogGantt = () => {
setOpenDialogGantt(false);
};
const toggleDialogFormGantt = () => {
setOpenDialogFormGantt(!openDialogFormGantt)
}
@ -304,6 +308,7 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek
</SweetAlert>
<DialogGantt
openDialog={openDialogGantt}
closeDialog={closeDialogGantt}
hierarchyId={parentId}
idTask={idTask}
/>

2
src/views/SimproV2/CreatedProyek/DialogFormGantt.js

@ -40,7 +40,7 @@ const DialogFormGantt = ({ openDialog, closeDialog, toggleDialog, idTask, parent
description,
calculation_type: calculationType,
proyek_id: idTask,
id_hierarcy_ftth: parentId
hierarchy_ftth_id: parentId
}
const result = await axios

13
src/views/SimproV2/ResourceWorker/index.js

@ -10,7 +10,7 @@ import { DownloadOutlined } from '@ant-design/icons';
import { NotificationContainer, NotificationManager } from 'react-notifications';
import { Pagination, Table, Button, Tooltip } from 'antd';
import {
PROYEK_SEARCH, USER_ADD, USER_SEARCH, USER_EDIT, USER_DELETE, ROLE_SEARCH, DIVISI_SEARCH, USER_SHIFT_ADD
PROYEK_SEARCH, USER_ADD, USER_SEARCH, USER_EDIT, USER_DELETE, ROLE_SEARCH, DIVISI_SEARCH, USER_SHIFT_ADD, USER_SYNC
} from '../../../const/ApiConst';
import { useTranslation } from 'react-i18next';
const url = "";
@ -229,6 +229,12 @@ const ResourceWorker = ({ params }) => {
}
const handleSync = async () => {
await axios.get(USER_SYNC, HEADER)
.then(res => res)
.catch((error)=>error.response)
}
const handleExportExcel = async () => {
let start = 0;
@ -429,7 +435,7 @@ const ResourceWorker = ({ params }) => {
getDataUser();
NotificationManager.success(`Data resource berhasil diedit`, 'Success!!');
} else {
NotificationManager.error(`Data resource gagal di edit`, `Failed!!`);
NotificationManager.error(`${result.data.message}`, `Failed!!`);
}
}
@ -555,6 +561,9 @@ const ResourceWorker = ({ params }) => {
<Tooltip title={t('hradd')}>
<Button style={{ background: "#4caf50", color: "#fff" }} onClick={() => handleOpenDialog('Save')}><i className="fa fa-plus"></i></Button>
</Tooltip>
<Tooltip title="HR Sync">
<Button style={{ background: "#007bff ", color: "#fff", marginLeft: "5px" }} onClick={() => handleSync()}><i className="fa fa-spinner"></i></Button>
</Tooltip>
<Tooltip title={t('exportExcel')}>
<Button style={{ marginLeft: "5px" }} onClick={() => handleExportExcel()}><i className="fa fa-print"></i></Button>
</Tooltip>

Loading…
Cancel
Save