Skip to Content
BBRICKSv0.7.4
PR PortalChallenges

RequestHandled

A brand request that is no longer waiting (the v3 mock's P.request with no request): "Request handled", that it was already handled, and "Back to challenges". A status card, for a link to a request someone else approved or rejected. Title the page with the same words.

import { RequestHandled } from '@ergasti/bricks';

Examples

A brand request's side cards

The brand's wallet against the requested budget ("Enough…", or a red "Not enough…" worked out in exact cents), and the gifts sent for the challenge with their status.

Code
import { RequestGiftsCard, RequestWalletCard } from '@ergasti/bricks';

function SideCards() {
  return (
    <div style={{ display: 'grid', gap: 16, maxWidth: 380 }}>
      <RequestWalletCard brandName="Nile Threads" health="ok" available="22000.00" requested="15000.00" money={{ decimals: 'auto' }} />
      <RequestWalletCard brandName="Mira Beauty" health="low" available="5200.00" requested="8000.00" money={{ decimals: 'auto' }} />
      <RequestGiftsCard claims={[{ id: 'GS-0015', claimed: 25, status: 'gift_expected' }]} onOpen={() => {}} />
    </div>
  );
}

Request handled

A link to a request someone already approved or rejected: RequestHandled with the way back.

Code (not run)
import { RequestHandled } from '@ergasti/bricks';

function Handled() {
  return <RequestHandled onBack={() => {}} />;
}

In Arabic

Pinned to Arabic
Code (not run)
import { RequestGiftsCard, RequestWalletCard } from '@ergasti/bricks';

function Arabic() {
  return (
    <div style={{ display: 'grid', gap: 16, maxWidth: 380 }}>
      <RequestWalletCard brandName="Nile Threads" health="ok" available="22000.00" requested="15000.00" money={{ decimals: 'auto' }} />
      <RequestGiftsCard claims={[]} />
    </div>
  );
}

Props

Prop

Type

Labels

Every word this component draws, in both languages. Override one per component and language with BricksProvider labels under the key prRequestCards, or with the component's own prop where it has one. A {name} is a value the component fills in.

prRequestCards
KeyEnglishArabic
wallet{brand} walletمحفظة {brand}
availableAvailableالمتاح
requestedRequested budgetالميزانية المطلوبة
enoughEnough to hold the full budget.كفاية تحجز الميزانية كلها.
shortNot enough. Ask the brand to top up first.مش كفاية. اطلب من البراند يشحن الأول.
giftsGifts sent for this challengeالهدايا اللي اتبعتت للتحدي ده
claimed{n} claimed{n} متبلّغ عنهم
confirmed{n} confirmed{n} اتأكدوا
giftsNoteApprove now if you like: the challenge goes live only once these gifts are confirmed.وافق دلوقتي لو حابب: التحدي هيبدأ بس لما الهدايا دي تتأكد.
noGiftsNo gifts sent for it yet.لسه مفيش هدايا اتبعتت ليه.
handledRequest handledالطلب اتعامل معاه
handledTextThis request was already handled.الطلب ده اتعامل معاه قبل كده.
backBack to challengesارجع للتحديات

Design guidance

How the BRICKS design system uses RequestHandled. Written in docs/content/components/RequestHandled.md; the props above are read from the code, which wins where the two disagree.

The status card for a brand request that is no longer waiting: a lime check, "Request handled", "This request was already handled." and "Back to challenges"; render it as the whole body of the request page when someone opens a link to a request that was already approved or rejected.

It is the PR v3 mock's P.request fallback (title: 'Request handled' with <div class="card empty">This request was already handled. <a>Back to challenges</a></div>). Use RequestHandled instead of composing PrEmpty with your own link, and title the page with the same words ("Request handled") through PrPortalFrame's title.

Anatomy

  1. Card (PrEmpty card): bordered, --r-lg, centred column, 36px padding, role="status".
  2. Icon: 52px lime IconSquare with a check.
  3. Title: "Request handled" (bold ink).
  4. Text: "This request was already handled." (text replaces it: who handled it, and when).
  5. Action (with onBack): "Back to challenges", a raspberry text-link button.

Variants

PropLookWhen to use
defaultTitle, text, no actionNowhere to go back to.
onBackAdds "Back to challenges"Always in the app: back to Affiliate programs › Challenges › Brand requests.
textYour lineSay who handled it and when ("Approved by Mona on 14 Nov.").

States

Static. The back link has hover (underline) and focus-visible.

Usage

// PR Portal › Affiliate programs › Challenges › Brand request, when the request is gone
import { PrPortalFrame, RequestHandled } from '@ergasti/bricks';

export function HandledRequestPage({ backToRequests }: { backToRequests: () => void }) {
  return (
    <PrPortalFrame activeId="programs" title="Request handled" breadcrumbs={<><a href="/challenges?tab=req">Brand requests</a> / Nile Threads</>}>
      <RequestHandled onBack={backToRequests} text="Approved by Mona on 14 Nov 2026. The challenge is in the builder." />
    </PrPortalFrame>
  );
}

Where it appears

  • PR Portal › Affiliate programs › Challenges › Brand requests › a request that was already handled (the request page's fallback; PR · Brand request, Brand requests).

Guidelines

Do

  • Show it instead of the request page body (not beside it) when the request is no longer waiting.
  • Title the page "Request handled" too.
  • Use text to say who handled it and when, when you know.

Don't

  • Don't show a stale BrandRequestCard with its Approve / Reject for a handled request.
  • Don't use it for an empty list; that is PrEmpty or the list's own empty state.

RTL and Arabic

  • Centred, so nothing moves. Its words: "الطلب اتعامل معاه", "الطلب ده اتعامل معاه قبل كده.", "ارجع للتحديات".

Tokens

--line, --r-lg, --card, --ink, --ink-3, --rasp (the back link); IconSquare lime tokens.

Accessibility

  • role="status" (a polite live region, from PrEmpty); the icon is aria-hidden and the title carries the meaning.
  • "Back to challenges" is a native <button type="button">.

Found in the source

  • Roles in the markup: status.

Read from the component's source and tests. See Accessibility for the patterns the library follows.

See also: Card · useLanguage · MiniList · MiniRow · PrStatusPill · WalletHealthPill · SummaryLine · SummarySection · BuilderStepCard · ChallengeAudienceFields

Source

src/pr/challenges/BrandRequestCardParts.tsx (line 159) on GitHub.

On this page