Commit a7622619 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

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

parents 2fca59d0 88eea993
...@@ -9,6 +9,7 @@ import { titleCase } from '../library/Utils'; ...@@ -9,6 +9,7 @@ import { titleCase } from '../library/Utils';
import ProfitLoss from './BudgetTahunan/ProfitLoss'; import ProfitLoss from './BudgetTahunan/ProfitLoss';
import TaxPlanning from './BudgetTahunan/TaxPlanning'; import TaxPlanning from './BudgetTahunan/TaxPlanning';
import FixedAssetsMovement from './BudgetTahunan/FixedAssetsMovement'; import FixedAssetsMovement from './BudgetTahunan/FixedAssetsMovement';
import CorporateAnnualTarget from './BudgetTahunan/CorporateAnnualTarget';
export default class BudgetTahunan extends Component { export default class BudgetTahunan extends Component {
constructor(props) { constructor(props) {
...@@ -23,7 +24,8 @@ export default class BudgetTahunan extends Component { ...@@ -23,7 +24,8 @@ export default class BudgetTahunan extends Component {
company: null, company: null,
report_id: null, report_id: null,
visiblePL: false, visiblePL: false,
visibleFAM: false visibleFAM: false,
visibleCAT: false
} }
} }
...@@ -114,6 +116,15 @@ export default class BudgetTahunan extends Component { ...@@ -114,6 +116,15 @@ export default class BudgetTahunan extends Component {
visibleFAM: true, visibleFAM: true,
visibleTP: false visibleTP: false
}) })
} else if (item === 'CAT') {
this.setState({
visibleBudgetTahunan: false,
visibleBS: false,
visiblePL: false,
visibleCAT: true,
visibleFAM: false,
visibleTP: false
})
} }
} }
...@@ -306,7 +317,12 @@ export default class BudgetTahunan extends Component { ...@@ -306,7 +317,12 @@ export default class BudgetTahunan extends Component {
/> />
)} )}
{this.state.visiblePL && ( {this.state.visiblePL && (
<ProfitLoss /> <ProfitLoss
report_id={this.state.report_id}
company={this.state.company}
onClickClose={()=> this.setState({ visiblePL: false, visibleBudgetTahunan: true})}
/>
)} )}
{this.state.visibleTP && ( {this.state.visibleTP && (
<TaxPlanning <TaxPlanning
...@@ -316,7 +332,14 @@ export default class BudgetTahunan extends Component { ...@@ -316,7 +332,14 @@ export default class BudgetTahunan extends Component {
/> />
)} )}
{this.state.visibleFAM && ( {this.state.visibleFAM && (
<FixedAssetsMovement /> <FixedAssetsMovement
onClickClose={() => this.setState({ visibleFAM: false, visibleBudgetTahunan: true })}
/>
)}
{this.state.visibleCAT && (
<CorporateAnnualTarget
onClickClose={() => this.setState({ visibleCAT: false, visibleBudgetTahunan: true })}
/>
)} )}
</div > </div >
); );
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -238,6 +238,29 @@ export default class Perusahaan extends Component { ...@@ -238,6 +238,29 @@ export default class Perusahaan extends Component {
componentDidMount() { componentDidMount() {
this.getData() this.getData()
this.getPermission()
}
getPermission() {
let payload = {
menu: "company"
}
api.create().getPermission(payload).then(response => {
console.log(response)
if (response.data) {
if (response.data.status === "success") {
this.setState({
create: response.data.data.create,
edit: response.data.data.edit,
load: true
})
} else {
this.setState({
load: true
})
}
}
})
} }
getData() { getData() {
...@@ -472,6 +495,7 @@ export default class Perusahaan extends Component { ...@@ -472,6 +495,7 @@ export default class Perusahaan extends Component {
</Alert> </Alert>
</Snackbar> </Snackbar>
{this.state.visiblePerusahaan === true ? {this.state.visiblePerusahaan === true ?
this.state.load && (
<div> <div>
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -118 }}> <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -118 }}>
<label style={{ color: 'white', fontSize: 16, alignSelf: 'center', width: '20%', }}>Master Data - Company</label> <label style={{ color: 'white', fontSize: 16, alignSelf: 'center', width: '20%', }}>Master Data - Company</label>
...@@ -570,8 +594,9 @@ export default class Perusahaan extends Component { ...@@ -570,8 +594,9 @@ export default class Perusahaan extends Component {
</div> </div>
</div> </div>
)
: :
this.state.visibleVisual == true ? this.state.visibleVisual === true ?
<VisualPerusahaan <VisualPerusahaan
onClickClose={() => this.setState({ visibleVisual: false, visiblePerusahaan: true })} onClickClose={() => this.setState({ visibleVisual: false, visiblePerusahaan: true })}
height={this.props.height} height={this.props.height}
......
...@@ -350,7 +350,7 @@ export default class CreateReportItems extends Component { ...@@ -350,7 +350,7 @@ export default class CreateReportItems extends Component {
<div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}> <div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
<div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}> <div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}>
<div className="popup-title"> <div className="popup-title">
<span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Add Data</span> <span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Create Data</span>
</div> </div>
</div> </div>
<div className="col-2 content-right" style={{ maxWidth: "inherit", alignSelf: 'center' }}> <div className="col-2 content-right" style={{ maxWidth: "inherit", alignSelf: 'center' }}>
...@@ -431,7 +431,7 @@ export default class CreateReportItems extends Component { ...@@ -431,7 +431,7 @@ export default class CreateReportItems extends Component {
debug debug
renderInput={(params) => renderInput={(params) =>
<TextField {...params} <TextField {...params}
label="Company" label="Company Name"
InputLabelProps={{ InputLabelProps={{
style: { style: {
fontSize: 11, fontSize: 11,
...@@ -830,16 +830,14 @@ export default class CreateReportItems extends Component { ...@@ -830,16 +830,14 @@ export default class CreateReportItems extends Component {
</div> </div>
</div> </div>
<div className="grid grid-2x grid-mobile-none gap-15px" style={{ paddingBottom: 20, paddingLeft: 20, paddingRight: 20 }}> <div className="margin-top-10px" style={{ padding: 20}}>
<div className="column-1">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11 }}>Created By :</Typography> <Typography style={{ fontSize: 11, width: '13%' }}>Created By</Typography>
<Typography style={{ fontSize: 11 }}>: </Typography>
</div> </div>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11 }}>Updated By :</Typography> <Typography style={{ fontSize: 11, width: '13%' }}>Updated By</Typography>
</div> <Typography style={{ fontSize: 11 }}>: </Typography>
</div>
</div> </div>
</div> </div>
......
...@@ -421,7 +421,7 @@ export default class EditReportItems extends Component { ...@@ -421,7 +421,7 @@ export default class EditReportItems extends Component {
debug debug
renderInput={(params) => renderInput={(params) =>
<TextField {...params} <TextField {...params}
label="Company" label="Company Name"
InputLabelProps={{ InputLabelProps={{
style: { style: {
fontSize: 11, fontSize: 11,
......
...@@ -112,11 +112,11 @@ export default class CreateUnitBisnis extends Component { ...@@ -112,11 +112,11 @@ export default class CreateUnitBisnis extends Component {
validasi() { validasi() {
if (R.isEmpty(this.state.name)) { if (R.isEmpty(this.state.name)) {
this.setState({ errorName: true, msgErrorName: 'Business unit is required.' }) this.setState({ errorName: true, msgErrorName: 'Business unit 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: 'Start date Cannot be Empty.' })
} else if (R.isEmpty(this.state.endDate) || this.state.endDate === null) { } else if (R.isEmpty(this.state.endDate) || this.state.endDate === null) {
this.setState({ errorEndDate: true, msgErrorEndDate: 'End date is required.' }) this.setState({ errorEndDate: true, msgErrorEndDate: 'End date Cannot be Empty.' })
} else { } else {
let payload = { let payload = {
"business_unit_id": this.state.id, "business_unit_id": this.state.id,
...@@ -130,11 +130,11 @@ export default class CreateUnitBisnis extends Component { ...@@ -130,11 +130,11 @@ export default class CreateUnitBisnis extends Component {
validasiCreate() { validasiCreate() {
if (R.isEmpty(this.state.name)) { if (R.isEmpty(this.state.name)) {
this.setState({ errorName: true, msgErrorName: 'Business unit is required.' }) this.setState({ errorName: true, msgErrorName: 'Business unit 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: 'Start date 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: 'End date Cannot be Empty.' })
} else { } else {
let payload = { let payload = {
"business_unit_name": this.state.name, "business_unit_name": this.state.name,
......
...@@ -78,7 +78,7 @@ export default class Profile extends Component { ...@@ -78,7 +78,7 @@ export default class Profile extends Component {
validasi() { validasi() {
if (this.state.oldPassword == "") { if (this.state.oldPassword == "") {
this.setState({ errorOldPassword: true, msgOldPassword: 'Old password is required.' }) this.setState({ errorOldPassword: true, msgOldPassword: 'Old password Cannot be Empty.' })
} else if (this.state.oldPassword.length < 8) { } else if (this.state.oldPassword.length < 8) {
this.setState({ errorOldPassword: true, msgOldPassword: 'Old password minimum 8 characters.' }) this.setState({ errorOldPassword: true, msgOldPassword: 'Old password minimum 8 characters.' })
} else if (this.isEmail(this.state.oldPassword)) { } else if (this.isEmail(this.state.oldPassword)) {
...@@ -86,7 +86,7 @@ export default class Profile extends Component { ...@@ -86,7 +86,7 @@ export default class Profile extends Component {
} else if (!this.isRegex(this.state.oldPassword)) { } else if (!this.isRegex(this.state.oldPassword)) {
this.setState({ errorOldPassword: true, msgOldPassword: 'Old password must be a combination of characters, letters and numbers.' }) this.setState({ errorOldPassword: true, msgOldPassword: 'Old password must be a combination of characters, letters and numbers.' })
} else if (this.state.password.trim() == "") { } else if (this.state.password.trim() == "") {
this.setState({ errorPassword: true, msgPassword: 'Password is required.' }) this.setState({ errorPassword: true, msgPassword: 'Password Cannot be Empty.' })
} else if (this.state.password.length < 8) { } else if (this.state.password.length < 8) {
this.setState({ errorPassword: true, msgPassword: 'Password minimum 8 characters.' }) this.setState({ errorPassword: true, msgPassword: 'Password minimum 8 characters.' })
} else if (this.isEmail(this.state.password)) { } else if (this.isEmail(this.state.password)) {
...@@ -94,7 +94,7 @@ export default class Profile extends Component { ...@@ -94,7 +94,7 @@ export default class Profile extends Component {
} else if (!this.isRegex(this.state.password)) { } else if (!this.isRegex(this.state.password)) {
this.setState({ errorPassword: true, msgPassword: 'Password must be a combination of characters, letters and numbers.' }) this.setState({ errorPassword: true, msgPassword: 'Password must be a combination of characters, letters and numbers.' })
} else if (this.state.confirmPassword.trim() == "") { } else if (this.state.confirmPassword.trim() == "") {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation is required.' }) this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation Cannot be Empty.' })
} else if (this.state.confirmPassword.length < 8) { } else if (this.state.confirmPassword.length < 8) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation of at least 8 characters.' }) this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation of at least 8 characters.' })
} else if (this.isEmail(this.state.confirmPassword)) { } else if (this.isEmail(this.state.confirmPassword)) {
......
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