Commit 9db1674e authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'syadziy' into 'master'

Syadziy

See merge request !212
parents 5ccd8333 2d957ce6
...@@ -456,9 +456,9 @@ export default class CreateApprovalMatrix extends Component { ...@@ -456,9 +456,9 @@ export default class CreateApprovalMatrix extends Component {
</div> </div>
</div> */} </div> */}
</div> </div>
<div className="margin-top-10px" style={{ padding: 10, paddingLeft: 0 }}> <div className="margin-top-10px" style={{ paddingTop: 10, paddingBottom: 10, paddingLeft: 10, paddingRight: 30 }}>
<Typography style={{ fontSize: 11 }}>{`Created by : `}</Typography> <Typography style={{ fontSize: 11 }}>{`Created By : `}</Typography>
{/* <Typography style={{ fontSize: 11 }}>Diubah : Admin - 21 Jul 2020, 18:45</Typography> */} <Typography style={{ fontSize: 11 }}>{`Updated By :`}</Typography>
</div> </div>
</div> </div>
<div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}> <div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
......
...@@ -489,13 +489,13 @@ export default class EditApprovalMatrix extends Component { ...@@ -489,13 +489,13 @@ export default class EditApprovalMatrix extends Component {
</div> */} </div> */}
</div> </div>
</div> </div>
<div className="margin-top-10px" style={{ padding: 10, paddingLeft: 0, borderRadius: 5 }}> <div className="margin-top-10px" style={{ paddingTop: 10, paddingBottom: 10, paddingLeft: 10, paddingRight: 20 }}>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '20%' }}>Created by</Typography> <Typography style={{ fontSize: 11, width: '12%' }}>Created By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.created}</Typography> <Typography style={{ fontSize: 11 }}>: {this.state.created}</Typography>
</div> </div>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '20%' }}>Updated by</Typography> <Typography style={{ fontSize: 11, width: '12%' }}>Updated By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.updated == - null ? "" : this.state.updated}</Typography> <Typography style={{ fontSize: 11 }}>: {this.state.updated == - null ? "" : this.state.updated}</Typography>
</div> </div>
</div> </div>
......
...@@ -45,6 +45,7 @@ export default class VisualisasiAM extends Component { ...@@ -45,6 +45,7 @@ export default class VisualisasiAM extends Component {
getTypeData() { getTypeData() {
api.create().getTypeAM().then((response) => { api.create().getTypeAM().then((response) => {
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
let data = response.data.data let data = response.data.data
// console.log(data) // console.log(data)
...@@ -60,7 +61,10 @@ export default class VisualisasiAM extends Component { ...@@ -60,7 +61,10 @@ export default class VisualisasiAM extends Component {
}; };
this.setState({ types: typeProps, typeData: response.data.data }) this.setState({ types: typeProps, typeData: response.data.data })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -71,6 +75,7 @@ export default class VisualisasiAM extends Component { ...@@ -71,6 +75,7 @@ export default class VisualisasiAM extends Component {
"keyword": this.state.typeName "keyword": this.state.typeName
} }
api.create().searchAM(body).then(response => { api.create().searchAM(body).then(response => {
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
let data = response.data.data let data = response.data.data
// console.log(data) // console.log(data)
...@@ -92,7 +97,10 @@ export default class VisualisasiAM extends Component { ...@@ -92,7 +97,10 @@ export default class VisualisasiAM extends Component {
this.setState({ listApproval: listVisual}) this.setState({ listApproval: listVisual})
// console.log(listVisual); // console.log(listVisual);
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
......
...@@ -75,6 +75,7 @@ export default class CreateParameter extends Component { ...@@ -75,6 +75,7 @@ export default class CreateParameter extends Component {
getDetailParameter() { getDetailParameter() {
api.create().getDetailParameter(this.props.data[0]).then((response) => { api.create().getDetailParameter(this.props.data[0]).then((response) => {
console.log(response); console.log(response);
if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
let data = response.data.data let data = response.data.data
this.setState({ this.setState({
...@@ -89,7 +90,10 @@ export default class CreateParameter extends Component { ...@@ -89,7 +90,10 @@ export default class CreateParameter extends Component {
console.log(this.state.tempData) console.log(this.state.tempData)
}) })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -97,6 +101,7 @@ export default class CreateParameter extends Component { ...@@ -97,6 +101,7 @@ export default class CreateParameter extends Component {
getAllGroup() { getAllGroup() {
api.create().getAllGroup().then(response => { api.create().getAllGroup().then(response => {
console.log(response); console.log(response);
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
let data = response.data.data let data = response.data.data
let typeData = data.map((item) => { let typeData = data.map((item) => {
...@@ -112,13 +117,17 @@ export default class CreateParameter extends Component { ...@@ -112,13 +117,17 @@ export default class CreateParameter extends Component {
}; };
this.setState({ types: typeProps, typeData: response.data.data, getTypes: index == -1 ? typeData[0] : typeData[index] }) this.setState({ types: typeProps, typeData: response.data.data, getTypes: index == -1 ? typeData[0] : typeData[index] })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
getPerusahaan() { getPerusahaan() {
api.create().getPerusahaanActive().then(response => { api.create().getPerusahaanActive().then(response => {
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
let data = response.data.data let data = response.data.data
let perusahaanData = data.map((item) => { let perusahaanData = data.map((item) => {
...@@ -138,13 +147,17 @@ export default class CreateParameter extends Component { ...@@ -138,13 +147,17 @@ export default class CreateParameter extends Component {
}; };
this.setState({ perusahaan: typeProps, perusahaanData: response.data.data, getPerusahaan: index == -1 ? null : perusahaanData[index], msgErrorPerusahaan: index === -1 ? 'Company has been inactive' : "", errorPerusahaan: index === -1 ? true : false }) this.setState({ perusahaan: typeProps, perusahaanData: response.data.data, getPerusahaan: index == -1 ? null : perusahaanData[index], msgErrorPerusahaan: index === -1 ? 'Company has been inactive' : "", errorPerusahaan: index === -1 ? true : false })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
getDataGroup() { getDataGroup() {
api.create().getAllGroup().then((response) => { api.create().getAllGroup().then((response) => {
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
let data = response.data.data let data = response.data.data
let typeData = data.map((item) => { let typeData = data.map((item) => {
...@@ -159,13 +172,17 @@ export default class CreateParameter extends Component { ...@@ -159,13 +172,17 @@ export default class CreateParameter extends Component {
}; };
this.setState({ types: typeProps, typeData: response.data.data }) this.setState({ types: typeProps, typeData: response.data.data })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
getDataPerusahaan() { getDataPerusahaan() {
api.create().getPerusahaanActive().then((response) => { api.create().getPerusahaanActive().then((response) => {
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
let data = response.data.data let data = response.data.data
let typeData = data.map((item) => { let typeData = data.map((item) => {
...@@ -184,7 +201,10 @@ export default class CreateParameter extends Component { ...@@ -184,7 +201,10 @@ export default class CreateParameter extends Component {
}; };
this.setState({ perusahaan: typeProps, perusahaanData: response.data.data }) this.setState({ perusahaan: typeProps, perusahaanData: response.data.data })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -192,6 +212,7 @@ export default class CreateParameter extends Component { ...@@ -192,6 +212,7 @@ export default class CreateParameter extends Component {
getParameterByGroup(id) { getParameterByGroup(id) {
api.create().getParameterByGroup(id).then(response => { api.create().getParameterByGroup(id).then(response => {
console.log(response); console.log(response);
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
let data = response.data.data let data = response.data.data
let typeData = data.map((item) => { let typeData = data.map((item) => {
...@@ -207,7 +228,10 @@ export default class CreateParameter extends Component { ...@@ -207,7 +228,10 @@ export default class CreateParameter extends Component {
}; };
this.setState({ enableParameter: true, parameter: typeProps, parameterData: response.data.data, getParameter: index == -1 ? typeData[0] : typeData[index] }) this.setState({ enableParameter: true, parameter: typeProps, parameterData: response.data.data, getParameter: index == -1 ? typeData[0] : typeData[index] })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -378,7 +402,7 @@ export default class CreateParameter extends Component { ...@@ -378,7 +402,7 @@ export default class CreateParameter extends Component {
} else if ((!R.isNil(this.state.minValue) && R.isNil(this.state.maxValue)) || (!R.isNil(this.state.minValue) && R.isEmpty(this.state.maxValue))) { } else if ((!R.isNil(this.state.minValue) && R.isNil(this.state.maxValue)) || (!R.isNil(this.state.minValue) && R.isEmpty(this.state.maxValue))) {
this.setState({ errorMaxValue: true, msgErrorMaxValue: 'Max Value Cannot be Empty.' }) this.setState({ errorMaxValue: true, msgErrorMaxValue: 'Max Value Cannot be Empty.' })
} else if (R.isNil(this.state.endDate)) { } else if (R.isNil(this.state.endDate)) {
this.setState({ errorEndDate: true, msgErrorEndDate: 'Valid To Cannot be Empty' }) this.setState({ errorEndDate: true, msgErrorEndDate: 'Valid To Cannot be Empty.' })
} else { } else {
this.createParameter() this.createParameter()
} }
...@@ -789,7 +813,7 @@ export default class CreateParameter extends Component { ...@@ -789,7 +813,7 @@ export default class CreateParameter extends Component {
onClick={() => this.props.onClickClose()} onClick={() => this.props.onClickClose()}
> >
<div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#354960', fontSize: 11 }}>Batal</span> <span style={{ color: '#354960', fontSize: 11 }}>Cancel</span>
</div> </div>
</button> </button>
</div> </div>
...@@ -799,7 +823,7 @@ export default class CreateParameter extends Component { ...@@ -799,7 +823,7 @@ export default class CreateParameter extends Component {
onClick={() => this.validasi()} onClick={() => this.validasi()}
> >
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Simpan</span> <span style={{ color: '#fff', fontSize: 11 }}>Save</span>
</div> </div>
</button> </button>
</div> </div>
...@@ -1159,7 +1183,7 @@ export default class CreateParameter extends Component { ...@@ -1159,7 +1183,7 @@ export default class CreateParameter extends Component {
onClick={() => this.props.onClickClose()} onClick={() => this.props.onClickClose()}
> >
<div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#354960', fontSize: 11 }}>Batal</span> <span style={{ color: '#354960', fontSize: 11 }}>Cancel</span>
</div> </div>
</button> </button>
</div> </div>
......
...@@ -179,6 +179,7 @@ export default class Parameter extends Component { ...@@ -179,6 +179,7 @@ export default class Parameter extends Component {
} }
api.create().searchParameter(body).then(response => { api.create().searchParameter(body).then(response => {
console.log(response.data); console.log(response.data);
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
let data = response.data.data let data = response.data.data
let listData = data.map((item, index) => { let listData = data.map((item, index) => {
...@@ -198,7 +199,10 @@ export default class Parameter extends Component { ...@@ -198,7 +199,10 @@ export default class Parameter extends Component {
}) })
this.setState({ dataTable: listData, listData: response.data.data }) this.setState({ dataTable: listData, listData: response.data.data })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
......
...@@ -91,7 +91,7 @@ export default class Perusahaan extends Component { ...@@ -91,7 +91,7 @@ export default class Perusahaan extends Component {
] ]
}) })
let columns = [ let columns = [
"Data Ke-", "Data",
{ {
name: "Company Name", name: "Company Name",
options: { options: {
...@@ -637,7 +637,7 @@ export default class Perusahaan extends Component { ...@@ -637,7 +637,7 @@ export default class Perusahaan extends Component {
style={{ marginRight: 20 }} style={{ marginRight: 20 }}
> >
<div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#354960', fontSize: 11 }}>Batal</span> <span style={{ color: '#354960', fontSize: 11 }}>Cancel</span>
</div> </div>
</button> </button>
<button <button
...@@ -646,7 +646,7 @@ export default class Perusahaan extends Component { ...@@ -646,7 +646,7 @@ export default class Perusahaan extends Component {
style={{}} style={{}}
> >
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}> <div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Simpan</span> <span style={{ color: '#fff', fontSize: 11 }}>Save</span>
</div> </div>
</button> </button>
</div> </div>
......
...@@ -65,8 +65,8 @@ export default class ReportItems extends Component { ...@@ -65,8 +65,8 @@ export default class ReportItems extends Component {
report: item[0], report: item[0],
company: item[1], company: item[1],
orders: item[2], orders: item[2],
description: item[3] === undefined ? null : item[3], description: item[3] === undefined ? "-" : item[3],
parent: item[4] === undefined ? null : item[4], parent: item[4] === undefined ? 0 : item[4],
uom: item[5] === undefined ? null : item[5], uom: item[5] === undefined ? null : item[5],
weight: item[6] === undefined ? "" : item[6], weight: item[6] === undefined ? "" : item[6],
type_report: item[7], type_report: item[7],
......
...@@ -830,14 +830,14 @@ export default class CreateReportItems extends Component { ...@@ -830,14 +830,14 @@ export default class CreateReportItems extends Component {
</div> </div>
</div> </div>
<div className="margin-top-10px" style={{ padding: 20}}> <div className="margin-top-10px" style={{ paddingTop: 10, paddingBottom: 30, paddingRight: 30, paddingLeft: 30}}>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '13%' }}>Created By</Typography> <Typography style={{ fontSize: 11, width: '13%' }}>Created By :</Typography>
<Typography style={{ fontSize: 11 }}>: </Typography> {/* <Typography style={{ fontSize: 11 }}>: </Typography> */}
</div> </div>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '13%' }}>Updated By</Typography> <Typography style={{ fontSize: 11, width: '13%' }}>Updated By :</Typography>
<Typography style={{ fontSize: 11 }}>: </Typography> {/* <Typography style={{ fontSize: 11 }}>: </Typography> */}
</div> </div>
</div> </div>
......
...@@ -796,13 +796,13 @@ export default class EditReportItems extends Component { ...@@ -796,13 +796,13 @@ export default class EditReportItems extends Component {
</div> </div>
</div> </div>
</div> </div>
<div className="margin-top-10px" style={{ padding: 20}}> <div className="margin-top-10px" style={{ paddingTop: 10, paddingBottom: 30, paddingRight: 30, paddingLeft: 30}}>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '13%' }}>Created By</Typography> <Typography style={{ fontSize: 11, width: '12%' }}>Created By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.tempData === null ? "" : this.state.tempData.created}</Typography> <Typography style={{ fontSize: 11 }}>: {this.state.tempData === null ? "" : this.state.tempData.created}</Typography>
</div> </div>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '13%' }}>Updated By</Typography> <Typography style={{ fontSize: 11, width: '12%' }}>Updated By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.tempData === null ? "" : this.state.tempData.updated}</Typography> <Typography style={{ fontSize: 11 }}>: {this.state.tempData === null ? "" : this.state.tempData.updated}</Typography>
</div> </div>
</div> </div>
......
...@@ -689,7 +689,7 @@ export default class EditUser extends Component { ...@@ -689,7 +689,7 @@ export default class EditUser extends Component {
</div> </div>
</div> </div>
</div> </div>
<div style={{ flexDirection: 'column', display: 'flex', paddingLeft: 20, paddingRight: 20 }}> <div style={{ flexDirection: 'column', display: 'flex', paddingLeft: 30, paddingRight: 30 }}>
<Typography style={{ fontSize: 11 }}>{`Created By : ${this.state.tempData === null ? '' : this.state.tempData.created}`}</Typography> <Typography style={{ fontSize: 11 }}>{`Created By : ${this.state.tempData === null ? '' : this.state.tempData.created}`}</Typography>
<Typography style={{ fontSize: 11 }}>{`Updated By : ${this.state.tempData === null ? '' : this.state.tempData.updated}`}</Typography> <Typography style={{ fontSize: 11 }}>{`Updated By : ${this.state.tempData === null ? '' : this.state.tempData.updated}`}</Typography>
</div> </div>
......
...@@ -507,7 +507,7 @@ export default class EditRole extends Component { ...@@ -507,7 +507,7 @@ export default class EditRole extends Component {
</div> </div>
</div> </div>
</div> </div>
<div style={{ flexDirection: 'column', display: 'flex', paddingLeft: 20, paddingRight: 20 }}> <div style={{ flexDirection: 'column', display: 'flex', paddingLeft: 30, paddingRight: 30 }}>
<Typography style={{ fontSize: 11 }}>{`Created By : ${this.state.tempData === null ? '' : (this.state.tempData.created === null ? '-' : this.state.tempData.created)}`}</Typography> <Typography style={{ fontSize: 11 }}>{`Created By : ${this.state.tempData === null ? '' : (this.state.tempData.created === null ? '-' : this.state.tempData.created)}`}</Typography>
<Typography style={{ fontSize: 11 }}>{`Updated By : ${this.state.tempData === null ? '' : (this.state.tempData.updated === null ? '-' : this.state.tempData.updated)}`}</Typography> <Typography style={{ fontSize: 11 }}>{`Updated By : ${this.state.tempData === null ? '' : (this.state.tempData.updated === null ? '-' : this.state.tempData.updated)}`}</Typography>
</div> </div>
......
...@@ -499,7 +499,7 @@ export default class Profile extends Component { ...@@ -499,7 +499,7 @@ export default class Profile extends Component {
style={{}} style={{}}
> >
<div style={{ backgroundColor: '#354960', textAlign: 'center', height: 25, width: 64, borderRadius: 3 }}> <div style={{ backgroundColor: '#354960', textAlign: 'center', height: 25, width: 64, borderRadius: 3 }}>
<span style={{ color: 'white', fontSize: 11 }}>Simpan</span> <span style={{ color: 'white', fontSize: 11 }}>Save</span>
</div> </div>
</button> </button>
</div> </div>
......
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