Browse Source

Merge pull request 'staging upload 23-04-04' (#10) from staging into master

Reviewed-on: ordo/adw-frontend#10
pull/2/head
ibnu 1 year ago
parent
commit
cabfadfe36
  1. 1
      src/const/ApiConst.js
  2. 11
      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}` }

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