Commit 9bd4d0e2 authored by muhammad ridwan's avatar muhammad ridwan

front end tambahan menu carfm

parent 9bd0ec10
// contents of .env // contents of .env
REACT_APP_URL_MAIN_BE=https://tia.eksad.com/tia-reporting-dev REACT_APP_URL_MAIN_BE=https://tia.eksad.com/tia-reporting
REACT_APP_URL_MAIN_FE=/tia-web-dev REACT_APP_URL_MAIN_FE=/tia-web-dev
"cpy_file_build_windows" : "robocopy E:\tia-web\src\tia-dev\src E:\tia-web\src /e", "cpy_file_build_windows" : "robocopy E:\tia-web\src\tia-dev\src E:\tia-web\src /e",
......
...@@ -470,6 +470,7 @@ const create = (type = "") => { ...@@ -470,6 +470,7 @@ const create = (type = "") => {
// MANAGEMENT DOCUMENT // MANAGEMENT DOCUMENT
// const getDocumentCategory = (body) => api.post('setting/get_all_setting_document_category', body) // const getDocumentCategory = (body) => api.post('setting/get_all_setting_document_category', body)
const getDocumentCategory = () => api.get('setting/get_all_setting_document_category') const getDocumentCategory = () => api.get('setting/get_all_setting_document_category')
const getCarfmDocumentBySubmenu = (body) => api.post('document/get_cafrm_document_by_submenu', body);
const getAllDocument = (body) => api.post('document/get_all_document', body) const getAllDocument = (body) => api.post('document/get_all_document', body)
const uploadDocument = (body) => api.post('document/upload_document', body) const uploadDocument = (body) => api.post('document/upload_document', body)
const updateDocument = (body) => api.post('document/update_document', body) const updateDocument = (body) => api.post('document/update_document', body)
...@@ -477,6 +478,8 @@ const create = (type = "") => { ...@@ -477,6 +478,8 @@ const create = (type = "") => {
const getPerusahaanUserActive = () => api.get('company/get_all_user_company_active') const getPerusahaanUserActive = () => api.get('company/get_all_user_company_active')
const getDetailDocument = (id) => api.get(`document/get_document_by_id/${id}`) const getDetailDocument = (id) => api.get(`document/get_document_by_id/${id}`)
const deleteDocument = (id) => api.post(`document/delete_document/${id}`) const deleteDocument = (id) => api.post(`document/delete_document/${id}`)
const uploadCarfmDocument = (body) => api.post('document/upload_cafrm_document', body)
// Monitoring // Monitoring
const getMonitoringMB = (body) => api.get(`transaction/monitoring/submission/${body.year}`) const getMonitoringMB = (body) => api.get(`transaction/monitoring/submission/${body.year}`)
...@@ -591,9 +594,11 @@ const create = (type = "") => { ...@@ -591,9 +594,11 @@ const create = (type = "") => {
deleteParameter, deleteParameter,
deletePerusahaan, deletePerusahaan,
deleteReportItems, deleteReportItems,
getCarfmDocumentBySubmenu,
getDocumentCategory, getDocumentCategory,
getAllDocument, getAllDocument,
uploadDocument, uploadDocument,
uploadCarfmDocument,
updateDocument, updateDocument,
downloadDocument, downloadDocument,
getPerusahaanUserActive, getPerusahaanUserActive,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -36,7 +36,7 @@ export default class TableDocument extends Component { ...@@ -36,7 +36,7 @@ export default class TableDocument extends Component {
componentWillReceiveProps(props) { componentWillReceiveProps(props) {
// console.log(props); // console.log(props);
const { refresh, id } = this.props; const { refresh} = this.props;
if (props.refresh !== refresh) { if (props.refresh !== refresh) {
this.getData() this.getData()
} }
...@@ -47,8 +47,10 @@ export default class TableDocument extends Component { ...@@ -47,8 +47,10 @@ export default class TableDocument extends Component {
"submenu_id": this.props.submenu_id "submenu_id": this.props.submenu_id
} }
this.setState({ loading: true }) this.setState({ loading: true })
api.create().getCrfmDocumentBySubmenu(payload).then(response => { api.create().getCarfmDocumentBySubmenu(payload).then(response => {
console.log("table document carfm");
console.log(response) console.log(response)
console.log("table document carfm stop")
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
...@@ -98,9 +100,11 @@ export default class TableDocument extends Component { ...@@ -98,9 +100,11 @@ export default class TableDocument extends Component {
}) })
} }
} else { } else {
console.log("error di table document getcarfm 1");
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
} }
} else { } else {
console.log("error di table document getcarfm 2");
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false }) this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
} }
}) })
...@@ -139,7 +143,7 @@ export default class TableDocument extends Component { ...@@ -139,7 +143,7 @@ export default class TableDocument extends Component {
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{this.props.btnview && <a data-tip={'Download'} data-for="download"> {this.props.btndownload && <a data-tip={'Download'} data-for="download">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
...@@ -166,7 +170,7 @@ export default class TableDocument extends Component { ...@@ -166,7 +170,7 @@ export default class TableDocument extends Component {
display: false display: false
} }
}, },
"Description", "Description", "Company Name", "Period Month", "Period Year",
"Type", "File Size", "Created By", "Created Date", "Type", "File Size", "Created By", "Created Date",
{ {
name: "Category", name: "Category",
......
...@@ -21,6 +21,9 @@ import SubHolding from '../container/Laporan/SubHolding'; ...@@ -21,6 +21,9 @@ import SubHolding from '../container/Laporan/SubHolding';
import SummaryTriputra from '../container/SummaryTriputra/SummaryOfTriputra'; import SummaryTriputra from '../container/SummaryTriputra/SummaryOfTriputra';
import MasterDataCAT from '../container/MasterData/MasterDataCAT/MasterDataCAT' import MasterDataCAT from '../container/MasterData/MasterDataCAT/MasterDataCAT'
import ProgressReport from '../container/Progress/ProgressReport' import ProgressReport from '../container/Progress/ProgressReport'
import InternalAudit from "../container/CRFM/InternalAudit";
import AntiFraud from "../container/CRFM/AntiFraud";
import RiskManagement from "../container/CRFM/RiskManagement";
const routes = [ const routes = [
{ {
...@@ -111,6 +114,18 @@ const routes = [ ...@@ -111,6 +114,18 @@ const routes = [
path: "/home/progress-reports", path: "/home/progress-reports",
main: ProgressReport main: ProgressReport
}, },
{
path: "/home/internal-audit",
main: InternalAudit
},
{
path: "/home/anti-fraud",
main: AntiFraud
},
{
path: "/home/risk-management",
main: RiskManagement
},
{ {
path: "*", path: "*",
main: screen404 main: screen404
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment