Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-07-11 12:12:40 +08:00
parent 01a2c63b06
commit 71f758fe0b
66 changed files with 3055 additions and 939 deletions
+14 -13
View File
@@ -1,4 +1,4 @@
import { Users, GitFork, FolderOpen, BookText, BookCheck, FileText, ListCheck, ShieldCheck, Megaphone, Bell, Trophy } from "lucide-react";
import { Users, GitFork, FolderOpen, BookText, BookCheck, FileText, ListCheck, ShieldCheck, Megaphone, Bell, Trophy, Cog } from "lucide-react";
export const ADMIN_SECTIONS = [
{
@@ -18,18 +18,10 @@ export const ADMIN_SECTIONS = [
title: "Resource Management",
description: "It includes assets management and tier plans.",
tiles: [
{ key: "resources", label: "Resources", icon: FolderOpen, link: "/admin/resources" },
{ key: "assets", label: "Assets", icon: FolderOpen, link: "/admin/assets" },
{ key: "tiers", label: "Tier Plans", icon: ShieldCheck, link: "/admin/tiers/plans" },
],
},
// {
// id: "section-assets",
// tab: "Resource Management",
// title: "Resource Management",
// description: "It includes assets management and tier plans.",
// tiles: [
// { key: "assets", label: "Resources", icon: FolderOpen, link: "/admin/assets" },
// ],
// },
{
id: "section-courses",
tab: "Content Management",
@@ -40,7 +32,7 @@ export const ADMIN_SECTIONS = [
{ key: "units", label: "Units", icon: BookCheck, link: "/admin/units" },
{ key: "lessons", label: "Lessons", icon: FileText, link: "/admin/lessons" },
{ key: "tasks", label: "Tasks", icon: ListCheck, link: "/admin/taskList" },
// { key: "tiers", label: "Tier Plans", icon: ShieldCheck, link: "/admin/tiers/plans" },
],
},
{
@@ -50,8 +42,17 @@ export const ADMIN_SECTIONS = [
description: "Manage public-facing content",
tiles: [
{ key: "advertisements", label: "Advertisements", icon: Megaphone, link: "/admin/advertisements" },
{ key: "notifications", label: "Announcements", icon: Bell, link: "/admin/notifications" },
{ key: "notifications", label: "Announcements", icon: Bell, link: "/admin/announcements" },
{ key: "achievements", label: "Achievements", icon: Trophy, link: "/admin/achievements" },
],
},
{
id: "section-system",
tab: "System",
title: "System",
description: "Background jobs and automation",
tiles: [
{ key: "jobs", label: "Jobs", icon: Cog, link: "/admin/jobs" },
],
},
];
+6
View File
@@ -6,6 +6,9 @@ import { Megaphone, Image, BellRing, PanelRight } from "lucide-react";
// and which fields the Add/Edit form shows (hero needs headline/description/ctas,
// banner/popup/sidebar are closer to image-only).
// TODO(ads-1): Once placements are re-categorized (Hero -> Dashboard, Banner ->
// Tier Plans) and popup/sidebar placements are removed, drop the "popup" and
// "sidebar" entries here too — see data/placement.data.js.
export const ADVERTISEMENT_TYPES = [
{ value: "hero", label: "Hero", icon: Megaphone, description: "Large featured banner with headline, description, and CTAs" },
{ value: "banner", label: "Banner", icon: Image, description: "Simple image banner" },
@@ -23,6 +26,9 @@ export const RICH_CONTENT_TYPES = ["hero"];
// ─── Statuses ───────────────────────────────────────────────────────────────
// Drives: filter dropdown options, status badge color/label on each card.
// TODO(ads-4): Remove "archived" from this list — it should no longer show up
// in the "All statuses" filter on AdvertisementList.jsx (archived ads live in
// their own separate Archived list/table, not mixed into the active filter).
export const ADVERTISEMENT_STATUSES = [
{ value: "draft", label: "Draft", badgeClass: "bg-muted text-muted-foreground" },
{ value: "active", label: "Active", badgeClass: "bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-400" },
+4
View File
@@ -6,6 +6,10 @@
// backend registry when adding a new placement — same pattern as ADVERTISEMENT_TYPES already
// mirroring the backend type ENUM.
// TODO(ads-1): Re-categorize placements — Hero -> Dashboard, Banner -> Tier Plans.
// Remove the "popup" and "sidebar" formats entirely (dashboard.popup,
// course_details.sidebar). Keep in sync with the backend registry at
// new_starr/models/advertisements/advertisements.placements.js.
export const PLACEMENTS = [
{ key: "dashboard.hero", format: "hero", page: "dashboard", pageLabel: "Dashboard", slotLabel: "Hero (top of page)" },
{ key: "dashboard.popup", format: "popup", page: "dashboard", pageLabel: "Dashboard", slotLabel: "Popup (on load)" },