Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
815772d
fix: fixing few things, and getting started with securities endpoint
dahal Jul 2, 2024
6d7c28a
feat: getting started with restful SAFE api endpoint
dahal Jul 3, 2024
e6dd997
Merge branch 'main' into api/safe
dahal Jul 5, 2024
1d432ec
chore: update cmd+k text
dahal Jul 5, 2024
33b713d
WIP
dahal Jul 7, 2024
b85a59a
Merge branch 'main' into api/safe
dahal Jul 7, 2024
4b57872
feat: getting started with updated safe form
dahal Jul 8, 2024
6d806a2
WIP
dahal Jul 8, 2024
fffc572
feat: create a re-usable stakeholder-selector
dahal Jul 9, 2024
34baf5f
feat: mfn and pro-rata selector
dahal Jul 9, 2024
6a02f08
fix: mfn and proRata inputs
dahal Jul 10, 2024
0be26e1
Merge branch 'main' into api/safe
dahal Jul 10, 2024
68179e2
feat: add missing migration
dahal Jul 10, 2024
be9caeb
feat: rename tldr to message
dahal Jul 10, 2024
1cbbabe
chore: update missing <Tldr> to <Message>
dahal Jul 10, 2024
a03e654
feat: custom design a SAFE template
dahal Jul 13, 2024
4df4336
chore: seperate pages by hr block
dahal Jul 13, 2024
8b2bf82
chore: complete SAFE template, TODO - sender details
dahal Jul 13, 2024
c57c4a9
WIP
dahal Jul 17, 2024
5ecf409
Merge branch 'main' into api/safe
dahal Jul 17, 2024
51e8dee
feat: create SAFE preview slideover
dahal Jul 18, 2024
dfa622e
feat: get rid of un-necessary safe new/preview stuff
dahal Jul 18, 2024
4ac4cbc
feat: update stakeholder query to get just the investor
dahal Jul 18, 2024
3553ee3
feat: add a feature to reload investor list if it does not auto-populate
dahal Jul 18, 2024
e8b6663
feat: model for bank account
dahal Jul 19, 2024
78e8c26
feat: add error state to EmptyState component
dahal Jul 19, 2024
1d9feb2
feat: getting started with bank account settings
dahal Jul 19, 2024
222a53c
Merge branch 'main' into api/safe
dahal Jul 19, 2024
c6d5844
Merge branch 'main' into api/safe
dahal Jul 19, 2024
9b6852b
feat: move existing selectors to selector folder, and add bank-accoun…
dahal Jul 19, 2024
25259ba
fix: return bankAccountId onSelect
dahal Jul 19, 2024
7e3e367
chore: update BankAccountSelectorType
dahal Jul 19, 2024
35c46e7
feat: complete team member selector
dahal Jul 19, 2024
dfa00f1
chore: remove console.log
dahal Jul 20, 2024
076c3ef
Merge branch 'main' into api/safe
dahal Jul 24, 2024
1f19b3b
feat: add company rep and bank account selector to safe modal
dahal Jul 24, 2024
a390c00
chore: add help text and reorder inputs
dahal Jul 24, 2024
703cdef
chore: minor cleanups
dahal Jul 24, 2024
f3a4b44
feat: add tooltip with fields descriptions
dahal Jul 24, 2024
786d04f
chore: add endpint descriptions
dahal Jul 26, 2024
2d0cef6
Merge branch 'main' into feat/safe
dahal Aug 7, 2024
a335eb0
feat: getting started with safe APIs
dahal Aug 8, 2024
1341e07
feat: complete getOne and getMany SAFE api
dahal Aug 8, 2024
4925057
chore: minor cleanups
dahal Aug 8, 2024
9bf060d
WIP
dahal Aug 14, 2024
01690d8
Merge branch 'main' into feat/safe
G3root Sep 19, 2024
fff59f3
fix: lock file
G3root Sep 19, 2024
79b77e5
feat: update schema
G3root Sep 20, 2024
cb030b2
feat: add endpoint creator
G3root Sep 24, 2024
799a30b
fix: script strategy
G3root Sep 24, 2024
d5c1475
fix: auth
G3root Sep 24, 2024
597bd6f
chore: fix schema
G3root Sep 25, 2024
882fd8f
feat: update api routes
G3root Sep 25, 2024
b592836
fix: api
G3root Sep 26, 2024
e49ce5b
fix: error handling
G3root Sep 26, 2024
0465931
feat: update schema
G3root Sep 27, 2024
5743397
feat: add email layout
G3root Sep 27, 2024
fe4c332
chore: fix script
G3root Sep 27, 2024
d1f28e9
feat: add logo
G3root Sep 27, 2024
568f5b5
feat: add logo component
G3root Sep 27, 2024
2869176
feat: add safe signing email
G3root Sep 27, 2024
e9f3321
feat: add safe signing email
G3root Sep 27, 2024
b640655
feat: update schema
G3root Sep 30, 2024
6d20478
feat: safe
G3root Oct 2, 2024
9ccff80
feat: link document
G3root Oct 7, 2024
f117e7f
feat: add signature
G3root Oct 7, 2024
63fc004
feat: add close modal
G3root Oct 7, 2024
36df242
fix: type
G3root Oct 7, 2024
f10f192
feat: add migration
G3root Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: rename tldr to message
  • Loading branch information
dahal committed Jul 10, 2024
commit be9caebe98a105cbba12538b6142c4d7fe675049
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { pushModal } from "@/components/modals";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
Expand Down Expand Up @@ -229,7 +229,7 @@ const EquityPlanForm = ({
shareClasses,
subtitle: (
<Tldr
message="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
description="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand Down Expand Up @@ -262,7 +262,7 @@ const EquityPlanForm = ({
shareClasses,
subtitle: (
<Tldr
message="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
description="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import EmptyState from "@/components/common/empty-state";
import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { Card } from "@/components/ui/card";
import { withServerComponentSession } from "@/server/auth";
import { db } from "@/server/db";
Expand Down Expand Up @@ -54,7 +54,7 @@ const EquityPlanPage = async () => {
shareClasses={shareClasses}
subtitle={
<Tldr
message="Equity plans are used to distribute ownership of your company using stock options, RSUs, and other instruments among employees and stakeholders."
description="Equity plans are used to distribute ownership of your company using stock options, RSUs, and other instruments among employees and stakeholders."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand Down Expand Up @@ -84,7 +84,7 @@ const EquityPlanPage = async () => {
title="Create an equity plan"
subtitle={
<Tldr
message="Equity plans are used to distribute ownership of your company using stock options, RSUs, and other instruments among employees and stakeholders."
description="Equity plans are used to distribute ownership of your company using stock options, RSUs, and other instruments among employees and stakeholders."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import {
TableRow,
} from "@/components/ui/table";

import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { Card } from "@/components/ui/card";
import { type EquityPlanMutationType } from "@/trpc/routers/equity-plan/schema";
import { type ShareClassMutationType } from "@/trpc/routers/share-class/schema";
import type { EquityPlanMutationType } from "@/trpc/routers/equity-plan/schema";
import type { ShareClassMutationType } from "@/trpc/routers/share-class/schema";
import { RiEqualizer2Line } from "@remixicon/react";
import EquityPlanModal from "./modal";
const formatter = new Intl.NumberFormat("en-US");
Expand Down Expand Up @@ -49,7 +49,7 @@ const EquityPlanTable = ({
<TableHead>Cancellation behavior</TableHead>
<TableHead>Board approval date</TableHead>
<TableHead>Plan effective date</TableHead>
<TableHead></TableHead>
<TableHead />
</TableRow>
</TableHeader>
<TableBody>
Expand Down Expand Up @@ -81,7 +81,7 @@ const EquityPlanTable = ({
shareClasses={shareClasses}
subtitle={
<Tldr
message="Equity plans are used to distribute ownership of your company using stock options, RSUs, and other instruments among employees and stakeholders."
description="Equity plans are used to distribute ownership of your company using stock options, RSUs, and other instruments among employees and stakeholders."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import EmptyState from "@/components/common/empty-state";
import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import OptionTable from "@/components/securities/options/option-table";
import { Card } from "@/components/ui/card";
import { api } from "@/trpc/server";
Expand Down Expand Up @@ -51,7 +51,7 @@ const OptionsPage = async () => {
title="Collect options for Stakeholders"
subtitle={
<Tldr
message="Manage stock options by adding them.
description="Manage stock options by adding them.
Add approval dates, notes, grantId for the stakeholders. "
cta={{
label: "Learn more",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import Message from "@/components/common/message";
import Modal from "@/components/common/modal";
import Tldr from "@/components/common/tldr";
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { api } from "@/trpc/react";
Expand Down Expand Up @@ -56,7 +56,7 @@ const CreateApiKey = () => {
title="API key created"
subtitle={
<Tldr
message="
description="
You will not see this key again, so please make sure to copy and store it in a safe place.
"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { dayjsExt } from "@/common/dayjs";
import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { Card } from "@/components/ui/card";
import { api } from "@/trpc/react";
import { RiMore2Fill } from "@remixicon/react";
Expand Down Expand Up @@ -59,7 +59,7 @@ const ApiKeysTable = ({ keys }: { keys: ApiKey[] }) => {
<Card className="mx-auto mt-3 w-[28rem] sm:w-[38rem] md:w-full">
<div className="mx-3">
<Tldr
message="
description="
For security reasons, we have no ways to retrieve your complete API keys. If you lose your API key, you will need to create or rotate and replace with a new one.
"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { pushModal } from "@/components/modals";
import { Button } from "@/components/ui/button";
import type { ShareClassMutationType } from "@/trpc/routers/share-class/schema";
Expand All @@ -23,7 +23,7 @@ export const CreateShareButton = ({
shareClasses,
subtitle: (
<Tldr
message="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
description="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { pushModal } from "@/components/modals";
import type { ShareClassMutationType } from "@/trpc/routers/share-class/schema";
import { RiEqualizer2Line } from "@remixicon/react";
Expand All @@ -26,7 +26,7 @@ export const EditShareClassButton = ({
shareClasses,
subtitle: (
<Tldr
message="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
description="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
cta={{
label: "Learn more",
href: "https://captable.inc/help",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { RiInformationLine } from "@remixicon/react";
import Link from "next/link";

type TldrProps = {
message: string;
type MessageProps = {
description: string;
cta?: {
label: string;
href: string;
};

children?: React.ReactNode;
};

const Tldr = ({ message, cta }: TldrProps) => {
const Message = ({ description, cta, children }: MessageProps) => {
return (
<div className="mt-3 rounded-md bg-teal-50 p-4 text-left">
<div className="flex">
Expand All @@ -21,7 +23,7 @@ const Tldr = ({ message, cta }: TldrProps) => {
</div>
<div className="ml-3">
<div className="text-sm text-teal-600">
<p>{message}</p>
<p>{description}</p>
</div>

{cta && (
Expand All @@ -40,10 +42,12 @@ const Tldr = ({ message, cta }: TldrProps) => {
</div>
</div>
)}

{children && <div className="mt-4">{children}</div>}
</div>
</div>
</div>
);
};

export default Tldr;
export default Message;
8 changes: 4 additions & 4 deletions src/components/dashboard/navbar/command-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { RiSearchLine } from "@remixicon/react";
import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";

import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { pushModal } from "@/components/modals";

type CommandOption = {
Expand All @@ -51,7 +51,7 @@ const Pages: CommandOption[] = [
title: "Add a stakeholder",
subtitle: (
<Tldr
message="Manage stakeholders by adding them.
description="Manage stakeholders by adding them.
Categorize, assign roles, and maintain contact info for investors, partners, and clients."
cta={{
label: "Learn more",
Expand Down Expand Up @@ -96,7 +96,7 @@ const Pages: CommandOption[] = [
shareClasses: [],
subtitle: (
<Tldr
message="Equity plans are used to distribute ownership of your company using stock options, RSUs, and other instruments among employees and stakeholders."
description="Equity plans are used to distribute ownership of your company using stock options, RSUs, and other instruments among employees and stakeholders."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand All @@ -119,7 +119,7 @@ const Pages: CommandOption[] = [
shareClasses: [],
subtitle: (
<Tldr
message="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
description="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand Down
6 changes: 3 additions & 3 deletions src/components/modals/equity-pan/equity-plan-form.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { popModal, pushModal } from "@/components/modals";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
Expand Down Expand Up @@ -227,7 +227,7 @@ export const EquityPlanForm = ({
shareClasses,
subtitle: (
<Tldr
message="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
description="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand Down Expand Up @@ -260,7 +260,7 @@ export const EquityPlanForm = ({
shareClasses,
subtitle: (
<Tldr
message="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
description="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand Down
5 changes: 5 additions & 0 deletions src/components/safe/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
FormMessage,
} from "@/components/ui/form";

import Message from "@/components/common/message";
import { StakeholderSelector } from "@/components/stakeholder/stakeholder-selector";
import { Button } from "@/components/ui/button";
import { LinearCombobox } from "@/components/ui/combobox";
Expand Down Expand Up @@ -259,6 +260,10 @@ export const SafeForm: React.FC<SafeFormProps> = ({ type }) => {
/>
</div>

{/* <Tldr
description="A Simple Agreement for Future Equity (SAFE) is an agreement between an investor and a company that provides the investor with the right to receive equity in the future, upon the occurrence of certain events."
> */}

<div className="mt-8 flex justify-end">
<Button disabled={isSubmitting} loading={isSubmitting} type="submit">
{type === "create"
Expand Down
4 changes: 2 additions & 2 deletions src/components/securities/shares/steps/general-details.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { pushModal } from "@/components/modals";
// import { EmptySelect } from "@/components/securities/shared/EmptySelect";
import { Button } from "@/components/ui/button";
Expand Down Expand Up @@ -147,7 +147,7 @@ export const GeneralDetails = ({ shareClasses = [] }: GeneralDetailsProps) => {
title: "Create a share class",
subtitle: (
<Tldr
message="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
description="A share class on a cap table represents a distinct category of shares with specific rights and characteristics, such as voting preferences or priorities. Eg. Common and Preferred shares, Class A, B, etc, ESOs and RSUs, etc."
cta={{
label: "Learn more",
// TODO - this link should be updated to the correct URL
Expand Down
6 changes: 3 additions & 3 deletions src/components/stakeholder/stakeholder-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { pushModal } from "@/components/modals";
import { Button } from "@/components/ui/button";
import {
Expand Down Expand Up @@ -31,7 +31,7 @@ export default function StakeholderDropdown() {
title: "Add a stakeholder",
subtitle: (
<Tldr
message="Manage stakeholders by adding them.
description="Manage stakeholders by adding them.
Categorize, assign roles, and maintain contact info for investors, partners, and clients."
cta={{
label: "Learn more",
Expand Down Expand Up @@ -59,7 +59,7 @@ export default function StakeholderDropdown() {
title: "Add or Import Stakeholders",
subtitle: (
<Tldr
message="Manage stakeholders by adding them.
description="Manage stakeholders by adding them.
Categorize, assign roles, and maintain contact info for investors, partners, and clients."
cta={{
label: "Learn more",
Expand Down
4 changes: 2 additions & 2 deletions src/components/stakeholder/stakeholder-selector.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import Tldr from "@/components/common/tldr";
import Message from "@/components/common/message";
import { pushModal } from "@/components/modals";
import { LinearCombobox } from "@/components/ui/combobox";
import { api } from "@/trpc/react";
Expand Down Expand Up @@ -51,7 +51,7 @@ export function StakeholderSelector({ onSelect }: StakeholderSelectorType) {
title: "Add a stakeholder",
subtitle: (
<Tldr
message="Manage stakeholders by adding them.
description="Manage stakeholders by adding them.
Categorize, assign roles, and maintain contact info for investors, partners, and clients."
cta={{
label: "Learn more",
Expand Down