Import updates
This commit is contained in:
parent
73fdb6e5d1
commit
53514d68cb
40 changed files with 85 additions and 90 deletions
|
|
@ -6,10 +6,10 @@ import Image from "next/legacy/image";
|
|||
import { Box, Grid, Container, IconButton } from "@mui/material";
|
||||
import { Apple as AppleIcon, Google as GoogleIcon } from "@mui/icons-material";
|
||||
import { useTranslate } from "react-polyglot";
|
||||
import { LanguageSelect } from "@/app/_components/LanguageSelect";
|
||||
import { LanguageSelect } from "app/_components/LanguageSelect";
|
||||
import LeafcutterLogoLarge from "images/leafcutter-logo-large.png";
|
||||
import { signIn } from "next-auth/react";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
|
||||
type LoginProps = {
|
||||
session: any;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import { useTranslate } from "react-polyglot";
|
|||
import Image from "next/legacy/image";
|
||||
import Link from "next/link";
|
||||
import { Grid, Container, Box, Button } from "@mui/material";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { PageHeader } from "@/app/_components/PageHeader";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
import { PageHeader } from "app/_components/PageHeader";
|
||||
import { AboutFeature } from "./AboutFeature";
|
||||
import { AboutBox } from "./AboutBox";
|
||||
import AbstractDiagram from "images/abstract-diagram.png";
|
||||
|
|
@ -161,4 +161,3 @@ export const About: FC = () => {
|
|||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import { useTranslate } from "react-polyglot";
|
|||
import { useRouter, usePathname } from "next/navigation";
|
||||
import { Box, Grid } from "@mui/material";
|
||||
import { useCookies } from "react-cookie";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { PageHeader } from "@/app/_components/PageHeader";
|
||||
import { VisualizationBuilder } from "@/app/_components/VisualizationBuilder";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
import { PageHeader } from "app/_components/PageHeader";
|
||||
import { VisualizationBuilder } from "app/_components/VisualizationBuilder";
|
||||
|
||||
type CreateProps = {
|
||||
templates: any;
|
||||
|
|
@ -62,4 +62,3 @@ export const Create: FC<CreateProps> = ({ templates }) => {
|
|||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { getTemplates } from "@/app/_lib/opensearch";
|
||||
import { getTemplates } from "app/_lib/opensearch";
|
||||
import { Create } from "./_components/Create";
|
||||
|
||||
export default async function Page() {
|
||||
const templates = await getTemplates(100);
|
||||
|
||||
return <Create templates={templates} />;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
import { FC } from "react";
|
||||
import { useTranslate } from "react-polyglot";
|
||||
import { Box, Grid } from "@mui/material";
|
||||
import { PageHeader } from "@/app/_components/PageHeader";
|
||||
import { Question } from "@/app/_components/Question";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { PageHeader } from "app/_components/PageHeader";
|
||||
import { Question } from "app/_components/Question";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
import FaqHeader from "images/faq-header.svg";
|
||||
|
||||
export const FAQ: FC = () => {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
import { FC } from "react";
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
import { RawDataViewer } from "@/app/_components/RawDataViewer";
|
||||
import { VisualizationDetail } from "@/app/_components/VisualizationDetail";
|
||||
import { RawDataViewer } from "app/_components/RawDataViewer";
|
||||
import { VisualizationDetail } from "app/_components/VisualizationDetail";
|
||||
|
||||
interface PreviewProps {
|
||||
visualization: any;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import { useLayoutEffect } from "react";
|
|||
import { useRouter } from "next/navigation";
|
||||
import { Grid, CircularProgress } from "@mui/material";
|
||||
import Iframe from "react-iframe";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
|
||||
export const Setup:FC = () => {
|
||||
export const Setup: FC = () => {
|
||||
const {
|
||||
colors: { leafcutterElectricBlue },
|
||||
} = useAppContext();
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
"use client";
|
||||
|
||||
import { FC, } from "react";
|
||||
import { FC } from "react";
|
||||
import { Grid, Box } from "@mui/material";
|
||||
import { useTranslate } from "react-polyglot";
|
||||
import { PageHeader } from "@/app/_components/PageHeader";
|
||||
import { VisualizationCard } from "@/app/_components/VisualizationCard";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { PageHeader } from "app/_components/PageHeader";
|
||||
import { VisualizationCard } from "app/_components/VisualizationCard";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
|
||||
type TrendsProps = {
|
||||
visualizations: any;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getTrends } from "@/app/_lib/opensearch";
|
||||
import { getTrends } from "app/_lib/opensearch";
|
||||
import { Trends } from "./_components/Trends";
|
||||
|
||||
export default async function Page() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable no-underscore-dangle */
|
||||
import { Client } from "@opensearch-project/opensearch";
|
||||
import { VisualizationDetail } from "@/app/_components/VisualizationDetail";
|
||||
import { VisualizationDetail } from "app/_components/VisualizationDetail";
|
||||
|
||||
const getVisualization = async (visualizationID: string) => {
|
||||
const node = `https://${process.env.OPENSEARCH_USERNAME}:${process.env.OPENSEARCH_PASSWORD}@${process.env.OPENSEARCH_URL}`;
|
||||
|
|
@ -31,18 +31,16 @@ const getVisualization = async (visualizationID: string) => {
|
|||
};
|
||||
|
||||
return visualization;
|
||||
}
|
||||
};
|
||||
|
||||
type PageProps = {
|
||||
params: {
|
||||
visualizationID: string;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
export default async function Page({ params: { visualizationID } }: PageProps) {
|
||||
const visualization = await getVisualization(visualizationID);
|
||||
|
||||
return <VisualizationDetail {...visualization} editing={false}/>;
|
||||
return <VisualizationDetail {...visualization} editing={false} />;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {
|
|||
useState,
|
||||
PropsWithChildren,
|
||||
} from "react";
|
||||
import { colors, typography } from "@/app/_styles/theme";
|
||||
import { colors, typography } from "app/_styles/theme";
|
||||
|
||||
const basePath = process.env.GITLAB_CI
|
||||
? "/link/link-stack/apps/leafcutter"
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import ReactMarkdown from "react-markdown";
|
|||
import { Grid, Button } from "@mui/material";
|
||||
import { useTranslate } from "react-polyglot";
|
||||
import { useCookies } from "react-cookie";
|
||||
import { Welcome } from "@/app/_components/Welcome";
|
||||
import { WelcomeDialog } from "@/app/_components/WelcomeDialog";
|
||||
import { VisualizationCard } from "@/app/_components/VisualizationCard";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { Welcome } from "app/_components/Welcome";
|
||||
import { WelcomeDialog } from "app/_components/WelcomeDialog";
|
||||
import { VisualizationCard } from "app/_components/VisualizationCard";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
|
||||
type HomeProps = {
|
||||
visualizations: any;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { CookiesProvider } from "react-cookie";
|
|||
import { I18n } from "react-polyglot";
|
||||
import { AdapterDateFns } from "@mui/x-date-pickers-pro/AdapterDateFns";
|
||||
import { LocalizationProvider } from "@mui/x-date-pickers-pro";
|
||||
import { AppProvider } from "@/app/_components/AppProvider";
|
||||
import { AppProvider } from "app/_components/AppProvider";
|
||||
import { NextAppDirEmotionCacheProvider } from "tss-react/next/appDir";
|
||||
import en from "app/_locales/en.json";
|
||||
import fr from "app/_locales/fr.json";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { FC, useState, useEffect } from "react";
|
|||
import { Box, Grid } from "@mui/material";
|
||||
import { useTranslate } from "react-polyglot";
|
||||
import taxonomy from "app/_config/taxonomy.json";
|
||||
import { colors } from "@/app/_styles/theme";
|
||||
import { colors } from "app/_styles/theme";
|
||||
import { useAppContext } from "./AppProvider";
|
||||
|
||||
export const QueryText: FC = () => {
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ import {
|
|||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { useTranslate } from "react-polyglot";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { Tooltip } from "@/app/_components/Tooltip";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
import { Tooltip } from "app/_components/Tooltip";
|
||||
// import { ArrowCircleRight as ArrowCircleRightIcon } from "@mui/icons-material";
|
||||
|
||||
const MenuItem = ({
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import Image from "next/legacy/image";
|
|||
import { AppBar, Grid, Box } from "@mui/material";
|
||||
import { useTranslate } from "react-polyglot";
|
||||
import LeafcutterLogo from "images/leafcutter-logo.png";
|
||||
import { AccountButton } from "@/app/_components/AccountButton";
|
||||
import { HelpButton } from "@/app/_components/HelpButton";
|
||||
import { Tooltip } from "@/app/_components/Tooltip";
|
||||
import { AccountButton } from "app/_components/AccountButton";
|
||||
import { HelpButton } from "app/_components/HelpButton";
|
||||
import { Tooltip } from "app/_components/Tooltip";
|
||||
import { useAppContext } from "./AppProvider";
|
||||
// import { LanguageSelect } from "./LanguageSelect";
|
||||
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ import {
|
|||
RemoveCircle as RemoveCircleIcon,
|
||||
} from "@mui/icons-material";
|
||||
import { useTranslate } from "react-polyglot";
|
||||
import { QueryBuilder } from "@/app/_components/QueryBuilder";
|
||||
import { QueryText } from "@/app/_components/QueryText";
|
||||
import { LiveDataViewer } from "@/app/_components/LiveDataViewer";
|
||||
import { Tooltip } from "@/app/_components/Tooltip";
|
||||
import { QueryBuilder } from "app/_components/QueryBuilder";
|
||||
import { QueryText } from "app/_components/QueryText";
|
||||
import { LiveDataViewer } from "app/_components/LiveDataViewer";
|
||||
import { Tooltip } from "app/_components/Tooltip";
|
||||
import visualizationMap from "app/_config/visualizationMap.json";
|
||||
import { VisualizationSelectCard } from "./VisualizationSelectCard";
|
||||
import { MetricSelectCard } from "./MetricSelectCard";
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
import { FC, useState } from "react";
|
||||
import { Grid, Card, Box } from "@mui/material";
|
||||
import Iframe from "react-iframe";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { VisualizationDetailDialog } from "@/app/_components/VisualizationDetailDialog";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
import { VisualizationDetailDialog } from "app/_components/VisualizationDetailDialog";
|
||||
|
||||
interface VisualizationCardProps {
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { FC } from "react";
|
|||
// import Link from "next/link";
|
||||
import { Box } from "@mui/material";
|
||||
import Iframe from "react-iframe";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
|
||||
interface VisualizationDetailProps {
|
||||
id: string;
|
||||
|
|
@ -26,7 +26,7 @@ export const VisualizationDetail: FC<VisualizationDetailProps> = ({
|
|||
typography: { h4, p },
|
||||
} = useAppContext();
|
||||
const finalURL = `${process.env.NEXT_PUBLIC_NEXTAUTH_URL}${url}&_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-3y%2Cto%3Anow))`;
|
||||
console.log({finalURL})
|
||||
console.log({ finalURL });
|
||||
return (
|
||||
<Box key={id}>
|
||||
{!editing ? (
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {
|
|||
TextField,
|
||||
} from "@mui/material";
|
||||
import { useTranslate } from "react-polyglot";
|
||||
import { useAppContext } from "@/app/_components/AppProvider";
|
||||
import { useAppContext } from "app/_components/AppProvider";
|
||||
import { VisualizationDetail } from "./VisualizationDetail";
|
||||
|
||||
interface VisualizationDetailDialogProps {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import NextAuth from "next-auth";
|
||||
import { authOptions } from "@/app/_lib/auth";
|
||||
import { authOptions } from "app/_lib/auth";
|
||||
|
||||
const handler = NextAuth(authOptions);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "@/app/_lib/auth";
|
||||
import { getUserMetadata, saveUserMetadata } from "@/app/_lib/opensearch";
|
||||
import { authOptions } from "app/_lib/auth";
|
||||
import { getUserMetadata, saveUserMetadata } from "app/_lib/opensearch";
|
||||
|
||||
export const POST = async (req: NextRequest) => {
|
||||
const session = await getServerSession(authOptions);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "@/app/_lib/auth";
|
||||
import { getUserMetadata, saveUserMetadata } from "@/app/_lib/opensearch";
|
||||
import { authOptions } from "app/_lib/auth";
|
||||
import { getUserMetadata, saveUserMetadata } from "app/_lib/opensearch";
|
||||
|
||||
export const POST = async (req: NextRequest) => {
|
||||
const session = await getServerSession(authOptions);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NextResponse } from "next/server";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "@/app/_lib/auth";
|
||||
import { getUserMetadata } from "@/app/_lib/opensearch";
|
||||
import { authOptions } from "app/_lib/auth";
|
||||
import { getUserMetadata } from "app/_lib/opensearch";
|
||||
|
||||
export const GET = async () => {
|
||||
const session = await getServerSession(authOptions);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { NextResponse } from "next/server";
|
||||
import { getTrends } from "@/app/_lib/opensearch";
|
||||
import { getTrends } from "app/_lib/opensearch";
|
||||
|
||||
export const GET = async () => {
|
||||
const results = await getTrends(5);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "@/app/_lib/auth";
|
||||
import { createUserVisualization } from "@/app/_lib/opensearch";
|
||||
import { authOptions } from "app/_lib/auth";
|
||||
import { createUserVisualization } from "app/_lib/opensearch";
|
||||
|
||||
export const POST = async (req: NextRequest) => {
|
||||
const session = await getServerSession(authOptions);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "@/app/_lib/auth";
|
||||
import { deleteUserVisualization } from "@/app/_lib/opensearch";
|
||||
import { authOptions } from "app/_lib/auth";
|
||||
import { deleteUserVisualization } from "app/_lib/opensearch";
|
||||
|
||||
export const POST = async (req: NextRequest, res: NextResponse) => {
|
||||
const session = await getServerSession(authOptions);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { performQuery } from "@/app/_lib/opensearch";
|
||||
import { performQuery } from "app/_lib/opensearch";
|
||||
|
||||
export const GET = async (req: NextRequest) => {
|
||||
const searchQuery = req.nextUrl.searchParams.get("searchQuery");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "@/app/_lib/auth";
|
||||
import { updateUserVisualization } from "@/app/_lib/opensearch";
|
||||
import { authOptions } from "app/_lib/auth";
|
||||
import { updateUserVisualization } from "app/_lib/opensearch";
|
||||
|
||||
export const POST = async (req: NextRequest) => {
|
||||
const session = await getServerSession(authOptions);
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "app/_lib/auth";
|
||||
import { getUserVisualizations } from "@/app/_lib/opensearch";
|
||||
import { Home } from "@/app/_components/Home";
|
||||
import { getUserVisualizations } from "app/_lib/opensearch";
|
||||
import { Home } from "app/_components/Home";
|
||||
|
||||
export default async function Page() {
|
||||
const session = await getServerSession(authOptions);
|
||||
const { user: { email } }: any = session;
|
||||
const visualizations = await getUserVisualizations(
|
||||
email ?? "none",
|
||||
20
|
||||
);
|
||||
const {
|
||||
user: { email },
|
||||
}: any = session;
|
||||
const visualizations = await getUserVisualizations(email ?? "none", 20);
|
||||
|
||||
return <Home visualizations={visualizations} />;
|
||||
return <Home visualizations={visualizations} />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import Link from "next/link";
|
|||
import Image from "next/image";
|
||||
import LinkLogo from "public/link-logo-small.png";
|
||||
import { useSession, signOut } from "next-auth/react";
|
||||
import { getTicketOverviewCountsQuery } from "@/app/_graphql/getTicketOverviewCountsQuery";
|
||||
import { getTicketOverviewCountsQuery } from "app/_graphql/getTicketOverviewCountsQuery";
|
||||
|
||||
const openWidth = 270;
|
||||
const closedWidth = 100;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Metadata } from "next";
|
||||
import { ZammadWrapper } from "@/app/(main)/_components/ZammadWrapper";
|
||||
import { ZammadWrapper } from "app/(main)/_components/ZammadWrapper";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Zammad",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Metadata } from "next";
|
||||
import { ZammadWrapper } from "@/app/(main)/_components/ZammadWrapper";
|
||||
import { ZammadWrapper } from "app/(main)/_components/ZammadWrapper";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Knowledge Base",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { FC } from "react";
|
|||
import { Grid, Box } from "@mui/material";
|
||||
import { GridColDef } from "@mui/x-data-grid-pro";
|
||||
import { StyledDataGrid } from "../../../_components/StyledDataGrid";
|
||||
import { typography } from "@/app/_styles/theme";
|
||||
import { typography } from "app/_styles/theme";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
interface TicketListProps {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
import { FC } from "react";
|
||||
import useSWR from "swr";
|
||||
import { TicketList } from "./TicketList";
|
||||
import { getTicketsByOverviewQuery } from "@/app/_graphql/getTicketsByOverviewQuery";
|
||||
import { getTicketsByOverviewQuery } from "app/_graphql/getTicketsByOverviewQuery";
|
||||
|
||||
type ZammadOverviewProps = {
|
||||
name: string;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Metadata } from "next";
|
||||
import { ZammadWrapper } from "@/app/(main)/_components/ZammadWrapper";
|
||||
import { ZammadWrapper } from "app/(main)/_components/ZammadWrapper";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Profile",
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
TextField,
|
||||
} from "@mui/material";
|
||||
import { useSWRConfig } from "swr";
|
||||
import { updateTicketMutation } from "@/app/_graphql/updateTicketMutation";
|
||||
import { updateTicketMutation } from "app/_graphql/updateTicketMutation";
|
||||
|
||||
interface ArticleCreateDialogProps {
|
||||
ticketID: string;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { FC, useState } from "react";
|
||||
import useSWR from "swr";
|
||||
import { getTicketQuery } from "@/app/_graphql/getTicketQuery";
|
||||
import { getTicketQuery } from "app/_graphql/getTicketQuery";
|
||||
import {
|
||||
Grid,
|
||||
Box,
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
"use client";
|
||||
|
||||
import { FC, useEffect, useState } from "react";
|
||||
import { FC, /* useEffect, */ useState } from "react";
|
||||
import {
|
||||
Grid,
|
||||
Box,
|
||||
Typography,
|
||||
TextField,
|
||||
// Typography,
|
||||
// TextField,
|
||||
Stack,
|
||||
Chip,
|
||||
Select,
|
||||
MenuItem,
|
||||
} from "@mui/material";
|
||||
import useSWR, { useSWRConfig } from "swr";
|
||||
import { updateTicketMutation } from "@/app/_graphql/updateTicketMutation";
|
||||
import { /* useSWR, */ useSWRConfig } from "swr";
|
||||
import { updateTicketMutation } from "app/_graphql/updateTicketMutation";
|
||||
import "@chatscope/chat-ui-kit-styles/dist/default/styles.min.css";
|
||||
|
||||
interface TicketEditProps {
|
||||
|
|
@ -24,7 +24,7 @@ export const TicketEdit: FC<TicketEditProps> = ({ ticket }) => {
|
|||
const [selectedOwner, setSelectedOwner] = useState(1);
|
||||
const [selectedPriority, setSelectedPriority] = useState(1);
|
||||
const [selectedState, setSelectedState] = useState(1);
|
||||
const [selectedTags, setSelectedTags] = useState(["tag1", "tag2"]);
|
||||
const [selectedTags] = useState(["tag1", "tag2"]);
|
||||
const handleDelete = () => {
|
||||
console.info("You clicked the delete icon.");
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ import Head from "next/head";
|
|||
import useSWR from "swr";
|
||||
import { NextPage } from "next";
|
||||
import { Grid } from "@mui/material";
|
||||
import { TicketDetail } from "@/app/_components/TicketDetail";
|
||||
import { TicketEdit } from "@/app/_components/TicketEdit";
|
||||
import { getTicketQuery } from "@/app/_graphql/getTicketQuery";
|
||||
import { TicketDetail } from "app/_components/TicketDetail";
|
||||
import { TicketEdit } from "app/_components/TicketEdit";
|
||||
import { getTicketQuery } from "app/_graphql/getTicketQuery";
|
||||
|
||||
type TicketProps = {
|
||||
id: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue