feat(doc): Modale Vollansicht des Dokuments hinzufügen und Öffnen bei Kartenklick ermöglichen
This commit is contained in:
parent
b15b4dc3b1
commit
49667d7fe9
@ -13,6 +13,8 @@ import { Doc } from 'src/api/document-service';
|
|||||||
|
|
||||||
import { Iconify } from 'src/components/iconify';
|
import { Iconify } from 'src/components/iconify';
|
||||||
import { SvgColor } from 'src/components/svg-color';
|
import { SvgColor } from 'src/components/svg-color';
|
||||||
|
|
||||||
|
import DocFullView from './view/doc-full-view';
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
export function DocItem({
|
export function DocItem({
|
||||||
@ -161,7 +163,9 @@ export function DocItem({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card sx={sx} {...other}>
|
<>
|
||||||
|
<DocFullView data={doc.data} open={openViewDoc} handleClose={() => setOpenViewDoc(false)} />
|
||||||
|
<Card sx={sx} {...other} onClick={() => setOpenViewDoc(true)}>
|
||||||
<Box
|
<Box
|
||||||
sx={(theme) => ({
|
sx={(theme) => ({
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
@ -204,5 +208,6 @@ export function DocItem({
|
|||||||
{renderInfo}
|
{renderInfo}
|
||||||
</Box>
|
</Box>
|
||||||
</Card>
|
</Card>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,7 @@ export default function DocFullView({ data, open, handleClose }: DocFullViewProp
|
|||||||
open={open}
|
open={open}
|
||||||
aria-labelledby="modal-modal-title"
|
aria-labelledby="modal-modal-title"
|
||||||
aria-describedby="modal-modal-description"
|
aria-describedby="modal-modal-description"
|
||||||
|
onClose={handleClose}
|
||||||
>
|
>
|
||||||
<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)} />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user