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) => ({
|
const catalog = Object.values(PACKAGE_CATALOG).map((p) => ({
|
||||||
id: p.id,
|
id: p.id,
|
||||||
name: p.name,
|
name: p.name,
|
||||||
kind: p.kind,
|
category: p.category,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import type { PlatformPricing, SkillPricing } from "@/types";
|
|||||||
interface CatalogEntry {
|
interface CatalogEntry {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
kind: string;
|
category: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -82,7 +82,7 @@ export function PricingEditor({
|
|||||||
// Server is authoritative — we don't keep an editable local copy of the
|
// 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().
|
// table; instead each action posts to the API and we router.refresh().
|
||||||
const [newSkillId, setNewSkillId] = useState(
|
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 [newSkillPrice, setNewSkillPrice] = useState("0.10");
|
||||||
const [addingSkill, setAddingSkill] = useState(false);
|
const [addingSkill, setAddingSkill] = useState(false);
|
||||||
@@ -137,7 +137,7 @@ export function PricingEditor({
|
|||||||
|
|
||||||
// Catalog filtered to skill-kind entries for the picker, but keeping
|
// Catalog filtered to skill-kind entries for the picker, but keeping
|
||||||
// existing pricing rows even if they reference non-skill packages.
|
// 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 catalogIndex = new Map(catalog.map((c) => [c.id, c]));
|
||||||
const pricedIds = new Set(initialSkillPricing.map((s) => s.skillId));
|
const pricedIds = new Set(initialSkillPricing.map((s) => s.skillId));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user