Skip to content

Commit

Permalink
Merge pull request #227 from panoratech/feat/add-crm-vertical
Browse files Browse the repository at this point in the history
🚧 WIP crm
  • Loading branch information
naelob authored Jan 17, 2024
2 parents fc5cc6c + 73c2094 commit 60294b3
Show file tree
Hide file tree
Showing 212 changed files with 19,090 additions and 1,202 deletions.
2 changes: 1 addition & 1 deletion apps/frontend-snippet/src/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const providersConfig: ProvidersConfig = {
'CRM': {
'hubspot': {
clientId: 'ba591170-a7c7-4fca-8086-1bd178c6b14d',
scopes: 'crm.objects.contacts.read crm.objects.contacts.write',
scopes: 'crm.objects.contacts.read crm.objects.contacts.write crm.schemas.deals.read crm.schemas.deals.write crm.objects.deals.read crm.objects.deals.write crm.objects.companies.read crm.objects.companies.write crm.objects.owners.read settings.users.read settings.users.write settings.users.teams.read settings.users.teams.write',
authBaseUrl: 'https://app-eu1.hubspot.com/oauth/authorize',
logoPath: './assets/crm/hubspot_logo.png',
},
Expand Down
21 changes: 15 additions & 6 deletions apps/webapp/src/components/api-keys/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PlusCircledIcon } from "@radix-ui/react-icons";
import { Button } from "../ui/button";
import { Button } from "@/components/ui/button"
import { columns } from "./data/columns";
import { DataTable } from "../shared/data-table";
import {
Expand All @@ -19,6 +19,7 @@ import useApiKeyMutation from "@/hooks/mutations/useApiKeyMutation";
import useProfileStore from "@/state/profileStore";
import { useState } from "react";
import { LoadingSpinner } from "../connections/components/LoadingSpinner";
import { cn } from "@/lib/utils";

export default function ApiKeysPage() {
const [keyName, setKeyName] = useState('');
Expand Down Expand Up @@ -63,10 +64,15 @@ export default function ApiKeysPage() {
<div></div>
<Dialog>
<DialogTrigger asChild>
<Button>
<PlusCircledIcon className="mr-2 h-4 w-4" />
Create New Key
</Button>
<Button
variant="outline"
role="combobox"
aria-label="Select a team"
className={cn("w-[180px] justify-between")}
>
<PlusCircledIcon className="mr-2 h-5 w-5" />
Create New Key
</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
Expand All @@ -86,7 +92,10 @@ export default function ApiKeysPage() {
</div>
</div>
<DialogFooter>
<Button onClick={handleSubmit}>Create</Button>
<Button
onClick={handleSubmit}
variant="outline"
>Create</Button>
</DialogFooter>
</DialogContent>
</Dialog>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const AddLinkedAccount = () => {
<Button variant="outline" onClick={() => setShowNewLinkedUserDialog({open: false})}>
Cancel
</Button>
<Button type="submit">{showNewLinkedUserDialog.import ? "Import" : "Create"}</Button>
<Button variant="outline" type="submit">{showNewLinkedUserDialog.import ? "Import" : "Create"}</Button>
</DialogFooter>
</form>
</Form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const AddWebhook = () => {
</div>
</CardContent>
<CardFooter className="justify-between space-x-2">
<Button type="submit">Submit</Button>
<Button variant="outline" type="submit">Submit</Button>
</CardFooter>
</form>
</Form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export function FModal({ onClose }: {onClose: () => void}) {
</div>
</CardContent>
<CardFooter>
<Button>Define Field</Button>
<Button variant="outline">Define Field</Button>
</CardFooter>
</form>
</Form>
Expand Down Expand Up @@ -413,7 +413,7 @@ export function FModal({ onClose }: {onClose: () => void}) {
</div>
</CardContent>
<CardFooter>
<Button>Map Field</Button>
<Button variant="outline">Map Field</Button>
</CardFooter>
</form>
</Form>
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/components/connections/ConnectionTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default function ConnectionTable() {
</div>
</div>
<DialogFooter>
<Button type="submit" onClick={() => window.open(`${config.FRONT_DOMAIN}/?uniqueLink=${uniqueLink}`, '_blank')}>
<Button variant="outline" type="submit" onClick={() => window.open(`${config.FRONT_DOMAIN}/?uniqueLink=${uniqueLink}`, '_blank')}>
<p className="mr-2">Open Link</p>
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z" fill="currentColor" fillRule="evenodd" clipRule="evenodd"></path></svg>
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const AddConnectionButton = ({
<Button variant="outline" onClick={() => setShowNewLinkedUserDialog({open: false})}>
Cancel
</Button>
<Button type="submit">Generate</Button>
<Button variant="outline" type="submit">Generate</Button>
</DialogFooter>
</form>
</Form>
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/components/dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function DashboardPage() {
<h2 className="text-3xl font-bold tracking-tight">Dashboard</h2>
<div className="flex items-center space-x-2">
<CalendarDateRangePicker />
<Button>Download</Button>
<Button variant="outline">Download</Button>
</div>
</div>
<Tabs defaultValue="overview" className="space-y-4">
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/components/events/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function JobsPage() {
<div className="flex items-center justify-between space-y-2">
<div className="flex-1 space-y-4 p-8 pt-6">
<div className="flex items-center justify-between space-y-2">
<h2 className="text-3xl font-bold tracking-tight">Jobs</h2>
<h2 className="text-3xl font-bold tracking-tight">Logs</h2>
</div>
<JobsTable/>
</div>
Expand Down
18 changes: 9 additions & 9 deletions apps/webapp/src/components/homepage/components/main-nav-sm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,26 @@ export function SmallNav({
onClick={() => click('quickstart')}
>
<p className="mx-4">Quick Start</p>
</a>*/}
</a>
<a
className={navItemClassName('dashboard')}
onClick={() => click('dashboard')}
>
<p className="mx-4">Dashboard</p>
</a>
<a
className={navItemClassName('jobs')}
onClick={() => click('jobs')}
>
<p className="mx-4">Jobs</p>

</a>
</a>*/}
<a
className={navItemClassName('connections')}
onClick={() => click('connections')}
>
<p className="mx-4">Connections</p>
</a>
<a
className={navItemClassName('logs')}
onClick={() => click('logs')}
>
<p className="mx-4">Logs</p>

</a>
<a
className={navItemClassName('configuration')}
onClick={() => click('configuration')}
Expand Down
22 changes: 11 additions & 11 deletions apps/webapp/src/components/homepage/components/main-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export function MainNav({
const [selectedItem, setSelectedItem] = useState<string>("quickstart");

const navItemClassName = (itemName: string) =>
`text-sm border-b font-medium w-full text-left px-4 py-2 hover:bg-gray-900 cursor-pointer ${
selectedItem === itemName ? "bg-gray-900" : "text-muted-foreground"
`text-sm border-b font-medium w-full text-left px-4 py-2 hover:bg-zinc-900 cursor-pointer ${
selectedItem === itemName ? "bg-zinc-800" : "text-muted-foreground"
} transition-colors`;

function click(name: string) {
Expand All @@ -31,24 +31,24 @@ export function MainNav({
>
Quick Start
</a>*/}
<a
{/*<a
className={navItemClassName('dashboard')}
onClick={() => click('dashboard')}
>
Dashboard
</a>
<a
className={navItemClassName('jobs')}
onClick={() => click('jobs')}
>
Jobs
</a>
<a
</a>*/}
<a
className={navItemClassName('connections')}
onClick={() => click('connections')}
>
Connections
</a>
<a
className={navItemClassName('logs')}
onClick={() => click('logs')}
>
Logs
</a>
<a
className={navItemClassName('configuration')}
onClick={() => click('configuration')}
Expand Down
10 changes: 5 additions & 5 deletions apps/webapp/src/components/homepage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function Homepage() {
/*case 'quickstart':
ContentComponent = QuickStartPage;
break;*/
case 'jobs':
case 'logs':
ContentComponent = JobsPage;
break;
case 'connections':
Expand All @@ -47,16 +47,16 @@ export default function Homepage() {
ContentComponent = ApiKeysPage;
break;
default:
ContentComponent = MainPage; //QuickStartPage; // The default page content
ContentComponent = ConnectionsPage;
}
return (
<>
<div>
{ windowWidth < lgBreakpoint ? <SmallNav onLinkClick={setActivePage} /> :
<div className="items-center hidden lg:flex lg:flex-col border-r fixed left-0 bg-opacity-90 backdrop-filter backdrop-blur-lg w-[200px] h-screen">
<div className="flex lg:flex-col items-start py-4 space-y-4">
<div className="flex flex-row items-center ml-3">
<img src="logo.png" className="w-10 mr-1"/><span className="font-bold">Panora.</span>
<div className="flex lg:flex-col items-center py-4 space-y-4">
<div className="flex flex-row justify-center">
<img src="logo.png" className="w-14"/>
</div>
<TeamSwitcher className="w-40 ml-3" />
<MainNav className="flex lg:flex-col mx-auto w-[200px] space-y-0" onLinkClick={setActivePage} />
Expand Down
32 changes: 16 additions & 16 deletions apps/webapp/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@layer base {
:root {
--background: 0 0% 100%;
--background: 0 0% 7%;
--foreground: 222.2 84% 4.9%;

--card: 0 0% 100%;
Expand All @@ -28,41 +28,41 @@
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;

--border: 214.3 31.8% 91.4%;
--border: 0 0% 7%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;

--radius: 0.5rem;
}

.dark {
--background: 210 4% 4%;
--background: 0 0% 7%;
--foreground: 210 40% 98%;

--card: 210 4% 4%;
--card: 0 0% 7%;
--card-foreground: 210 40% 98%;

--popover: 210 4% 4%;
--popover: 0 0% 7%;
--popover-foreground: 210 40% 98%;

--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;
--primary: 0 0% 7%;
--primary-foreground: 0 0% 100%;

--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;
--secondary: 0 0% 7%;
--secondary-foreground: 0 0% 7%;

--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;
--muted: 0 0% 17.5%;
--muted-foreground: 0 0% 100%;

--accent: 217.2 32.6% 17.5%;
--accent: 0 0% 17.5%;
--accent-foreground: 210 40% 98%;

--destructive: 0 62.8% 30.6%;
--destructive: 0 0% 17.5%;
--destructive-foreground: 210 40% 98%;

--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
--border: 0 0% 40%;
--input: 0 0% 40%;
--ring: 0 0% 100%;
}
}

Expand Down
Loading

0 comments on commit 60294b3

Please sign in to comment.