Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 89: UI to edit non-ui driven xp fields #141

Merged
merged 7 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 9 additions & 23 deletions src/components/adminaddresses/CreateUpdateForm.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
import * as Yup from "yup"
import {
Box,
Button,
ButtonGroup,
Card,
CardBody,
CardHeader,
Container,
Flex,
SimpleGrid,
Stack,
theme,
VStack
} from "@chakra-ui/react"
import {InputControl, SwitchControl} from "components/react-hook-form"
import {Address, AdminAddresses} from "ordercloud-javascript-sdk"
import {useRouter} from "hooks/useRouter"
import {Button, ButtonGroup, Card, CardBody, CardHeader, Container, SimpleGrid} from "@chakra-ui/react"
import {yupResolver} from "@hookform/resolvers/yup"
import {InputControl} from "components/react-hook-form"
import {useCreateUpdateForm} from "hooks/useCreateUpdateForm"
import {useRouter} from "hooks/useRouter"
import {pick} from "lodash"
import {IAdminAddress} from "types/ordercloud/IAdminAddress"
import {Address, AdminAddresses} from "ordercloud-javascript-sdk"
import {useForm} from "react-hook-form"
import {yupResolver} from "@hookform/resolvers/yup"
import SubmitButton from "../react-hook-form/submit-button"
import ResetButton from "../react-hook-form/reset-button"
import {TbChevronLeft} from "react-icons/tb"
import AdminUserXpCard from "../adminusers/AdminUserXpCard"
import {IAdminAddress} from "types/ordercloud/IAdminAddress"
import * as Yup from "yup"
import ResetButton from "../react-hook-form/reset-button"
import SubmitButton from "../react-hook-form/submit-button"

export {CreateUpdateForm}
interface CreateUpdateFormProps {
Expand Down
64 changes: 0 additions & 64 deletions src/components/adminusers/AdminUserXpCard.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/adminusers/CreateUpdateForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
TableContainer,
Tbody,
Td,
Text,
theme,
Tr,
VStack
Expand All @@ -29,7 +30,6 @@ import {textHelper} from "utils"
import {appPermissions} from "constants/app-permissions.config"
import {isEqual, sortBy, difference, pick} from "lodash"
import {IAdminUser} from "types/ordercloud/IAdminUser"
import AdminUserXpCard from "./AdminUserXpCard"
import {useForm} from "react-hook-form"
import {yupResolver} from "@hookform/resolvers/yup"
import SubmitButton from "../react-hook-form/submit-button"
Expand Down Expand Up @@ -197,7 +197,7 @@ function CreateUpdateForm({user, assignedPermissions}: CreateUpdateFormProps) {
</CardBody>
</Card>
<Card mt={6}>
<AdminUserXpCard user={user} />
<Text>Under construction</Text>
</Card>
</Container>
)
Expand Down
Loading