Skip to Content
BBRICKSv0.7.4
Screens

Motivation · Gifts

Gift KPIs, rules and stock, the gift orders, a gift's drawer, the choose-gifts modal and a gift order's drawer.

Gift KPIs, rules and stock, the gift orders, a gift's drawer, the choose-gifts modal and a gift order's drawer. Composed in MotivationScreen.tsx (its view prop) from BRICKS exports only, with the v3 brand mock's numbers.

Motivation › Gifts

Gift KPIs, the read-only GiftRulesCard, GiftStockList and the gift orders table.

Pinned to TRNDR preset
Code
import type { Lang } from '@ergasti/bricks';
import { useLanguage } from '@ergasti/bricks';
import { BRAND_SUB_SCREENS } from '../../../packages/bricks/src/gallery/screens/BrandSubScreens';

const view = (id: string, language: Lang) => {
  const { Screen } = BRAND_SUB_SCREENS[id];
  return <Screen language={language} />;
};

function Gifts() { return view('motivation-gifts', useLanguage()); }

A gift product open

DrawerHead, stock figures and who picked it.

Pinned to TRNDR preset
Code
import type { Lang } from '@ergasti/bricks';
import { useLanguage } from '@ergasti/bricks';
import { BRAND_SUB_SCREENS } from '../../../packages/bricks/src/gallery/screens/BrandSubScreens';

const view = (id: string, language: Lang) => {
  const { Screen } = BRAND_SUB_SCREENS[id];
  return <Screen language={language} />;
};

function GiftDrawer() { return view('gift-drawer', useLanguage()); }

Choosing gift products

GiftProductsPicker in a modal: products, units and what is already picked.

Pinned to TRNDR preset
Code
import type { Lang } from '@ergasti/bricks';
import { useLanguage } from '@ergasti/bricks';
import { BRAND_SUB_SCREENS } from '../../../packages/bricks/src/gallery/screens/BrandSubScreens';

const view = (id: string, language: Lang) => {
  const { Screen } = BRAND_SUB_SCREENS[id];
  return <Screen language={language} />;
};

function ChooseGifts() { return view('gifts-choose', useLanguage()); }

A gift order open

DrawerHead with the creator, the picked date and status, and the delivery steps.

Pinned to TRNDR preset
Code
import type { Lang } from '@ergasti/bricks';
import { useLanguage } from '@ergasti/bricks';
import { BRAND_SUB_SCREENS } from '../../../packages/bricks/src/gallery/screens/BrandSubScreens';

const view = (id: string, language: Lang) => {
  const { Screen } = BRAND_SUB_SCREENS[id];
  return <Screen language={language} />;
};

function GiftOrder() { return view('gift-order', useLanguage()); }

How it is built

  • view="gifts": a Banner, then StatGrid columns={5} of KpiCards. Shipped, Not delivered and Delivered set the table's status chip through active / onClick.
  • GiftRulesCard readOnly (pick, one per challenge, 90-day cooldown) beside GiftStockList (onOpen, onChoose).
  • In a Card: ListToolbar (search, chips, sort, export, collapseFiltersBelow={600}) and DataTable of gift orders (CreatorCell, gift, date, StatusPill) with a Pager.
  • view="gift": Drawer hideTitle with DrawerHead (ProductThumb lead), KeyValue and RowItems (heading) of who picked it.
  • view="choose": Modal with GiftProductsPicker (picked and units per product).
  • view="giftOrder": Drawer with DrawerHead (Avatar lead), KeyValue and a StepTimeline for delivery.