Commit a894c0ea authored by Riri Novita's avatar Riri Novita

Merge branch 'dev/riri' into 'ENV-DEPLOYMENT'

push banyak bgt pokoknya

See merge request !1683
parents f8c69ff8 c929006b
...@@ -496,6 +496,13 @@ const create = (type = "") => { ...@@ -496,6 +496,13 @@ const create = (type = "") => {
// Reminder Manual // Reminder Manual
const sendEmail = (body) => api.post('transaction/monitoring/reminder_progress_report', body) const sendEmail = (body) => api.post('transaction/monitoring/reminder_progress_report', body)
// Download Report
const createDownloadFile = (body) => api.post('transaction/create/download-files-report', body)
const createZipReport = (id) => api.get(`transaction/zip-files?downloadedFileReportId=${id}`)
const getListDownload = () => api.get('transaction/download-files')
const downloadZipReport = (id) => api.get(`transaction/download/zip-files?downloadedFileReportId=${id}`)
// const createZipReport = (body) => api.post('transaction/monthly_report/export_selected_report', body)
// Superadmin Approve // Superadmin Approve
const getListApprover = (report, monthlyReportId) => api.get(`transaction/${report}/get_approver/${monthlyReportId}`) const getListApprover = (report, monthlyReportId) => api.get(`transaction/${report}/get_approver/${monthlyReportId}`)
const getIdToken = (userId) => api.get(`transaction/get_token/${userId}`) const getIdToken = (userId) => api.get(`transaction/get_token/${userId}`)
...@@ -855,7 +862,11 @@ const create = (type = "") => { ...@@ -855,7 +862,11 @@ const create = (type = "") => {
triggerHistoricalRatio, triggerHistoricalRatio,
getDetailMaintenanceMode, getDetailMaintenanceMode,
createMaintenanceMode, createMaintenanceMode,
updateMaintenanceMode updateMaintenanceMode,
createZipReport,
createDownloadFile,
getListDownload,
downloadZipReport
} }
} }
......
...@@ -55,7 +55,7 @@ const Images = { ...@@ -55,7 +55,7 @@ const Images = {
dotDone: require('./dot-done.svg'), dotDone: require('./dot-done.svg'),
dotOverdue: require('./dot-overdue.svg'), dotOverdue: require('./dot-overdue.svg'),
dotOpen: require('./dot-open.svg'), dotOpen: require('./dot-open.svg'),
zip: require('./zip.png'),
} }
export default Images export default Images
\ No newline at end of file
...@@ -97,6 +97,7 @@ class Login extends Component { ...@@ -97,6 +97,7 @@ class Login extends Component {
"password": this.state.password "password": this.state.password
} }
api.create().login(payload).then((response) => { api.create().login(payload).then((response) => {
console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
......
This diff is collapsed.
...@@ -376,7 +376,7 @@ export default function MiniDrawer() { ...@@ -376,7 +376,7 @@ export default function MiniDrawer() {
const getIsApprover = (superadmin) => { const getIsApprover = (superadmin) => {
api.create().getAM().then((response) => { api.create().getAM().then((response) => {
console.log(response); // console.log(response);
let actAMActive = response.data.data let actAMActive = response.data.data
let userId = localStorage.getItem(Constant.USER) let userId = localStorage.getItem(Constant.USER)
let indexId = actAMActive.findIndex((val) => val.user_id == userId) let indexId = actAMActive.findIndex((val) => val.user_id == userId)
...@@ -404,7 +404,6 @@ export default function MiniDrawer() { ...@@ -404,7 +404,6 @@ export default function MiniDrawer() {
}) })
setApplication(app) setApplication(app)
setSetting(set) setSetting(set)
console.log(set);
} else { } else {
localStorage.removeItem(Constant.TOKEN) localStorage.removeItem(Constant.TOKEN)
window.location.reload(); window.location.reload();
......
...@@ -2611,27 +2611,29 @@ export default class BalanceSheetMR extends Component { ...@@ -2611,27 +2611,29 @@ export default class BalanceSheetMR extends Component {
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.props.isApprover === true || this.state.get_for == 'view' ? {this.props.isApprover === true || this.state.get_for == 'view' ?
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> null
<a data-tip={'Download'} data-for="download"> // <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<button // <a data-tip={'Download'} data-for="download">
style={{ // <button
backgroundColor: 'transparent', // style={{
cursor: 'pointer', // backgroundColor: 'transparent',
borderColor: 'transparent', // cursor: 'pointer',
margin: 5 // borderColor: 'transparent',
}} // margin: 5
onClick={() => // }}
this.setState({ loading: true }, () => { // onClick={() =>
setTimeout(() => { // this.setState({ loading: true }, () => {
this.downloadAllData() // setTimeout(() => {
}, 100); // this.downloadAllData()
})} // }, 100);
> // })}
<img src={Images.download} /> // >
</button> // <img src={Images.download} />
</a> // </button>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> // </a>
</div> : // <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
// </div>
:
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download Template'} data-for="template"> <a data-tip={'Download Template'} data-for="template">
<button <button
...@@ -2661,7 +2663,7 @@ export default class BalanceSheetMR extends Component { ...@@ -2661,7 +2663,7 @@ export default class BalanceSheetMR extends Component {
</button> </button>
</a> </a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
<a data-tip={'Download'} data-for="download"> {/* <a data-tip={'Download'} data-for="download">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
...@@ -2679,7 +2681,7 @@ export default class BalanceSheetMR extends Component { ...@@ -2679,7 +2681,7 @@ export default class BalanceSheetMR extends Component {
<img src={Images.download} /> <img src={Images.download} />
</button> </button>
</a> </a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> */}
</div> </div>
} }
</div> </div>
......
...@@ -698,7 +698,7 @@ export default class CashFlowMR extends Component { ...@@ -698,7 +698,7 @@ export default class CashFlowMR extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {String(this.props.month.month_value).toLocaleUpperCase()} {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {String(this.props.month.month_value).toLocaleUpperCase()} {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
<div style={{ width: '50%' }}> {/* <div style={{ width: '50%' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download'} data-for="download"> <a data-tip={'Download'} data-for="download">
<button <button
...@@ -720,7 +720,7 @@ export default class CashFlowMR extends Component { ...@@ -720,7 +720,7 @@ export default class CashFlowMR extends Component {
</a> </a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div> </div>
</div> </div> */}
</div> </div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
...@@ -2004,7 +2004,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -2004,7 +2004,7 @@ export default class CorporateAnnualTargetMR extends Component {
</button> </button>
</a>} </a>}
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
<a data-tip={'Download'} data-for="download"> {/* <a data-tip={'Download'} data-for="download">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
...@@ -2022,7 +2022,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -2022,7 +2022,7 @@ export default class CorporateAnnualTargetMR extends Component {
<img src={Images.download} /> <img src={Images.download} />
</button> </button>
</a> </a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> */}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -3856,7 +3856,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3856,7 +3856,7 @@ export default class ListOfCreditFacilities extends Component {
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
</div> </div>
)} )}
<a data-tip={'Download'} data-for="download"> {/* <a data-tip={'Download'} data-for="download">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
...@@ -3875,7 +3875,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3875,7 +3875,7 @@ export default class ListOfCreditFacilities extends Component {
<img src={Images.download} /> <img src={Images.download} />
</button> </button>
</a> </a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> */}
</div> </div>
{/* } */} {/* } */}
</div> </div>
......
...@@ -2032,27 +2032,29 @@ export default class ProfitLossMR extends Component { ...@@ -2032,27 +2032,29 @@ export default class ProfitLossMR extends Component {
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.props.isApprover === true || this.state.get_for == 'view' ? {this.props.isApprover === true || this.state.get_for == 'view' ?
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> // <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download'} data-for="download"> // <a data-tip={'Download'} data-for="download">
<button // <button
style={{ // style={{
backgroundColor: 'transparent', // backgroundColor: 'transparent',
cursor: 'pointer', // cursor: 'pointer',
borderColor: 'transparent', // borderColor: 'transparent',
margin: 5 // margin: 5
}} // }}
onClick={() => // onClick={() =>
this.setState({ loading: true }, () => { // this.setState({ loading: true }, () => {
setTimeout(() => { // setTimeout(() => {
this.downloadAllData() // this.downloadAllData()
}, 100); // }, 100);
})} // })}
> // >
<img src={Images.download} /> // <img src={Images.download} />
</button> // </button>
</a> // </a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> // <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
</div> : // </div>
null
:
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download Template'} data-for="template"> <a data-tip={'Download Template'} data-for="template">
<button <button
...@@ -2081,7 +2083,7 @@ export default class ProfitLossMR extends Component { ...@@ -2081,7 +2083,7 @@ export default class ProfitLossMR extends Component {
<img src={Images.upload} /> <img src={Images.upload} />
</button> </button>
</a> </a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" /> {/* <ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
<a data-tip={'Download'} data-for="download"> <a data-tip={'Download'} data-for="download">
<button <button
style={{ style={{
...@@ -2100,7 +2102,7 @@ export default class ProfitLossMR extends Component { ...@@ -2100,7 +2102,7 @@ export default class ProfitLossMR extends Component {
<img src={Images.download} /> <img src={Images.download} />
</button> </button>
</a> </a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> */}
</div> </div>
} }
</div> </div>
......
...@@ -149,7 +149,13 @@ const arraySide = [ ...@@ -149,7 +149,13 @@ const arraySide = [
path: '', path: '',
}, },
] ]
} },
{
img: Images.outlookperformance,
label: 'Download Files',
path: 'download-files',
subItem: null
},
] ]
export default arraySide; export default arraySide;
\ No newline at end of file
...@@ -24,6 +24,7 @@ import MaintenanceMode from '../container/GeneralSetting/MaintenanceMode'; ...@@ -24,6 +24,7 @@ import MaintenanceMode from '../container/GeneralSetting/MaintenanceMode';
import CafrmDocument from "../container/CAFRM/CafrmDocument"; import CafrmDocument from "../container/CAFRM/CafrmDocument";
import ReportCafrm from "../container/ReportCarfm/RepotrCafrm"; import ReportCafrm from "../container/ReportCarfm/RepotrCafrm";
import Maintenance from "../container/Auth/Maintenance"; import Maintenance from "../container/Auth/Maintenance";
import DownloadReport from "../container/DownloadReport/DownloadReport"
const routes = [ const routes = [
{ {
...@@ -134,6 +135,10 @@ const routes = [ ...@@ -134,6 +135,10 @@ const routes = [
path: "/home/maintenance-mode", path: "/home/maintenance-mode",
main: MaintenanceMode main: MaintenanceMode
}, },
{
path: "/home/download-files",
main: DownloadReport
},
{ {
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