|
|
|
@ -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> |
|
|
|
|