diff --git a/frontend/package.json b/frontend/package.json index f38bdcd..3a48c6d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vue-tsc && vite build", + "build": "vue-tsc --noEmit && vite build", "preview": "vite preview" }, "dependencies": { @@ -26,7 +26,6 @@ "typescript": "^5.2.2", "vite": "^5.1.4", "vue-tsc": "^2.0.6", - "@tailwindcss/forms": "^0.5.7", - "@types/axios": "^0.14.0" + "@tailwindcss/forms": "^0.5.7" } } \ No newline at end of file diff --git a/frontend/src/types/index.d.ts b/frontend/src/types/index.d.ts new file mode 100644 index 0000000..03659da --- /dev/null +++ b/frontend/src/types/index.d.ts @@ -0,0 +1,31 @@ +declare module '*.vue' { + import type { DefineComponent } from 'vue' + const component: DefineComponent<{}, {}, any> + export default component +} + +interface LoginResponse { + access_token: string + token_type: string + [key: string]: any +} + +interface Employee { + id: number + first_name: string + last_name: string + department: string + office: string + created_at: string +} + +interface Request { + id: number + employee_id: number + department: string + request_type: string + priority: string + description: string + status: string + created_at: string +} \ No newline at end of file diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 1ed1de8..2fb2812 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -1,42 +1,23 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ESNext", "useDefineForClassFields": true, "module": "ESNext", - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, + "moduleResolution": "node", + "strict": true, + "jsx": "preserve", "resolveJsonModule": true, "isolatedModules": true, + "esModuleInterop": true, + "lib": ["ESNext", "DOM"], + "skipLibCheck": true, "noEmit": true, - "jsx": "preserve", - - /* Linting */ - "strict": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noFallthroughCasesInSwitch": true, - - /* Paths */ "baseUrl": ".", "paths": { - "@/*": ["src/*"] + "@/*": ["./src/*"] }, - - /* Additional Options */ - "allowJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true + "types": ["node", "vite/client"] }, - "include": [ - "src/**/*.ts", - "src/**/*.d.ts", - "src/**/*.tsx", - "src/**/*.vue", - "vite.config.ts" - ], + "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], "references": [{ "path": "./tsconfig.node.json" }] } \ No newline at end of file diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json index 4eb43d0..aac0ce5 100644 --- a/frontend/tsconfig.node.json +++ b/frontend/tsconfig.node.json @@ -1,11 +1,9 @@ { "compilerOptions": { "composite": true, - "skipLibCheck": true, "module": "ESNext", - "moduleResolution": "bundler", - "allowSyntheticDefaultImports": true, - "strict": true + "moduleResolution": "Node", + "allowSyntheticDefaultImports": true }, "include": ["vite.config.ts"] } \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 3999316..3c69c55 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -11,6 +11,11 @@ export default defineConfig({ }, }, server: { + host: true, + port: 5173, + watch: { + usePolling: true + }, proxy: { '/api': { target: 'http://backend:8000',