Commit ebd6bdc4 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'rifka' into 'master'

taxplan managdoc

See merge request !430
parents 05a0c2a1 672e1044
......@@ -723,9 +723,10 @@ export default class TaxPlanning extends Component {
async downloadAllData() {
let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let sub_null = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
console.log(url);
let res = await fetch(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
this.props.submissionID == null ? sub_null : url
)
res = await res.blob()
this.setState({ loading: false })
......@@ -1023,7 +1024,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1100,7 +1101,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1179,7 +1180,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1288,7 +1289,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1366,7 +1367,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1445,7 +1446,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1557,7 +1558,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1635,7 +1636,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1714,7 +1715,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1825,7 +1826,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1903,7 +1904,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -1982,7 +1983,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2093,7 +2094,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2171,7 +2172,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2250,7 +2251,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2361,7 +2362,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2439,7 +2440,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2518,7 +2519,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2629,7 +2630,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2707,7 +2708,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2786,7 +2787,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2897,7 +2898,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -2975,7 +2976,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3054,7 +3055,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3165,7 +3166,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3243,7 +3244,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3322,7 +3323,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3433,7 +3434,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3511,7 +3512,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3590,7 +3591,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3701,7 +3702,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3779,7 +3780,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3858,7 +3859,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -3969,7 +3970,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -4047,7 +4048,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -4126,7 +4127,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -4242,7 +4243,7 @@ export default class TaxPlanning extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(handleTotal(tableMeta)).toFixed(1)}
/>
}
......@@ -4348,7 +4349,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -4426,7 +4427,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -4505,7 +4506,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -4616,7 +4617,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbc).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -4694,7 +4695,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.fcp).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......@@ -4773,7 +4774,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? true : this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION' ? false : true}
disabled={this.props.isApprover == true ? true : (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false ? false : true}
value={Number(value.tbf).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
......
......@@ -10,7 +10,7 @@ import PopUpDelete from "./PopUpDelete";
import api from '../../api';
import CreateManagementDoc from './CreateManagementDoc';
import EditManagementDoc from './EditManagementDoc';
import PropagateLoader from "react-spinners/PropagateLoader"
var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable());
......@@ -33,8 +33,6 @@ export default class getAllDocument extends Component {
}
componentDidMount() {
console.log(this.props.data)
console.log(this.props.setId)
this.getData()
}
......@@ -51,7 +49,7 @@ export default class getAllDocument extends Component {
let payload = {
"setting_id": this.props.data.setting_id
}
this.setState({ loading: true })
api.create().getAllDocument(payload).then(response => {
console.log(response)
if (response.data) {
......@@ -71,19 +69,19 @@ export default class getAllDocument extends Component {
item.created_at,
]
})
this.setState({ dataTable })
this.setState({ dataTable, loading: false })
let docPath = response.data.data.map((item) => {
return [
item.document_filepath
]
})
this.setState({ docPath })
this.setState({ docPath, loading: false })
let docId = response.data.data.map((item) => {
return [
item.document_id
]
})
this.setState({ docId })
this.setState({ docId, loading: false })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
......@@ -136,16 +134,16 @@ export default class getAllDocument extends Component {
}
deleteDoc = (payload) => {
this.setState({ popupDel: false })
this.setState({ popupDel: false, loading: true })
api.create().deleteDocument(payload).then(response => {
console.log(response.data)
if (response.data) {
if (response.ok) {
if (response.data.status == 'success') {
this.getData()
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success', loading: false })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......@@ -155,24 +153,25 @@ export default class getAllDocument extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
updateDocument(payload) {
this.setState({ loading: true })
api.create().updateDocument(payload).then(response => {
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === "success") {
this.getData()
this.setState({ konfirmasi: false, alert: true, messageAlert: response.data.message, tipeAlert: 'success', visibleEdit: false })
this.setState({ konfirmasi: false, alert: true, messageAlert: response.data.message, tipeAlert: 'success', visibleEdit: false, loading: false })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......@@ -182,10 +181,10 @@ export default class getAllDocument extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
......@@ -203,7 +202,6 @@ export default class getAllDocument extends Component {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
{/* {this.state.btnedit && <span> */}
<a data-tip={'Download'} data-for="download">
<button
style={{
......@@ -219,7 +217,6 @@ export default class getAllDocument extends Component {
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
{/* </span>} */}
{this.props.btnedit && <span>
<a data-tip={'Edit'} data-for="edit">
<button
......@@ -257,7 +254,13 @@ export default class getAllDocument extends Component {
);
}
}
}, "File Name", "Description", "Company Name",
}, "File Name", "Description",
{
name: "Company Name",
options: {
display: String(this.props.data.value).includes('Manual Book TIA') ? false : true
}
},
{
name: "Period Month",
options: {
......@@ -272,6 +275,18 @@ export default class getAllDocument extends Component {
},
"Type", "File Size", "Created By", "Created Date"
]
const loadingComponent = (
<div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader
// css={override}
size={20}
color={"#274B80"}
loading={this.state.loading}
/>
</div>
);
return (
<div style={{ width: '100%' }}>
{this.props.load && (
......@@ -281,9 +296,10 @@ export default class getAllDocument extends Component {
{this.state.messageAlert}
</Alert>
</Snackbar>
{this.state.loading && loadingComponent}
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
theme={getMuiTheme()}
// theme={getMuiTheme()}
data={this.state.dataTable}
columns={columns}
options={options}
......
......@@ -9,6 +9,7 @@ import { format } from 'date-fns';
import UploadFile from "../../library/Upload";
import { ExcelRenderer } from 'react-excel-renderer';
import * as R from 'ramda'
import PropagateLoader from "react-spinners/PropagateLoader"
const Alert = withStyles({
})((props) => <MuiAlert elevation={6} variant="filled" {...props} />);
......@@ -99,7 +100,7 @@ export default class CreateManagementDoc extends Component {
// company_name: 'Default'
// })
let typeProps = {
options: typeData.sort((a, b) => a.company_id - b.company_id),
options: typeData.sort((a, b) => a.company_name - b.company_name),
getOptionLabel: (option) => option.company_name,
};
this.setState({ perusahaan: typeProps, perusahaanData: response.data.data })
......@@ -305,6 +306,16 @@ export default class CreateManagementDoc extends Component {
}
render() {
const loadingComponent = (
<div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader
// css={override}
size={20}
color={"#274B80"}
loading={this.state.loading}
/>
</div>
);
return (
<div>
<div className="test app-popup-show">
......@@ -482,7 +493,13 @@ export default class CreateManagementDoc extends Component {
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<button
type="button"
onClick={() => this.validasi()}
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.validasi()
}, 100);
})
}
>
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Save</span>
......
......@@ -68,12 +68,6 @@ export default class DocumentManagement extends Component {
}
getDataDocument(id, name) {
// let payload = {
// "setting_group_id": 7,
// "setting_type_id": 167,
// "company_id": 0
// }
api.create().getDocumentCategory().then(response => {
console.log(response);
if (response) {
......@@ -96,21 +90,22 @@ export default class DocumentManagement extends Component {
}
createDocument(payload, settingID, menuName) {
this.setState({ loading: true })
api.create().uploadDocument(payload).then(response => {
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.message === "The Document Already Exists in The System, Do You Want to Overwrite It?") {
this.setState({ formData: payload, docId: response.data.data.document_id, settingID, menuName }, () => {
this.setState({ formData: payload, docId: response.data.data.document_id, settingID, menuName, loading: false }, () => {
this.setState({ konfirmasi: true })
})
}
else if (response.data.message === "Upload Document Success") {
else if (response.data.message === "Data was Saved Successfully") {
this.getDataDocument(settingID, menuName)
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success', settingID, menuName, visibleCreate: false })
}
else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......@@ -120,10 +115,10 @@ export default class DocumentManagement extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
......@@ -132,6 +127,7 @@ export default class DocumentManagement extends Component {
const formData = this.state.formData
formData.append("documentId", this.state.docId)
formData.append("updated", 1)
this.setState({ loading: true })
api.create().updateDocument(formData).then(response => {
console.log(response)
if (response.data) {
......@@ -140,7 +136,7 @@ export default class DocumentManagement extends Component {
this.getDataDocument(this.state.settingID, this.state.menuName)
this.setState({ konfirmasi: false, alert: true, messageAlert: response.data.message, tipeAlert: 'success', visibleCreate: false })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......@@ -150,10 +146,10 @@ export default class DocumentManagement extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -529,7 +529,13 @@ export default class EditManagementDoc extends Component {
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<button
type="button"
onClick={() => this.validasi()}
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.validasi()
}, 100);
})
}
>
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Save</span>
......
......@@ -54,7 +54,13 @@ export default class PopUpDelete extends Component {
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<button
type="button"
onClick={()=> this.onClickDelete()}
onClick={() =>
this.setState({ loading: true }, () => {
setTimeout(() => {
this.onClickDelete()
}, 100);
})
}
>
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Delete</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