Commit db55449e authored by Hardiansyah's avatar Hardiansyah

binding history approval

parent 06c63f02
...@@ -125,6 +125,7 @@ export default class BudgetTahunan extends Component { ...@@ -125,6 +125,7 @@ export default class BudgetTahunan extends Component {
visibleTableHistoryCAT: false, visibleTableHistoryCAT: false,
isApproverFinance: false, isApproverFinance: false,
isApproverCAT: false, isApproverCAT: false,
currentMasterReportTypeId: null
} }
this.myRef = React.createRef() this.myRef = React.createRef()
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
...@@ -279,12 +280,12 @@ export default class BudgetTahunan extends Component { ...@@ -279,12 +280,12 @@ export default class BudgetTahunan extends Component {
this.getRevision() this.getRevision()
this.getCurrency(this.state.company.company_id) this.getCurrency(this.state.company.company_id)
} else { } else {
this.setState({ listRevision: null, revision: null, dataTable: [], dataTableCAT: [], checkApprover: false, lastRevision: "", visibleTableHistory: false }) this.setState({ listRevision: null, revision: null, dataTable: [], dataTableCAT: [], checkApprover: false, lastRevision: "", visibleTableHistory: false, visibleTableHistoryCAT: false })
} }
// //
}) })
} else { } else {
this.setState({ listRevision: null, revision: null, dataTable: [], dataTableCAT: [], checkApprover: false, lastRevision: "", visibleTableHistory: false, loading: false }, () => { this.setState({ listRevision: null, revision: null, dataTable: [], dataTableCAT: [], checkApprover: false, lastRevision: "", visibleTableHistory: false, visibleTableHistoryCAT: false, loading: false }, () => {
document.body.style.overflow = 'unset'; document.body.style.overflow = 'unset';
}) })
} }
...@@ -2205,16 +2206,16 @@ export default class BudgetTahunan extends Component { ...@@ -2205,16 +2206,16 @@ export default class BudgetTahunan extends Component {
}); });
} }
async setHeaderTokenSuperadmin(type) { async setHeaderTokenSuperadmin(type, master_report_type_id) {
let realToken = await localStorage.getItem(Constant.TOKEN) let realToken = await localStorage.getItem(Constant.TOKEN)
api.create().getIdToken(this.state.approver.userId).then((response) => { api.create().getIdToken(this.state.approver.userId).then((response) => {
// console.log(response.data.data.token) // console.log(response.data.data.token)
localStorage.setItem(Constant.TOKEN, response.data.data.token) localStorage.setItem(Constant.TOKEN, response.data.data.token)
this.approvalSubmission(type, realToken) this.approvalSubmission(type, master_report_type_id, realToken)
}) })
} }
approvalSubmission(type, realToken) { approvalSubmission(type, master_report_type_id, realToken) {
// this.scrollToMyRef() // this.scrollToMyRef()
// let realToken = await localStorage.getItem(Constant.TOKEN) // let realToken = await localStorage.getItem(Constant.TOKEN)
// if (this.state.isAdmin && type == 'approve') { // if (this.state.isAdmin && type == 'approve') {
...@@ -2238,7 +2239,8 @@ export default class BudgetTahunan extends Component { ...@@ -2238,7 +2239,8 @@ export default class BudgetTahunan extends Component {
"company_id": this.state.company.company_id, "company_id": this.state.company.company_id,
"periode": this.state.periode.periode, "periode": this.state.periode.periode,
"min_periode": moment(this.state.minDateRevision).format('YYYY-MM-DD'), "min_periode": moment(this.state.minDateRevision).format('YYYY-MM-DD'),
"max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD') "max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD'),
master_report_type_id
} }
// console.log(payload) // console.log(payload)
// // console.log(this.props.location); // // console.log(this.props.location);
...@@ -2250,7 +2252,7 @@ export default class BudgetTahunan extends Component { ...@@ -2250,7 +2252,7 @@ export default class BudgetTahunan extends Component {
// }) // })
if (this.state.isAdmin && type == 'approve') { if (this.state.isAdmin && type == 'approve') {
localStorage.setItem(Constant.TOKEN, realToken) localStorage.setItem(Constant.TOKEN, realToken)
this.setState({ visibleApproveSuperadmin: false }) this.setState({ visibleApproveSuperadmin: false, currentMasterReportTypeId: null })
} }
setTimeout(() => { setTimeout(() => {
if (type == 'revision') { if (type == 'revision') {
...@@ -2526,7 +2528,7 @@ export default class BudgetTahunan extends Component { ...@@ -2526,7 +2528,7 @@ export default class BudgetTahunan extends Component {
} }
validateRevision() { validateRevision(master_report_type_id) {
// this.scrollToMyRef() // this.scrollToMyRef()
let arrayRevisi = this.state.detailRevisiCheck let arrayRevisi = this.state.detailRevisiCheck
let remarksKosong = 0 let remarksKosong = 0
...@@ -2539,12 +2541,12 @@ export default class BudgetTahunan extends Component { ...@@ -2539,12 +2541,12 @@ export default class BudgetTahunan extends Component {
if (arrayRevisi.length == 0 || remarksKosong > 0) { if (arrayRevisi.length == 0 || remarksKosong > 0) {
this.setState({ alert: true, messageAlert: 'Remarks Cannot be Empty', tipeAlert: 'error' }) this.setState({ alert: true, messageAlert: 'Remarks Cannot be Empty', tipeAlert: 'error' })
} else { } else {
this.setState({ visibleRevision: false }, () => this.approvalSubmission('revision')) this.setState({ visibleRevision: false, currentMasterReportTypeId: null }, () => this.approvalSubmission('revision', master_report_type_id))
} }
} }
handleApproveAdmin() { handleApproveAdmin(master_report_type_id) {
this.setState({ visibleApproveSuperadmin: true }) this.setState({ visibleApproveSuperadmin: true, currentMasterReportTypeId: master_report_type_id })
} }
handleSelectAll(data) { handleSelectAll(data) {
...@@ -2792,7 +2794,7 @@ export default class BudgetTahunan extends Component { ...@@ -2792,7 +2794,7 @@ export default class BudgetTahunan extends Component {
if (this.state.isApprover === true) { if (this.state.isApprover === true) {
this.getCompanySubmitted() this.getCompanySubmitted()
} else { } else {
this.setState({ visibleTableHistory: false }) this.setState({ visibleTableHistory: false, visibleTableHistoryCAT: false })
this.getRevision() this.getRevision()
} }
})} })}
...@@ -2855,7 +2857,7 @@ export default class BudgetTahunan extends Component { ...@@ -2855,7 +2857,7 @@ export default class BudgetTahunan extends Component {
id="company" id="company"
disabled={this.state.listCompany === null ? true : this.state.intent === 'Home' ? true : false} disabled={this.state.listCompany === null ? true : this.state.intent === 'Home' ? true : false}
onChange={(event, newInputValue) => this.setState({ company: newInputValue }, () => { onChange={(event, newInputValue) => this.setState({ company: newInputValue }, () => {
this.setState({ visibleTableHistory: false }) this.setState({ visibleTableHistory: false, visibleTableHistoryCAT: false })
this.getLastPeriod() this.getLastPeriod()
this.getCurrency(newInputValue.company_id) this.getCurrency(newInputValue.company_id)
this.getRevision() this.getRevision()
...@@ -2971,6 +2973,7 @@ export default class BudgetTahunan extends Component { ...@@ -2971,6 +2973,7 @@ export default class BudgetTahunan extends Component {
renderBtnSubmit = (master_report_type_id) => { renderBtnSubmit = (master_report_type_id) => {
const obj = this.getSubmissionObj(master_report_type_id) const obj = this.getSubmissionObj(master_report_type_id)
console.log(obj, master_report_type_id)
return ( return (
this.state.isAdmin && obj.lastStatus == 'APPROVED' ? this.state.isAdmin && obj.lastStatus == 'APPROVED' ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}> <div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
...@@ -2984,7 +2987,7 @@ export default class BudgetTahunan extends Component { ...@@ -2984,7 +2987,7 @@ export default class BudgetTahunan extends Component {
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
onClick={() => this.setState({ visibleRevision: true })} onClick={() => this.setState({ visibleRevision: true, currentMasterReportTypeId: master_report_type_id })}
> >
<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' }}>Revision</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
...@@ -3017,7 +3020,7 @@ export default class BudgetTahunan extends Component { ...@@ -3017,7 +3020,7 @@ export default class BudgetTahunan extends Component {
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
}} }}
onClick={() => this.handleApproveAdmin()} onClick={() => this.handleApproveAdmin(master_report_type_id)}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
...@@ -3037,7 +3040,7 @@ export default class BudgetTahunan extends Component { ...@@ -3037,7 +3040,7 @@ export default class BudgetTahunan extends Component {
outline: 'none', outline: 'none',
}} }}
onClick={() => onClick={() =>
this.approvalSubmission('review') this.approvalSubmission('review', master_report_type_id)
} }
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
...@@ -3056,7 +3059,7 @@ export default class BudgetTahunan extends Component { ...@@ -3056,7 +3059,7 @@ export default class BudgetTahunan extends Component {
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
onClick={() => this.setState({ visibleRevision: true })} onClick={() => this.setState({ visibleRevision: true, currentMasterReportTypeId: master_report_type_id })}
> >
<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' }}>Revision</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
...@@ -3069,7 +3072,7 @@ export default class BudgetTahunan extends Component { ...@@ -3069,7 +3072,7 @@ export default class BudgetTahunan extends Component {
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
}} }}
onClick={() => this.approvalSubmission('approve')} onClick={() => this.approvalSubmission('approve', master_report_type_id)}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
...@@ -3103,7 +3106,7 @@ export default class BudgetTahunan extends Component { ...@@ -3103,7 +3106,7 @@ export default class BudgetTahunan extends Component {
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
}} }}
onClick={() => this.approvalSubmission('cancel')} onClick={() => this.approvalSubmission('cancel', master_report_type_id)}
> >
<div style={{ backgroundColor: 'gray', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: 'gray', 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' }}>Cancel</Typography>
...@@ -3238,7 +3241,7 @@ export default class BudgetTahunan extends Component { ...@@ -3238,7 +3241,7 @@ export default class BudgetTahunan extends Component {
"Name", "Status", "Remarks", "Revision Item", "Date" "Name", "Status", "Remarks", "Revision Item", "Date"
] ]
const columnRevisi = [ const columnRevisi = (master_report_type_id) => [
{ {
name: "#", name: "#",
options: { options: {
...@@ -3255,7 +3258,7 @@ export default class BudgetTahunan extends Component { ...@@ -3255,7 +3258,7 @@ export default class BudgetTahunan extends Component {
control={ control={
<Checkbox <Checkbox
checked={this.state.detailRevisiCheck.findIndex((val) => val.report_id == tableMeta.rowData[0]) == -1 ? false : true} checked={this.state.detailRevisiCheck.findIndex((val) => val.report_id == tableMeta.rowData[0]) == -1 ? false : true}
onClick={() => handleCheckRevision(tableMeta.rowData)} /> onClick={() => handleCheckRevision(tableMeta.rowData, master_report_type_id)} />
} }
/> />
</div > </div >
...@@ -3283,7 +3286,7 @@ export default class BudgetTahunan extends Component { ...@@ -3283,7 +3286,7 @@ export default class BudgetTahunan extends Component {
onBlur={(event) => { onBlur={(event) => {
// // // console.log(event.target.value) // // // console.log(event.target.value)
// updateValue(event.target.value) // updateValue(event.target.value)
handleChangeText(event.target.value, tableMeta) handleChangeText(event.target.value, tableMeta, master_report_type_id)
// // // console.log(dataTable2) // // // console.log(dataTable2)
}} }}
/>} />}
...@@ -3298,9 +3301,9 @@ export default class BudgetTahunan extends Component { ...@@ -3298,9 +3301,9 @@ export default class BudgetTahunan extends Component {
} }
] ]
const handleChangeText = (value, tableMeta) => { const handleChangeText = (value, tableMeta, master_report_type_id) => {
let dataTableRevision = this.state.dataTableRevision const listTableRevision = master_report_type_id === 2 ? this.state.dataTableRevisionCAT : this.state.dataTableRevision
dataTableRevision[tableMeta.rowIndex][tableMeta.columnIndex] = value listTableRevision[tableMeta.rowIndex][tableMeta.columnIndex] = value
let detailRevisiCheck = this.state.detailRevisiCheck let detailRevisiCheck = this.state.detailRevisiCheck
let indexId = detailRevisiCheck.findIndex((val) => val.report_id == tableMeta.rowData[0]) let indexId = detailRevisiCheck.findIndex((val) => val.report_id == tableMeta.rowData[0])
...@@ -3308,21 +3311,22 @@ export default class BudgetTahunan extends Component { ...@@ -3308,21 +3311,22 @@ export default class BudgetTahunan extends Component {
detailRevisiCheck[indexId].remarks = value detailRevisiCheck[indexId].remarks = value
} }
this.setState({ dataTableRevision, detailRevisiCheck }) this.setState({ [master_report_type_id === 2 ? "dataTableRevisionCAT" : "dataTableRevision"]: listTableRevision, detailRevisiCheck })
} }
const handleCheckRevision = (value) => { const handleCheckRevision = (value, master_report_type_id) => {
const listTableRevision = master_report_type_id === 2 ? this.state.dataTableRevisionCAT : this.state.dataTableRevision
let detailRevisiCheck = this.state.detailRevisiCheck let detailRevisiCheck = this.state.detailRevisiCheck
let payload = { let payload = {
report_id: value[0], report_id: value[0],
remarks: value[2], remarks: value[2],
number: value[3] number: value[3]
} }
let indexDataRevisi = this.state.dataTableRevision.findIndex((val) => val[3] == value[3]) let indexDataRevisi = listTableRevision.findIndex((val) => val[3] == value[3])
let indexId = detailRevisiCheck.sort((a, b) => a.number - b.number).findIndex((val) => val.number == value[3]) let indexId = detailRevisiCheck.sort((a, b) => a.number - b.number).findIndex((val) => val.number == value[3])
// // console.log(indexId) // // console.log(indexId)
if (indexId == -1) { if (indexId == -1) {
this.state.dataTableRevision.map((item, index) => { listTableRevision.map((item, index) => {
if (index > indexDataRevisi) { if (index > indexDataRevisi) {
let indexIds = detailRevisiCheck.findIndex((val) => val.number == item[3]) let indexIds = detailRevisiCheck.findIndex((val) => val.number == item[3])
if (indexIds == -1) { if (indexIds == -1) {
...@@ -3345,7 +3349,7 @@ export default class BudgetTahunan extends Component { ...@@ -3345,7 +3349,7 @@ export default class BudgetTahunan extends Component {
} }
}) })
if (x < 1) { if (x < 1) {
this.state.dataTableRevision.map((item, index) => { listTableRevision.map((item, index) => {
if (index > indexDataRevisi) { if (index > indexDataRevisi) {
let indexIdz = detailRevisiCheck.findIndex((val) => val.number == item[3]) let indexIdz = detailRevisiCheck.findIndex((val) => val.number == item[3])
if (indexIdz !== -1) { if (indexIdz !== -1) {
...@@ -3512,6 +3516,17 @@ export default class BudgetTahunan extends Component { ...@@ -3512,6 +3516,17 @@ export default class BudgetTahunan extends Component {
/> />
</MuiThemeProvider> </MuiThemeProvider>
{this.renderAttachment()} {this.renderAttachment()}
{this.state.visibleTableHistoryCAT && (
<div style={{ marginTop: 20 }}>
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={this.state.dataTableHistoryCAT}
columns={columnsHistory}
options={optionsHistory}
/>
</MuiThemeProvider>
</div>
)}
</div> </div>
{this.state.checkApprover && this.state.isApproverCAT && this.renderBtnSubmit(this.state?.rowDataCAT?.length > 0 && this.state.rowDataCAT[0]?.master_report_type_id)} {this.state.checkApprover && this.state.isApproverCAT && this.renderBtnSubmit(this.state?.rowDataCAT?.length > 0 && this.state.rowDataCAT[0]?.master_report_type_id)}
</Paper> </Paper>
...@@ -3721,7 +3736,7 @@ export default class BudgetTahunan extends Component { ...@@ -3721,7 +3736,7 @@ export default class BudgetTahunan extends Component {
<button <button
type="button" type="button"
className="btn btn-circle btn-white" className="btn btn-circle btn-white"
onClick={() => this.setState({ visibleRevision: false })} onClick={() => this.setState({ visibleRevision: false, currentMasterReportTypeId: null })}
> >
<img src={Images.close} /> <img src={Images.close} />
</button> </button>
...@@ -3732,8 +3747,8 @@ export default class BudgetTahunan extends Component { ...@@ -3732,8 +3747,8 @@ export default class BudgetTahunan extends Component {
<div style={{ marginTop: 20 }}> <div style={{ marginTop: 20 }}>
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
data={this.state.dataTableRevision} data={this.state.currentMasterReportTypeId === 2 ? this.state.dataTableRevisionCAT : this.state.dataTableRevision}
columns={columnRevisi} columns={columnRevisi(this.state.currentMasterReportTypeId)}
options={optionsRevision} options={optionsRevision}
/> />
</MuiThemeProvider> </MuiThemeProvider>
...@@ -3802,7 +3817,7 @@ export default class BudgetTahunan extends Component { ...@@ -3802,7 +3817,7 @@ export default class BudgetTahunan extends Component {
<div className="column-1" style={{ alignSelf: 'center' }}> <div className="column-1" style={{ alignSelf: 'center' }}>
<button <button
type="button" type="button"
onClick={() => this.setState({ visibleRevision: false })} onClick={() => this.setState({ visibleRevision: false, currentMasterReportTypeId: null })}
> >
<div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#354960', fontSize: 11 }}>Cancel</span> <span style={{ color: '#354960', fontSize: 11 }}>Cancel</span>
...@@ -3812,7 +3827,7 @@ export default class BudgetTahunan extends Component { ...@@ -3812,7 +3827,7 @@ export default class BudgetTahunan extends Component {
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}> <div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<button <button
type="button" type="button"
onClick={() => this.validateRevision()} onClick={() => this.validateRevision(this.state.currentMasterReportTypeId)}
> >
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Revision</span> <span style={{ color: '#fff', fontSize: 11 }}>Revision</span>
...@@ -3838,7 +3853,7 @@ export default class BudgetTahunan extends Component { ...@@ -3838,7 +3853,7 @@ export default class BudgetTahunan extends Component {
<button <button
type="button" type="button"
className="btn btn-circle btn-white" className="btn btn-circle btn-white"
onClick={() => this.setState({ visibleApproveSuperadmin: false })} onClick={() => this.setState({ visibleApproveSuperadmin: false, currentMasterReportTypeId: null })}
> >
<img src={Images.close} /> <img src={Images.close} />
</button> </button>
...@@ -3865,7 +3880,7 @@ export default class BudgetTahunan extends Component { ...@@ -3865,7 +3880,7 @@ export default class BudgetTahunan extends Component {
<div className="column-1" style={{ alignSelf: 'center' }}> <div className="column-1" style={{ alignSelf: 'center' }}>
<button <button
type="button" type="button"
onClick={() => this.setState({ visibleApproveSuperadmin: false })} onClick={() => this.setState({ visibleApproveSuperadmin: false, currentMasterReportTypeId: null })}
> >
<div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#354960', fontSize: 11 }}>Cancel</span> <span style={{ color: '#354960', fontSize: 11 }}>Cancel</span>
...@@ -3875,7 +3890,7 @@ export default class BudgetTahunan extends Component { ...@@ -3875,7 +3890,7 @@ export default class BudgetTahunan extends Component {
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}> <div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<button <button
type="button" type="button"
onClick={() => this.state.approver == null ? this.setState({ alert: true, messageAlert: 'Approver Cannot be Empty', tipeAlert: 'error' }) : this.setHeaderTokenSuperadmin('approve')} onClick={() => this.state.approver == null ? this.setState({ alert: true, messageAlert: 'Approver Cannot be Empty', tipeAlert: 'error' }) : this.setHeaderTokenSuperadmin('approve', this.state.currentMasterReportTypeId)}
> >
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Confirm Approve</span> <span style={{ color: '#fff', fontSize: 11 }}>Confirm Approve</span>
......
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