@@ -40,7 +40,7 @@ export function UploadTemplateWindow({ isWindowOpen, onNormalClose, onConfirmClo | |||||
const handleChange = (event) => { | const handleChange = (event) => { | ||||
if(event !== null){ | if(event !== null){ | ||||
const newFile = event.target.files[0]; | const newFile = event.target.files[0]; | ||||
setFile(newFile); | |||||
handleFieldChange(newFile); | |||||
} | } | ||||
else{ | else{ | ||||
setFile(null) | setFile(null) | ||||
@@ -248,9 +248,9 @@ export function UploadTemplateWindow({ isWindowOpen, onNormalClose, onConfirmClo | |||||
</Grid> | </Grid> | ||||
<Grid container alignItems={'flex-start'} spacing={2} sx={{ mt: 3 }}> | <Grid container alignItems={'flex-start'} spacing={2} sx={{ mt: 3 }}> | ||||
<Grid item sx={{ mr: 3 }}> | |||||
<Grid item sx={{ mr: -0.5 }}>{/*3 }}>*/} | |||||
<Typography variant="lionerLabel" component="span"> | <Typography variant="lionerLabel" component="span"> | ||||
Remark: | |||||
Form Code: | |||||
</Typography> | </Typography> | ||||
</Grid> | </Grid> | ||||
<Grid item xs={9}> | <Grid item xs={9}> | ||||
@@ -189,7 +189,7 @@ const TemplateSearchForm = ({applySearch, setExpanded,expanded, clientId}) => { | |||||
</Grid> | </Grid> | ||||
<Grid item xs={9} s={6} md={5} lg={3} sx={{ml:3, mr:3, mb:0.5}}> | <Grid item xs={9} s={6} md={5} lg={3} sx={{ml:3, mr:3, mb:0.5}}> | ||||
<InputLabel htmlFor="remarks">Remarks</InputLabel> | |||||
<InputLabel htmlFor="remarks">Form Code</InputLabel> | |||||
<TextField | <TextField | ||||
fullWidth | fullWidth | ||||
{...register("remarks")} | {...register("remarks")} | ||||
@@ -14,6 +14,7 @@ import AbilityContext from "../../../components/AbilityProvider"; | |||||
import {LIONER_BUTTON_THEME} from "../../../themes/colorConst"; | import {LIONER_BUTTON_THEME} from "../../../themes/colorConst"; | ||||
import {ThemeProvider} from "@emotion/react"; | import {ThemeProvider} from "@emotion/react"; | ||||
import {UploadTemplateWindow} from "../TemplateMaintainPage/UploadTemplateWindow"; | import {UploadTemplateWindow} from "../TemplateMaintainPage/UploadTemplateWindow"; | ||||
import { color } from '../../../../node_modules/@mui/system/index'; | |||||
// ==============================|| Template TABLE ||============================== // | // ==============================|| Template TABLE ||============================== // | ||||
@@ -141,10 +142,11 @@ export default function TemplateTable({recordList, applySearch}) { | |||||
{ | { | ||||
id: 'remarks', | id: 'remarks', | ||||
field: 'remarks', | field: 'remarks', | ||||
headerName: 'Remarks', | |||||
headerName: 'Form Code', | |||||
flex: 2, | flex: 2, | ||||
renderCell: (params) => { | renderCell: (params) => { | ||||
return ( | return ( | ||||
// params.value == null? <div style={{"color": "red"}}><b>Missing Form Code!</b></div> : | |||||
<div style={{display: 'flex', alignItems: 'center', justifyContent: 'center', whiteSpace: 'normal', wordBreak: 'break-word'}}> | <div style={{display: 'flex', alignItems: 'center', justifyContent: 'center', whiteSpace: 'normal', wordBreak: 'break-word'}}> | ||||
{params.value} | {params.value} | ||||
</div> | </div> | ||||