Removing Prisma and Grapql-nestjs-prisma resolvers (#2574)
* Some cleaning * Fix seeds * Fix all sign in, sign up flow and apiKey optimistic rendering * Fix
This commit is contained in:
@ -2,17 +2,8 @@ import { useState } from 'react';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { useOpenActivityRightDrawer } from '@/activities/hooks/useOpenActivityRightDrawer';
|
||||
import { IconNotes } from '@/ui/display/icon';
|
||||
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
|
||||
import { AppHotkeyScope } from '@/ui/utilities/hotkey/types/AppHotkeyScope';
|
||||
import { Avatar } from '@/users/components/Avatar';
|
||||
import {
|
||||
QueryMode,
|
||||
useSearchActivityQuery,
|
||||
useSearchCompanyQuery,
|
||||
useSearchPeopleQuery,
|
||||
} from '~/generated/graphql';
|
||||
import { getLogoUrlFromDomainName } from '~/utils';
|
||||
|
||||
import { useCommandMenu } from '../hooks/useCommandMenu';
|
||||
import { commandMenuCommandsState } from '../states/commandMenuCommandsState';
|
||||
@ -45,47 +36,47 @@ export const CommandMenu = () => {
|
||||
[openCommandMenu, setSearch],
|
||||
);
|
||||
|
||||
const { data: peopleData } = useSearchPeopleQuery({
|
||||
skip: !isCommandMenuOpened,
|
||||
variables: {
|
||||
where: {
|
||||
OR: [
|
||||
{ firstName: { contains: search, mode: QueryMode.Insensitive } },
|
||||
{ lastName: { contains: search, mode: QueryMode.Insensitive } },
|
||||
],
|
||||
},
|
||||
limit: 3,
|
||||
},
|
||||
});
|
||||
// const { data: peopleData } = useSearchPeopleQuery({
|
||||
// skip: !isCommandMenuOpened,
|
||||
// variables: {
|
||||
// where: {
|
||||
// OR: [
|
||||
// { firstName: { contains: search, mode: QueryMode.Insensitive } },
|
||||
// { lastName: { contains: search, mode: QueryMode.Insensitive } },
|
||||
// ],
|
||||
// },
|
||||
// limit: 3,
|
||||
// },
|
||||
// });
|
||||
|
||||
const people = peopleData?.searchResults ?? [];
|
||||
// const people = peopleData?.searchResults ?? [];
|
||||
|
||||
const { data: companyData } = useSearchCompanyQuery({
|
||||
skip: !isCommandMenuOpened,
|
||||
variables: {
|
||||
where: {
|
||||
OR: [{ name: { contains: search, mode: QueryMode.Insensitive } }],
|
||||
},
|
||||
limit: 3,
|
||||
},
|
||||
});
|
||||
// const { data: companyData } = useSearchCompanyQuery({
|
||||
// skip: !isCommandMenuOpened,
|
||||
// variables: {
|
||||
// where: {
|
||||
// OR: [{ name: { contains: search, mode: QueryMode.Insensitive } }],
|
||||
// },
|
||||
// limit: 3,
|
||||
// },
|
||||
// });
|
||||
|
||||
const companies = companyData?.searchResults ?? [];
|
||||
// const companies = companyData?.searchResults ?? [];
|
||||
|
||||
const { data: activityData } = useSearchActivityQuery({
|
||||
skip: !isCommandMenuOpened,
|
||||
variables: {
|
||||
where: {
|
||||
OR: [
|
||||
{ title: { contains: search, mode: QueryMode.Insensitive } },
|
||||
{ body: { contains: search, mode: QueryMode.Insensitive } },
|
||||
],
|
||||
},
|
||||
limit: 3,
|
||||
},
|
||||
});
|
||||
// const { data: activityData } = useSearchActivityQuery({
|
||||
// skip: !isCommandMenuOpened,
|
||||
// variables: {
|
||||
// where: {
|
||||
// OR: [
|
||||
// { title: { contains: search, mode: QueryMode.Insensitive } },
|
||||
// { body: { contains: search, mode: QueryMode.Insensitive } },
|
||||
// ],
|
||||
// },
|
||||
// limit: 3,
|
||||
// },
|
||||
// });
|
||||
|
||||
const activities = activityData?.searchResults ?? [];
|
||||
// const activities = activityData?.searchResults ?? [];
|
||||
|
||||
const checkInShortcuts = (cmd: Command, search: string) => {
|
||||
return (cmd.firstHotKey + (cmd.secondHotKey ?? ''))
|
||||
@ -158,7 +149,7 @@ export const CommandMenu = () => {
|
||||
/>
|
||||
))}
|
||||
</CommandGroup>
|
||||
<CommandGroup heading="People">
|
||||
{/* <CommandGroup heading="People">
|
||||
{people.map((person) => (
|
||||
<CommandMenuItem
|
||||
key={person.id}
|
||||
@ -200,7 +191,7 @@ export const CommandMenu = () => {
|
||||
onClick={() => openActivityRightDrawer(activity.id)}
|
||||
/>
|
||||
))}
|
||||
</CommandGroup>
|
||||
</CommandGroup> */}
|
||||
</StyledList>
|
||||
</StyledDialog>
|
||||
);
|
||||
|
||||
@ -10,7 +10,7 @@ import { Command, CommandType } from '../types/Command';
|
||||
|
||||
export const commandMenuCommands: Command[] = [
|
||||
{
|
||||
to: '/people',
|
||||
to: '/objects/people',
|
||||
label: 'Go to People',
|
||||
type: CommandType.Navigate,
|
||||
firstHotKey: 'G',
|
||||
@ -18,7 +18,7 @@ export const commandMenuCommands: Command[] = [
|
||||
Icon: IconUser,
|
||||
},
|
||||
{
|
||||
to: '/companies',
|
||||
to: '/objects/companies',
|
||||
label: 'Go to Companies',
|
||||
type: CommandType.Navigate,
|
||||
firstHotKey: 'G',
|
||||
@ -26,7 +26,7 @@ export const commandMenuCommands: Command[] = [
|
||||
Icon: IconBuildingSkyscraper,
|
||||
},
|
||||
{
|
||||
to: '/opportunities',
|
||||
to: '/objects/opportunities',
|
||||
label: 'Go to Opportunities',
|
||||
type: CommandType.Navigate,
|
||||
firstHotKey: 'G',
|
||||
|
||||
Reference in New Issue
Block a user