Commit c0050637 authored by Riri Novita's avatar Riri Novita

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into riri

parents 587ceebe da640e9d
...@@ -257,6 +257,7 @@ const create = (type = "") => { ...@@ -257,6 +257,7 @@ const create = (type = "") => {
const getHierarkiMontlyReportOI = (body) => api.post('transaction/monthly_report_oi/get_report_hierarki', body) const getHierarkiMontlyReportOI = (body) => api.post('transaction/monthly_report_oi/get_report_hierarki', body)
const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body) const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body)
const getHierarkiMontlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/get_report_hierarki', body) const getHierarkiMontlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/get_report_hierarki', body)
const getHierarkiMontlyReportFAM = (body) => api.post('transaction/monthly_report/fam/get_report_hierarki', body)
const getLastPeriodMonthly = (idCompany) => api.get(`transaction/monthly_report/get_last_periode/${idCompany}`) const getLastPeriodMonthly = (idCompany) => api.get(`transaction/monthly_report/get_last_periode/${idCompany}`)
const checkApproverMonthly = () => api.get('transaction/monthly_report/is_approver') const checkApproverMonthly = () => api.get('transaction/monthly_report/is_approver')
const getCompanySubmittedMonthly = (body) => api.post('transaction/monthly_report/get_company_submitted', body) const getCompanySubmittedMonthly = (body) => api.post('transaction/monthly_report/get_company_submitted', body)
...@@ -266,7 +267,7 @@ const create = (type = "") => { ...@@ -266,7 +267,7 @@ const create = (type = "") => {
const deleteAttachmentMonthly = (id) => api.post(`transaction/monthly_report/delete_attachment/${id}`) const deleteAttachmentMonthly = (id) => api.post(`transaction/monthly_report/delete_attachment/${id}`)
const createMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/create_monthly_report', body) const createMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/create_monthly_report', body)
const createMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/create_monthly_report', body) const createMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/create_monthly_report', body)
const getHierarkiMontlyReportFAM = (body) => api.post('transaction/monthly_report/fam/get_report_hierarki', body) const createMonthlyReportFAM = (body) => api.post('transaction/monthly_report/fam/create_monthly_report', body)
const checkUploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/check_import', body) const checkUploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/check_import', body)
...@@ -407,6 +408,7 @@ const create = (type = "") => { ...@@ -407,6 +408,7 @@ const create = (type = "") => {
createMonthlyReportBS, createMonthlyReportBS,
createMonthlyReportTP, createMonthlyReportTP,
createMonthlyReportPL, createMonthlyReportPL,
createMonthlyReportFAM,
getSubmission, getSubmission,
checkUploadMB, checkUploadMB,
getAllOperatingInd, getAllOperatingInd,
......
...@@ -94,7 +94,8 @@ export default class TaxPlanningMR extends Component { ...@@ -94,7 +94,8 @@ export default class TaxPlanningMR extends Component {
"months": this.props.month.month_id "months": this.props.month.month_id
} }
api.create().getHierarkiMontlyReportTP(payload).then(response => { api.create().getHierarkiMontlyReportTP(payload).then(response => {
console.log(response); // console.log(response);
// console.log(payload);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
...@@ -205,7 +206,7 @@ export default class TaxPlanningMR extends Component { ...@@ -205,7 +206,7 @@ export default class TaxPlanningMR extends Component {
// }, () => console.log(this.state.dataTable)) // }, () => console.log(this.state.dataTable))
} }
backToMasterBudget(type) { backToMonthlyReport(type) {
let data = [] let data = []
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
...@@ -228,8 +229,8 @@ export default class TaxPlanningMR extends Component { ...@@ -228,8 +229,8 @@ export default class TaxPlanningMR extends Component {
} }
api.create('UPLOAD').createMonthlyReportTP(payload).then(response => { api.create('UPLOAD').createMonthlyReportTP(payload).then(response => {
console.log(payload); // console.log(payload);
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.saveToMonthlyReport() this.props.saveToMonthlyReport()
...@@ -293,6 +294,7 @@ export default class TaxPlanningMR extends Component { ...@@ -293,6 +294,7 @@ export default class TaxPlanningMR extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadMonthlyReportTP(this.state.payload).then(response => { api.create().checkUploadMonthlyReportTP(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload)); // console.log(JSON.stringify(this.state.payload));
// console.log(this.state.payload)
// console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
...@@ -776,7 +778,7 @@ export default class TaxPlanningMR extends Component { ...@@ -776,7 +778,7 @@ export default class TaxPlanningMR extends Component {
} }
const handleChange = (value, tableMeta, indexChilds) => { const handleChange = (value, tableMeta, indexChilds) => {
console.log(dataTable2) // console.log(dataTable2)
let val = String(value).split(",").join("") let val = String(value).split(",").join("")
// let data = this.state.dataTable2 // let data = this.state.dataTable2
let indexParent = dataTable2.findIndex((val) => val[4] === dataTable2[tableMeta.rowIndex][2]) let indexParent = dataTable2.findIndex((val) => val[4] === dataTable2[tableMeta.rowIndex][2])
...@@ -1444,7 +1446,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1444,7 +1446,7 @@ export default class TaxPlanningMR extends Component {
</MuiThemeProvider> </MuiThemeProvider>
{/* )} */} {/* )} */}
</div> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20, marginLeft: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
</div> </div>
<div className="grid grid-2x" style={{ marginTop: 20 }}> <div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1"> <div className="col-1">
...@@ -1462,7 +1464,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1462,7 +1464,7 @@ export default class TaxPlanningMR extends Component {
outline: 'none' outline: 'none'
}} }}
> >
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', marginLeft: 20 }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
</div> </div>
</button> </button>
...@@ -1505,7 +1507,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1505,7 +1507,7 @@ export default class TaxPlanningMR extends Component {
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => { setTimeout(() => {
this.backToMasterBudget('draft') this.backToMonthlyReport('draft')
}, 100); }, 100);
}) })
} }
...@@ -1531,7 +1533,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1531,7 +1533,7 @@ export default class TaxPlanningMR extends Component {
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => { setTimeout(() => {
this.backToMasterBudget('submitted') this.backToMonthlyReport('submitted')
}, 100); }, 100);
}) })
} }
...@@ -1584,7 +1586,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1584,7 +1586,7 @@ export default class TaxPlanningMR extends Component {
style={{ marginRight: 20 }} style={{ marginRight: 20 }}
> >
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
</div> </div>
</button> </button>
</div> </div>
......
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