Compare commits
2 Commits
fix/menu-b
...
feat/healt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6bc21a1d0 | ||
|
|
5436567315 |
@@ -46,8 +46,7 @@ const Button: React.FC<{
|
|||||||
onMouseEnter={handleMouseEnter}
|
onMouseEnter={handleMouseEnter}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
"group flex h-[34px] items-center rounded-md p-1.5 text-sm font-normal leading-6 hover:bg-light-200 hover:text-light-1000 dark:hover:bg-dark-200 dark:hover:text-dark-1000",
|
"group flex h-[34px] items-center justify-between rounded-md p-1.5 text-sm font-normal leading-6 hover:bg-light-200 hover:text-light-1000 dark:hover:bg-dark-200 dark:hover:text-dark-1000",
|
||||||
isCollapsed ? "md:justify-center" : "justify-between",
|
|
||||||
current
|
current
|
||||||
? "bg-light-200 text-light-1000 dark:bg-dark-200 dark:text-dark-1000"
|
? "bg-light-200 text-light-1000 dark:bg-dark-200 dark:text-dark-1000"
|
||||||
: "text-neutral-600 dark:bg-dark-100 dark:text-dark-900",
|
: "text-neutral-600 dark:bg-dark-100 dark:text-dark-900",
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ interface ChecklistItemRowProps {
|
|||||||
completed: boolean;
|
completed: boolean;
|
||||||
};
|
};
|
||||||
cardPublicId: string;
|
cardPublicId: string;
|
||||||
onCreateNewItem?: () => void;
|
|
||||||
viewOnly?: boolean;
|
viewOnly?: boolean;
|
||||||
dragHandleProps?: DraggableProvided["dragHandleProps"];
|
dragHandleProps?: DraggableProvided["dragHandleProps"];
|
||||||
isDragging?: boolean;
|
isDragging?: boolean;
|
||||||
@@ -26,7 +25,6 @@ interface ChecklistItemRowProps {
|
|||||||
export default function ChecklistItemRow({
|
export default function ChecklistItemRow({
|
||||||
item,
|
item,
|
||||||
cardPublicId,
|
cardPublicId,
|
||||||
onCreateNewItem,
|
|
||||||
viewOnly = false,
|
viewOnly = false,
|
||||||
dragHandleProps,
|
dragHandleProps,
|
||||||
isDragging = false,
|
isDragging = false,
|
||||||
@@ -189,10 +187,7 @@ export default function ChecklistItemRow({
|
|||||||
disabled={viewOnly}
|
disabled={viewOnly}
|
||||||
onChange={(e) => setTitle(e.target.value)}
|
onChange={(e) => setTitle(e.target.value)}
|
||||||
// @ts-expect-error - valid event
|
// @ts-expect-error - valid event
|
||||||
onBlur={(e: Event) => {
|
onBlur={(e: Event) => commitTitle(e.target.innerHTML as string)}
|
||||||
const innerHTML = (e.target as HTMLElement).innerHTML;
|
|
||||||
commitTitle(innerHTML);
|
|
||||||
}}
|
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
"m-0 min-h-[20px] w-full p-0 text-sm leading-[20px] text-light-950 outline-none focus-visible:outline-none dark:text-dark-950",
|
"m-0 min-h-[20px] w-full p-0 text-sm leading-[20px] text-light-950 outline-none focus-visible:outline-none dark:text-dark-950",
|
||||||
viewOnly && "cursor-default",
|
viewOnly && "cursor-default",
|
||||||
@@ -202,9 +197,7 @@ export default function ChecklistItemRow({
|
|||||||
if (viewOnly) return;
|
if (viewOnly) return;
|
||||||
if (e.key === "Enter") {
|
if (e.key === "Enter") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const innerHTML = (e.currentTarget as HTMLElement).innerHTML;
|
commitTitle(title);
|
||||||
commitTitle(innerHTML);
|
|
||||||
onCreateNewItem?.();
|
|
||||||
}
|
}
|
||||||
if (e.key === "Escape") {
|
if (e.key === "Escape") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
@@ -210,9 +210,6 @@ export default function Checklists({
|
|||||||
completed: item.completed,
|
completed: item.completed,
|
||||||
}}
|
}}
|
||||||
cardPublicId={cardPublicId}
|
cardPublicId={cardPublicId}
|
||||||
onCreateNewItem={() =>
|
|
||||||
setActiveChecklistForm?.(checklist.publicId)
|
|
||||||
}
|
|
||||||
viewOnly={viewOnly}
|
viewOnly={viewOnly}
|
||||||
dragHandleProps={provided.dragHandleProps}
|
dragHandleProps={provided.dragHandleProps}
|
||||||
isDragging={snapshot.isDragging}
|
isDragging={snapshot.isDragging}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const cardRouter = createTRPCRouter({
|
|||||||
})
|
})
|
||||||
.input(
|
.input(
|
||||||
z.object({
|
z.object({
|
||||||
title: z.string().min(1).max(2000),
|
title: z.string().min(1),
|
||||||
description: z.string().max(10000),
|
description: z.string().max(10000),
|
||||||
listPublicId: z.string().min(12),
|
listPublicId: z.string().min(12),
|
||||||
labelPublicIds: z.array(z.string().min(12)),
|
labelPublicIds: z.array(z.string().min(12)),
|
||||||
@@ -760,7 +760,7 @@ export const cardRouter = createTRPCRouter({
|
|||||||
.input(
|
.input(
|
||||||
z.object({
|
z.object({
|
||||||
cardPublicId: z.string().min(12),
|
cardPublicId: z.string().min(12),
|
||||||
title: z.string().min(1).max(2000).optional(),
|
title: z.string().min(1).optional(),
|
||||||
description: z.string().optional(),
|
description: z.string().optional(),
|
||||||
index: z.number().optional(),
|
index: z.number().optional(),
|
||||||
listPublicId: z.string().min(12).optional(),
|
listPublicId: z.string().min(12).optional(),
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ interface TrelloCheckItem {
|
|||||||
|
|
||||||
interface TrelloCard {
|
interface TrelloCard {
|
||||||
id: string;
|
id: string;
|
||||||
name: string | null;
|
name: string;
|
||||||
desc: string;
|
desc: string;
|
||||||
idList: string;
|
idList: string;
|
||||||
labels: TrelloLabel[];
|
labels: TrelloLabel[];
|
||||||
@@ -290,7 +290,7 @@ export const importRouter = createTRPCRouter({
|
|||||||
if (list.cards.length && newListId) {
|
if (list.cards.length && newListId) {
|
||||||
const cardsInsert = list.cards.map((card, index) => ({
|
const cardsInsert = list.cards.map((card, index) => ({
|
||||||
publicId: generateUID(),
|
publicId: generateUID(),
|
||||||
title: (card.name?.trim() ?? "Untitled Card").slice(0, 2000),
|
title: card.name,
|
||||||
description: card.description,
|
description: card.description,
|
||||||
createdBy: userId,
|
createdBy: userId,
|
||||||
listId: newListId,
|
listId: newListId,
|
||||||
|
|||||||
@@ -339,37 +339,6 @@ export const initAuth = (db: dbClient) => {
|
|||||||
discoveryUrl: process.env.OIDC_DISCOVERY_URL,
|
discoveryUrl: process.env.OIDC_DISCOVERY_URL,
|
||||||
scopes: ["openid", "email", "profile"],
|
scopes: ["openid", "email", "profile"],
|
||||||
pkce: true,
|
pkce: true,
|
||||||
mapProfileToUser: (profile: {
|
|
||||||
name?: string;
|
|
||||||
display_name?: string;
|
|
||||||
preferred_username?: string;
|
|
||||||
given_name?: string;
|
|
||||||
family_name?: string;
|
|
||||||
email?: string;
|
|
||||||
email_verified?: boolean;
|
|
||||||
sub?: string;
|
|
||||||
picture?: string;
|
|
||||||
avatar?: string;
|
|
||||||
}) => {
|
|
||||||
console.log("OIDC profile:", profile);
|
|
||||||
|
|
||||||
const name =
|
|
||||||
profile.name ??
|
|
||||||
profile.display_name ??
|
|
||||||
profile.preferred_username ??
|
|
||||||
(profile.given_name && profile.family_name
|
|
||||||
? `${profile.given_name} ${profile.family_name}`.trim()
|
|
||||||
: (profile.given_name ?? profile.family_name)) ??
|
|
||||||
profile.sub ??
|
|
||||||
"";
|
|
||||||
|
|
||||||
return {
|
|
||||||
email: profile.email,
|
|
||||||
name: name,
|
|
||||||
emailVerified: profile.email_verified ?? false,
|
|
||||||
image: profile.picture ?? profile.avatar ?? null,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
ALTER TABLE "card_activity" ALTER COLUMN "fromTitle" SET DATA TYPE text;--> statement-breakpoint
|
|
||||||
ALTER TABLE "card_activity" ALTER COLUMN "toTitle" SET DATA TYPE text;--> statement-breakpoint
|
|
||||||
ALTER TABLE "card" ALTER COLUMN "title" SET DATA TYPE text;
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -148,13 +148,6 @@
|
|||||||
"when": 1764621815672,
|
"when": 1764621815672,
|
||||||
"tag": "20251201204335_AddCardDueDates",
|
"tag": "20251201204335_AddCardDueDates",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 21,
|
|
||||||
"version": "7",
|
|
||||||
"when": 1767045713686,
|
|
||||||
"tag": "20251229220153_UpdateCardTitleFromVarcharToText",
|
|
||||||
"breakpoints": true
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ export const activityTypeEnum = pgEnum("card_activity_type", activityTypes);
|
|||||||
export const cards = pgTable("card", {
|
export const cards = pgTable("card", {
|
||||||
id: bigserial("id", { mode: "number" }).primaryKey(),
|
id: bigserial("id", { mode: "number" }).primaryKey(),
|
||||||
publicId: varchar("publicId", { length: 12 }).notNull().unique(),
|
publicId: varchar("publicId", { length: 12 }).notNull().unique(),
|
||||||
title: text("title").notNull(),
|
title: varchar("title", { length: 255 }).notNull(),
|
||||||
description: text("description"),
|
description: text("description"),
|
||||||
index: integer("index").notNull(),
|
index: integer("index").notNull(),
|
||||||
createdBy: uuid("createdBy").references(() => users.id, {
|
createdBy: uuid("createdBy").references(() => users.id, {
|
||||||
@@ -127,8 +127,8 @@ export const cardActivities = pgTable("card_activity", {
|
|||||||
workspaceMemberId: bigint("workspaceMemberId", {
|
workspaceMemberId: bigint("workspaceMemberId", {
|
||||||
mode: "number",
|
mode: "number",
|
||||||
}).references(() => workspaceMembers.id, { onDelete: "set null" }),
|
}).references(() => workspaceMembers.id, { onDelete: "set null" }),
|
||||||
fromTitle: text("fromTitle"),
|
fromTitle: varchar("fromTitle", { length: 255 }),
|
||||||
toTitle: text("toTitle"),
|
toTitle: varchar("toTitle", { length: 255 }),
|
||||||
fromDescription: text("fromDescription"),
|
fromDescription: text("fromDescription"),
|
||||||
toDescription: text("toDescription"),
|
toDescription: text("toDescription"),
|
||||||
createdBy: uuid("createdBy").references(() => users.id, {
|
createdBy: uuid("createdBy").references(() => users.id, {
|
||||||
|
|||||||
Reference in New Issue
Block a user