Commit 35fa4c81 authored by Deni Rinaldi's avatar Deni Rinaldi

pus pus pus

parent b1bdffca
......@@ -851,7 +851,7 @@ export default class TaxPlanning extends Component {
}
}
})
// console.log(tableMeta.rowData[5])
// console.log(tableMeta.rowData[8])
// console.log(baru)
// console.log(anjay)
// console.log(total)
......@@ -863,12 +863,6 @@ export default class TaxPlanning extends Component {
// } else {
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc.value = total
// }
// } else if (dex == 2) {
// if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp.value == undefined) {
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp = total
// } else {
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp.value = total
// }
// } else {
// if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value == undefined) {
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = total
......@@ -7435,7 +7429,7 @@ export default class TaxPlanning extends Component {
}}
onClick={() => {
// this.forceUpdate()
this.setState({ loading: true, buttonDraft: false, dataTable: dataTable2 }, () => {
this.setState({ loading: true, buttonDraft: false }, () => {
setTimeout(() => {
// this.setState({ loading: false, buttonError: false, editable: true })
this.handleValidate()
......
......@@ -125,8 +125,9 @@ export default class CreateParameter extends Component {
options: typeData,
getOptionLabel: (option) => option.setting_group_name,
};
this.setState({ types: typeProps, typeData: response.data.data, getTypes: index == -1 ? typeData[0] : typeData[index] }, ()=> {
this.getParameterByGroup(this.state.getTypes.setting_group_id)})
this.setState({ types: typeProps, typeData: response.data.data, getTypes: index == -1 ? typeData[0] : typeData[index] }, () => {
this.getParameterByGroup(this.state.getTypes.setting_group_id)
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) {
......@@ -535,7 +536,7 @@ export default class CreateParameter extends Component {
</div>
<div className="border-bottom grid grid-2x grid-mobile-none gap-15px" style={{ padding: 20 }}>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ padding: 20 }}>
<div className="column-1">
<div style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
<TextField
......@@ -629,8 +630,8 @@ export default class CreateParameter extends Component {
}
// this.handleChange(coba, 'value')}
}
error={this.state.errorValue}
helperText={this.state.msgErrorValue}
error={this.state.errorValue}
helperText={this.state.msgErrorValue}
>
</TextField>
</div>
......@@ -719,17 +720,6 @@ export default class CreateParameter extends Component {
}}
/>
</div>
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '25%' }}>Created By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.tempData === null ? "" : this.state.tempData.created}</Typography>
</div>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '25%' }}>Updated By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.tempData === null ? "" : this.state.tempData.updated === null ? "" : this.state.tempData.updated}</Typography>
</div>
</div>
</div>
<div className="column-2">
......@@ -870,6 +860,17 @@ export default class CreateParameter extends Component {
</div>
</div>
<div className="border-bottom margin-top-10px" style={{ padding: '0px 20px 20px 20px', borderRadius: 5 }}>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '12%' }}>Created By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.tempData === null ? "" : this.state.tempData.created}</Typography>
</div>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '12%' }}>Updated By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.tempData === null ? "" : this.state.tempData.updated === null ? "" : this.state.tempData.updated}</Typography>
</div>
</div>
<div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1" style={{ alignSelf: 'center' }}>
<button
......
......@@ -53,7 +53,7 @@ export default class CreatePerusahaan extends Component {
}
componentDidMount() {
if(this.props.type === 'edit') {
if (this.props.type === 'edit') {
this.getDetailPerusahaan()
// console.log(this.props.data);
} else {
......@@ -88,8 +88,8 @@ export default class CreatePerusahaan extends Component {
updated: response.data.data.updated === null ? "" : response.data.data.updated
}, () => {
// setTimeout(() => {
this.getAllUnitBisnis()
this.getCompanyActive()
this.getAllUnitBisnis()
this.getCompanyActive()
// }, 1000);
})
} else {
......@@ -104,10 +104,10 @@ export default class CreatePerusahaan extends Component {
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
}
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
}
}
})
}
......@@ -120,7 +120,7 @@ export default class CreatePerusahaan extends Component {
}
api.create().getPerusahaanActive(payload).then(response => {
console.log(response)
if (response.data) {
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
let data = response.data.data
......@@ -160,10 +160,10 @@ export default class CreatePerusahaan extends Component {
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
}
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
}
}
})
}
}
......@@ -186,7 +186,7 @@ export default class CreatePerusahaan extends Component {
let typeProps = {
options: typeData,
getOptionLabel: (option) => option.business_unit_name,
};
};
if (this.props.type === 'edit') {
this.setState({ types: typeProps, typeData: response.data.data, getTypes: index == -1 ? null : typeData[index], msgErrorUB: index === -1 ? 'Business Unit has been Inactive' : "", errorUB: index === -1 ? true : false })
} else {
......@@ -204,10 +204,10 @@ export default class CreatePerusahaan extends Component {
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
}
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
}
}
})
}
......@@ -274,7 +274,7 @@ export default class CreatePerusahaan extends Component {
} else if (R.isNil(this.state.getPerusahaan)) {
this.setState({ errorPC: true, msgErrorPC: 'Parent Company Cannot be Empty' })
} else if (R.isNil(this.state.getTypes)) {
this.setState({ errorUB: true, msgErrorUB: 'Business Unit Cannot be Empty' })
this.setState({ errorUB: true, msgErrorUB: 'Business Unit Cannot be Empty' })
} else if (R.isNil(this.state.startDate)) {
this.setState({ errorSD: true, msgErrorSD: 'Valid From Cannot be Empty' })
} else if (R.isNil(this.state.endDate)) {
......@@ -289,7 +289,7 @@ export default class CreatePerusahaan extends Component {
"start_date": this.state.startDate,
"end_date": this.state.endDate
}
this.props.updatePerusahaan(payload)
this.props.updatePerusahaan(payload)
}
}
......@@ -299,12 +299,12 @@ export default class CreatePerusahaan extends Component {
} else if (R.isNil(this.state.getPerusahaan)) {
this.setState({ errorPC: true, msgErrorPC: 'Parent Company Cannot be Empty.' })
} else if (R.isNil(this.state.getTypes)) {
this.setState({ errorUB: true, msgErrorUB: 'Business Unit Cannot be Empty.' })
this.setState({ errorUB: true, msgErrorUB: 'Business Unit Cannot be Empty.' })
} else if (R.isNil(this.state.startDate)) {
this.setState({ errorSD: true, msgErrorSD: 'Valid From Cannot be Empty.' })
} else if (R.isNil(this.state.endDate)) {
this.setState({ errorED: true, msgErrorED: 'Valid To Cannot be Empty.' })
}
}
else {
let payload = {
"company_name": this.state.company,
......@@ -344,13 +344,13 @@ export default class CreatePerusahaan extends Component {
className="btn btn-circle btn-white"
onClick={() => this.props.onClickClose()}
>
<img src={Images.close}/>
<img src={Images.close} />
</button>
</div>
</div>
<div className="border-bottom grid grid-2x grid-mobile-none gap-15px" style={{ padding: 20 }}>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ padding: 20 }}>
<div className="column-1">
<div style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
<TextField
......@@ -377,16 +377,16 @@ export default class CreatePerusahaan extends Component {
{...this.state.types}
debug
id="tipe"
onChange={(event, newInputValue) => this.setState({ getTypes: newInputValue }, ()=> this.clearError())}
renderInput={(params) =>
<TextField
{...params}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
label="Business Unit"
error={this.state.errorUB}
helperText={this.state.msgErrorUB}
/>
onChange={(event, newInputValue) => this.setState({ getTypes: newInputValue }, () => this.clearError())}
renderInput={(params) =>
<TextField
{...params}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
label="Business Unit"
error={this.state.errorUB}
helperText={this.state.msgErrorUB}
/>
}
value={this.state.getTypes}
/>
......@@ -438,17 +438,6 @@ export default class CreatePerusahaan extends Component {
}}
/>
</div>
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '25%' }}>Created By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.created}</Typography>
</div>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '25%' }}>Updated By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.updated}</Typography>
</div>
</div>
</div>
<div className="column-2">
......@@ -480,16 +469,16 @@ export default class CreatePerusahaan extends Component {
{...this.state.perusahaan}
debug
id="tipe"
onChange={(event, newInputValue) => this.setState({ getPerusahaan: newInputValue }, ()=> this.clearError())}
renderInput={(params) =>
<TextField
{...params}
label="Parent Company"
error={this.state.errorPC}
helperText={this.state.msgErrorPC}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
onChange={(event, newInputValue) => this.setState({ getPerusahaan: newInputValue }, () => this.clearError())}
renderInput={(params) =>
<TextField
{...params}
label="Parent Company"
error={this.state.errorPC}
helperText={this.state.msgErrorPC}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
}
value={this.state.getPerusahaan}
/>
......@@ -525,6 +514,17 @@ export default class CreatePerusahaan extends Component {
</div>
</div>
<div className="border-bottom margin-top-10px" style={{ padding: '0px 20px 20px 20px', borderRadius: 5 }}>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '12%' }}>Created By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.created}</Typography>
</div>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '12%' }}>Updated By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.updated}</Typography>
</div>
</div>
<div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1" style={{ alignSelf: 'center' }}>
<button
......@@ -568,7 +568,7 @@ export default class CreatePerusahaan extends Component {
className="btn btn-circle btn-white"
onClick={() => this.props.onClickClose()}
>
<img src={Images.close}/>
<img src={Images.close} />
</button>
</div>
</div>
......@@ -600,23 +600,23 @@ export default class CreatePerusahaan extends Component {
{...this.state.types}
debug
id="tipe"
onChange={(event, newInputValue) => this.setState({ getTypes: newInputValue }, ()=> this.clearError())}
renderInput={(params) =>
<TextField
{...params}
label="Business Unit"
margin="normal"
style={{marginTop: 7}}
error={this.state.errorUB}
helperText={this.state.msgErrorUB}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
onChange={(event, newInputValue) => this.setState({ getTypes: newInputValue }, () => this.clearError())}
renderInput={(params) =>
<TextField
{...params}
label="Business Unit"
margin="normal"
style={{ marginTop: 7 }}
error={this.state.errorUB}
helperText={this.state.msgErrorUB}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
}
value={this.state.types}
/>
</div>
</div>
<div style={{ padding: 10, borderRadius: 5 }}>
<DatePicker
margin="normal"
......@@ -699,16 +699,16 @@ export default class CreatePerusahaan extends Component {
{...this.state.perusahaan}
debug
id="tipe"
onChange={(event, newInputValue) => this.setState({ getPerusahaan: newInputValue }, ()=> this.clearError())}
renderInput={(params) =>
<TextField
{...params}
label="Parent Company"
error={this.state.errorPC}
helperText={this.state.msgErrorPC}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
onChange={(event, newInputValue) => this.setState({ getPerusahaan: newInputValue }, () => this.clearError())}
renderInput={(params) =>
<TextField
{...params}
label="Parent Company"
error={this.state.errorPC}
helperText={this.state.msgErrorPC}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/>
}
value={this.state.perusahaan}
/>
......
......@@ -85,7 +85,7 @@ export default class CreateUnitBisnis extends Component {
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
}
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
}
......@@ -188,7 +188,7 @@ export default class CreateUnitBisnis extends Component {
</div>
<div className="border-bottom grid grid-2x grid-mobile-none gap-15px" style={{ padding: 20 }}>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ padding: 20 }}>
<div className="column-1">
<div style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
<TextField
......@@ -258,17 +258,6 @@ export default class CreateUnitBisnis extends Component {
}}
/>
</div>
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '25%' }}>Created By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.created}</Typography>
</div>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '25%' }}>Updated By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.updated}</Typography>
</div>
</div>
</div>
<div className="column-2">
......@@ -327,6 +316,17 @@ export default class CreateUnitBisnis extends Component {
</div>
<div className="border-bottom margin-top-10px" style={{ padding: '0px 20px 20px 20px', borderRadius: 5 }}>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '12%' }}>Created By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.created}</Typography>
</div>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '12%' }}>Updated By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.updated}</Typography>
</div>
</div>
<div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1" style={{ alignSelf: 'center' }}>
<button
......
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