Commit 744897b7 authored by Riri Novita's avatar Riri Novita

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

tes

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