Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekly release #61

Merged
merged 35 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
13f1b98
Update README.md
arjunkomath Jan 14, 2025
fc051f8
Add project switch, few datetime fixes
arjunkomath Jan 15, 2025
ce8cb52
Merge branch 'main' of github.com:techulus/manage
arjunkomath Jan 15, 2025
f3d0760
Fix today view data
arjunkomath Jan 15, 2025
7ee63af
More timezone fixes
arjunkomath Jan 15, 2025
bd591b4
Add notifications
arjunkomath Jan 15, 2025
7168a14
Adjust navbar spacing and align notification popover content
arjunkomath Jan 15, 2025
43e28f9
Update today view
arjunkomath Jan 16, 2025
ea43920
Fix events in today
arjunkomath Jan 16, 2025
1a20545
Fix event filtering in today's view
arjunkomath Jan 16, 2025
22f1a33
Update date time picker
arjunkomath Jan 16, 2025
db16847
Fix DateTimePicker Props
arjunkomath Jan 16, 2025
4509cb7
Fix date time picker
arjunkomath Jan 16, 2025
7bf9de8
Update icon width and change user avatar image source
arjunkomath Jan 18, 2025
2504724
Fix task date handling
arjunkomath Jan 19, 2025
e35357a
Add live demo
arjunkomath Jan 19, 2025
3bed56a
Add web socket support
arjunkomath Jan 20, 2025
8042de9
More date time fixes
arjunkomath Jan 21, 2025
248fd82
Fix task query
arjunkomath Jan 21, 2025
ec8905f
Fix dockerfile
arjunkomath Jan 21, 2025
58ab461
Disable profile changes for demo user
arjunkomath Jan 21, 2025
c247043
Update navigation
arjunkomath Jan 21, 2025
f4fbb8c
Remove back url
arjunkomath Jan 21, 2025
66607ef
Update theme color meta tags for light and dark modes
arjunkomath Jan 21, 2025
30a7643
Make sidebar nicer + fixes
arjunkomath Jan 22, 2025
8ec3ad7
Update page title animation
arjunkomath Jan 22, 2025
786c579
Fix sidebar trigger
arjunkomath Jan 22, 2025
38a62a0
Fix nav padding in mobile
arjunkomath Jan 22, 2025
309f778
Add delete tasklist action
arjunkomath Jan 23, 2025
e6ba602
Adjust button size in task list header and update uploader padding
arjunkomath Jan 23, 2025
a9ef725
Refactor event handling and improve task list deletion
arjunkomath Jan 25, 2025
6431c52
Update event payload handling to allow optional description
arjunkomath Jan 25, 2025
6410416
Add actionType prop to PageTitle component and update related pages
arjunkomath Jan 25, 2025
51d8074
Add zod-validation-error package and refactor event forms to use upda…
arjunkomath Jan 26, 2025
7f30595
Prevent default and stop propagation on back button click in EventForm
arjunkomath Jan 26, 2025
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
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ ENV NEXT_TELEMETRY_DISABLED=1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public

COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ Manage is an open-source project management app inspired by Basecamp. With its i
- [x] Files - Uploading and sharing files
- [x] Comments
- [x] Events / Calendar
- [ ] Activity logs
- [x] Activity logs
- [ ] Notifications
- [ ] Discussions / Forums
- [ ] Chat
- [ ] Search
- [ ] Permissions
- [ ] Billing

## Development

Expand Down
28 changes: 26 additions & 2 deletions app/(auth)/sign-in/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
import { logtoConfig } from "@/app/logto";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { DotPattern } from "@/components/ui/dot-pattern";
import { cn } from "@/lib/utils";
import { signIn } from "@logto/next/server-actions";
import Image from "next/image";
import Link from "next/link";
import logo from "../../../public/images/logo.png";

export default function SignInForm() {
export default async function SignInForm(props: {
searchParams: Promise<{
demo: string;
}>;
}) {
const query = await props.searchParams;
const isDemo = query.demo === "true";

return (
<div className="m-6 flex h-full items-center justify-center">
<Card className="w-full max-w-md">
<DotPattern />
<Card className="w-full max-w-md z-10">
<div className="flex p-6 lg:flex-1">
<Image
src={logo}
Expand All @@ -34,6 +44,20 @@ export default function SignInForm() {
</CardHeader>

<CardContent className="grid gap-4">
{isDemo ? (
<div className="bg-gray-100 dark:bg-gray-800 p-4 rounded-md space-y-2">
<p className="text-sm text-gray-600 dark:text-gray-300">
Try the demo account to see how it works, login with the
following credentials.
</p>
<div className="text-sm text-gray-600 dark:text-gray-300">
User ID: <pre className="font-semibold">demo</pre>
</div>
<div className="text-sm text-gray-600 dark:text-gray-300">
Password: <pre className="font-semibold">w-okDQsz</pre>
</div>
</div>
) : null}
<Button
type="button"
onClick={async () => {
Expand Down
35 changes: 22 additions & 13 deletions app/(dashboard)/[tenant]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import NavBar from "@/components/console/navbar";
import { AppSidebar } from "@/components/app-sidebar";
import { ReportTimezone } from "@/components/core/report-timezone";
import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar";
import { isDatabaseReady } from "@/lib/utils/useDatabase";
import { getOwner } from "@/lib/utils/useOwner";
import { getOwner, getUser } from "@/lib/utils/useOwner";
import { redirect } from "next/navigation";

export const fetchCache = "force-no-store"; // disable cache for console pages
Expand All @@ -13,12 +14,13 @@ export default async function ConsoleLayout(props: {
tenant: string;
}>;
}) {
const params = await props.params;
const { tenant } = await props.params;

const { children } = props;
const { orgId, orgSlug, userId } = await getOwner();
const { orgSlug } = await getOwner();
const user = await getUser();

if (params.tenant !== orgSlug) {
if (tenant !== orgSlug) {
redirect("/start");
}

Expand All @@ -28,17 +30,24 @@ export default async function ConsoleLayout(props: {
}

return (
<div className="relative flex min-h-full flex-col">
<NavBar activeOrgId={orgId ?? userId} activeOrgSlug={orgSlug} />

<div className="mx-auto w-full flex-grow lg:flex">
<SidebarProvider>
<AppSidebar
user={{
firstName: user.firstName ?? "",
email: user.email ?? "",
imageUrl: null,
}}
/>
<main className="relative mx-auto w-full flex-grow lg:flex">
<SidebarTrigger className="absolute top-[18px] left-4 z-50" />
<div className="min-w-0 flex-1 xl:flex">
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 lg:min-w-0 lg:flex-1">
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 lg:min-w-0 lg:flex-1 pb-8">
{children}
</div>
</div>
</div>
<ReportTimezone />
</div>

<ReportTimezone />
</main>
</SidebarProvider>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ type Props = {
};

export default async function EditDocument(props: Props) {
const params = await props.params;
const { orgSlug } = await getOwner();
const document = await getDocumentById(params.documentId);
const backUrl = `/${orgSlug}/projects/${params.projectId}/documents/${document.id}`;
const params = await props.params;
const { orgSlug } = await getOwner();
const document = await getDocumentById(params.documentId);
const backUrl = `/${orgSlug}/projects/${params.projectId}/documents/${document.id}`;

return (
return (
<>
<PageTitle title="Update Document" backUrl={backUrl} />
<PageTitle title="Update Document" />

<PageSection topInset>
<form action={updateDocument}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ type Props = {
};

export default async function DocumentDetails(props: Props) {
const params = await props.params;
const { projectId, documentId } = params;
const params = await props.params;
const { projectId, documentId } = params;

const { orgSlug } = await getOwner();
const db = await database();
const documentDetails = await db.query.document.findFirst({
const { orgSlug } = await getOwner();
const db = await database();
const documentDetails = await db.query.document.findFirst({
where: eq(document.id, +documentId),
with: {
folder: true,
},
});

if (!documentDetails) {
if (!documentDetails) {
return null;
}

return (
return (
<>
<PageTitle
title={documentDetails.name}
Expand All @@ -42,13 +42,9 @@ export default async function DocumentDetails(props: Props) {
? `Documents / ${documentDetails.folder?.name}`
: "Document"
}
backUrl={
documentDetails.folderId
? `/${orgSlug}/projects/${projectId}/documents/folders/${documentDetails.folderId}`
: `/${orgSlug}/projects/${projectId}/documents`
}
actionLabel="Edit"
actionLink={`/${orgSlug}/projects/${projectId}/documents/${documentId}/edit`}
actionType="edit"
/>

<PageSection topInset>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ type Props = {
};

export default async function EditDocumentFolder(props: Props) {
const params = await props.params;
const { orgSlug } = await getOwner();
const backUrl = `/${orgSlug}/projects/${params.projectId}/documents/folders/${params.folderId}`;
const db = await database();
const folder = await db.query.documentFolder.findFirst({
const params = await props.params;
const { orgSlug } = await getOwner();
const backUrl = `/${orgSlug}/projects/${params.projectId}/documents/folders/${params.folderId}`;
const db = await database();
const folder = await db.query.documentFolder.findFirst({
where: eq(documentFolder.id, +params.folderId),
});

return (
return (
<>
<PageTitle title="Update Folder" backUrl={backUrl} />
<PageTitle title="Update Folder" />

<PageSection topInset>
<form action={updateDocumentFolder}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ type Props = {
};

export default async function CreateDocument(props: Props) {
const params = await props.params;
const { orgSlug } = await getOwner();
const backUrl = `/${orgSlug}/projects/${params.projectId}/documents/folders/${params.folderId}`;
return (
const params = await props.params;
const { orgSlug } = await getOwner();
const backUrl = `/${orgSlug}/projects/${params.projectId}/documents/folders/${params.folderId}`;
return (
<>
<PageTitle title="Create Document" backUrl={backUrl} />
<PageTitle title="Create Document" />
<PageSection topInset>
<form action={createDocument}>
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ type Props = {
};

export default async function FolderDetails(props: Props) {
const params = await props.params;
const { orgSlug } = await getOwner();
const { projectId, folderId } = params;
const params = await props.params;
const { orgSlug } = await getOwner();
const { projectId, folderId } = params;

const db = await database();
const folder: FolderWithContents | undefined =
const db = await database();
const folder: FolderWithContents | undefined =
await db.query.documentFolder.findFirst({
where: eq(documentFolder.id, Number(folderId)),
with: {
Expand All @@ -63,18 +63,18 @@ export default async function FolderDetails(props: Props) {
},
});

if (!folder) {
if (!folder) {
return null;
}

return (
return (
<>
<PageTitle
title={folder?.name}
subTitle="Documents"
backUrl={`/${orgSlug}/projects/${projectId}/documents`}
actionLabel="Edit"
actionLink={`/${orgSlug}/projects/${projectId}/documents/folders/${folderId}/edit`}
actionType="edit"
/>

<PageSection topInset>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ type Props = {
};

export default async function CreateDocumentFolder(props: Props) {
const params = await props.params;
const { orgSlug } = await getOwner();
const backUrl = `/${orgSlug}/projects/${params.projectId}/documents`;
return (
const params = await props.params;
const { orgSlug } = await getOwner();
const backUrl = `/${orgSlug}/projects/${params.projectId}/documents`;
return (
<>
<PageTitle title="Create Folder" backUrl={backUrl} />
<PageTitle title="Create Folder" />
<PageSection topInset>
<form action={createDocumentFolder}>
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ type Props = {
};

export default async function CreateDocument(props: Props) {
const params = await props.params;
const { orgSlug } = await getOwner();
const backUrl = `/${orgSlug}/projects/${params.projectId}/documents`;
return (
const params = await props.params;
const { orgSlug } = await getOwner();
const backUrl = `/${orgSlug}/projects/${params.projectId}/documents`;
return (
<>
<PageTitle title="Create Document" backUrl={backUrl} />
<PageTitle title="Create Document" />
<PageSection topInset>
<form action={createDocument}>
<input
Expand Down
12 changes: 6 additions & 6 deletions app/(dashboard)/[tenant]/projects/[projectId]/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ interface Props {
}

export default async function EditProject(props: Props) {
const params = await props.params;
const { projectId } = params;
const params = await props.params;
const { projectId } = params;

const project = await getProjectById(projectId);
const { orgSlug } = await getOwner();
const project = await getProjectById(projectId);
const { orgSlug } = await getOwner();

return (
return (
<>
<PageTitle title={project.name} backUrl={`/${orgSlug}/projects`} />
<PageTitle title={project.name} />

<PageSection topInset>
<form action={updateProject}>
Expand Down
Loading
Loading