Skip to content

Commit d3e0687

Browse files
authored
Partner rejection updates (dubinc#3671)
1 parent 3390812 commit d3e0687

3 files changed

Lines changed: 27 additions & 22 deletions

File tree

apps/web/lib/zod/schemas/partners.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ export const bulkApprovePartnersSchema = z.object({
846846
});
847847

848848
/** Max length for optional `rejectionNote` on `ProgramApplication`. */
849-
export const PROGRAM_APPLICATION_REJECTION_NOTE_MAX_LENGTH = 5000;
849+
export const PROGRAM_APPLICATION_REJECTION_NOTE_MAX_LENGTH = 500;
850850

851851
export const rejectPartnerSchema = z.object({
852852
workspaceId: z.string(),

apps/web/ui/modals/reject-partner-application-modal.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,17 @@ export function RejectPartnerApplicationModal({
176176
</div>
177177

178178
<div>
179-
<label
180-
htmlFor="reject-rejection-note"
181-
className="block text-sm font-medium text-neutral-900"
182-
>
183-
Additional notes (optional)
184-
</label>
179+
<div className="flex items-center justify-between">
180+
<label
181+
htmlFor="reject-rejection-note"
182+
className="block text-sm font-medium text-neutral-900"
183+
>
184+
Additional notes (optional)
185+
</label>
186+
<span className="text-xs text-neutral-400">
187+
{rejectionNote.length}/{PROGRAM_APPLICATION_REJECTION_NOTE_MAX_LENGTH}
188+
</span>
189+
</div>
185190
<div className="relative mt-1.5 rounded-md shadow-sm">
186191
<textarea
187192
id="reject-rejection-note"

apps/web/ui/partners/program-card.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ProgramEnrollmentProps } from "@/lib/types";
77
import {
88
BlurImage,
99
CalendarIcon,
10-
CircleInfo,
10+
CircleQuestion,
1111
DynamicTooltipWrapper,
1212
Link4,
1313
MiniAreaChart,
@@ -31,18 +31,18 @@ function RejectionTooltipRow({
3131
valueClassName?: string;
3232
}) {
3333
return (
34-
<div className="flex gap-3">
35-
<div className="mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg bg-neutral-100 text-neutral-600">
34+
<div className="flex w-full items-start gap-2">
35+
<div className="flex size-[34px] shrink-0 items-center justify-center rounded-lg bg-neutral-100 text-neutral-500">
3636
{icon}
3737
</div>
3838
<div className="min-w-0 flex-1">
39-
<p className="text-[11px] font-semibold uppercase tracking-wide text-neutral-500">
39+
<p className="text-[10px] font-bold uppercase leading-[14px] tracking-[0.2px] text-neutral-800">
4040
{label}
4141
</p>
4242
<p
4343
className={
4444
valueClassName ??
45-
"mt-0.5 text-sm font-medium leading-snug text-neutral-800"
45+
"mt-0.5 text-xs font-normal leading-4 tracking-[-0.24px] text-neutral-500"
4646
}
4747
>
4848
{value}
@@ -70,10 +70,17 @@ function rejectedApplicationTooltipContent(
7070
}
7171

7272
return (
73-
<div className="flex w-full min-w-0 max-w-[min(100vw-2rem,17.5rem)] flex-col gap-3.5 self-start px-4 py-3 text-left">
73+
<div className="flex w-full min-w-0 max-w-[min(100vw-2rem,17.5rem)] flex-col gap-2 p-3 pb-4 text-left">
74+
{reviewedAt ? (
75+
<RejectionTooltipRow
76+
icon={<CalendarIcon className="size-4 shrink-0" aria-hidden />}
77+
label="Reviewed"
78+
value={formatDate(reviewedAt)}
79+
/>
80+
) : null}
7481
{reasonLabel ? (
7582
<RejectionTooltipRow
76-
icon={<CircleInfo className="size-4 shrink-0" aria-hidden />}
83+
icon={<CircleQuestion className="size-4 shrink-0" aria-hidden />}
7784
label="Reason"
7885
value={reasonLabel}
7986
/>
@@ -83,14 +90,7 @@ function rejectedApplicationTooltipContent(
8390
icon={<Note className="size-4 shrink-0" aria-hidden />}
8491
label="Notes"
8592
value={note}
86-
valueClassName="mt-0.5 whitespace-pre-wrap text-sm font-normal leading-snug text-neutral-700"
87-
/>
88-
) : null}
89-
{reviewedAt ? (
90-
<RejectionTooltipRow
91-
icon={<CalendarIcon className="size-4 shrink-0" aria-hidden />}
92-
label="Reviewed"
93-
value={formatDate(reviewedAt)}
93+
valueClassName="mt-0.5 whitespace-pre-wrap text-xs font-reg leading-4 tracking-[-0.24px] text-neutral-500"
9494
/>
9595
) : null}
9696
</div>

0 commit comments

Comments
 (0)