feat(doc-full-view): init

This commit is contained in:
tekh 2025-07-14 09:21:34 +02:00
parent c1c7d6baaa
commit e3c5e84bb7
3 changed files with 72 additions and 28 deletions

View File

@ -44,6 +44,8 @@ export function DocItem({
// ); // );
//#endregion //#endregion
const [openViewDoc, setOpenViewDoc] = useState(false);
const renderTitle = ( const renderTitle = (
<Link <Link
color="inherit" color="inherit"

View File

@ -51,33 +51,31 @@ export default function CreateFilterModal({ open, handleClose }: ModalProps) {
} }
return ( return (
<div> <Modal
<Modal open={open}
open={open} onClose={closeReset}
onClose={closeReset} aria-labelledby="modal-modal-title"
aria-labelledby="modal-modal-title" aria-describedby="modal-modal-description"
aria-describedby="modal-modal-description" >
> <Box sx={style}>
<Box sx={style}> <TextField label="Label" variant="filled" value={name} onChange={e => setName(e.target.value)} />
<TextField label="Label" variant="filled" value={name} onChange={e => setName(e.target.value)} /> <TextField label="Name" variant="filled" value={label} onChange={e => setLabel(e.target.value)} />
<TextField label="Name" variant="filled" value={label} onChange={e => setLabel(e.target.value)} /> <Autocomplete
<Autocomplete disablePortal
disablePortal options={filterTypes}
options={filterTypes} value={selectedType}
value={selectedType} onChange={(event, newValue) => setSelectedType(newValue)}
onChange={(event, newValue) => setSelectedType(newValue)} renderInput={params => <TextField {...params} label="Type" variant="filled" />}
renderInput={params => <TextField {...params} label="Type" variant="filled" />} />
/> <Button
<Button variant="contained"
variant="contained" color="inherit"
color="inherit" startIcon={<Iconify icon="mingcute:add-line" />}
startIcon={<Iconify icon="mingcute:add-line" />} onClick={() => tryCreateFilter()}
onClick={() => tryCreateFilter()} >
> Add filter
Add filter </Button>
</Button> </Box>
</Box> </Modal>
</Modal>
</div>
); );
} }

View File

@ -0,0 +1,44 @@
import { useState } from 'react';
import Box from '@mui/material/Box';
import Modal from '@mui/material/Modal';
import { TextField } from '@mui/material';
import { Type } from 'src/api/attribute-service';
type DocFullViewProps = {
data: Uint8Array;
open: boolean;
handleClose: () => void;
}
const style = {
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
width: 400,
bgcolor: 'background.paper',
border: '2px solid #000',
boxShadow: 24,
p: 4,
};
export default function DocFullView({ data, open, handleClose }: DocFullViewProps) {
const [name, setName] = useState<string | undefined>('');
const [label, setLabel] = useState<string | undefined>('');
const [selectedType, setSelectedType] = useState<Type | null>(null);
return (
<Modal
open={open}
aria-labelledby="modal-modal-title"
aria-describedby="modal-modal-description"
>
<Box sx={style}>
<TextField label="Label" variant="filled" value={name} onChange={e => setName(e.target.value)} />
<TextField label="Name" variant="filled" value={label} onChange={e => setLabel(e.target.value)} />
</Box>
</Modal>
);
}