feat: 5-tier pricing UI, market ticker, delivery map, and stats dashboard

Full frontend companion to the API updates:

- Pricing: Oil price admin page now supports 5-tier configuration for
  same-day/prime/emergency fees with collapsible tier sections
- Market Ticker: Add GlobalMarketTicker and OilPriceTicker components
  with real-time commodity + competitor prices in header bar
- Delivery Map: New interactive Leaflet map view for daily deliveries
- Stats: Add PricingHistoryChart component and info pages for market
  trends with daily/weekly/monthly gallon charts and YoY comparisons
- Layout: Refactor header navbar to separate search into navbar-center,
  add oilPrice Pinia store with polling, update sidebar navigation
- Forms: Wire tier selection into delivery create/edit flows, update
  types and services for new pricing and scraper API endpoints

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-08 17:54:30 -05:00
parent 6c28c0c2d2
commit 1a53e50d91
69 changed files with 4756 additions and 3040 deletions

View File

@@ -107,7 +107,24 @@ export const paymentService = {
linkTransactionToAuto: (transactionId: number, autoId: number, data?: Record<string, unknown>): Promise<AxiosResponse<{ ok: boolean }>> =>
authorizeApi.put(`/api/transaction/${transactionId}/update_auto_id/${autoId}`, data ?? {}),
// Check authorize account status
checkAccount: (customerId: number): Promise<AxiosResponse<{ profile_exists: boolean; has_payment_methods: boolean; missing_components: string[]; valid_for_charging: boolean }>> =>
authorizeApi.get(`/user/check-authorize-account/${customerId}`),
},
// Convenience wrappers for commonly used operations
getCardById: (id: number): Promise<AxiosResponse<CardResponse>> =>
api.get(`/payment/card/${id}`),
checkAuthorizeAccount: (customerId: number): Promise<AxiosResponse<{ profile_exists: boolean; has_payment_methods: boolean; missing_components: string[]; valid_for_charging: boolean }>> =>
authorizeApi.get(`/user/check-authorize-account/${customerId}`),
createAuthorizeCard: (customerId: number, data: TokenizeCardRequest): Promise<AxiosResponse<CardResponse>> =>
authorizeApi.post(`/api/payments/customers/${customerId}/cards`, data),
updateAuthorizeCard: (customerId: number, cardId: number, data: UpdateTokenizedCardRequest): Promise<AxiosResponse<CardResponse>> =>
authorizeApi.put(`/api/payments/customers/${customerId}/cards/${cardId}`, data),
};
export default paymentService;