From bd84731142907694c3bbf55bdb90647861e31e67 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Tue, 4 Apr 2023 11:01:46 +0700 Subject: [PATCH] Task #860q2vhvg add sync HR --- src/const/ApiConst.js | 1 + src/views/SimproV2/ResourceWorker/index.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/const/ApiConst.js b/src/const/ApiConst.js index d90b6af..f964656 100644 --- a/src/const/ApiConst.js +++ b/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}` } diff --git a/src/views/SimproV2/ResourceWorker/index.js b/src/views/SimproV2/ResourceWorker/index.js index 486e8dd..f4f6af5 100644 --- a/src/views/SimproV2/ResourceWorker/index.js +++ b/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; @@ -554,6 +560,9 @@ const ResourceWorker = ({ params }) => { + + +