CreatViewIO header menu and EditViewIO modal

This commit is contained in:
rockyeverlast
2024-07-08 20:14:34 +05:30
parent 5ceba1f8b9
commit c3893d843b
12 changed files with 1025 additions and 31 deletions

View File

@@ -5,28 +5,29 @@ import { OPACITY_ON_LOAD } from "../Layout/animations";
import { ArrowBackIcon } from "@chakra-ui/icons";
const FormInputMain = ({
register,
groupedFields,
control,
errors,
onSubmit,
children,
onCancle,
onCancle,
submitTitle,
p,
w
w,
}) => {
return (
<form onSubmit={onSubmit}>
{Object.entries(groupedFields).map(([section, fields], index) => (
<Box key={section} mt={4} >
<Heading as="h6" size="xs" mx={5} fontWeight={'500'}>
<Box key={section} mt={4}>
<Heading as="h6" size="xs" mx={5} fontWeight={"500"}>
{/* <ArrowBackIcon fontSize={'lg'} /> */}
{section}
</Heading>
<Box display={"flex"} gap={0}>
<Box
width={"100%"}
p={p?p:5}
p={p ? p : 5}
display={"flex"}
flexWrap={"wrap"}
gap={4}
@@ -49,7 +50,7 @@ const FormInputMain = ({
options,
helperText,
multiple,
width
width,
},
key
) => (
@@ -83,22 +84,24 @@ const FormInputMain = ({
))}
{children}
<Box display={'flex'} justifyContent={'end'} mb={5}>
<Box display={"flex"} justifyContent={"end"} p={2} w={'49%'} gap={4}>
{onCancle && <Button
size={"sm"}
width={w?w:"44.5%"}
rounded={"sm"}
type="submit"
colorScheme='gray'
onClick={onCancle}
>
Cancel
</Button>}
<Box display={"flex"} justifyContent={"end"} mb={5}>
<Box display={"flex"} justifyContent={"end"} p={2} w={"49%"} gap={4}>
{onCancle && (
<Button
size={"sm"}
width={w ? w : "44.5%"}
rounded={"sm"}
type="submit"
colorScheme="gray"
onClick={onCancle}
>
Cancel
</Button>
)}
<Button
size={"sm"}
width={w?w:"44.5%"}
width={w ? w : "44.5%"}
rounded={"sm"}
type="submit"
colorScheme="green"