Commit 1039484f authored by EKSAD's avatar EKSAD

edit report item

parent aa2e2607
...@@ -119,6 +119,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') => ...@@ -119,6 +119,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
const getReportItems = () => api.get('item_report/get_all_item_report') const getReportItems = () => api.get('item_report/get_all_item_report')
const getInputType = () => api.get('type_report/get_all_type_report') const getInputType = () => api.get('type_report/get_all_type_report')
const getReportType = () => api.get('report/get_all_report') const getReportType = () => api.get('report/get_all_report')
const getDetailReportItems = (userId) => api.get(`item_report/get_item_report_by_id/${userId}`)
const searchReportItems = (body) => api.post('/item_report/search_item_report', body) const searchReportItems = (body) => api.post('/item_report/search_item_report', body)
const createReportItems = (body) => api.post('/item_report/create_item_report', body) const createReportItems = (body) => api.post('/item_report/create_item_report', body)
const updateReportItems = (body) => api.post('/item_report/update_item_report', body) const updateReportItems = (body) => api.post('/item_report/update_item_report', body)
...@@ -195,6 +196,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') => ...@@ -195,6 +196,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
searchReportItems, searchReportItems,
createReportItems, createReportItems,
updateReportItems, updateReportItems,
getDetailReportItems,
getInputType, getInputType,
getReportType, getReportType,
checkUploadReportItems, checkUploadReportItems,
......
...@@ -3,72 +3,15 @@ import { TextField, Typography } from '@material-ui/core'; ...@@ -3,72 +3,15 @@ import { TextField, Typography } from '@material-ui/core';
import { DatePicker } from '@material-ui/pickers'; import { DatePicker } from '@material-ui/pickers';
import format from "date-fns/format"; import format from "date-fns/format";
import Autocomplete from '@material-ui/lab/Autocomplete'; import Autocomplete from '@material-ui/lab/Autocomplete';
import api from '../../../api';
import * as R from 'ramda' import * as R from 'ramda'
import { titleCase } from '../../../library/Utils';
const companies = [
{
value: '',
label: '',
},
{
value: '1',
label: 'TIA',
},
{
value: '2',
label: 'TIA',
},
];
const dataTypes = [
{
value: '',
label: '',
},
{
value: '1',
label: 'Formula',
},
{
value: '2',
label: 'Formula',
},
];
const reportTypes = [
{
value: '',
label: '',
},
{
value: '1',
label: 'KPI',
},
{
value: '2',
label: 'KPI',
},
];
const parents = [
{
value: '-',
label: '-',
},
{
value: '1',
label: '1',
},
{
value: '2',
label: '2',
},
];
export default class EditReportItems extends Component { export default class EditReportItems extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
tempData: null, tempData: null,
InputType: null, InputType: null,
company: null, company: null,
...@@ -109,7 +52,12 @@ export default class EditReportItems extends Component { ...@@ -109,7 +52,12 @@ export default class EditReportItems extends Component {
} }
componentDidMount() { componentDidMount() {
console.log(this.props.data); // console.log(this.props.data);
this.getDetailReportItems();
this.getInputType()
this.getPerusahaan()
this.getReportType()
this.getParent()
} }
handleChange(e, type) { handleChange(e, type) {
...@@ -197,6 +145,117 @@ export default class EditReportItems extends Component { ...@@ -197,6 +145,117 @@ export default class EditReportItems extends Component {
} }
getDetailReportItems() {
api.create().getDetailReportItems(this.props.data.item_report_id).then((response) => {
this.getInputType()
this.getPerusahaan()
this.getReportType()
this.getParent()
if (response.data.status === 'success') {
this.setState({ tempData: response.data.data})
console.log(response.data.data)
} else {
alert(response.data.message)
}
})
}
getInputType() {
api.create().getInputType().then((response) => {
// console.log(response)
if(response.data.status === 'success') {
let data = response.data.data
let inputData = data.map((item) => {
return {
type_report_id: item.type_report_id,
type_report_name: item.type_report_name
}
})
let defaultProps = {
options: inputData,
getOptionLabel: (option) => titleCase(option.type_report_name),
};
let index = inputData.findIndex((val) => val.type_report_id === this.state.tempData.type_report_id)
this.setState({listInputType: defaultProps, InputType: index === -1 ? inputData[0] : inputData[index]})
} else {
alert(response.data.message)
}
})
}
getPerusahaan() {
api.create().getPerusahaanActive().then((response) => {
console.log(response)
if(response.data.status === 'success') {
let data = response.data.data
let companyData = data.map((item) => {
return {
company_id: item.company_id,
company_name: item.company_name
}
})
let defaultProps = {
options: companyData,
getOptionLabel: (option) => titleCase(option.company_name),
};
let index = companyData.findIndex((val) => val.company_id === this.state.tempData.company_id)
this.setState({listCompany: defaultProps, company: index === -1 ? companyData[0] : companyData[index]})
} else {
alert(response.data.message)
}
})
}
getReportType() {
api.create().getReportType().then((response) => {
console.log(response)
if(response.data.status === 'success') {
let data = response.data.data
let reportTypeData = data.map((item) => {
return {
report_id: item.report_id,
report_name: item.report_name,
}
})
let defaultProps = {
options: reportTypeData,
getOptionLabel: (option) => titleCase(option.report_name),
};
let index = reportTypeData.findIndex((val) => val.report_id === this.state.tempData.report_id)
this.setState({listReportType: defaultProps, reportType: index === -1 ? reportTypeData[0] : reportTypeData[index]})
} else {
alert(response.data.message)
}
})
}
getParent() {
api.create().getReportItems().then((response) => {
// console.log(response)
if(response.data.status === 'success') {
let data = response.data.data
let parentData = data.map((item) => {
return {
item_report_id: item.item_report_id,
report_name: item.report_name
}
})
let defaultProps = {
options: parentData,
getOptionLabel: (option) => titleCase(option.report_name),
};
let index = parentData.findIndex((val) => val.item_report_id === this.state.tempData.item_report_id)
this.setState({listParent: defaultProps, parent: index === -1 ? parentData[0] : parentData[index]})
} else {
alert(response.data.message)
}
})
}
render() { render() {
const { startDate, endDate } = this.state; const { startDate, endDate } = this.state;
...@@ -226,16 +285,17 @@ export default class EditReportItems extends Component { ...@@ -226,16 +285,17 @@ export default class EditReportItems extends Component {
<div style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}> <div style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
<TextField <TextField
style={{ width: '100%' }} style={{ width: '100%' }}
value={1} value={this.state.tempData === null ? '' : this.state.tempData.item_report_id}
id="ID" id="ID"
label="ID" label="ID"
disabled disabled
variant="filled"
onChange={(e) => null}
inputProps={{ inputProps={{
style: { style: {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif'
paddingLeft: 10
} }
}} }}
InputLabelProps={{ InputLabelProps={{
...@@ -243,60 +303,45 @@ export default class EditReportItems extends Component { ...@@ -243,60 +303,45 @@ export default class EditReportItems extends Component {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif',
color: '#7e8085', color: '#7e8085'
paddingLeft: 10
} }
}} }}
/> />
</div> </div>
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{padding: 10}} >
<TextField <Autocomplete
{...this.state.listCompany}
id="company" id="company"
style={{ width: '100%' }} onChange={(event, newInputValue) => this.setState({company: newInputValue})}
select debug
label="Perusahaan" renderInput={(params) =>
// onChange={handleChange} <TextField {...params}
helperText="" label="Perusahaan"
SelectProps={{ InputLabelProps={{
native: true, style: {
}} fontSize: 11,
InputLabelProps={{ fontWeight: 600,
style: { fontFamily: 'Nunito Sans, sans-serif',
fontSize: 11, color: '#7e8085'
fontWeight: 600, }
fontFamily: 'Nunito Sans, sans-serif', }}
color: '#7e8085', InputProps={{ ...params.InputProps, style: { fontSize: 11, fontWeight: 600, fontFamily: 'Nunito Sans, sans-serif' } }}
paddingLeft: 10 />}
} value={this.state.company}
}} />
inputProps={{
style: {
fontSize: 11,
fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif',
paddingLeft: 10
}
}}
>
{companies.map((option) => (
<option key={option.value} value={option.value}>
{option.label}
</option>
))}
</TextField>
</div> </div>
<div style={{ padding: 10, borderRadius: 5 }}> <div style={{ padding: 10, borderRadius: 5 }}>
<TextField <TextField
style={{ width: '100%' }} style={{ width: '100%' }}
id="description" id="description"
label="Deskripsi" label="Deskripsi"
// value={this.props.data.business_unit_name} onChange={(e) => null}
value={this.state.tempData === null ? '' : this.state.tempData.description}
inputProps={{ inputProps={{
style: { style: {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif'
paddingLeft: 10
} }
}} }}
InputLabelProps={{ InputLabelProps={{
...@@ -304,8 +349,7 @@ export default class EditReportItems extends Component { ...@@ -304,8 +349,7 @@ export default class EditReportItems extends Component {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif',
color: '#7e8085', color: '#7e8085'
paddingLeft: 10
} }
}} }}
> >
...@@ -316,13 +360,13 @@ export default class EditReportItems extends Component { ...@@ -316,13 +360,13 @@ export default class EditReportItems extends Component {
style={{ width: '100%' }} style={{ width: '100%' }}
id="uom" id="uom"
label="UOM" label="UOM"
// value={this.props.data.business_unit_name} onChange={(e) => null}
value={this.state.tempData === null ? '' : this.state.tempData.uom}
inputProps={{ inputProps={{
style: { style: {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif'
paddingLeft: 10
} }
}} }}
InputLabelProps={{ InputLabelProps={{
...@@ -330,64 +374,52 @@ export default class EditReportItems extends Component { ...@@ -330,64 +374,52 @@ export default class EditReportItems extends Component {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif',
color: '#7e8085', color: '#7e8085'
paddingLeft: 10
} }
}} }}
> >
</TextField> </TextField>
</div> </div>
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{padding: 10}}>
<TextField <Autocomplete
id="dataType" {...this.state.listInputType}
style={{ width: '100%' }} id="inputType"
select onChange={(event, newInputValue) => this.setState({InputType: newInputValue},
label="Tipe Data" () => newInputValue === null ? this.setState({disabledFormula: true, disabledCondt: true, disabledValue: true, formula: '', condition: '', realVal: ''})
// onChange={handleChange} : newInputValue.type_report_name === 'FORMULA' ? this.setState({disabledFormula: false, disabledCondt: true, disabledValue: true, formula: '', condition: '', realVal: ''})
helperText="" : newInputValue.type_report_name === 'VALIDATION' ? this.setState({disabledFormula: false, disabledCondt: false, disabledValue: false, formula: '', condition: '', realVal: ''})
SelectProps={{ : this.setState({disabledFormula: true, disabledCondt: true, disabledValue: true, formula: '', condition: '', realVal: ''})
native: true, )}
}} debug
InputLabelProps={{ renderInput={(params) =>
style: { <TextField {...params}
fontSize: 11, label="Tipe Data"
fontWeight: 600, InputLabelProps={{
fontFamily: 'Nunito Sans, sans-serif', style: {
color: '#7e8085', fontSize: 11,
paddingLeft: 10 fontWeight: 600,
} fontFamily: 'Nunito Sans, sans-serif',
}} color: '#7e8085'
inputProps={{ }
style: { }}
fontSize: 11, InputProps={{ ...params.InputProps, style: { fontSize: 11, fontWeight: 600, fontFamily: 'Nunito Sans, sans-serif' } }}
fontWeight: 600, />}
fontFamily: 'Nunito Sans, sans-serif', value={this.state.InputType}
paddingLeft: 10 />
}
}}
>
{dataTypes.map((option) => (
<option key={option.value} value={option.value}>
{option.label}
</option>
))}
</TextField>
</div> </div>
<div className="margin-top-10px" style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{ padding: 10 }}>
<TextField <TextField
style={{ width: '100%' }} style={{ width: '100%' }}
// value={this.props.data.status}
id="realValue" id="realValue"
label="Nilai Seharusnya" label="Nilai Seharusnya"
value="-" disabled={this.state.disabledValue}
disabled value={this.state.tempData === null ? '' : this.state.tempData.condition_it_should_be}
inputProps={{ inputProps={{
style: { style: {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif'
paddingLeft: 10
} }
}} }}
InputLabelProps={{ InputLabelProps={{
...@@ -395,48 +427,47 @@ export default class EditReportItems extends Component { ...@@ -395,48 +427,47 @@ export default class EditReportItems extends Component {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif',
color: '#7e8085', color: '#7e8085'
paddingLeft: 10
} }
}} }}
/> />
</div> </div>
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<DatePicker <DatePicker
margin="normal" margin="normal"
id="startDate" id="startDate"
value={startDate} label="Berlaku Mulai"
onChange={this.handleStartDate} format="dd MMMM yyyy"
label="Berlaku Mulai" value={this.state.tempData === null ? null : this.state.tempData.start_date}
format="dd MMMM yyyy" error={this.state.errorStartDate}
KeyboardButtonProps={{ helperText={this.state.msgErrorSD}
'aria-label': 'change date', onChange={(e) => this.handleChange(e, 'start_date')}
}} KeyboardButtonProps={{
inputProps={{ 'aria-label': 'change date',
style: { }}
fontSize: 11, inputProps={{
fontWeight: 600, style: {
fontFamily: 'Nunito Sans, sans-serif', fontSize: 11,
paddingLeft: 10 fontWeight: 600,
} fontFamily: 'Nunito Sans, sans-serif',
}} }
InputLabelProps={{ }}
style: { InputLabelProps={{
fontSize: 11, style: {
color: '#7e8085', fontSize: 11,
fontWeight: 600, color: '#7e8085',
fontFamily: 'Nunito Sans, sans-serif', fontWeight: 600,
paddingLeft: 10 fontFamily: 'Nunito Sans, sans-serif',
} }
}} }}
style={{ padding: 0, margin: 0, width: '100%' }} style={{padding: 0, margin: 0, width: '100%'}}
/> />
</div> </div>
<div className="margin-top-10px" style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
<TextField <TextField
style={{ width: '100%' }} style={{ width: '100%' }}
value="Aktif" value={this.state.tempData === null ? '' : this.state.tempData.status}
id="status" id="status"
label="Status" label="Status"
disabled disabled
...@@ -444,8 +475,7 @@ export default class EditReportItems extends Component { ...@@ -444,8 +475,7 @@ export default class EditReportItems extends Component {
style: { style: {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif'
paddingLeft: 10
} }
}} }}
InputLabelProps={{ InputLabelProps={{
...@@ -453,8 +483,7 @@ export default class EditReportItems extends Component { ...@@ -453,8 +483,7 @@ export default class EditReportItems extends Component {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif',
color: '#7e8085', color: '#7e8085'
paddingLeft: 10
} }
}} }}
/> />
...@@ -473,48 +502,34 @@ export default class EditReportItems extends Component { ...@@ -473,48 +502,34 @@ export default class EditReportItems extends Component {
</div> </div>
<div className="column-2"> <div className="column-2">
<div style={{ padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{padding: 10}}>
<TextField <Autocomplete
{...this.state.listReportType}
id="reportType" id="reportType"
style={{ width: '100%' }} onChange={(event, newInputValue) => this.setState({reportType: newInputValue})}
select debug
label="Jenis Laporan" renderInput={(params) =>
// onChange={handleChange} <TextField {...params}
helperText="" label="Jenis Laporan"
SelectProps={{ InputLabelProps={{
native: true, style: {
}} fontSize: 11,
InputLabelProps={{ fontWeight: 600,
style: { fontFamily: 'Nunito Sans, sans-serif',
fontSize: 11, color: '#7e8085'
fontWeight: 600, }
fontFamily: 'Nunito Sans, sans-serif', }}
color: '#7e8085', InputProps={{ ...params.InputProps, style: { fontSize: 11, fontWeight: 600, fontFamily: 'Nunito Sans, sans-serif' } }}
paddingLeft: 10 />}
} value={this.state.reportType}
}} />
inputProps={{
style: {
fontSize: 11,
fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif',
paddingLeft: 10
}
}}
>
{reportTypes.map((option) => (
<option key={option.value} value={option.value}>
{option.label}
</option>
))}
</TextField>
</div> </div>
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<TextField <TextField
style={{ width: '100%' }} style={{ width: '100%' }}
id="order" id="order"
label="Order" label="Order"
value="1" value={this.state.tempData === null ? '' : this.state.tempData.order}
inputProps={{ inputProps={{
style: { style: {
fontSize: 11, fontSize: 11,
...@@ -535,54 +550,39 @@ export default class EditReportItems extends Component { ...@@ -535,54 +550,39 @@ export default class EditReportItems extends Component {
> >
</TextField> </TextField>
</div> </div>
<div style={{ padding: 10, borderRadius: 5 }}> <div style={{padding: 10}} >
<TextField <Autocomplete
id="parent" {...this.state.listParent}
style={{ width: '100%' }} id="parentId"
select onChange={(event, newInputValue) => this.setState({parent: newInputValue})}
label="Parent" debug
// onChange={handleChange} renderInput={(params) =>
helperText="" <TextField {...params}
SelectProps={{ label="Parent ID"
native: true, InputLabelProps={{
}} style: {
InputLabelProps={{ fontSize: 11,
style: { fontWeight: 600,
fontSize: 11, fontFamily: 'Nunito Sans, sans-serif',
fontWeight: 600, color: '#7e8085'
fontFamily: 'Nunito Sans, sans-serif', }
color: '#7e8085', }}
paddingLeft: 10 InputProps={{ ...params.InputProps, style: { fontSize: 11, fontWeight: 600, fontFamily: 'Nunito Sans, sans-serif' } }}
} />}
}} value={this.state.parent}
inputProps={{ />
style: {
fontSize: 11,
fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif',
paddingLeft: 10
}
}}
>
{parents.map((option) => (
<option key={option.value} value={option.value}>
{option.label}
</option>
))}
</TextField>
</div> </div>
<div style={{ padding: 10, borderRadius: 5 }}> <div style={{ padding: 10, borderRadius: 5 }}>
<TextField <TextField
style={{ width: '100%' }} style={{ width: '100%' }}
id="weight" id="weight"
label="Weight" label="Weight"
value="1" value={this.state.tempData === null ? '' : this.state.tempData.weight}
inputProps={{ inputProps={{
style: { style: {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif'
paddingLeft: 10
} }
}} }}
InputLabelProps={{ InputLabelProps={{
...@@ -590,8 +590,7 @@ export default class EditReportItems extends Component { ...@@ -590,8 +590,7 @@ export default class EditReportItems extends Component {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif',
color: '#7e8085', color: '#7e8085'
paddingLeft: 10
} }
}} }}
> >
...@@ -602,13 +601,13 @@ export default class EditReportItems extends Component { ...@@ -602,13 +601,13 @@ export default class EditReportItems extends Component {
style={{ width: '100%' }} style={{ width: '100%' }}
id="formula" id="formula"
label="Formula" label="Formula"
value="1" disabled={this.state.disabledFormula}
value={this.state.tempData === null ? '' : this.state.tempData.formula}
inputProps={{ inputProps={{
style: { style: {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif'
paddingLeft: 10
} }
}} }}
InputLabelProps={{ InputLabelProps={{
...@@ -616,69 +615,67 @@ export default class EditReportItems extends Component { ...@@ -616,69 +615,67 @@ export default class EditReportItems extends Component {
fontSize: 11, fontSize: 11,
fontWeight: 600, fontWeight: 600,
fontFamily: 'Nunito Sans, sans-serif', fontFamily: 'Nunito Sans, sans-serif',
color: '#7e8085', color: '#7e8085'
paddingLeft: 10
} }
}} }}
> >
</TextField> </TextField>
</div> </div>
<div className="margin-top-10px" style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{padding: 10}}>
<TextField <Autocomplete
style={{ width: '100%' }} value={this.state.tempData === null ? '' : this.state.tempData.condition}
value="-"
id="isWrongCondition" id="isWrongCondition"
label="Kondisi Jika Salah" disabled={this.state.disabledCondt}
disabled onChange={(event, newValue) => {
inputProps={{ this.setState({condition: newValue});
style: { }}
fontSize: 11, options={this.state.options}
fontWeight: 600, renderInput={(params) =>
fontFamily: 'Nunito Sans, sans-serif', <TextField {...params}
paddingLeft: 10 label="Kondisi Jika Salah"
} InputLabelProps={{
}} style: {
InputLabelProps={{ fontSize: 11,
style: { fontWeight: 600,
fontSize: 11, fontFamily: 'Nunito Sans, sans-serif',
fontWeight: 600, color: '#7e8085'
fontFamily: 'Nunito Sans, sans-serif', }
color: '#7e8085', }}
paddingLeft: 10 InputProps={{ ...params.InputProps, style: { fontSize: 11, fontWeight: 600, fontFamily: 'Nunito Sans, sans-serif' } }}
} />}
}}
/> />
</div> </div>
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}> <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<DatePicker <DatePicker
margin="normal" margin="normal"
id="endDate" id="endDate"
value={endDate} label="Berlaku Hingga"
onChange={this.handleEndDate} format="dd MMMM yyyy"
label="Berlaku Hingga" value={this.state.tempData === null ? '' : this.state.tempData.end_date}
format="dd MMMM yyyy" error={this.state.errorEndDate}
KeyboardButtonProps={{ helperText={this.state.msgErrorED}
'aria-label': 'change date', onChange={(e) => this.handleChange(e, 'end_date')}
}} minDate={this.state.startDate}
inputProps={{ KeyboardButtonProps={{
style: { 'aria-label': 'change date',
fontSize: 11, }}
fontWeight: 600, inputProps={{
fontFamily: 'Nunito Sans, sans-serif', style: {
paddingLeft: 10 fontSize: 11,
} fontWeight: 600,
}} fontFamily: 'Nunito Sans, sans-serif',
InputLabelProps={{ }
style: { }}
fontSize: 11, InputLabelProps={{
color: '#7e8085', style: {
fontWeight: 600, fontSize: 11,
fontFamily: 'Nunito Sans, sans-serif', color: '#7e8085',
paddingLeft: 10 fontWeight: 600,
} fontFamily: 'Nunito Sans, sans-serif',
}} }
}}
style={{ padding: 0, margin: 0, width: '100%' }}
style={{padding: 0, margin: 0, width: '100%'}}
/> />
</div> </div>
</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