Link ticket fixes #1
This commit is contained in:
parent
1443a61164
commit
d9ce2f5883
21 changed files with 617 additions and 583 deletions
|
|
@ -17,14 +17,14 @@
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/server": "^11.11.0",
|
"@emotion/server": "^11.11.0",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@fontsource/playfair-display": "^5.0.12",
|
"@fontsource/playfair-display": "^5.0.13",
|
||||||
"@fontsource/poppins": "^5.0.8",
|
"@fontsource/poppins": "^5.0.8",
|
||||||
"@fontsource/roboto": "^5.0.8",
|
"@fontsource/roboto": "^5.0.8",
|
||||||
"@mui/icons-material": "^5",
|
"@mui/icons-material": "^5",
|
||||||
"@mui/lab": "^5.0.0-alpha.146",
|
"@mui/lab": "^5.0.0-alpha.146",
|
||||||
"@mui/material": "^5",
|
"@mui/material": "^5",
|
||||||
"@mui/x-data-grid-pro": "^6.15.0",
|
"@mui/x-data-grid-pro": "^6.16.0",
|
||||||
"@mui/x-date-pickers-pro": "^6.15.0",
|
"@mui/x-date-pickers-pro": "^6.16.0",
|
||||||
"@opensearch-project/opensearch": "^2.3.1",
|
"@opensearch-project/opensearch": "^2.3.1",
|
||||||
"cryptr": "^6.3.0",
|
"cryptr": "^6.3.0",
|
||||||
"date-fns": "^2.30.0",
|
"date-fns": "^2.30.0",
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
"react-cookie-consent": "^8.0.1",
|
"react-cookie-consent": "^8.0.1",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-iframe": "^1.8.5",
|
"react-iframe": "^1.8.5",
|
||||||
"react-markdown": "^8.0.7",
|
"react-markdown": "^9.0.0",
|
||||||
"react-polyglot": "^0.7.2",
|
"react-polyglot": "^0.7.2",
|
||||||
"sharp": "^0.32.6",
|
"sharp": "^0.32.6",
|
||||||
"swr": "^2.2.4",
|
"swr": "^2.2.4",
|
||||||
|
|
@ -49,8 +49,8 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.23.0",
|
"@babel/core": "^7.23.0",
|
||||||
"@types/node": "^20.7.0",
|
"@types/node": "^20.8.0",
|
||||||
"@types/react": "18.2.23",
|
"@types/react": "18.2.24",
|
||||||
"@types/uuid": "^9.0.4",
|
"@types/uuid": "^9.0.4",
|
||||||
"babel-loader": "^9.1.3",
|
"babel-loader": "^9.1.3",
|
||||||
"eslint": "^8.50.0",
|
"eslint": "^8.50.0",
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import {
|
||||||
Dvr as DvrIcon,
|
Dvr as DvrIcon,
|
||||||
Assessment as AssessmentIcon,
|
Assessment as AssessmentIcon,
|
||||||
LibraryBooks as LibraryBooksIcon,
|
LibraryBooks as LibraryBooksIcon,
|
||||||
|
School as SchoolIcon,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
import { usePathname } from "next/navigation";
|
import { usePathname } from "next/navigation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
@ -33,6 +34,7 @@ import LinkLogo from "public/link-logo-small.png";
|
||||||
import { useSession, signOut } from "next-auth/react";
|
import { useSession, signOut } from "next-auth/react";
|
||||||
import { getTicketOverviewCountsQuery } from "app/_graphql/getTicketOverviewCountsQuery";
|
import { getTicketOverviewCountsQuery } from "app/_graphql/getTicketOverviewCountsQuery";
|
||||||
|
|
||||||
|
console.log;
|
||||||
const openWidth = 270;
|
const openWidth = 270;
|
||||||
const closedWidth = 100;
|
const closedWidth = 100;
|
||||||
|
|
||||||
|
|
@ -163,7 +165,6 @@ interface SidebarProps {
|
||||||
export const Sidebar: FC<SidebarProps> = ({ open, setOpen }) => {
|
export const Sidebar: FC<SidebarProps> = ({ open, setOpen }) => {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const { data: session } = useSession();
|
const { data: session } = useSession();
|
||||||
console.log({ session });
|
|
||||||
const username = session?.user?.name || "User";
|
const username = session?.user?.name || "User";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const roles = session?.user?.roles || [];
|
const roles = session?.user?.roles || [];
|
||||||
|
|
@ -436,11 +437,19 @@ export const Sidebar: FC<SidebarProps> = ({ open, setOpen }) => {
|
||||||
<MenuItem
|
<MenuItem
|
||||||
name="Knowledge Base"
|
name="Knowledge Base"
|
||||||
href="/knowledge"
|
href="/knowledge"
|
||||||
Icon={LibraryBooksIcon}
|
Icon={SchoolIcon}
|
||||||
iconSize={20}
|
iconSize={20}
|
||||||
selected={pathname.endsWith("/knowledge")}
|
selected={pathname.endsWith("/knowledge")}
|
||||||
open={open}
|
open={open}
|
||||||
/>
|
/>
|
||||||
|
<MenuItem
|
||||||
|
name="Documentation"
|
||||||
|
href="/docs"
|
||||||
|
Icon={LibraryBooksIcon}
|
||||||
|
iconSize={20}
|
||||||
|
selected={pathname.endsWith("/docs")}
|
||||||
|
open={open}
|
||||||
|
/>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
name="Reporting"
|
name="Reporting"
|
||||||
href="/reporting"
|
href="/reporting"
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export const StyledDataGrid: FC<StyledDataGridProps> = ({
|
||||||
columns,
|
columns,
|
||||||
rows,
|
rows,
|
||||||
onRowClick,
|
onRowClick,
|
||||||
height = "calc(100vh - 20px)",
|
height = "100%",
|
||||||
selectedRows,
|
selectedRows,
|
||||||
setSelectedRows,
|
setSelectedRows,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
@ -43,6 +43,9 @@ export const StyledDataGrid: FC<StyledDataGridProps> = ({
|
||||||
border: 0,
|
border: 0,
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height,
|
height,
|
||||||
|
".MuiDataGrid-row": {
|
||||||
|
cursor: "pointer",
|
||||||
|
},
|
||||||
".MuiDataGrid-row:nth-of-type(1n)": {
|
".MuiDataGrid-row:nth-of-type(1n)": {
|
||||||
backgroundColor: "#f3f3f3",
|
backgroundColor: "#f3f3f3",
|
||||||
},
|
},
|
||||||
|
|
@ -66,12 +69,14 @@ export const StyledDataGrid: FC<StyledDataGridProps> = ({
|
||||||
rows={rows}
|
rows={rows}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
density="compact"
|
density="compact"
|
||||||
hideFooter
|
pagination
|
||||||
|
initialState={{
|
||||||
|
pagination: { paginationModel: { pageSize: 20 } },
|
||||||
|
}}
|
||||||
|
pageSizeOptions={[5, 10, 25]}
|
||||||
|
paginationMode="client"
|
||||||
sx={{ height }}
|
sx={{ height }}
|
||||||
rowBuffer={30}
|
rowBuffer={30}
|
||||||
checkboxSelection={!!setSelectedRows}
|
|
||||||
onRowSelectionModelChange={setSelectedRows}
|
|
||||||
rowSelectionModel={selectedRows}
|
|
||||||
rowHeight={46}
|
rowHeight={46}
|
||||||
scrollbarSize={0}
|
scrollbarSize={0}
|
||||||
disableVirtualization
|
disableVirtualization
|
||||||
|
|
|
||||||
24
apps/link/app/(main)/docs/_components/DocsWrapper.tsx
Normal file
24
apps/link/app/(main)/docs/_components/DocsWrapper.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
"use client";
|
||||||
|
|
||||||
|
import { FC } from "react";
|
||||||
|
import { Grid } from "@mui/material";
|
||||||
|
import Iframe from "react-iframe";
|
||||||
|
|
||||||
|
export const DocsWrapper: FC = () => (
|
||||||
|
<Grid
|
||||||
|
container
|
||||||
|
spacing={0}
|
||||||
|
sx={{ height: "100%", width: "100%" }}
|
||||||
|
direction="column"
|
||||||
|
>
|
||||||
|
<Grid item sx={{ height: "100vh", width: "100%" }}>
|
||||||
|
<Iframe
|
||||||
|
id="docs"
|
||||||
|
url={"https://digiresilience.org/docs/link/about/"}
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
frameBorder={0}
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
10
apps/link/app/(main)/docs/page.tsx
Normal file
10
apps/link/app/(main)/docs/page.tsx
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { Metadata } from "next";
|
||||||
|
import { DocsWrapper } from "./_components/DocsWrapper";
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: "Documentation",
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function Page() {
|
||||||
|
return <DocsWrapper />;
|
||||||
|
}
|
||||||
|
|
@ -19,24 +19,24 @@ export const TicketList: FC<TicketListProps> = ({ title, tickets }) => {
|
||||||
{
|
{
|
||||||
field: "number",
|
field: "number",
|
||||||
headerName: "Number",
|
headerName: "Number",
|
||||||
flex: 1,
|
flex: 0.3,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "title",
|
field: "title",
|
||||||
headerName: "Title",
|
headerName: "Title",
|
||||||
flex: 1,
|
flex: 1.5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "customer",
|
field: "customer",
|
||||||
headerName: "Sender",
|
headerName: "Sender",
|
||||||
valueGetter: (params) => params.row?.customer?.fullname,
|
valueGetter: (params) => params.row?.customer?.fullname,
|
||||||
flex: 1,
|
flex: 0.6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "group",
|
field: "group",
|
||||||
headerName: "Group",
|
headerName: "Group",
|
||||||
valueGetter: (params) => params.row?.group?.name,
|
valueGetter: (params) => params.row?.group?.name,
|
||||||
flex: 1,
|
flex: 0.3,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
console.log({ tickets });
|
console.log({ tickets });
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ export const ZammadOverview: FC<ZammadOverviewProps> = ({ name, id }) => {
|
||||||
const { data: ticketData, error: ticketError }: any = useSWR(
|
const { data: ticketData, error: ticketError }: any = useSWR(
|
||||||
{
|
{
|
||||||
document: getTicketsByOverviewQuery,
|
document: getTicketsByOverviewQuery,
|
||||||
variables: { overviewId: `gid://zammad/Overview/${id}` },
|
variables: { overviewId: `gid://zammad/Overview/${id}`, pageSize: 250 },
|
||||||
},
|
},
|
||||||
{ refreshInterval: 10000 },
|
{ refreshInterval: 10000 },
|
||||||
);
|
);
|
||||||
|
|
@ -23,10 +23,20 @@ export const ZammadOverview: FC<ZammadOverviewProps> = ({ name, id }) => {
|
||||||
const tickets =
|
const tickets =
|
||||||
ticketData?.ticketsByOverview?.edges.map((edge: any) => edge.node) || [];
|
ticketData?.ticketsByOverview?.edges.map((edge: any) => edge.node) || [];
|
||||||
|
|
||||||
|
const sortedTickets = tickets.sort((a: any, b: any) => {
|
||||||
|
if (a.internalId < b.internalId) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (a.internalId > b.internalId) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{shouldRender && <TicketList title={name} tickets={tickets} />}
|
{shouldRender && <TicketList title={name} tickets={sortedTickets} />}
|
||||||
{ticketError && <div>{ticketError.toString()}</div>}
|
{/*ticketError && <div>{ticketError.toString()}</div>*/}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ export const TicketDetail: FC<TicketDetailProps> = ({ id }) => {
|
||||||
document: getTicketQuery,
|
document: getTicketQuery,
|
||||||
variables: { ticketId: `gid://zammad/Ticket/${id}` },
|
variables: { ticketId: `gid://zammad/Ticket/${id}` },
|
||||||
},
|
},
|
||||||
{ refreshInterval: 100000 },
|
{ refreshInterval: 10000 },
|
||||||
);
|
);
|
||||||
const { data: ticketArticlesData, error: ticketArticlesError }: any = useSWR(
|
const { data: ticketArticlesData, error: ticketArticlesError }: any = useSWR(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import { MuiChipsInput } from "mui-chips-input";
|
||||||
import useSWR, { useSWRConfig } from "swr";
|
import useSWR, { useSWRConfig } from "swr";
|
||||||
import { getTicketQuery } from "../../../../../_graphql/getTicketQuery";
|
import { getTicketQuery } from "../../../../../_graphql/getTicketQuery";
|
||||||
import { updateTicketMutation } from "../../../../../_graphql/updateTicketMutation";
|
import { updateTicketMutation } from "../../../../../_graphql/updateTicketMutation";
|
||||||
|
import { updateTagsMutation } from "../../../../../_graphql/updateTagsMutation";
|
||||||
import "@chatscope/chat-ui-kit-styles/dist/default/styles.min.css";
|
import "@chatscope/chat-ui-kit-styles/dist/default/styles.min.css";
|
||||||
|
|
||||||
interface TicketEditProps {
|
interface TicketEditProps {
|
||||||
|
|
@ -43,7 +44,7 @@ export const TicketEdit: FC<TicketEditProps> = ({ id }) => {
|
||||||
document: getTicketQuery,
|
document: getTicketQuery,
|
||||||
variables: { ticketId: `gid://zammad/Ticket/${id}` },
|
variables: { ticketId: `gid://zammad/Ticket/${id}` },
|
||||||
},
|
},
|
||||||
{ refreshInterval: 100000 },
|
{ refreshInterval: 10000 },
|
||||||
);
|
);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const ticket = ticketData?.ticket;
|
const ticket = ticketData?.ticket;
|
||||||
|
|
@ -59,14 +60,8 @@ export const TicketEdit: FC<TicketEditProps> = ({ id }) => {
|
||||||
setSelectedTags(ticket.tags);
|
setSelectedTags(ticket.tags);
|
||||||
}
|
}
|
||||||
}, [ticketData, ticketError]);
|
}, [ticketData, ticketError]);
|
||||||
const updateTicket = async () => {
|
const updateTicket = async (input: any) => {
|
||||||
const input = {
|
console.log({ input });
|
||||||
ownerId: `gid://zammad/User/${selectedOwner}`,
|
|
||||||
priorityId: `gid://zammad/Ticket::Priority/${selectedPriority}`,
|
|
||||||
stateId: `gid://zammad/Ticket::State/${selectedState}`,
|
|
||||||
groupId: `gid://zammad/Group/${selectedGroup}`,
|
|
||||||
// tags: selectedTags,
|
|
||||||
};
|
|
||||||
const res = await fetcher({
|
const res = await fetcher({
|
||||||
document: updateTicketMutation,
|
document: updateTicketMutation,
|
||||||
variables: {
|
variables: {
|
||||||
|
|
@ -76,6 +71,17 @@ export const TicketEdit: FC<TicketEditProps> = ({ id }) => {
|
||||||
});
|
});
|
||||||
console.log({ res });
|
console.log({ res });
|
||||||
};
|
};
|
||||||
|
const updateTags = async (tags: string[]) => {
|
||||||
|
console.log({ tags });
|
||||||
|
const res = await fetcher({
|
||||||
|
document: updateTagsMutation,
|
||||||
|
variables: {
|
||||||
|
objectId: `gid://zammad/Ticket/${id}`,
|
||||||
|
tags,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log({ res });
|
||||||
|
};
|
||||||
const shouldRender = ticketData && !ticketError;
|
const shouldRender = ticketData && !ticketError;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -88,8 +94,11 @@ export const TicketEdit: FC<TicketEditProps> = ({ id }) => {
|
||||||
defaultValue={selectedGroup}
|
defaultValue={selectedGroup}
|
||||||
value={selectedGroup}
|
value={selectedGroup}
|
||||||
onChange={(e: any) => {
|
onChange={(e: any) => {
|
||||||
setSelectedGroup(e.target.value);
|
const newGroup = e.target.value;
|
||||||
updateTicket();
|
setSelectedGroup(newGroup);
|
||||||
|
updateTicket({
|
||||||
|
groupId: `gid://zammad/Group/${newGroup}`,
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="small"
|
size="small"
|
||||||
sx={{
|
sx={{
|
||||||
|
|
@ -109,8 +118,9 @@ export const TicketEdit: FC<TicketEditProps> = ({ id }) => {
|
||||||
<Select
|
<Select
|
||||||
value={selectedOwner}
|
value={selectedOwner}
|
||||||
onChange={(e: any) => {
|
onChange={(e: any) => {
|
||||||
setSelectedOwner(e.target.value);
|
const newOwner = e.target.value;
|
||||||
updateTicket();
|
setSelectedOwner(newOwner);
|
||||||
|
updateTicket({ ownerId: `gid://zammad/User/${newOwner}` });
|
||||||
}}
|
}}
|
||||||
size="small"
|
size="small"
|
||||||
sx={{
|
sx={{
|
||||||
|
|
@ -130,8 +140,11 @@ export const TicketEdit: FC<TicketEditProps> = ({ id }) => {
|
||||||
<Select
|
<Select
|
||||||
value={selectedState}
|
value={selectedState}
|
||||||
onChange={(e: any) => {
|
onChange={(e: any) => {
|
||||||
setSelectedState(e.target.value);
|
const newState = e.target.value;
|
||||||
updateTicket();
|
setSelectedState(newState);
|
||||||
|
updateTicket({
|
||||||
|
stateId: `gid://zammad/Ticket::State/${newState}`,
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="small"
|
size="small"
|
||||||
sx={{
|
sx={{
|
||||||
|
|
@ -151,8 +164,11 @@ export const TicketEdit: FC<TicketEditProps> = ({ id }) => {
|
||||||
<Select
|
<Select
|
||||||
value={selectedPriority}
|
value={selectedPriority}
|
||||||
onChange={(e: any) => {
|
onChange={(e: any) => {
|
||||||
setSelectedPriority(e.target.value);
|
const newPriority = e.target.value;
|
||||||
updateTicket();
|
setSelectedPriority(newPriority);
|
||||||
|
updateTicket({
|
||||||
|
priorityId: `gid://zammad/Ticket::Priority/${newPriority}`,
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
size="small"
|
size="small"
|
||||||
sx={{
|
sx={{
|
||||||
|
|
@ -175,7 +191,7 @@ export const TicketEdit: FC<TicketEditProps> = ({ id }) => {
|
||||||
value={selectedTags}
|
value={selectedTags}
|
||||||
onChange={(tags: any) => {
|
onChange={(tags: any) => {
|
||||||
setSelectedTags(tags);
|
setSelectedTags(tags);
|
||||||
updateTicket();
|
updateTags(tags);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
||||||
12
apps/link/app/_graphql/updateTagsMutation.ts
Normal file
12
apps/link/app/_graphql/updateTagsMutation.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { gql } from "graphql-request";
|
||||||
|
|
||||||
|
export const updateTagsMutation = gql`
|
||||||
|
mutation UpdateTags($objectId: ID!, $tags: [String!]!) {
|
||||||
|
tagAssignmentUpdate(objectId: $objectId, tags: $tags) {
|
||||||
|
success
|
||||||
|
errors {
|
||||||
|
message
|
||||||
|
field
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}`;
|
||||||
|
|
@ -5,6 +5,9 @@ mutation UpdateTicket($ticketId: ID!, $input: TicketUpdateInput!) {
|
||||||
ticketUpdate(ticketId: $ticketId, input: $input) {
|
ticketUpdate(ticketId: $ticketId, input: $input) {
|
||||||
ticket {
|
ticket {
|
||||||
id
|
id
|
||||||
|
priority {
|
||||||
|
id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,11 @@ import { NextResponse } from 'next/server';
|
||||||
import { withAuth, NextRequestWithAuth } from "next-auth/middleware";
|
import { withAuth, NextRequestWithAuth } from "next-auth/middleware";
|
||||||
|
|
||||||
const rewriteURL = (request: NextRequestWithAuth, originBaseURL: string, destinationBaseURL: string, headers: any = {}) => {
|
const rewriteURL = (request: NextRequestWithAuth, originBaseURL: string, destinationBaseURL: string, headers: any = {}) => {
|
||||||
|
if (request.nextUrl.pathname.startsWith('/api/v1/reports/sets')) {
|
||||||
|
console.log(request.nextUrl.searchParams.get("sheet"));
|
||||||
|
NextResponse.next();
|
||||||
|
}
|
||||||
|
|
||||||
const destinationURL = request.url.replace(originBaseURL, destinationBaseURL);
|
const destinationURL = request.url.replace(originBaseURL, destinationBaseURL);
|
||||||
|
|
||||||
console.log(`Rewriting ${request.url} to ${destinationURL}`);
|
console.log(`Rewriting ${request.url} to ${destinationURL}`);
|
||||||
|
|
@ -35,6 +40,7 @@ const checkRewrites = async (request: NextRequestWithAuth) => {
|
||||||
} else if (request.nextUrl.pathname.startsWith('/proxy/api') || request.nextUrl.pathname.startsWith('/proxy/assets')) {
|
} else if (request.nextUrl.pathname.startsWith('/proxy/api') || request.nextUrl.pathname.startsWith('/proxy/assets')) {
|
||||||
return rewriteURL(request, `${linkBaseURL}/proxy`, zammadURL);
|
return rewriteURL(request, `${linkBaseURL}/proxy`, zammadURL);
|
||||||
} else if (request.nextUrl.pathname.startsWith('/api/v1') || request.nextUrl.pathname.startsWith('/auth/sso') || request.nextUrl.pathname.startsWith('/mobile')) {
|
} else if (request.nextUrl.pathname.startsWith('/api/v1') || request.nextUrl.pathname.startsWith('/auth/sso') || request.nextUrl.pathname.startsWith('/mobile')) {
|
||||||
|
console.log("THIS PATH");
|
||||||
return rewriteURL(request, linkBaseURL, zammadURL, headers);
|
return rewriteURL(request, linkBaseURL, zammadURL, headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,8 +62,9 @@ export default withAuth(
|
||||||
const noAuthPaths = ["/login", "/api/v1"];
|
const noAuthPaths = ["/login", "/api/v1"];
|
||||||
const parsedURL = new URL(url);
|
const parsedURL = new URL(url);
|
||||||
const path = parsedURL.pathname;
|
const path = parsedURL.pathname;
|
||||||
console.log({ p: parsedURL.pathname });
|
|
||||||
if (noAuthPaths.some((p: string) => path.startsWith(p))) {
|
if (noAuthPaths.some((p: string) => path.startsWith(p))) {
|
||||||
|
console.log({ p: parsedURL.pathname, auth: "no" });
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,14 +15,14 @@
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/server": "^11.11.0",
|
"@emotion/server": "^11.11.0",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@fontsource/playfair-display": "^5.0.12",
|
"@fontsource/playfair-display": "^5.0.13",
|
||||||
"@fontsource/poppins": "^5.0.8",
|
"@fontsource/poppins": "^5.0.8",
|
||||||
"@fontsource/roboto": "^5.0.8",
|
"@fontsource/roboto": "^5.0.8",
|
||||||
"@mui/icons-material": "^5",
|
"@mui/icons-material": "^5",
|
||||||
"@mui/lab": "^5.0.0-alpha.146",
|
"@mui/lab": "^5.0.0-alpha.146",
|
||||||
"@mui/material": "^5",
|
"@mui/material": "^5",
|
||||||
"@mui/x-data-grid-pro": "^6.15.0",
|
"@mui/x-data-grid-pro": "^6.16.0",
|
||||||
"@mui/x-date-pickers-pro": "^6.15.0",
|
"@mui/x-date-pickers-pro": "^6.16.0",
|
||||||
"cryptr": "^6.3.0",
|
"cryptr": "^6.3.0",
|
||||||
"date-fns": "^2.30.0",
|
"date-fns": "^2.30.0",
|
||||||
"graphql-request": "^6.1.0",
|
"graphql-request": "^6.1.0",
|
||||||
|
|
@ -32,12 +32,12 @@
|
||||||
"next": "13.5.3",
|
"next": "13.5.3",
|
||||||
"next-auth": "^4.23.1",
|
"next-auth": "^4.23.1",
|
||||||
"ra-data-graphql": "^4.14.3",
|
"ra-data-graphql": "^4.14.3",
|
||||||
"ra-i18n-polyglot": "^4.14.3",
|
"ra-i18n-polyglot": "^4.14.4",
|
||||||
"ra-input-rich-text": "^4.14.3",
|
"ra-input-rich-text": "^4.14.4",
|
||||||
"ra-language-english": "^4.14.3",
|
"ra-language-english": "^4.14.4",
|
||||||
"ra-postgraphile": "^6.1.1",
|
"ra-postgraphile": "^6.1.1",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-admin": "^4.14.3",
|
"react-admin": "^4.14.4",
|
||||||
"react-cookie": "^6.1.1",
|
"react-cookie": "^6.1.1",
|
||||||
"react-digit-input": "^2.1.0",
|
"react-digit-input": "^2.1.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
|
|
@ -52,8 +52,8 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.23.0",
|
"@babel/core": "^7.23.0",
|
||||||
"@types/node": "^20.7.0",
|
"@types/node": "^20.8.0",
|
||||||
"@types/react": "18.2.23",
|
"@types/react": "18.2.24",
|
||||||
"@types/uuid": "^9.0.4",
|
"@types/uuid": "^9.0.4",
|
||||||
"babel-loader": "^9.1.3",
|
"babel-loader": "^9.1.3",
|
||||||
"eslint": "^8.50.0",
|
"eslint": "^8.50.0",
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
"@hapipal/schmervice": "^3.0.0",
|
"@hapipal/schmervice": "^3.0.0",
|
||||||
"@hapipal/toys": "^4.0.0",
|
"@hapipal/toys": "^4.0.0",
|
||||||
"blipp": "^4.0.2",
|
"blipp": "^4.0.2",
|
||||||
"camelcase-keys": "^9.0.0",
|
"camelcase-keys": "^9.1.0",
|
||||||
"expiry-map": "^2.0.0",
|
"expiry-map": "^2.0.0",
|
||||||
"fluent-ffmpeg": "^2.1.2",
|
"fluent-ffmpeg": "^2.1.2",
|
||||||
"graphile-migrate": "^1.4.1",
|
"graphile-migrate": "^1.4.1",
|
||||||
|
|
@ -43,13 +43,13 @@
|
||||||
"remeda": "^1.27.0",
|
"remeda": "^1.27.0",
|
||||||
"twilio": "^4.18.0",
|
"twilio": "^4.18.0",
|
||||||
"typeorm": "^0.3.17",
|
"typeorm": "^0.3.17",
|
||||||
"@whiskeysockets/baileys": "^6.4.1"
|
"@whiskeysockets/baileys": "^6.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/long": "^4.0.2",
|
"@types/long": "^4.0.2",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"babel-preset-link": "*",
|
"babel-preset-link": "*",
|
||||||
"camelcase-keys": "^9.0.0",
|
"camelcase-keys": "^9.1.0",
|
||||||
"eslint-config-link": "*",
|
"eslint-config-link": "*",
|
||||||
"jest-config-link": "*",
|
"jest-config-link": "*",
|
||||||
"nodemon": "^3.0.1",
|
"nodemon": "^3.0.1",
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
FROM postgres:16.0-bookworm
|
FROM postgres:15.3-bookworm
|
||||||
|
|
|
||||||
974
package-lock.json
generated
974
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -9,7 +9,7 @@
|
||||||
"fmt": "prettier \"profile/**/*.js\" --write"
|
"fmt": "prettier \"profile/**/*.js\" --write"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rushstack/eslint-patch": "^1.5.0",
|
"@rushstack/eslint-patch": "^1.5.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
||||||
"@typescript-eslint/parser": "^6.7.3",
|
"@typescript-eslint/parser": "^6.7.3",
|
||||||
"eslint-config-prettier": "^9.0.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
"eslint-plugin-cypress": "^2.15.1",
|
"eslint-plugin-cypress": "^2.15.1",
|
||||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||||
"eslint-plugin-import": "^2.28.1",
|
"eslint-plugin-import": "^2.28.1",
|
||||||
"eslint-plugin-jest": "^27.4.0",
|
"eslint-plugin-jest": "^27.4.2",
|
||||||
"eslint-plugin-no-use-extend-native": "^0.5.0",
|
"eslint-plugin-no-use-extend-native": "^0.5.0",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"eslint-plugin-unicorn": "48.0.1",
|
"eslint-plugin-unicorn": "48.0.1",
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,14 @@
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/server": "^11.11.0",
|
"@emotion/server": "^11.11.0",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@fontsource/playfair-display": "^5.0.12",
|
"@fontsource/playfair-display": "^5.0.13",
|
||||||
"@fontsource/poppins": "^5.0.8",
|
"@fontsource/poppins": "^5.0.8",
|
||||||
"@fontsource/roboto": "^5.0.8",
|
"@fontsource/roboto": "^5.0.8",
|
||||||
"@mui/icons-material": "^5",
|
"@mui/icons-material": "^5",
|
||||||
"@mui/lab": "^5.0.0-alpha.146",
|
"@mui/lab": "^5.0.0-alpha.146",
|
||||||
"@mui/material": "^5",
|
"@mui/material": "^5",
|
||||||
"@mui/x-data-grid-pro": "^6.15.0",
|
"@mui/x-data-grid-pro": "^6.16.0",
|
||||||
"@mui/x-date-pickers-pro": "^6.15.0",
|
"@mui/x-date-pickers-pro": "^6.16.0",
|
||||||
"@opensearch-project/opensearch": "^2.3.1",
|
"@opensearch-project/opensearch": "^2.3.1",
|
||||||
"date-fns": "^2.30.0",
|
"date-fns": "^2.30.0",
|
||||||
"http-proxy-middleware": "^2.0.6",
|
"http-proxy-middleware": "^2.0.6",
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
"react-cookie-consent": "^8.0.1",
|
"react-cookie-consent": "^8.0.1",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-iframe": "^1.8.5",
|
"react-iframe": "^1.8.5",
|
||||||
"react-markdown": "^8.0.7",
|
"react-markdown": "^9.0.0",
|
||||||
"react-polyglot": "^0.7.2",
|
"react-polyglot": "^0.7.2",
|
||||||
"sharp": "^0.32.6",
|
"sharp": "^0.32.6",
|
||||||
"swr": "^2.2.4",
|
"swr": "^2.2.4",
|
||||||
|
|
@ -39,8 +39,8 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.23.0",
|
"@babel/core": "^7.23.0",
|
||||||
"@types/node": "^20.7.0",
|
"@types/node": "^20.8.0",
|
||||||
"@types/react": "18.2.23",
|
"@types/react": "18.2.24",
|
||||||
"@types/uuid": "^9.0.4",
|
"@types/uuid": "^9.0.4",
|
||||||
"babel-loader": "^9.1.3",
|
"babel-loader": "^9.1.3",
|
||||||
"eslint": "^8.50.0",
|
"eslint": "^8.50.0",
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -21,7 +21,7 @@
|
||||||
"@types/lodash": "^4.14.199",
|
"@types/lodash": "^4.14.199",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"@types/uuid": "^9.0.4",
|
"@types/uuid": "^9.0.4",
|
||||||
"camelcase-keys": "^9.0.0",
|
"camelcase-keys": "^9.1.0",
|
||||||
"pg-monitor": "^2.0.0",
|
"pg-monitor": "^2.0.0",
|
||||||
"tsc-watch": "^6.0.4",
|
"tsc-watch": "^6.0.4",
|
||||||
"typedoc": "^0.25.1",
|
"typedoc": "^0.25.1",
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"next-auth": "^4.23.1",
|
"next-auth": "^4.23.1",
|
||||||
"pg-promise": "^11.5.4",
|
"pg-promise": "^11.5.4",
|
||||||
"pino": "^8.15.1",
|
"pino": "^8.15.3",
|
||||||
"pino-pretty": "^10.2.0",
|
"pino-pretty": "^10.2.0",
|
||||||
"prom-client": "^14.x.x",
|
"prom-client": "^14.x.x",
|
||||||
"uuid": "^9.0.1"
|
"uuid": "^9.0.1"
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"backoff": "^2.5.0",
|
"backoff": "^2.5.0",
|
||||||
"camelcase-keys": "^9.0.0",
|
"camelcase-keys": "^9.1.0",
|
||||||
"eventemitter3": "^5.0.1",
|
"eventemitter3": "^5.0.1",
|
||||||
"snakecase-keys": "^5.4.7",
|
"snakecase-keys": "^5.4.7",
|
||||||
"ts-custom-error": "^3.3.1",
|
"ts-custom-error": "^3.3.1",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue