Phase2: Invoicecomputation/AdminpricingUI/Ainvoicemgnt
Some checks failed
Build and Push / build (push) Failing after 45s
Some checks failed
Build and Push / build (push) Failing after 45s
This commit is contained in:
@@ -33,7 +33,7 @@ export default async function AdminBillingPricingPage() {
|
||||
const catalog = Object.values(PACKAGE_CATALOG).map((p) => ({
|
||||
id: p.id,
|
||||
name: p.name,
|
||||
kind: p.kind,
|
||||
category: p.category,
|
||||
}));
|
||||
|
||||
return (
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { PlatformPricing, SkillPricing } from "@/types";
|
||||
interface CatalogEntry {
|
||||
id: string;
|
||||
name: string;
|
||||
kind: string;
|
||||
category: string;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
@@ -82,7 +82,7 @@ export function PricingEditor({
|
||||
// Server is authoritative — we don't keep an editable local copy of the
|
||||
// table; instead each action posts to the API and we router.refresh().
|
||||
const [newSkillId, setNewSkillId] = useState(
|
||||
catalog.find((c) => c.kind === "skill")?.id ?? ""
|
||||
catalog.find((c) => c.category === "skill")?.id ?? ""
|
||||
);
|
||||
const [newSkillPrice, setNewSkillPrice] = useState("0.10");
|
||||
const [addingSkill, setAddingSkill] = useState(false);
|
||||
@@ -137,7 +137,7 @@ export function PricingEditor({
|
||||
|
||||
// Catalog filtered to skill-kind entries for the picker, but keeping
|
||||
// existing pricing rows even if they reference non-skill packages.
|
||||
const skillCatalogOptions = catalog.filter((c) => c.kind === "skill");
|
||||
const skillCatalogOptions = catalog.filter((c) => c.category === "skill");
|
||||
const catalogIndex = new Map(catalog.map((c) => [c.id, c]));
|
||||
const pricedIds = new Set(initialSkillPricing.map((s) => s.skillId));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user