Step 4: Add admin UI page for pricing configuration
- Add pricing API functions to admin.ts - Create admin pricing page with form and validation - Add MANAGE_PRICING permission to auth context - Add pricing to admin navigation - Add translations for pricing page (en, ca, es) - Update PageLayout and Header types for new page
This commit is contained in:
parent
4d0dad8e2b
commit
d838d1be96
11 changed files with 509 additions and 5 deletions
|
|
@ -6,6 +6,8 @@ type PaginatedInvites = components["schemas"]["PaginatedResponse_InviteResponse_
|
|||
type AdminExchangeResponse = components["schemas"]["AdminExchangeResponse"];
|
||||
type AvailabilityResponse = components["schemas"]["AvailabilityResponse"];
|
||||
type PriceHistoryRecord = components["schemas"]["PriceHistoryResponse"];
|
||||
type PricingConfigResponse = components["schemas"]["PricingConfigResponse"];
|
||||
type PricingConfigUpdate = components["schemas"]["PricingConfigUpdate"];
|
||||
|
||||
interface CreateInviteRequest {
|
||||
godfather_id: number;
|
||||
|
|
@ -153,4 +155,18 @@ export const adminApi = {
|
|||
fetchPrice(): Promise<PriceHistoryRecord> {
|
||||
return client.post<PriceHistoryRecord>("/api/audit/price-history/fetch", {});
|
||||
},
|
||||
|
||||
/**
|
||||
* Get current pricing configuration
|
||||
*/
|
||||
getPricingConfig(): Promise<PricingConfigResponse> {
|
||||
return client.get<PricingConfigResponse>("/api/admin/pricing");
|
||||
},
|
||||
|
||||
/**
|
||||
* Update pricing configuration
|
||||
*/
|
||||
updatePricingConfig(request: PricingConfigUpdate): Promise<PricingConfigResponse> {
|
||||
return client.put<PricingConfigResponse>("/api/admin/pricing", request);
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue