Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d697f8d
feat(ui): add new components DataTable, Calendar, Dialog, Popover, Se…
martin0024 Apr 18, 2026
5b2be23
feat(services): services data table
martin0024 Apr 18, 2026
64d70d8
feat(layout): improved authentication guard
martin0024 Apr 18, 2026
8b34c04
feat(services): add service dialog component
martin0024 Apr 18, 2026
34f4fd6
fix(dialog): price input in service dialog
martin0024 Apr 19, 2026
01a9259
feat: enhance page structure with Suspense and add product management…
achneerov Apr 17, 2026
b0004ac
fix: resolve issues with product management functions and enhance err…
achneerov Apr 17, 2026
06e2616
made service type immutable and made a function to update the schedul…
Berny-ft Apr 19, 2026
1a6cff4
admin services and backend validation
Berny-ft Apr 19, 2026
9ddeeb1
renamed coaching services and bookings to private lessons and pragrams
Berny-ft Apr 19, 2026
710a4f1
fix(layout): wrap auth shell in Suspense to resolve blocking route error
Berny-ft Apr 19, 2026
26307ca
fix: add dashboard page and resolve lint error
Berny-ft Apr 19, 2026
339c920
fix(format): remove NaN check in formatDate function
martin0024 Apr 19, 2026
b6838a6
Merge branch 'feat/10-service-tab-actions-2' into feature/9-service-t…
martin0024 Apr 19, 2026
e4011cb
chore(ci): switch from npm to pnpm for ci
martin0024 Apr 19, 2026
628b432
chore: update package manager to pnpm@9.15.3
martin0024 Apr 19, 2026
ac41677
chore: fixed pnpm-lock.yaml
martin0024 Apr 19, 2026
9ca3b5d
Merge pull request #57 from hack4impact/feature/9-service-tab-frontend
martin0024 Apr 19, 2026
29f0454
refactor: moved folder
martin0024 Apr 19, 2026
42b4099
fix(actions): parsing
martin0024 Apr 19, 2026
dd5456d
fix(actions): update allowed transitions for archived state
RenaudBernier Apr 19, 2026
c35290c
fix(actions): reduce maximum description length for service fields
RenaudBernier Apr 19, 2026
779cdc5
fix(ui): fix overflow in service description and weekly schedule
RenaudBernier Apr 19, 2026
c6b7506
fix(actions): improve error handling and validation for service creat…
RenaudBernier Apr 19, 2026
02e018b
refactor(db): split the scheduled_at column to slots, startdate and e…
RenaudBernier Apr 20, 2026
f96429f
refactor(format): update date formatting
RenaudBernier Apr 20, 2026
1b1eb2d
fix(test): updated sanity test to remove import
RenaudBernier Apr 20, 2026
a7e4037
Merge pull request #58 from hack4impact/feat/service-date-attributes
RenaudBernier Apr 20, 2026
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
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: "25"
cache: npm
cache: pnpm

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Lint
run: npm run lint
run: pnpm lint

- name: Unit tests
run: npm run test:ci
run: pnpm test:ci
11 changes: 5 additions & 6 deletions __tests__/sanity.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { render, screen } from "@testing-library/react";
import DashboardPage from "@/app/(authenticated)/dashboard/page";
import { TestComponent } from "./test-component";

describe("jest setup", () => {
it("runs React + Testing Library", async () => {
const jsx = await DashboardPage();
render(jsx);
expect(screen.getByText("You are admin")).toBeInTheDocument();
});
it("runs React + Testing Library", () => {
render(<TestComponent />);
expect(screen.getByText("ok")).toBeInTheDocument();
});
});
3 changes: 3 additions & 0 deletions __tests__/test-component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function TestComponent() {
return <div>ok</div>;
}
11 changes: 10 additions & 1 deletion app/(authenticated)/checkout/success/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import { Suspense } from "react";
import { redirect } from "next/navigation";
import { createClient } from "@/utils/supabase/server";
import { syncStripeData } from "@/lib/stripe";
import { db } from "@/lib/db";
import { profiles } from "@/lib/db/schema";
import { eq } from "drizzle-orm";

export default async function CheckoutSuccessPage() {
export default function CheckoutSuccessPage() {
return (
<Suspense>
<SyncAndRedirect />
</Suspense>
);
}

async function SyncAndRedirect(): Promise<never> {
const supabase = await createClient();
const {
data: { user },
Expand Down
10 changes: 0 additions & 10 deletions app/(authenticated)/dashboard/page.tsx

This file was deleted.

19 changes: 13 additions & 6 deletions app/(authenticated)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { Suspense } from "react";
import { redirect } from "next/navigation";
import { createClient } from "@/utils/supabase/server";
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
import { TooltipProvider } from "@/components/ui/tooltip";
import { AppSidebar } from "@/components/app-sidebar";

export default async function AuthenticatedLayout({
children,
}: {
children: React.ReactNode;
}) {
async function AuthGate({ children }: { children: React.ReactNode }) {
const supabase = await createClient();
const {
data: { user },
Expand All @@ -18,13 +15,23 @@ export default async function AuthenticatedLayout({
redirect("/login");
}

return <>{children}</>;
}

export default function AuthenticatedLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<TooltipProvider>
<SidebarProvider>
<AppSidebar />
<SidebarInset>
<div className="flex flex-1 flex-col gap-4 p-4">
{children}
<Suspense fallback={null}>
<AuthGate>{children}</AuthGate>
</Suspense>
</div>
</SidebarInset>
</SidebarProvider>
Expand Down
11 changes: 10 additions & 1 deletion app/(authenticated)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Suspense } from "react";
import { createClient } from "@/utils/supabase/server";
import { signout } from "@/app/login/actions";
import { getSubscriptionDetails } from "@/lib/stripe";
Expand All @@ -14,7 +15,15 @@ import { CheckoutButton } from "@/components/subscribe-button";
const SUBSCRIPTION_PRICE_ID = process.env.STRIPE_PRICE_ID!;
const PRODUCT_PRICE_ID = process.env.STRIPE_PRODUCT_PRICE_ID!;

export default async function Page() {
export default function Page() {
return (
<Suspense>
<HomeContent />
</Suspense>
);
}

async function HomeContent() {
const supabase = await createClient();
const {
data: { user },
Expand Down
Loading
Loading