Commit Graph

87 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
5060ca8d9b Update capture endpoint to match backend refactor
- Update capture URL from /api/capture/ to /api/payments/capture
2026-02-01 12:32:05 -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
079c2ac50f Updated claude big changes 2026-01-29 08:44:06 -05:00
f9b5364c53 major claude changes 2026-01-28 21:55:14 -05:00
f9d0e4c0fd updated readme 2026-01-18 19:04:01 -05:00
68f5b6eafc Added totals to delivery 2026-01-05 09:14:13 -05:00
65cfd0c463 Working site 2026-01-05 08:44:20 -05:00
623cbf8c4c fixes for docker local 2025-11-03 20:55:06 -05:00
661aaf39b0 fixed auto query profile 2025-10-30 20:39:14 -04:00
e70ae887f3 added cancel button 2025-10-20 12:01:16 -04:00
78e959883d bug autyo 2025-10-13 11:10:21 -04:00
4a40bffbd5 Small ui fixes 2025-10-13 10:40:37 -04:00
cf7e5299b8 Updated auto finalize button 2025-10-12 12:10:51 -04:00
f42444e81d added hot water 2025-10-06 21:13:28 -04:00
91d6d708dc fixed auto pathing 2025-09-28 12:24:29 -04:00
9cbb2954b5 config issues prod 2025-09-27 14:25:45 -04:00
d6525f2d24 working auto 2025-09-27 00:13:40 -04:00
99eacbb51d working auto 2025-09-26 20:30:59 -04:00
c57ceb7e47 Added call dropdown 2025-09-24 16:38:56 -04:00
a9ee292b23 updated user customer list 2025-09-21 19:10:23 -04:00
279f0d9deb Working API CHARGING! 2025-09-20 15:33:25 -04:00
b77e5b4b9d updated pay oil 2025-09-20 08:38:32 -04:00
ce86bab1dc added popup 2025-09-19 19:08:13 -04:00
481420e795 Fixed bug edit delivery 2025-09-19 17:37:17 -04:00
16da5bf1c0 Working payment accopunts 2025-09-19 17:27:34 -04:00
886e7ed3ff small routing changes 2025-09-18 19:31:13 -04:00
f7bc23d9ed fixes to amounts 2025-09-18 14:12:41 -04:00
dc71eee4db working charge 2025-09-18 13:20:03 -04:00
6baefe9f50 Good progress 2025-09-18 13:02:28 -04:00
827debd1cc small frontend changed 2025-09-16 13:52:16 -04:00
bd95e14bb3 Working flow authorize 2025-09-16 12:45:42 -04:00
3cf6d1911a Adding authnet not tested 2025-09-15 15:30:50 -04:00
7d59c07881 Updated office 2025-09-14 12:00:23 -04:00
98fe855e65 Updated charge close to working 2025-09-09 18:26:21 -04:00
fd11c9e794 work 2025-09-07 18:29:42 -04:00
ea52f7ba62 Working authorize needs work 2025-09-07 17:52:47 -04:00
6978ed30e1 fixed profile 2025-09-06 14:55:02 -04:00
e74f5510f0 small fixes routing 2025-09-06 13:40:58 -04:00
8649c3815c Updated sidebar 2025-09-06 12:42:34 -04:00
3282229116 Added service plan. Password change 2025-09-06 12:28:44 -04:00
9d86b4a60e Fixed page layout and edit delivery 2025-09-06 09:44:01 -04:00
45b536baca Updated sibar 2025-09-05 11:39:35 -04:00
af9e6882ba Updated form for creating delivery 2025-09-04 15:07:21 -04:00
1531b0f240 Fixed error with numbers sidebaar not updating 2025-09-04 11:23:18 -04:00
dc1ee95827 Working log in/route guard 2025-09-04 08:03:24 -04:00
992a1a217d Major Refactor 2025-09-01 16:42:44 -04:00
76cbca94e3 Added price for service 2025-08-26 17:19:41 -04:00
87a50fa37c Updated auto desc 2025-08-25 18:29:13 -04:00
adc1606312 tons fixes 2025-08-25 17:58:30 -04:00