Email redirect and group dropdown fixes
This commit is contained in:
parent
7ad25e8a95
commit
84731c9e9a
5 changed files with 24 additions and 14 deletions
|
|
@ -44,7 +44,8 @@ export const TicketEdit: FC<TicketEditProps> = ({ id }) => {
|
|||
|
||||
useEffect(() => {
|
||||
const fetchAgents = async () => {
|
||||
const result = await getAgentsAction();
|
||||
const groupID = formState?.values?.group?.split("/")?.pop();
|
||||
const result = await getAgentsAction(groupID);
|
||||
setAgents(result);
|
||||
};
|
||||
|
||||
|
|
@ -67,7 +68,7 @@ export const TicketEdit: FC<TicketEditProps> = ({ id }) => {
|
|||
fetchTicketPriorities();
|
||||
fetchAgents();
|
||||
fetchGroups();
|
||||
}, []);
|
||||
}, [formState.values.group]);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchTicket = async () => {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,11 @@
|
|||
"use client";
|
||||
|
||||
import { Grid } from "@mui/material";
|
||||
|
||||
type LayoutProps = {
|
||||
detail: any;
|
||||
edit: any;
|
||||
params: {
|
||||
id: string;
|
||||
};
|
||||
};
|
||||
|
||||
export default function Layout({ detail, edit, params: { id } }: LayoutProps) {
|
||||
export default async function Layout({ detail, edit }: LayoutProps) {
|
||||
return (
|
||||
<Grid container spacing={0} sx={{ height: "100vh" }} direction="row">
|
||||
<Grid item sx={{ height: "100vh" }} xs={9}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue