Commit a5730bda authored by EKSAD's avatar EKSAD

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

parents 1404374e c20dcfed
...@@ -51,7 +51,10 @@ const Images = { ...@@ -51,7 +51,10 @@ const Images = {
camera: require('./camera.svg'), camera: require('./camera.svg'),
meeting: require('./meeting.jpg'), meeting: require('./meeting.jpg'),
triputraBlack: require('./triputra-black.jpg'), triputraBlack: require('./triputra-black.jpg'),
delete: require('./delete.svg') delete: require('./delete.svg'),
dotDone: require('./dot-done.svg'),
dotOverdue: require('./dot-overdue.svg'),
dotOpen: require('./dot-open.svg'),
} }
......
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10">
<g fill="none" fill-rule="evenodd" transform="translate(-7 -7)">
<path d="M0 0H24V24H0z"/>
<circle cx="12" cy="12" r="4.5" fill="#69D56E" stroke="#4CAF51"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10">
<g fill="none" fill-rule="evenodd" transform="translate(-7 -7)">
<path d="M0 0H24V24H0z"/>
<circle cx="12" cy="12" r="4.5" fill="#D8D8D8" stroke="#B1B1B1"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10">
<g fill="none" fill-rule="evenodd" transform="translate(-7 -7)">
<path d="M0 0H24V24H0z"/>
<circle cx="12" cy="12" r="4.5" fill="#F65A4C" stroke="#CF392C"/>
</g>
</svg>
...@@ -59,7 +59,8 @@ export default class BudgetTahunan extends Component { ...@@ -59,7 +59,8 @@ export default class BudgetTahunan extends Component {
pic: '', pic: '',
submitter: false, submitter: false,
detailRevisiCheck: [], detailRevisiCheck: [],
lastRevision: "" lastRevision: "",
checkApprover: false
} }
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
} }
...@@ -81,10 +82,10 @@ export default class BudgetTahunan extends Component { ...@@ -81,10 +82,10 @@ export default class BudgetTahunan extends Component {
api.create().checkApprover().then(response => { api.create().checkApprover().then(response => {
console.log(response); console.log(response);
if (response.data.data.is_approver === true) { if (response.data.data.is_approver === true) {
this.setState({ isApprover: true }, () => this.setState({ isApprover: true, checkApprover: true }, () =>
this.getDetailUser()) this.getDetailUser())
} else { } else {
this.setState({ isApprover: false }, () => this.setState({ isApprover: false, checkApprover: false }, () =>
this.getDetailUser()) this.getDetailUser())
} }
}) })
...@@ -273,11 +274,21 @@ export default class BudgetTahunan extends Component { ...@@ -273,11 +274,21 @@ export default class BudgetTahunan extends Component {
approverID: response.data.data.approve_id, pic: response.data.data.approver == null ? '' : response.data.data.approver, approverID: response.data.data.approve_id, pic: response.data.data.approver == null ? '' : response.data.data.approver,
lastStatus: response.data.data.last_status === null ? 'SUBMIT' : response.data.data.last_status, lastStatus: response.data.data.last_status === null ? 'SUBMIT' : response.data.data.last_status,
loading: false, loading: false,
lastRevision: response.data.data.last_revision lastRevision: response.data.data.last_revision,
}, () => { }, () => {
console.log(this.state.lastStatus);
this.historyApproval() this.historyApproval()
this.getReport() this.getReport()
this.getReportAttachment() this.getReportAttachment()
api.create().checkApprover().then(response => {
// console.log(response);
if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true })
} else {
this.setState({ isApprover: this.state.lastStatus === "SUBMITTED" ? true : false, checkApprover: false })
}
})
}) })
} else { } else {
this.setState({ submissionID: null, loading: null }) this.setState({ submissionID: null, loading: null })
...@@ -752,7 +763,7 @@ export default class BudgetTahunan extends Component { ...@@ -752,7 +763,7 @@ export default class BudgetTahunan extends Component {
{this.state.visibleBudgetTahunan && ( {this.state.visibleBudgetTahunan && (
<div> <div>
<div className={"main-color"} style={{ height: 78, display: 'flex', alignItems: 'center', paddingLeft: 20 }}> <div className={"main-color"} style={{ height: 78, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
<Typography style={{ fontSize: '16px', color: 'white' }}>Master Budget Submission & CAT Submission</Typography> <Typography style={{ fontSize: '16px', color: 'white' }}>Master Budget & CAT Submission</Typography>
</div> </div>
<div style={{ padding: 20, width: '100%' }}> <div style={{ padding: 20, width: '100%' }}>
<Paper style={{ paddingTop: 10 }}> <Paper style={{ paddingTop: 10 }}>
...@@ -842,7 +853,7 @@ export default class BudgetTahunan extends Component { ...@@ -842,7 +853,7 @@ export default class BudgetTahunan extends Component {
this.state.listAttachment.map((item, index) => { this.state.listAttachment.map((item, index) => {
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Typography style={{ fontSize: '13px', color: '#4b4b4b', width: 25 }}>{index+1}. </Typography> <Typography style={{ fontSize: '13px', color: '#4b4b4b', width: 25 }}>{index + 1}. </Typography>
<button <button
style={{ style={{
...@@ -888,29 +899,29 @@ export default class BudgetTahunan extends Component { ...@@ -888,29 +899,29 @@ export default class BudgetTahunan extends Component {
} }
</div> </div>
</div> </div>
{this.state.isApprover === true ? {this.state.checkApprover === true ?
this.state.lastStatus === 'WAITING FOR REVIEW' ? this.state.lastStatus === 'WAITING FOR REVIEW' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center' }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{this.state.lastStatus}</span> <span>{this.state.lastStatus}</span>
</div> : this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' ? </div> : this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center' }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{this.state.lastStatus}</span> <span>{this.state.lastStatus}</span>
</div> : null </div> : null
: :
this.state.lastStatus === 'SUBMITTED' ? this.state.lastStatus === 'SUBMITTED' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center' }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{this.state.lastStatus}</span> <span>{this.state.lastStatus}</span>
</div> : </div> :
this.state.lastStatus === 'WAITING FOR APPROVAL' ? this.state.lastStatus === 'WAITING FOR APPROVAL' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center' }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>{`${this.state.lastStatus} - ${this.state.pic}`}</span> <span>{`${this.state.lastStatus} - ${this.state.pic}`}</span>
</div> : </div> :
this.state.lastStatus === 'REVISION' ? this.state.lastStatus === 'REVISION' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center' }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>NEED REVISION</span> <span>NEED REVISION</span>
</div> : </div> :
this.state.lastStatus === 'APPROVED' ? this.state.lastStatus === 'APPROVED' ?
<div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center' }}> <div style={{ width: '100%', padding: '10px 20px', backgroundColor: 'yellow', textAlign: 'center', marginTop: 20 }}>
<span>APPROVED</span> <span>APPROVED</span>
</div> : null </div> : null
} }
...@@ -926,7 +937,7 @@ export default class BudgetTahunan extends Component { ...@@ -926,7 +937,7 @@ export default class BudgetTahunan extends Component {
</div> </div>
)} )}
</div> </div>
{this.state.isApprover === true ? {this.state.checkApprover === true ?
this.state.lastStatus === 'WAITING FOR REVIEW' ? this.state.lastStatus === 'WAITING FOR REVIEW' ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} > <div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button <button
......
This diff is collapsed.
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