mirror of
https://github.com/reconurge/flowsint.git
synced 2026-04-29 18:59:14 -05:00
feat: use of dialog instead of sheet for user
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -128,3 +128,6 @@ dist
|
|||||||
.yarn/build-state.yml
|
.yarn/build-state.yml
|
||||||
.yarn/install-state.gz
|
.yarn/install-state.gz
|
||||||
.pnp.*
|
.pnp.*
|
||||||
|
|
||||||
|
# Supabase
|
||||||
|
.supabase
|
||||||
|
|||||||
@@ -4,10 +4,9 @@ import { useEffect, useState } from "react"
|
|||||||
import { useIndividual } from "@/lib/hooks/individuals/use-individual"
|
import { useIndividual } from "@/lib/hooks/individuals/use-individual"
|
||||||
import { useEmailsAndBreaches } from "@/lib/hooks/individuals/use-emails-breaches"
|
import { useEmailsAndBreaches } from "@/lib/hooks/individuals/use-emails-breaches"
|
||||||
import { useRelations } from "@/lib/hooks/individuals/use-relations"
|
import { useRelations } from "@/lib/hooks/individuals/use-relations"
|
||||||
import { useInvestigationStore } from '@/store/investigation-store';
|
|
||||||
import { usePlatformIcons } from "@/lib/hooks/use-platform-icons"
|
import { usePlatformIcons } from "@/lib/hooks/use-platform-icons"
|
||||||
import { supabase } from "@/lib/supabase/client"
|
import { supabase } from "@/lib/supabase/client"
|
||||||
import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetTitle } from "@/components/ui/sheet"
|
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogTitle } from "@/components/ui/dialog"
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
import { Input } from "@/components/ui/input"
|
import { Input } from "@/components/ui/input"
|
||||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
||||||
@@ -72,27 +71,27 @@ const IndividualModal = () => {
|
|||||||
|
|
||||||
if (!isLoading && !individual) {
|
if (!isLoading && !individual) {
|
||||||
return (
|
return (
|
||||||
<Sheet open={Boolean(individualId)} onOpenChange={handleCloseModal}>
|
<Dialog open={Boolean(individualId)} onOpenChange={handleCloseModal}>
|
||||||
<SheetContent>
|
<DialogContent>
|
||||||
<SheetTitle>No data</SheetTitle>
|
<DialogTitle>No data</DialogTitle>
|
||||||
<SheetDescription>No data found for this individual.</SheetDescription>
|
<DialogDescription>No data found for this individual.</DialogDescription>
|
||||||
<SheetFooter>
|
<DialogFooter>
|
||||||
<Button variant="outline" onClick={handleCloseModal}>
|
<Button variant="outline" onClick={handleCloseModal}>
|
||||||
Close
|
Close
|
||||||
</Button>
|
</Button>
|
||||||
</SheetFooter>
|
</DialogFooter>
|
||||||
</SheetContent>
|
</DialogContent>
|
||||||
</Sheet>
|
</Dialog>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Sheet open={Boolean(individualId)} onOpenChange={handleCloseModal}>
|
<Dialog open={Boolean(individualId)} onOpenChange={handleCloseModal}>
|
||||||
<SheetContent className="sm:max-w-[80vw] p-12 overflow-y-auto">
|
<DialogContent className="sm:max-w-[70vw] h-[90vh] overflow-auto p-12">
|
||||||
<form className="flex flex-col gap-3 justify-between h-full" onSubmit={handleSave}>
|
<form className="flex flex-col gap-3 justify-between h-full" onSubmit={handleSave}>
|
||||||
<div className="flex flex-col gap-4 flex-grow-0">
|
<div className="flex flex-col gap-4 flex-grow-0">
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<SheetTitle>User Profile</SheetTitle>
|
<DialogTitle>User Profile</DialogTitle>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
@@ -349,15 +348,15 @@ const IndividualModal = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<SheetFooter>
|
<DialogFooter>
|
||||||
<Button variant="outline" onClick={handleCloseModal}>
|
<Button variant="outline" onClick={handleCloseModal}>
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
{editMode && <Button type="submit">Save Changes</Button>}
|
{editMode && <Button type="submit">Save Changes</Button>}
|
||||||
</SheetFooter>
|
</DialogFooter>
|
||||||
</form>
|
</form>
|
||||||
</SheetContent>
|
</DialogContent>
|
||||||
</Sheet>
|
</Dialog>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ const InvestigationLayout = ({
|
|||||||
investigation_id: string
|
investigation_id: string
|
||||||
user: any
|
user: any
|
||||||
}) => {
|
}) => {
|
||||||
const { panelOpen, setPanelOpen, useInvestigationData, isRefetching } = useInvestigationStore()
|
const { panelOpen, setPanelOpen } = useInvestigationStore()
|
||||||
const { refetchAll } = useInvestigationData(investigation_id)
|
|
||||||
return (
|
return (
|
||||||
<SidebarProvider defaultOpen={false}>
|
<SidebarProvider defaultOpen={false}>
|
||||||
<AppSidebar user={user} defaultChecked={false} />
|
<AppSidebar user={user} defaultChecked={false} />
|
||||||
|
|||||||
Reference in New Issue
Block a user