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>
This commit is contained in:
2026-01-29 15:33:13 -05:00
parent 079c2ac50f
commit 53086515ba
12 changed files with 65 additions and 32 deletions

View File

@@ -130,7 +130,8 @@ export default defineComponent({
});
});
},
getEmployeeTypeName(typeId: number | string): string {
getEmployeeTypeName(typeId: number | string | undefined): string {
if (typeId === undefined) return 'Unknown Role';
const typeMap: { [key: string]: string } = {
'0': 'Owner', '1': 'Manager', '2': 'Secretary', '3': 'Office',
'4': 'Driver', '5': 'Service Tech', '6': 'Contractor', '7': 'Cash Driver', '8': 'Driver/Tech'