diff --git a/packages/webapp/public/avatars/01.png b/packages/webapp/public/avatars/01.png new file mode 100644 index 000000000..c19010109 Binary files /dev/null and b/packages/webapp/public/avatars/01.png differ diff --git a/packages/webapp/public/avatars/02.png b/packages/webapp/public/avatars/02.png new file mode 100644 index 000000000..b2aae01dd Binary files /dev/null and b/packages/webapp/public/avatars/02.png differ diff --git a/packages/webapp/public/avatars/03.png b/packages/webapp/public/avatars/03.png new file mode 100644 index 000000000..f04b6b0b0 Binary files /dev/null and b/packages/webapp/public/avatars/03.png differ diff --git a/packages/webapp/public/avatars/04.png b/packages/webapp/public/avatars/04.png new file mode 100644 index 000000000..1129539ca Binary files /dev/null and b/packages/webapp/public/avatars/04.png differ diff --git a/packages/webapp/public/avatars/05.png b/packages/webapp/public/avatars/05.png new file mode 100644 index 000000000..e73aabf6d Binary files /dev/null and b/packages/webapp/public/avatars/05.png differ diff --git a/packages/webapp/src/components/configuration/components/FieldMappingModal.tsx b/packages/webapp/src/components/configuration/components/FieldMappingModal.tsx index e5e8fd2df..d0b145b7a 100644 --- a/packages/webapp/src/components/configuration/components/FieldMappingModal.tsx +++ b/packages/webapp/src/components/configuration/components/FieldMappingModal.tsx @@ -16,6 +16,16 @@ import { TabsTrigger, } from "@/components/ui/tabs" + +import { + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select" + export function FModal() { return ( @@ -26,46 +36,127 @@ export function FModal() { - Account + Define - Make changes to your account here. Click save when you're done. + Define a custom field you want to enable on unified models. It must be mapped to an existent custom field on your end-user's provider.
- - + +
- - + + +
+
+ + +
+
+ +
- +
- Password + Map - Change your password here. After saving, you'll be logged out. + Now that you defined your field, map it to an existent custom field on your end-user's tool.
- - + + +
+
+ + +
+
+ +
- +
- +
diff --git a/packages/webapp/src/components/configuration/components/FieldMappingsTable.tsx b/packages/webapp/src/components/configuration/components/FieldMappingsTable.tsx new file mode 100644 index 000000000..62d58b0e5 --- /dev/null +++ b/packages/webapp/src/components/configuration/components/FieldMappingsTable.tsx @@ -0,0 +1,58 @@ +import { useEffect, useState } from "react" +import { + Card, + CardContent, + CardHeader, + CardTitle, + } from "@/components/ui/card" +import { CONNECTIONS } from "@/components/connections/data/connection"; +import { columns } from "@/components/connections/data/columns"; +import { DataTable } from "@/components/jobs/components/data-table"; + +export interface Connection { + organisation: string; + app: string; + status: string; + category: string; + linkedUser: string; + date: string; +} + +export default function FieldMappingsTable() { + const [connections, setTasks] = useState(); + + useEffect(() => { + async function loadTasks() { + //const fetchedTasks = await getTasks(); + setTasks(CONNECTIONS); + } + + loadTasks(); + }, []); + return ( + <> +
+
+ + + Defined + + +

0

+
+ +
+ + + Mapped + + +

3

+
+
+
+ {connections && } +
+ + ) +} \ No newline at end of file diff --git a/packages/webapp/src/components/configuration/index.tsx b/packages/webapp/src/components/configuration/index.tsx index ba3a642d9..dd95e4d10 100644 --- a/packages/webapp/src/components/configuration/index.tsx +++ b/packages/webapp/src/components/configuration/index.tsx @@ -28,6 +28,7 @@ import { } from "@/components/ui/dropdown-menu" import { FModal } from "./components/FieldMappingModal" import { Separator } from "../ui/separator"; +import FieldMappingsTable from "./components/FieldMappingsTable"; export default function ConfigurationPage() { /*const {getRootProps, getInputProps} = useDropzone({ @@ -94,8 +95,8 @@ export default function ConfigurationPage() { - Your Linked Accounts - + Your Linked Accounts + You connected 1389 linked accounts. @@ -153,14 +154,14 @@ export default function ConfigurationPage() { - Your Fields Mapping - + Your Fields Mapping + You built 30 fields mapping. - + diff --git a/packages/webapp/src/components/connections/Connection.tsx b/packages/webapp/src/components/connections/Connection.tsx index d07671d6d..0e5270f2c 100644 --- a/packages/webapp/src/components/connections/Connection.tsx +++ b/packages/webapp/src/components/connections/Connection.tsx @@ -11,8 +11,7 @@ import { import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "../ui/dialog"; import { Button } from "../ui/button"; import { PlusCircledIcon } from "@radix-ui/react-icons"; -import { Label } from "../ui/label"; -import { Input } from "../ui/input"; +import CopyLinkInput from "./components/CopyLinkInput"; export interface Connection { organisation: string; @@ -69,42 +68,26 @@ export default function ConnectionTable() { - - Edit profile + Share this magic link with your customers - Make changes to your profile here. Click save when you're done. + Once they finish the oAuth flow, a new connection would be enabled.
- - -
-
- - +
+
- +
diff --git a/packages/webapp/src/components/connections/components/CopyLinkInput.tsx b/packages/webapp/src/components/connections/components/CopyLinkInput.tsx new file mode 100644 index 000000000..c0658af22 --- /dev/null +++ b/packages/webapp/src/components/connections/components/CopyLinkInput.tsx @@ -0,0 +1,37 @@ +import { Button } from '@/components/ui/button'; +import { Input } from '@/components/ui/input'; +import React, { useState } from 'react'; + +const CopyLinkInput = () => { + const [value, setValue] = useState('https://magic-link/edfr-12h3KKHjdd-1.com'); + const [copied, setCopied] = useState(false); + + const handleCopy = async () => { + try { + await navigator.clipboard.writeText(value); + setCopied(true); + setTimeout(() => setCopied(false), 2000); // Reset copied state after 2 seconds + } catch (err) { + console.error('Failed to copy: ', err); + } + }; + + return ( + <> + + + + ); +}; + +export default CopyLinkInput; diff --git a/packages/webapp/src/components/dashboard/components/recent-sales.tsx b/packages/webapp/src/components/dashboard/components/recent-sales.tsx index e989a8bbc..6c84399ba 100644 --- a/packages/webapp/src/components/dashboard/components/recent-sales.tsx +++ b/packages/webapp/src/components/dashboard/components/recent-sales.tsx @@ -14,61 +14,76 @@ import { Badge } from "@/components/ui/badge" OM
-

Olivia Martin

-

+

user-origin-id-9c89

+

@ACME.ORG

- user-123-iko + 6dda265c-4bb7-4919-9c89-3b178069d0d1
- + - JL + CP
-

Jackson Lee

-

@ACME.ORG

+

user-origin-id-9c89

+

+ @ACME.ORG +

+
+
+ 6dda265c-4bb7-4919-9c89-3b178069d0d1
- user-123-iko
- IN + AK
-

Isabella Nguyen

-

- @ACME.ORG +

user-origin-id-9c89

+

+ @ACME.ORG

- user-123-iko +
+ 6dda265c-4bb7-4919-9c89-3b178069d0d1 +
- WK + IN
-

William Kim

-

@ACME.ORG

+

user-origin-id-9c89

+

+ @ACME.ORG +

+
+
+ 6dda265c-4bb7-4919-9c89-3b178069d0d1
- user-123-iko
- SD + HG
-

Sofia Davis

-

@ACME.ORG

+

user-origin-id-9c89

+

+ @ACME.ORG +

+
+
+ 6dda265c-4bb7-4919-9c89-3b178069d0d1
- user-123-iko
+ ) } \ No newline at end of file