Commit a2e7d408 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'rifka' into 'master'

update bahasa dan layout tax planning

See merge request !190
parents 88eea993 36599645
...@@ -71,7 +71,7 @@ export default class CreateApprovalMatrix extends Component { ...@@ -71,7 +71,7 @@ export default class CreateApprovalMatrix extends Component {
}; };
this.setState({ approvedBy: defaultProps, userData: response.data.data}) this.setState({ approvedBy: defaultProps, userData: response.data.data})
} else { } else {
alert('Approver: ' +response.data.message) alert('Approver Name: ' +response.data.message)
} }
}) })
} }
...@@ -157,22 +157,22 @@ export default class CreateApprovalMatrix extends Component { ...@@ -157,22 +157,22 @@ export default class CreateApprovalMatrix extends Component {
validasi() { validasi() {
if (R.isNil(this.state.typeId)) { if (R.isNil(this.state.typeId)) {
this.setState({ errorType: true, msgErrType: 'Approval Type is Required' }) this.setState({ errorType: true, msgErrType: 'Approval Type Cannot be Empty' })
} }
else if (R.isEmpty(this.state.order)) { else if (R.isEmpty(this.state.order)) {
this.setState({ errorOrder: true, msgErrOrder: 'Order is Required'}) this.setState({ errorOrder: true, msgErrOrder: 'Order Cannot be Empty'})
} }
else if (R.isNil(this.state.userId)) { else if (R.isNil(this.state.userId)) {
// return alert("Pemberi Persetujuan tidak boleh kosong"); // return alert("Pemberi Persetujuan tidak boleh kosong");
this.setState({ errorApproved: true, msgErrApproved: 'Approver is Required' }) this.setState({ errorApproved: true, msgErrApproved: 'Approver Name Cannot be Empty' })
} }
else if (R.isNil(this.state.operatorId)) { else if (R.isNil(this.state.operatorId)) {
this.setState({ errorOperator: true, msgErrOperator: 'Operator is Required' }) this.setState({ errorOperator: true, msgErrOperator: 'Operator Cannot be Empty' })
} }
else if (R.isNil(this.state.startDate)) { else if (R.isNil(this.state.startDate)) {
this.setState({ errorStartDate: true, msgErrorStartDate: 'Start Date is Required' }) this.setState({ errorStartDate: true, msgErrorStartDate: 'Valid From Cannot be Empty' })
} else if (R.isNil(this.state.endDate)) { } else if (R.isNil(this.state.endDate)) {
this.setState({ errorEndDate: true, msgErrorEndDate: 'End Date is Required' }) this.setState({ errorEndDate: true, msgErrorEndDate: 'Valid To Cannot be Empty' })
} else { } else {
console.log('masuk'); console.log('masuk');
let payload = { let payload = {
...@@ -299,7 +299,7 @@ export default class CreateApprovalMatrix extends Component { ...@@ -299,7 +299,7 @@ export default class CreateApprovalMatrix extends Component {
debug debug
renderInput={(params) => renderInput={(params) =>
<TextField {...params} <TextField {...params}
label="Approver" label="Approver Name"
onChange={(e) => this.handleChange(e, '')} onChange={(e) => this.handleChange(e, '')}
error={this.state.errorApproved} error={this.state.errorApproved}
helperText={this.state.msgErrApproved} helperText={this.state.msgErrApproved}
...@@ -353,7 +353,7 @@ export default class CreateApprovalMatrix extends Component { ...@@ -353,7 +353,7 @@ export default class CreateApprovalMatrix extends Component {
<DatePicker <DatePicker
margin="normal" margin="normal"
id="startDate" id="startDate"
label="Start Date" label="Valid From"
format="dd MMMM yyyy" format="dd MMMM yyyy"
value={this.state.startDate == "" ? null : this.state.startDate} value={this.state.startDate == "" ? null : this.state.startDate}
onChange={(e) => this.handleChange(e, 'start_date')} onChange={(e) => this.handleChange(e, 'start_date')}
...@@ -382,7 +382,7 @@ export default class CreateApprovalMatrix extends Component { ...@@ -382,7 +382,7 @@ export default class CreateApprovalMatrix extends Component {
<DatePicker <DatePicker
margin="normal" margin="normal"
id="endDate" id="endDate"
label="End Date" label="Valid To"
format="dd MMMM yyyy" format="dd MMMM yyyy"
value={this.state.endDate == "" ? null : this.state.endDate} value={this.state.endDate == "" ? null : this.state.endDate}
error={this.state.errorEndDate} error={this.state.errorEndDate}
......
...@@ -176,21 +176,21 @@ export default class EditApprovalMatrix extends Component { ...@@ -176,21 +176,21 @@ export default class EditApprovalMatrix extends Component {
validasi() { validasi() {
if (R.isNil(this.state.getTypes)) { if (R.isNil(this.state.getTypes)) {
this.setState({ errorType: true, msgErrType: 'Approval Type is Required' }) this.setState({ errorType: true, msgErrType: 'Approval Type Cannot be Empty' })
} }
else if (R.isEmpty(this.state.order)) { else if (R.isEmpty(this.state.order)) {
this.setState({ errorOrder: true, msgErrOrder: 'Order is Required'}) this.setState({ errorOrder: true, msgErrOrder: 'Order Cannot be Empty'})
} }
else if (R.isNil(this.state.getApprovedBy)) { else if (R.isNil(this.state.getApprovedBy)) {
this.setState({ errorApproved: true, msgErrApproved: 'Approver is Required' }) this.setState({ errorApproved: true, msgErrApproved: 'Approver Name Cannot be Empty' })
} }
else if (R.isNil(this.state.getOperators)) { else if (R.isNil(this.state.getOperators)) {
this.setState({ errorOperator: true, msgErrOperator: 'Operator is Required' }) this.setState({ errorOperator: true, msgErrOperator: 'Operator Cannot be Empty' })
} }
else if (R.isEmpty(this.state.startDate)) { else if (R.isEmpty(this.state.startDate)) {
this.setState({ errorStartDate: true, msgErrorStartDate: 'Start Date is Required' }) this.setState({ errorStartDate: true, msgErrorStartDate: 'Valid From Cannot be Empty' })
} else if (R.isEmpty(this.state.endDate)) { } else if (R.isEmpty(this.state.endDate)) {
this.setState({ errorEndDate: true, msgErrorEndDate: 'End Date is Required' }) this.setState({ errorEndDate: true, msgErrorEndDate: 'Valid To Cannot be Empty' })
} else { } else {
console.log('masuk'); console.log('masuk');
if (this.props.type == 'edit') { if (this.props.type == 'edit') {
...@@ -319,7 +319,7 @@ export default class EditApprovalMatrix extends Component { ...@@ -319,7 +319,7 @@ export default class EditApprovalMatrix extends Component {
onChange={(event, newInputValue) => this.setState({getApprovedBy: newInputValue}, ()=> this.clearError())} onChange={(event, newInputValue) => this.setState({getApprovedBy: newInputValue}, ()=> this.clearError())}
renderInput={(params) => renderInput={(params) =>
<TextField {...params} <TextField {...params}
label="Approver" label="Approver Name"
onChange={(e) => this.handleChange(e, '')} onChange={(e) => this.handleChange(e, '')}
error={this.state.errorApproved} error={this.state.errorApproved}
helperText={this.state.msgErrApproved} helperText={this.state.msgErrApproved}
...@@ -373,7 +373,7 @@ export default class EditApprovalMatrix extends Component { ...@@ -373,7 +373,7 @@ export default class EditApprovalMatrix extends Component {
<DatePicker <DatePicker
margin="normal" margin="normal"
id="startDate" id="startDate"
label="Start Date" label="Valid From"
format="dd MMMM yyyy" format="dd MMMM yyyy"
value={this.state.startDate} value={this.state.startDate}
onChange={(e) => this.handleChange(e, 'start_date')} onChange={(e) => this.handleChange(e, 'start_date')}
...@@ -402,7 +402,7 @@ export default class EditApprovalMatrix extends Component { ...@@ -402,7 +402,7 @@ export default class EditApprovalMatrix extends Component {
<DatePicker <DatePicker
margin="normal" margin="normal"
id="endDate" id="endDate"
label="End Date" label="Valid To"
format="dd MMMM yyyy" format="dd MMMM yyyy"
error={this.state.errorEndDate} error={this.state.errorEndDate}
helperText={this.state.msgErrorEndDate} helperText={this.state.msgErrorEndDate}
......
...@@ -326,6 +326,8 @@ export default class BudgetTahunan extends Component { ...@@ -326,6 +326,8 @@ export default class BudgetTahunan extends Component {
)} )}
{this.state.visibleTP && ( {this.state.visibleTP && (
<TaxPlanning <TaxPlanning
report_id={this.state.report_id}
company={this.state.company}
onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })}
/> />
)} )}
......
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