Commit 6e36aac0 authored by ardiansyah's avatar ardiansyah

Merge branch 'ENV-DEV' into 'ENV-STAGING'

Env dev

See merge request !2408
parents 249be92e b68b4a89
......@@ -56,10 +56,10 @@
"build": "react-scripts --max_old_space_size=4096 build",
"build_dev": "copy .env_dev .env && react-scripts --max_old_space_size=4096 build",
"build_staging": "copy .env_staging .env && react-scripts --max_old_space_size=4096 build",
"build_prod": "copy .env_prod .env && react-scripts --max_old_space_size=8192 build",
"build_prod": "copy .env_prod .env && react-scripts --max_old_space_size=4096 build",
"build_dev_linux": "cp .env_dev .env && react-scripts --max_old_space_size=4096 build",
"build_staging_linux": "cp .env_staging .env && react-scripts --max_old_space_size=4096 build",
"build_prod_linux": "cp .env_prod .env && react-scripts --max_old_space_size=8192 build",
"build_prod_linux": "cp .env_prod .env && react-scripts --max_old_space_size=4096 build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"dev": "copy .env_dev .env && react-scripts start",
......
......@@ -165,6 +165,7 @@ const create = (type = "") => {
const getApprovedByAM = () => api.get('approval_matrix/get_all_approver')
const getTypeAM = () => api.get('approval_type/get_all_approval_type')
const getOperatorAM = () => api.get('operator_type/get_all_operator_type')
const getMasterReportType = () => api.get('masterreporttype/get_all_master_report_type')
const getDetailAM = (id) => api.get(`approval_matrix/get_approval_matrix_by_id/${id}`)
const searchAM = (body) => api.post('/approval_matrix/search_approval_matrix', body)
const createAM = (body) => api.post('/approval_matrix/create_approval_matrix', body)
......@@ -633,6 +634,7 @@ const create = (type = "") => {
getApprovedByAM,
getTypeAM,
getOperatorAM,
getMasterReportType,
getDetailAM,
searchAM,
createAM,
......
......@@ -8,6 +8,8 @@ import localeID from "date-fns/locale/id"
import api from "../../api";
import Images from '../../assets/Images';
import Constant from '../../library/Constant';
import AutocompleteField from '../../library/AutocompleteField';
import { fetchMasterReportType } from '../../utils/services';
export default class CreateApprovalMatrix extends Component {
constructor(props) {
......@@ -36,7 +38,12 @@ export default class CreateApprovalMatrix extends Component {
errorStartDate: false,
errorEndDate: false,
msgErrorStartDate: "",
msgErrorEndDate: ""
msgErrorEndDate: "",
master_report_type_id: null,
listMasterReportType: [],
errorMasterReportTypeId: false,
msgErrMasterReportTypeId: '',
}
}
......@@ -44,6 +51,7 @@ export default class CreateApprovalMatrix extends Component {
this.getUserData()
this.getTypeData()
this.getOperatorData()
this.getMasterBudgetType()
let date = format(new Date, 'yyyy-MM-dd')
this.setState({
startDate: date,
......@@ -51,23 +59,37 @@ export default class CreateApprovalMatrix extends Component {
})
}
getMasterBudgetType = async () => {
const { data } = await fetchMasterReportType();
if (data) {
const list = data.map((item) => ({
id: item.master_report_type_id,
name: item.master_report_type_name
}));
this.setState({ listMasterReportType: list });
} else {
this.setState({ listMasterReportType: [] });
}
}
getUserData() {
api.create().getApprovedByAM().then((response) => {
if(response.data) {
if (response.ok) {
if (response.data) {
if (response.ok) {
if (response.data.status == 'success') {
let data = response.data.data
let userData = data.map((item) => {
return {
user_id: item.user_id,
fullname: item.fullname == null? "(NO_NAME)" : item.fullname
fullname: item.fullname == null ? "(NO_NAME)" : item.fullname
}
})
let defaultProps = {
options: userData,
getOptionLabel: (option) => option.fullname,
};
this.setState({ approvedBy: defaultProps, userData: response.data.data})
this.setState({ approvedBy: defaultProps, userData: response.data.data })
} else {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
......@@ -104,7 +126,7 @@ export default class CreateApprovalMatrix extends Component {
let typeProps = {
options: typeData,
getOptionLabel: (option) => option.approval_type_name,
};
};
this.setState({ types: typeProps, typeData: response.data.data })
} else {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -142,7 +164,7 @@ export default class CreateApprovalMatrix extends Component {
let operatorProps = {
options: operatorData,
getOptionLabel: (option) => option.operator_type_name,
};
};
this.setState({ operators: operatorProps, operatorData: response.data.data })
} else {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -174,7 +196,7 @@ export default class CreateApprovalMatrix extends Component {
// console.log(this.state.startDate)
})
} else if (isDate && type == 'end_date') {
this.setState({ endDate: format(e, 'yyyy-MM-dd')}, () => {
this.setState({ endDate: format(e, 'yyyy-MM-dd') }, () => {
this.clearError()
// console.log(this.state.endDate)
})
......@@ -184,6 +206,15 @@ export default class CreateApprovalMatrix extends Component {
}
handleChangeDropdown = (newValue, name) => {
this.setState(prevState => ({
...prevState,
[name]: newValue,
}), () => {
this.clearError();
})
}
clearError() {
this.setState({
errorOrder: false,
......@@ -197,7 +228,9 @@ export default class CreateApprovalMatrix extends Component {
errorStartDate: false,
errorEndDate: false,
msgErrorStartDate: "",
msgErrorEndDate: ""
msgErrorEndDate: "",
errorMasterReportTypeId: false,
msgErrMasterReportTypeId: '',
})
}
......@@ -206,14 +239,17 @@ export default class CreateApprovalMatrix extends Component {
this.setState({ errorType: true, msgErrType: 'Approval Type Cannot be Empty' })
}
else if (R.isEmpty(this.state.order)) {
this.setState({ errorOrder: true, msgErrOrder: 'Order Cannot be Empty'})
this.setState({ errorOrder: true, msgErrOrder: 'Order Cannot be Empty' })
}
else if (R.isNil(this.state.userId)) {
this.setState({ errorApproved: true, msgErrApproved: 'Approver Name Cannot be Empty' })
}
}
else if (R.isNil(this.state.operatorId)) {
this.setState({ errorOperator: true, msgErrOperator: 'Operator Cannot be Empty. Please Choose - Option' })
}
}
else if (R.isNil(this.state.master_report_type_id)) {
this.setState({ errorMasterReportTypeId: true, msgErrMasterReportTypeId: 'Master Report Type Cannot be Empty. Please Choose - Option' })
}
else if (R.isNil(this.state.startDate)) {
this.setState({ errorStartDate: true, msgErrorStartDate: 'Valid From Cannot be Empty' })
} else if (R.isNil(this.state.endDate)) {
......@@ -224,6 +260,7 @@ export default class CreateApprovalMatrix extends Component {
"orders": this.state.order,
"user_id": this.state.userId.user_id,
"operator_type_id": this.state.operatorId.operator_type_id,
"master_report_type_id": this.state.master_report_type_id?.id ?? null,
"start_date": this.state.startDate,
"end_date": this.state.endDate
}
......@@ -247,7 +284,7 @@ export default class CreateApprovalMatrix extends Component {
className="btn btn-circle btn-white"
onClick={() => this.props.onClickClose()}
>
<img src={Images.close}/>
<img src={Images.close} />
</button>
</div>
</div>
......@@ -281,11 +318,11 @@ export default class CreateApprovalMatrix extends Component {
<Autocomplete
{...this.state.types}
id="tipe"
onChange={(event, newInputValue) => this.setState({typeId:newInputValue}, ()=> this.clearError())}
onChange={(event, newInputValue) => this.setState({ typeId: newInputValue }, () => this.clearError())}
debug
renderInput={(params) =>
<TextField
{...params}
renderInput={(params) =>
<TextField
{...params}
label="Approval Type"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorType}
......@@ -318,11 +355,12 @@ export default class CreateApprovalMatrix extends Component {
helperText={this.state.msgErrOrder}
// onChange={(e) => this.setState({ order: e.target.value }, () => this.clearError())}
onChange={(e) => {
let coba = String(e.target.value).replace(/[^\d]/g,'');
let coba = String(e.target.value).replace(/[^\d]/g, '');
this.setState({
order: coba
},
() => this.clearError())}
},
() => this.clearError())
}
// this.handleChange(coba, 'value')}
}
inputProps={{
......@@ -342,28 +380,28 @@ export default class CreateApprovalMatrix extends Component {
</div>
<div className="column-2">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<Autocomplete
{...this.state.approvedBy}
id="approvedby"
onChange={(event, newInputValue) => this.setState({userId:newInputValue}, ()=> this.clearError())}
// disableClearable
debug
renderInput={(params) =>
<TextField {...params}
label="Approver Name"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorApproved}
helperText={this.state.msgErrApproved}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
/>}
value={this.state.userId}
/>
<Autocomplete
{...this.state.approvedBy}
id="approvedby"
onChange={(event, newInputValue) => this.setState({ userId: newInputValue }, () => this.clearError())}
// disableClearable
debug
renderInput={(params) =>
<TextField {...params}
label="Approver Name"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorApproved}
helperText={this.state.msgErrApproved}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
/>}
value={this.state.userId}
/>
</div>
</div>
</div>
......@@ -375,10 +413,10 @@ export default class CreateApprovalMatrix extends Component {
id="operator"
// disableClearable
debug
onChange={(event, newInputValue) => this.setState({operatorId:newInputValue}, ()=> this.clearError())}
renderInput={(params) =>
<TextField {...params}
label="Operator"
onChange={(event, newInputValue) => this.setState({ operatorId: newInputValue }, () => this.clearError())}
renderInput={(params) =>
<TextField {...params}
label="Operator"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorOperator}
helperText={this.state.msgErrOperator}
......@@ -389,73 +427,84 @@ export default class CreateApprovalMatrix extends Component {
}
}}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
/>}
/>}
value={this.state.operatorId}
/>
</div>
</div>
<div className="column-2">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<AutocompleteField
options={this.state.listMasterReportType}
value={this.state.master_report_type_id}
onChange={(event, newValue) => this.handleChangeDropdown(newValue, 'master_report_type_id')}
label="Master Report Type"
minSizeBox={true}
error={this.state.errorMasterReportTypeId}
helperText={this.state.msgErrMasterReportTypeId}
disableClearable={false}
/>
</div>
</div>
</div>
<div className="grid grid-2x grid-mobile-none gap-15px">
<div className="column-1">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<DatePicker
margin="normal"
id="startDate"
label="Valid From"
format="dd MMMM yyyy"
value={this.state.startDate == "" ? null : this.state.startDate}
onChange={(e) => this.handleChange(e, 'start_date')}
KeyboardButtonProps={{
'aria-label': 'change date',
}}
inputProps={{
style: {
fontSize: 11
}
}}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
error={this.state.errorStartDate}
helperText={this.state.msgErrorStartDate}
style={{ padding: 0, margin: 0, width: '100%' }}
/>
<DatePicker
margin="normal"
id="startDate"
label="Valid From"
format="dd MMMM yyyy"
value={this.state.startDate == "" ? null : this.state.startDate}
onChange={(e) => this.handleChange(e, 'start_date')}
KeyboardButtonProps={{
'aria-label': 'change date',
}}
inputProps={{
style: {
fontSize: 11
}
}}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
error={this.state.errorStartDate}
helperText={this.state.msgErrorStartDate}
style={{ padding: 0, margin: 0, width: '100%' }}
/>
</div>
</div>
<div className="column-2">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<DatePicker
margin="normal"
id="endDate"
label="Valid To"
format="dd MMMM yyyy"
value={this.state.endDate == "" ? null : this.state.endDate}
error={this.state.errorEndDate}
helperText={this.state.msgErrorEndDate}
onChange={(e) => this.handleChange(e, 'end_date')}
minDate={this.state.startDate}
KeyboardButtonProps={{
'aria-label': 'change date',
}}
inputProps={{
style: {
fontSize: 11
}
}}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
style={{ padding: 0, margin: 0, width: '100%' }}
/>
<DatePicker
margin="normal"
id="endDate"
label="Valid To"
format="dd MMMM yyyy"
value={this.state.endDate == "" ? null : this.state.endDate}
error={this.state.errorEndDate}
helperText={this.state.msgErrorEndDate}
onChange={(e) => this.handleChange(e, 'end_date')}
minDate={this.state.startDate}
KeyboardButtonProps={{
'aria-label': 'change date',
}}
inputProps={{
style: {
fontSize: 11
}
}}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
style={{ padding: 0, margin: 0, width: '100%' }}
/>
</div>
</div>
</div>
......@@ -502,12 +551,12 @@ export default class CreateApprovalMatrix extends Component {
</div>
<div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1" style={{ alignSelf: 'center' }}>
<div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
<div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor: "pointer" }}>
<span style={{ color: '#354960', fontSize: 11 }} >Cancel</span>
</div>
</div>
<div className="column-2" style={{display: 'flex', justifyContent: 'flex-end', alignItems: 'center'}}>
<div onClick={() => this.validasi()} style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<div onClick={() => this.validasi()} style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor: "pointer" }}>
<span style={{ color: '#fff', fontSize: 11 }}>Save</span>
</div>
</div>
......
import React, { Component } from 'react';
import { TextField, Typography } from '@material-ui/core';
import { DateTimePicker, KeyboardDatePicker, DatePicker} from "@material-ui/pickers";
import { DateTimePicker, KeyboardDatePicker, DatePicker } from "@material-ui/pickers";
import Autocomplete from '@material-ui/lab/Autocomplete';
import * as R from 'ramda'
import format from "date-fns/format";
import api from "../../api";
import Images from '../../assets/Images';
import Constant from '../../library/Constant';
import { fetchMasterReportType } from '../../utils/services';
import AutocompleteField from '../../library/AutocompleteField';
import { convertSelect } from '../../library/Utils';
export default class EditApprovalMatrix extends Component {
constructor(props) {
......@@ -35,7 +38,12 @@ export default class EditApprovalMatrix extends Component {
errorStartDate: false,
errorEndDate: false,
msgErrorStartDate: "",
msgErrorEndDate: ""
msgErrorEndDate: "",
master_report_type_id: null,
listMasterReportType: [],
errorMasterReportTypeId: false,
msgErrMasterReportTypeId: '',
}
}
......@@ -49,6 +57,21 @@ export default class EditApprovalMatrix extends Component {
}
}
getMasterBudgetType = async () => {
const { data } = await fetchMasterReportType();
if (data) {
const list = data.map((item) => ({
id: item.master_report_type_id,
name: item.master_report_type_name
}));
this.setState({ listMasterReportType: list });
} else {
this.setState({ listMasterReportType: [] });
}
}
getDetailAM() {
api.create().getDetailAM(this.props.data[1]).then(response => {
console.log(response)
......@@ -66,8 +89,9 @@ export default class EditApprovalMatrix extends Component {
getOperatorId: data.operator_type_id,
status: data.status,
created: data.created,
updated: data.updated === null ? "" : data.updated
}, () => this.getUserData(), this.getTypeData(), this.getOperatorData())
updated: data.updated === null ? "" : data.updated,
master_report_type_id: convertSelect(data?.master_report_type_id, data?.master_report_type_name)
}, () => this.getUserData(), this.getTypeData(), this.getOperatorData(), this.getMasterBudgetType())
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -98,7 +122,7 @@ export default class EditApprovalMatrix extends Component {
let userData = data.map((item) => {
return {
user_id: item.user_id,
fullname: item.fullname == null? "(NO_NAME)" : item.fullname
fullname: item.fullname == null ? "(NO_NAME)" : item.fullname
}
})
let index = userData.findIndex((val) => val.user_id == this.state.getUserId)
......@@ -107,8 +131,8 @@ export default class EditApprovalMatrix extends Component {
getOptionLabel: (option) => option.fullname,
};
// this.setState({ approvedBy: defaultProps, userData: response.data.data, getApprovedBy: index == -1 ? userData[0]: userData[index] })
this.setState({ approvedBy: defaultProps, userData: response.data.data, getApprovedBy: index == -1 ? this.setState({ errorApproved: true, msgErrApproved: 'Approver Name has been Inactive.' }): userData[index] })
this.setState({ approvedBy: defaultProps, userData: response.data.data, getApprovedBy: index == -1 ? this.setState({ errorApproved: true, msgErrApproved: 'Approver Name has been Inactive.' }) : userData[index] })
} else {
// alert('Pemberi Persetujuan: ' +response.data.message)
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -119,7 +143,7 @@ export default class EditApprovalMatrix extends Component {
}, 1000);
})
} else {
this.setState({ alert: true, messageAlert: 'Pemberi Persetujuan: ' +response.data.message, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: 'Pemberi Persetujuan: ' + response.data.message, tipeAlert: 'error' })
}
}
} else {
......@@ -148,7 +172,7 @@ export default class EditApprovalMatrix extends Component {
options: operatorData,
getOptionLabel: (option) => option.operator_type_name,
};
this.setState({ operators: operatorProps, operatorData: response.data.data, getOperators: index == -1 ? operatorData[0]: operatorData[index] })
this.setState({ operators: operatorProps, operatorData: response.data.data, getOperators: index == -1 ? operatorData[0] : operatorData[index] })
} else {
// alert('Operator: ' +response.data.message)
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -159,7 +183,7 @@ export default class EditApprovalMatrix extends Component {
}, 1000);
})
} else {
this.setState({ alert: true, messageAlert: 'Operator: ' +response.data.message, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: 'Operator: ' + response.data.message, tipeAlert: 'error' })
}
}
} else {
......@@ -188,7 +212,7 @@ export default class EditApprovalMatrix extends Component {
options: typeData,
getOptionLabel: (option) => option.approval_type_name,
};
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 {
// alert('Approval Type: ' +response.data.message)
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -199,7 +223,7 @@ export default class EditApprovalMatrix extends Component {
}, 1000);
})
} else {
this.setState({ alert: true, messageAlert: 'Approval Type: ' +response.data.message, tipeAlert: 'error' })
this.setState({ alert: true, messageAlert: 'Approval Type: ' + response.data.message, tipeAlert: 'error' })
}
}
} else {
......@@ -231,6 +255,15 @@ export default class EditApprovalMatrix extends Component {
}
handleChangeDropdown = (newValue, name) => {
this.setState(prevState => ({
...prevState,
[name]: newValue,
}), () => {
this.clearError();
})
}
clearError() {
this.setState({
errorType: false,
......@@ -244,7 +277,9 @@ export default class EditApprovalMatrix extends Component {
errorStartDate: false,
errorEndDate: false,
msgErrorStartDate: "",
msgErrorEndDate: ""
msgErrorEndDate: "",
errorMasterReportTypeId: false,
msgErrMasterReportTypeId: '',
})
}
......@@ -253,26 +288,30 @@ export default class EditApprovalMatrix extends Component {
this.setState({ errorType: true, msgErrType: 'Approval Type Cannot be Empty' })
}
else if (R.isEmpty(this.state.order)) {
this.setState({ errorOrder: true, msgErrOrder: 'Order Cannot be Empty'})
this.setState({ errorOrder: true, msgErrOrder: 'Order Cannot be Empty' })
}
else if (R.isNil(this.state.getApprovedBy)) {
this.setState({ errorApproved: true, msgErrApproved: 'Approver Name Cannot be Empty' })
}
}
else if (R.isNil(this.state.getOperators)) {
this.setState({ errorOperator: true, msgErrOperator: 'Operator Cannot be Empty' })
}
}
else if (R.isNil(this.state.master_report_type_id)) {
this.setState({ errorMasterReportTypeId: true, msgErrMasterReportTypeId: 'Master Report Type Cannot be Empty. Please Choose - Option' })
}
else if (R.isEmpty(this.state.startDate)) {
this.setState({ errorStartDate: true, msgErrorStartDate: 'Valid From Cannot be Empty' })
} else if (R.isEmpty(this.state.endDate)) {
this.setState({ errorEndDate: true, msgErrorEndDate: 'Valid To Cannot be Empty' })
} else {
if (this.props.type == 'edit') {
let payload = {
let payload = {
"approval_matrix_id": this.state.id,
"approval_type_id": this.state.getTypes.approval_type_id,
"orders": this.state.order,
"user_id": this.state.getApprovedBy.user_id,
"operator_type_id": this.state.getOperators.operator_type_id,
"master_report_type_id": this.state.master_report_type_id?.id ?? null,
"start_date": this.state.startDate,
"end_date": this.state.endDate
}
......@@ -297,7 +336,7 @@ export default class EditApprovalMatrix extends Component {
className="btn btn-circle btn-white"
onClick={() => this.props.onClickClose()}
>
<img src={Images.close}/>
<img src={Images.close} />
</button>
</div>
</div>
......@@ -333,10 +372,10 @@ export default class EditApprovalMatrix extends Component {
option
debug
id="tipe"
onChange={(event, newInputValue) => this.setState({getTypes:newInputValue}, ()=> this.clearError())}
renderInput={(params) =>
<TextField {...params}
label="Approval Type"
onChange={(event, newInputValue) => this.setState({ getTypes: newInputValue }, () => this.clearError())}
renderInput={(params) =>
<TextField {...params}
label="Approval Type"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorType}
helperText={this.state.msgErrType}
......@@ -347,7 +386,7 @@ export default class EditApprovalMatrix extends Component {
}
}}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
/>}
/>}
value={this.state.getTypes}
/>
</div>
......@@ -365,11 +404,12 @@ export default class EditApprovalMatrix extends Component {
helperText={this.state.msgErrOrder}
// onChange={(e) => this.setState({ order: e.target.value }, () => this.clearError())}
onChange={(e) => {
let coba = String(e.target.value).replace(/[^\d]/g,'');
let coba = String(e.target.value).replace(/[^\d]/g, '');
this.setState({
order: coba
},
() => this.clearError())}
},
() => this.clearError())
}
// this.handleChange(coba, 'value')}
}
inputProps={{
......@@ -383,7 +423,7 @@ export default class EditApprovalMatrix extends Component {
color: '#7e8085'
}
}}
// name="order"
// name="order"
>
</TextField>
</div>
......@@ -395,9 +435,9 @@ export default class EditApprovalMatrix extends Component {
option
debug
id="approvedby"
onChange={(event, newInputValue) => this.setState({getApprovedBy: newInputValue}, ()=> this.clearError())}
renderInput={(params) =>
<TextField {...params}
onChange={(event, newInputValue) => this.setState({ getApprovedBy: newInputValue }, () => this.clearError())}
renderInput={(params) =>
<TextField {...params}
label="Approver Name"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorApproved}
......@@ -423,10 +463,10 @@ export default class EditApprovalMatrix extends Component {
option
debug
id="operator"
onChange={(event, newInputValue) => this.setState({getOperators: newInputValue}, ()=> this.clearError())}
renderInput={(params) =>
<TextField {...params}
label="Operator"
onChange={(event, newInputValue) => this.setState({ getOperators: newInputValue }, () => this.clearError())}
renderInput={(params) =>
<TextField {...params}
label="Operator"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorOperator}
helperText={this.state.msgErrOperator}
......@@ -443,7 +483,18 @@ export default class EditApprovalMatrix extends Component {
</div>
</div>
<div className="column-2">
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<AutocompleteField
options={this.state.listMasterReportType}
value={this.state.master_report_type_id}
onChange={(event, newValue) => this.handleChangeDropdown(newValue, 'master_report_type_id')}
label="Master Report Type"
minSizeBox={true}
error={this.state.errorMasterReportTypeId}
helperText={this.state.msgErrMasterReportTypeId}
disableClearable={false}
/>
</div>
</div>
</div>
<div className="grid grid-2x grid-mobile-none gap-15px">
......@@ -472,7 +523,7 @@ export default class EditApprovalMatrix extends Component {
}}
error={this.state.errorStartDate}
helperText={this.state.msgErrorStartDate}
style={{padding: 0, margin: 0, width: '100%'}}
style={{ padding: 0, margin: 0, width: '100%' }}
/>
</div>
</div>
......@@ -502,8 +553,8 @@ export default class EditApprovalMatrix extends Component {
color: '#7e8085'
}
}}
style={{padding: 0, margin: 0, width: '100%'}}
/>
style={{ padding: 0, margin: 0, width: '100%' }}
/>
</div>
</div>
</div>
......@@ -568,12 +619,12 @@ export default class EditApprovalMatrix extends Component {
</div>
<div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1" style={{ alignSelf: 'center' }}>
<div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
<div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor: "pointer" }}>
<span style={{ color: '#354960', fontSize: 11 }} >Cancel</span>
</div>
</div>
<div className="column-2" style={{display: 'flex', justifyContent: 'flex-end', alignItems: 'center'}}>
<div onClick={() => this.validasi()} style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<div onClick={() => this.validasi()} style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor: "pointer" }}>
<span style={{ color: '#fff', fontSize: 11 }}>Save</span>
</div>
</div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -175,7 +175,8 @@ class ReportProgress extends Component {
let data = response.data.data
data.map((item,index) => {
let report = []
let statusSubmission = String(item.submission_status).toLocaleUpperCase()
let statusSubmissionCAT = String(item.submission_status_cat).toLocaleUpperCase()
let statusSubmissionFinance = String(item.submission_status_finance).toLocaleUpperCase()
let statusOI = String(item.operating_indicator).toLocaleUpperCase()
item.report.map((items,index) => {
let statusReport = String(items.status_report).toLocaleUpperCase()
......@@ -183,7 +184,9 @@ class ReportProgress extends Component {
})
report.push(
{report_name: 'Operating Indicator', status_report: statusOI},
{report_name: 'Submission Status', status_report: (statusSubmission == 'APPROVED' || statusSubmission == 'REVISION' || statusSubmission == 'COMPLETED') ? (statusSubmission + ' - ' + item.submissionStatusDate) : statusSubmission})
{report_name: 'Report Finance Status', status_report: (statusSubmissionFinance == 'APPROVED' || statusSubmissionFinance == 'REVISION' || statusSubmissionFinance == 'COMPLETED') ? (statusSubmissionFinance + ' - ' + item.submissionStatusDate) : statusSubmissionFinance},
{report_name: 'Report CAT Status', status_report: (statusSubmissionCAT == 'APPROVED' || statusSubmissionCAT == 'REVISION' || statusSubmissionCAT == 'COMPLETED') ? (statusSubmissionCAT + ' - ' + item.submissionStatusDate) : statusSubmissionCAT}
)
dataTable.push([
item.company_name,
report,
......@@ -239,7 +242,11 @@ class ReportProgress extends Component {
let data = response.data.data
data.map((item,index) => {
let report = item.report
report.push({report_name: 'Operating Indicator', status_report: item.operating_indicator}, {report_name: 'Monthly Status', status_report: item.monthly_status})
report.push(
{report_name: 'Operating Indicator', status_report: item.operating_indicator},
{report_name: 'Report Finance Status', status_report: item.monthly_status_finance},
{report_name: 'Report CAT Status', status_report: item.monthly_status_cat}
)
dataTable.push([
item.company_name,
report,
......@@ -277,7 +284,11 @@ class ReportProgress extends Component {
let data = response.data.data
data.map((item,index) => {
let report = item.report
report.push({report_name: 'Operating Indicator', status_report: item.operating_indicator}, {report_name: 'Rolling Status', status_report: item.rolling_status})
report.push(
{report_name: 'Operating Indicator', status_report: item.operating_indicator},
{report_name: 'Report Finance Status', status_report: item.rolling_status_finance},
{report_name: 'Report CAT Status', status_report: item.rolling_status_cat}
)
dataTable.push([
item.company_name,
report,
......@@ -315,7 +326,8 @@ class ReportProgress extends Component {
let data = response.data.data
data.map((item,index) => {
let report = []
let statusSubmission = String(item.outlook_status).toLocaleUpperCase()
let statusSubmissionFinance = String(item.outlook_status_finance).toLocaleUpperCase()
let statusSubmissionCAT = String(item.outlook_status_cat).toLocaleUpperCase()
let statusOI = String(item.operating_indicator).toLocaleUpperCase()
item.report.map((items,index) => {
let statusReport = String(items.status_report).toLocaleUpperCase()
......@@ -323,7 +335,9 @@ class ReportProgress extends Component {
})
report.push(
{report_name: 'Operating Indicator', status_report: statusOI},
{report_name: 'OLPA Status', status_report: (statusSubmission == 'APPROVED' || statusSubmission == 'REVISION' || statusSubmission == 'COMPLETED') ? (statusSubmission + ' - ' + item.submissionStatusDate) : statusSubmission})
{report_name: 'Report Finance Status', status_report: (statusSubmissionFinance == 'APPROVED' || statusSubmissionFinance == 'REVISION' || statusSubmissionFinance == 'COMPLETED') ? (statusSubmissionFinance + ' - ' + item.submissionStatusDate) : statusSubmissionFinance},
{report_name: 'Report CAT Status', status_report: (statusSubmissionCAT == 'APPROVED' || statusSubmissionCAT == 'REVISION' || statusSubmissionCAT == 'COMPLETED') ? (statusSubmissionCAT + ' - ' + item.submissionStatusDate) : statusSubmissionCAT}
)
dataTable.push([
item.company_name,
report,
......
......@@ -170,7 +170,7 @@ export default class TableProgressReport extends Component {
<span>{"Fixed Assets Movement"}</span>
</div>
</div>
<div className="column-2 grid grid-4x" style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-2 grid grid-5x" style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Cash Flow"}</span>
</div>
......@@ -178,9 +178,12 @@ export default class TableProgressReport extends Component {
<span>{"CAT"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#cc2929', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Submission Status"}</span>
<span>{"Report Finance Status"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#cc2929', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Report CAT Status"}</span>
</div>
<div className="column-5" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Operating Indicator"}</span>
</div>
</div>
......@@ -216,7 +219,7 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Fixed Assets Movement')}</div>
</div>
</div>
<div className="column-2 grid grid-4x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
<div className="column-2 grid grid-5x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Cash Flow')}</div>
</div>
......@@ -224,9 +227,12 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'CAT')}</div>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Submission Status')}</div>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Report Finance Status')}</div>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Report CAT Status')}</div>
</div>
<div className="column-5" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Operating Indicator')}</div>
</div>
</div>
......@@ -347,14 +353,17 @@ export default class TableProgressReport extends Component {
<span>{"Cash Flow"}</span>
</div>
</div>
<div className="column-3 grid grid-3x" style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-3 grid grid-4x" style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"CAT"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#cc2929', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Monthly Status"}</span>
<span>{"Report Finance Status"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#cc2929', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Report CAT Status"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Operating Indicator"}</span>
</div>
</div>
......@@ -387,7 +396,7 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Balance Sheet')}</div>
</div>
</div>
<div className="column-2 grid grid-3x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
<div className="column-2 grid grid-4x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Fixed Assets Movement')}</div>
</div>
......@@ -398,14 +407,17 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Cash Flow')}</div>
</div>
</div>
<div className="column-3 grid grid-3x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
<div className="column-3 grid grid-4x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'CAT')}</div>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Monthly Status')}</div>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Report Finance Status')}</div>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Report CAT Status')}</div>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Operating Indicator')}</div>
</div>
</div>
......@@ -518,14 +530,17 @@ export default class TableProgressReport extends Component {
<span>{"Cash Flow"}</span>
</div>
</div>
<div className="column-2 grid grid-3x" style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-2 grid grid-4x" style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"CAT"}</span>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#cc2929', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Rolling Status"}</span>
<span>{"Report Finance Status"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#cc2929', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Report CAT Status"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Operating Indicator"}</span>
</div>
</div>
......@@ -561,14 +576,17 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Cash Flow')}</div>
</div>
</div>
<div className="column-2 grid grid-3x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
<div className="column-2 grid grid-4x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'CAT')}</div>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Rolling Status')}</div>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Report Finance Status')}</div>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Report CAT Status')}</div>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Operating Indicator')}</div>
</div>
</div>
......@@ -678,7 +696,7 @@ export default class TableProgressReport extends Component {
<span>{"Balance Sheet"}</span>
</div>
</div>
<div className="column-2 grid grid-3x" style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-2 grid grid-4x" style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Cash Flow"}</span>
</div>
......@@ -686,7 +704,10 @@ export default class TableProgressReport extends Component {
<span>{"CAT"}</span>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#cc2929', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"OLPA Status"}</span>
<span>{"Report Finance Status"}</span>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#cc2929', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Report CAT Status"}</span>
</div>
{/* <div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 45, width: 150 }}>
<span>{"Operating Indicator"}</span>
......@@ -721,7 +742,7 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Balance Sheet')}</div>
</div>
</div>
<div className="column-2 grid grid-3x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
<div className="column-2 grid grid-4x" style={{ ...style2, fontSize: 12, position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Cash Flow')}</div>
</div>
......@@ -729,7 +750,10 @@ export default class TableProgressReport extends Component {
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'CAT')}</div>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'OLPA Status')}</div>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Report Finance Status')}</div>
</div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Report CAT Status')}</div>
</div>
{/* <div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, width: 143 }}>
<div style={{ textAlign: 'center' }}>{handleValue(tableMeta, 'Operating Indicator')}</div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -27,21 +27,29 @@ const AutocompleteField = ({
multiple = false,
showCheckbox = false,
isLoading = false,
minSizeBox = false,
...props
}) => {
const defaultRenderInput = (params) => (
<TextField
{...params}
label={label}
margin={margin}
style={{ marginTop: 7 }}
margin={minSizeBox ? 'none' : margin}
style={minSizeBox ? {} : { marginTop: 7 }}
disabled={disabled}
required={required}
error={error}
helperText={helperText}
fullWidth
InputLabelProps={minSizeBox ? {
style: {
fontSize: 11,
color: '#7e8085'
}
} : {}}
InputProps={{
...params.InputProps,
style: minSizeBox ? { fontSize: 11 } : {},
endAdornment: (
<>
{isLoading ? (
......
......@@ -72,4 +72,12 @@ export const createMonthData = (item, startIdx, formatFn) => {
months[month] = formatFn(item[startIdx + idx]);
});
return months;
};
export const convertSelect = (id, name) => {
const obj = id ? {
id,
name,
} : null
return obj
};
\ No newline at end of file
......@@ -68,4 +68,5 @@ export const fetchPLID = (payload) => wrapService(api.create().getPLID(payload))
export const fetchHierarkiCreateReportPLMB = (payload) => wrapService(api.create().getHierarkiCreateReportPLMB(payload));
export const fetchFRID = (payload) => wrapService(api.create().getFRID(payload));
export const fetchDownloadFile = (payload) => wrapService(api.create().createDownloadFile(payload));
export const fetchZipReport = (downloadedFileReportId) => wrapService(api.create().createZipReport(downloadedFileReportId));
\ No newline at end of file
export const fetchZipReport = (downloadedFileReportId) => wrapService(api.create().createZipReport(downloadedFileReportId));
export const fetchMasterReportType = () => wrapService(api.create().getMasterReportType());
\ No newline at end of file
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