Commit 25e3c70f authored by Hardiansyah's avatar Hardiansyah

master report type on approval matrix

parent c0f39076
...@@ -165,6 +165,7 @@ const create = (type = "") => { ...@@ -165,6 +165,7 @@ const create = (type = "") => {
const getApprovedByAM = () => api.get('approval_matrix/get_all_approver') const getApprovedByAM = () => api.get('approval_matrix/get_all_approver')
const getTypeAM = () => api.get('approval_type/get_all_approval_type') const getTypeAM = () => api.get('approval_type/get_all_approval_type')
const getOperatorAM = () => api.get('operator_type/get_all_operator_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 getDetailAM = (id) => api.get(`approval_matrix/get_approval_matrix_by_id/${id}`)
const searchAM = (body) => api.post('/approval_matrix/search_approval_matrix', body) const searchAM = (body) => api.post('/approval_matrix/search_approval_matrix', body)
const createAM = (body) => api.post('/approval_matrix/create_approval_matrix', body) const createAM = (body) => api.post('/approval_matrix/create_approval_matrix', body)
...@@ -633,6 +634,7 @@ const create = (type = "") => { ...@@ -633,6 +634,7 @@ const create = (type = "") => {
getApprovedByAM, getApprovedByAM,
getTypeAM, getTypeAM,
getOperatorAM, getOperatorAM,
getMasterReportType,
getDetailAM, getDetailAM,
searchAM, searchAM,
createAM, createAM,
......
...@@ -27,21 +27,29 @@ const AutocompleteField = ({ ...@@ -27,21 +27,29 @@ const AutocompleteField = ({
multiple = false, multiple = false,
showCheckbox = false, showCheckbox = false,
isLoading = false, isLoading = false,
minSizeBox = false,
...props ...props
}) => { }) => {
const defaultRenderInput = (params) => ( const defaultRenderInput = (params) => (
<TextField <TextField
{...params} {...params}
label={label} label={label}
margin={margin} margin={minSizeBox ? 'none' : margin}
style={{ marginTop: 7 }} style={minSizeBox ? {} : { marginTop: 7 }}
disabled={disabled} disabled={disabled}
required={required} required={required}
error={error} error={error}
helperText={helperText} helperText={helperText}
fullWidth fullWidth
InputLabelProps={minSizeBox ? {
style: {
fontSize: 11,
color: '#7e8085'
}
} : {}}
InputProps={{ InputProps={{
...params.InputProps, ...params.InputProps,
style: minSizeBox ? { fontSize: 11 } : {},
endAdornment: ( endAdornment: (
<> <>
{isLoading ? ( {isLoading ? (
......
...@@ -72,4 +72,12 @@ export const createMonthData = (item, startIdx, formatFn) => { ...@@ -72,4 +72,12 @@ export const createMonthData = (item, startIdx, formatFn) => {
months[month] = formatFn(item[startIdx + idx]); months[month] = formatFn(item[startIdx + idx]);
}); });
return months; 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)) ...@@ -68,4 +68,5 @@ export const fetchPLID = (payload) => wrapService(api.create().getPLID(payload))
export const fetchHierarkiCreateReportPLMB = (payload) => wrapService(api.create().getHierarkiCreateReportPLMB(payload)); export const fetchHierarkiCreateReportPLMB = (payload) => wrapService(api.create().getHierarkiCreateReportPLMB(payload));
export const fetchFRID = (payload) => wrapService(api.create().getFRID(payload)); export const fetchFRID = (payload) => wrapService(api.create().getFRID(payload));
export const fetchDownloadFile = (payload) => wrapService(api.create().createDownloadFile(payload)); export const fetchDownloadFile = (payload) => wrapService(api.create().createDownloadFile(payload));
export const fetchZipReport = (downloadedFileReportId) => wrapService(api.create().createZipReport(downloadedFileReportId)); export const fetchZipReport = (downloadedFileReportId) => wrapService(api.create().createZipReport(downloadedFileReportId));
\ No newline at end of file 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