add fitur edit hak kamar, penempatan dan submission date
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import MuiDialog from "@/components/MuiDialog";
|
||||
import { Button, Card, Checkbox, DialogActions, Grid, TextField, Typography } from "@mui/material";
|
||||
import { Button, Card, Checkbox, DialogActions, Grid, TextField, TextareaAutosize, Typography } from "@mui/material";
|
||||
import { Paper } from "@mui/material";
|
||||
import { Stack } from '@mui/material';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
@@ -102,6 +102,16 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
const numericInput = input.replace(/\D/g, '');
|
||||
return numericInput;
|
||||
};
|
||||
|
||||
const handleKeyPress = (e:any) => {
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
// Menghentikan default "Enter" (tidak membuat baris baru)
|
||||
e.preventDefault();
|
||||
|
||||
// Menambahkan karakter baris baru
|
||||
handleChange('keterangan', `${formData.keterangan}\n`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const getContent = () => (
|
||||
@@ -147,12 +157,20 @@ export default function DialogConfirmation({requestLog, setOpenDialog, openDialo
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Keterangan</Typography>
|
||||
<TextField
|
||||
label="Keterangan"
|
||||
variant="outlined"
|
||||
fullWidth
|
||||
<TextareaAutosize
|
||||
aria-label="Keterangan"
|
||||
minRows={3}
|
||||
placeholder="Masukkan keterangan..."
|
||||
value={formData.keterangan}
|
||||
onChange={(e) => handleChange('keterangan', e.target.value)}
|
||||
onKeyDown={handleKeyPress}
|
||||
style={{
|
||||
width: '100%',
|
||||
padding: '8px',
|
||||
border: '1px solid #ced4da',
|
||||
borderRadius: '4px',
|
||||
fontSize: '14px',
|
||||
}}
|
||||
/>
|
||||
</Stack>
|
||||
<Stack direction='row' spacing={2} sx={marginBottom2}>
|
||||
|
||||
Reference in New Issue
Block a user