diff --git a/src/components/admin/awards/AwardAutomationView.tsx b/src/components/admin/awards/AwardAutomationView.tsx index 43128c78..5b869335 100644 --- a/src/components/admin/awards/AwardAutomationView.tsx +++ b/src/components/admin/awards/AwardAutomationView.tsx @@ -1,11 +1,16 @@ "use client"; import * as React from "react"; -import { Button } from "@/components/ui/button"; -import { Badge } from "@/components/ui/badge"; +import { Button } from "@payloadcms/ui"; import { runAwardEvaluation, applyAwardGrants } from "@/lib/awards/automationActions"; import type { EvaluationResult } from "@/lib/awards/automation"; +const panelStyle: React.CSSProperties = { + border: "1px solid var(--theme-elevation-150)", + borderRadius: "3px", + background: "var(--theme-elevation-50)", +}; + /** * Admin view (award-rules collection): preview which members currently * qualify under the active rules, then apply the grants. Both actions are @@ -40,68 +45,164 @@ export default function AwardAutomationView() { setResult(res.result); }; - return ( -
- Evaluate every active award rule against all members. Preview first: nothing is written - until you apply. Applying is safe to repeat, members who already hold an award are skipped. -
+ const grantCount = result ? result.plans.filter((p) => p.kind === "grant").length : 0; + const upgradeCount = result ? result.plans.filter((p) => p.kind === "upgrade").length : 0; -