Commit Graph

5 Commits

Author SHA1 Message Date
72d8e35e06 refactor(frontend): migrate Customer domain to centralized API services
- Replaced all direct axios imports with service layer calls across 8 customer files
- Migrated core pages: home.vue, create.vue, edit.vue
- Migrated profile pages: profile.vue (1100+ lines), TankEstimation.vue
- Migrated supporting pages: ServicePlanEdit.vue, tank/edit.vue, list.vue

Services integrated:
- customerService: CRUD, descriptions, tank info, automatic status
- authService: authentication and Authorize.net account management
- paymentService: credit cards, transactions, payment authorization
- deliveryService: delivery records and automatic delivery data
- serviceService: service calls, parts, and service plans
- adminService: statistics, social comments, and reports
- queryService: dropdown data (customer types, states)

Type safety improvements:
- Updated paymentService.ts with accurate AxiosResponse types
- Fixed response unwrapping to match api.ts interceptor behavior
- Resolved all TypeScript errors in customer domain (0 errors)

Benefits:
- Consistent authentication via centralized interceptors
- Standardized error handling across all API calls
- Improved type safety with proper TypeScript interfaces
- Single source of truth for API endpoints
- Better testability through mockable services

Verified with vue-tsc --noEmit - all customer domain files pass type checking
2026-02-01 13:00:21 -05:00
53086515ba fix: resolve TypeScript build errors for production builds
- Add local AxiosResponse/AxiosError interfaces to models.ts as workaround
  for bundler moduleResolution issues with axios types
- Update 7 payment Vue files to import axios types from local models
- Convert axios.get<T>() generic calls to typed .then() response callbacks
- Fix type narrowing in getTypeColor(), getEmployeeTypeName() functions
- Add Number() conversion for tank_size arithmetic in auto preauth
- Use 'as unknown as' for Delivery to DeliveryFormData type assertions
- Fix incorrect import paths for sidebar/footer in delivery/create.vue

Production build (npm run build) now completes successfully.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:33:13 -05:00
f9b5364c53 major claude changes 2026-01-28 21:55:14 -05:00
661aaf39b0 fixed auto query profile 2025-10-30 20:39:14 -04:00
279f0d9deb Working API CHARGING! 2025-09-20 15:33:25 -04:00