Commit ecd7b8bb authored by EKSAD's avatar EKSAD

titik

parent 26c6f5af
...@@ -423,25 +423,25 @@ export default class CreateParameter extends Component { ...@@ -423,25 +423,25 @@ export default class CreateParameter extends Component {
validasi() { validasi() {
if (R.isNil(this.state.getTypes)) { if (R.isNil(this.state.getTypes)) {
this.setState({ errorGroup: true, msgErrorGroup: 'Group Cannot be Empty.' }) this.setState({ errorGroup: true, msgErrorGroup: 'Group Cannot be Empty' })
} else if (R.isNil(this.state.getParameter)) { } else if (R.isNil(this.state.getParameter)) {
this.setState({ errorParameter: true, msgErrorParameter: 'Parameter Cannot be Empty.' }) this.setState({ errorParameter: true, msgErrorParameter: 'Parameter Cannot be Empty' })
} else if (R.isNil(this.state.getPerusahaan)) { } else if (R.isNil(this.state.getPerusahaan)) {
this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Company Cannot be Empty.' }) this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Company Cannot be Empty' })
// } else if (R.isEmpty(this.state.tempData.description)) { // } else if (R.isEmpty(this.state.tempData.description)) {
// this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' }) // this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' })
} else if (R.isEmpty(this.state.tempData.value) && R.isEmpty(this.state.tempData.min_value) && R.isEmpty(this.state.tempData.max_value)) { } else if (R.isEmpty(this.state.tempData.value) && R.isEmpty(this.state.tempData.min_value) && R.isEmpty(this.state.tempData.max_value)) {
this.setState({ errorValue: true, msgErrorValue: 'Value Cannot be Empty.' }) this.setState({ errorValue: true, msgErrorValue: 'Value Cannot be Empty' })
} else if ((!R.isEmpty(this.state.tempData.max_value) && R.isEmpty(this.state.tempData.min_value))) { } else if ((!R.isEmpty(this.state.tempData.max_value) && R.isEmpty(this.state.tempData.min_value))) {
this.setState({ errorMinValue: true, msgErrorMinValue: 'Min Value Cannot be Empty.' }) this.setState({ errorMinValue: true, msgErrorMinValue: 'Min Value Cannot be Empty' })
} else if (R.isNil(this.state.tempData.start_date)) { } else if (R.isNil(this.state.tempData.start_date)) {
this.setState({ errorStartDate: true, msgErrorStartDate: 'Valid From Cannot be Empty.' }) this.setState({ errorStartDate: true, msgErrorStartDate: 'Valid From Cannot be Empty' })
// } else if (R.isNil(this.state.tempData.order)) { // } else if (R.isNil(this.state.tempData.order)) {
// this.setState({ errorOrder: true, msgErrorOrder: 'Order tidak boleh kosong' }) // this.setState({ errorOrder: true, msgErrorOrder: 'Order tidak boleh kosong' })
} else if ((!R.isEmpty(this.state.tempData.min_value) && R.isEmpty(this.state.tempData.max_value))) { } else if ((!R.isEmpty(this.state.tempData.min_value) && R.isEmpty(this.state.tempData.max_value))) {
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.tempData.end_date)) { } else if (R.isNil(this.state.tempData.end_date)) {
this.setState({ errorEndDate: true, msgErrorEndDate: 'Valid To Cannot be Empty.' }) this.setState({ errorEndDate: true, msgErrorEndDate: 'Valid To Cannot be Empty' })
} else { } else {
this.updateParameter() this.updateParameter()
} }
...@@ -449,25 +449,25 @@ export default class CreateParameter extends Component { ...@@ -449,25 +449,25 @@ export default class CreateParameter extends Component {
validasiCreate() { validasiCreate() {
if (R.isNil(this.state.getTypes)) { if (R.isNil(this.state.getTypes)) {
this.setState({ errorGroup: true, msgErrorGroup: 'Group Cannot be Empty.' }) this.setState({ errorGroup: true, msgErrorGroup: 'Group Cannot be Empty' })
} else if (R.isNil(this.state.getParameter)) { } else if (R.isNil(this.state.getParameter)) {
this.setState({ errorParameter: true, msgErrorParameter: 'Parameter Cannot be Empty.' }) this.setState({ errorParameter: true, msgErrorParameter: 'Parameter Cannot be Empty' })
} else if (R.isNil(this.state.getPerusahaan)) { } else if (R.isNil(this.state.getPerusahaan)) {
this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Company Cannot be Empty.' }) this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Company Cannot be Empty' })
// } else if (R.isEmpty(this.state.description)) { // } else if (R.isEmpty(this.state.description)) {
// this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' }) // this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' })
} else if ((R.isEmpty(this.state.value) && R.isEmpty(this.state.maxValue) && R.isEmpty(this.state.minValue))) { } else if ((R.isEmpty(this.state.value) && R.isEmpty(this.state.maxValue) && R.isEmpty(this.state.minValue))) {
this.setState({ errorValue: true, msgErrorValue: 'Value Cannot be Empty.' }) this.setState({ errorValue: true, msgErrorValue: 'Value Cannot be Empty' })
} else if ((!R.isEmpty(this.state.maxValue) && R.isEmpty(this.state.minValue))) { } else if ((!R.isEmpty(this.state.maxValue) && R.isEmpty(this.state.minValue))) {
this.setState({ errorMinValue: true, msgErrorMinValue: 'Min Value Cannot be Empty.' }) this.setState({ errorMinValue: true, msgErrorMinValue: 'Min Value Cannot be Empty' })
} else if (R.isNil(this.state.startDate)) { } else if (R.isNil(this.state.startDate)) {
this.setState({ errorStartDate: true, msgErrorStartDate: 'Valid From Cannot be Empty.' }) this.setState({ errorStartDate: true, msgErrorStartDate: 'Valid From Cannot be Empty' })
// } else if (R.isNil(this.state.order)) { // } else if (R.isNil(this.state.order)) {
// this.setState({ errorOrder: true, msgErrorOrder: 'Order tidak boleh kosong' }) // this.setState({ errorOrder: true, msgErrorOrder: 'Order tidak boleh kosong' })
} else if ((!R.isEmpty(this.state.minValue) && R.isEmpty(this.state.maxValue))) { } else if ((!R.isEmpty(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()
} }
......
...@@ -262,15 +262,15 @@ export default class CreatePerusahaan extends Component { ...@@ -262,15 +262,15 @@ export default class CreatePerusahaan extends Component {
validasiEdit() { validasiEdit() {
if (R.isEmpty(this.state.company)) { if (R.isEmpty(this.state.company)) {
this.setState({ errorNP: true, msgErrorNP: 'Company Name Cannot be Empty.' }) this.setState({ errorNP: true, msgErrorNP: 'Company Name Cannot be Empty' })
} else if (R.isNil(this.state.getPerusahaan)) { } else if (R.isNil(this.state.getPerusahaan)) {
this.setState({ errorPC: true, msgErrorPC: 'Parent Company Cannot be Empty.' }) this.setState({ errorPC: true, msgErrorPC: 'Parent Company Cannot be Empty' })
} else if (R.isNil(this.state.getTypes)) { } 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)) { } else if (R.isNil(this.state.startDate)) {
this.setState({ errorSD: true, msgErrorSD: 'Valid From Cannot be Empty.' }) this.setState({ errorSD: true, msgErrorSD: 'Valid From Cannot be Empty' })
} else if (R.isNil(this.state.endDate)) { } else if (R.isNil(this.state.endDate)) {
this.setState({ errorED: true, msgErrorED: 'Valid To Cannot be Empty.' }) this.setState({ errorED: true, msgErrorED: 'Valid To Cannot be Empty' })
} else { } else {
let payload = { let payload = {
"company_id": this.state.companyID, "company_id": this.state.companyID,
......
...@@ -124,11 +124,11 @@ export default class CreateUnitBisnis extends Component { ...@@ -124,11 +124,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 Cannot be Empty.' }) 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: 'Valid From Cannot be Empty.' }) this.setState({ errorStartDate: true, msgErrorStartDate: 'Valid From 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: 'Valid To Cannot be Empty.' }) this.setState({ errorEndDate: true, msgErrorEndDate: 'Valid To Cannot be Empty' })
} else { } else {
let payload = { let payload = {
"business_unit_id": this.state.id, "business_unit_id": this.state.id,
...@@ -142,11 +142,11 @@ export default class CreateUnitBisnis extends Component { ...@@ -142,11 +142,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 Cannot be Empty.' }) 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: 'Valid From Cannot be Empty.' }) 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: 'Valid To Cannot be Empty.' }) this.setState({ errorEndDate: true, msgErrorEndDate: 'Valid To Cannot be Empty' })
} else { } else {
let payload = { let payload = {
"business_unit_name": this.state.name, "business_unit_name": this.state.name,
......
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