From 229bfe0b79a153b4c025f43cbc25d6342217ad7c Mon Sep 17 00:00:00 2001 From: ThompsonNye Date: Wed, 18 Jun 2025 20:54:04 +0200 Subject: [PATCH] Add import paths --- src/Vegasco-Web/src/app/api/cars/car-client.ts | 10 +++++----- src/Vegasco-Web/src/app/auth/auth.config.ts | 14 +++++++------- .../entries/entries/entries.component.ts | 18 ++++++------------ src/Vegasco-Web/tsconfig.json | 6 ++++++ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Vegasco-Web/src/app/api/cars/car-client.ts b/src/Vegasco-Web/src/app/api/cars/car-client.ts index 8039ccd..ee13171 100644 --- a/src/Vegasco-Web/src/app/api/cars/car-client.ts +++ b/src/Vegasco-Web/src/app/api/cars/car-client.ts @@ -1,14 +1,14 @@ -import {inject, Injectable} from "@angular/core"; -import {HttpClient} from '@angular/common/http'; -import {map, Observable} from 'rxjs'; -import {API_BASE_PATH} from '../api-base-path'; +import { HttpClient } from '@angular/common/http'; +import { inject, Injectable } from "@angular/core"; +import { map, Observable } from 'rxjs'; +import { API_BASE_PATH } from "../api-base-path"; @Injectable({ providedIn: 'root', }) export class CarClient { private readonly http = inject(HttpClient); - private readonly apiBasePath = inject(API_BASE_PATH, {optional: true}); + private readonly apiBasePath = inject(API_BASE_PATH, { optional: true }); getAll(): Observable { return this.http.get(`${this.apiBasePath}/v1/cars`); diff --git a/src/Vegasco-Web/src/app/auth/auth.config.ts b/src/Vegasco-Web/src/app/auth/auth.config.ts index ad6227b..db5d77b 100644 --- a/src/Vegasco-Web/src/app/auth/auth.config.ts +++ b/src/Vegasco-Web/src/app/auth/auth.config.ts @@ -1,12 +1,12 @@ -import { environment } from '../../environments/environment'; +import { environment } from '@vegasco-web/environments/environment'; import { - provideKeycloak, - createInterceptorCondition, - IncludeBearerTokenCondition, - INCLUDE_BEARER_TOKEN_INTERCEPTOR_CONFIG, - withAutoRefreshToken, AutoRefreshTokenService, - UserActivityService + createInterceptorCondition, + INCLUDE_BEARER_TOKEN_INTERCEPTOR_CONFIG, + IncludeBearerTokenCondition, + provideKeycloak, + UserActivityService, + withAutoRefreshToken } from 'keycloak-angular'; const serverHostBearerInterceptorCondition = createInterceptorCondition({ diff --git a/src/Vegasco-Web/src/app/modules/entries/entries/entries.component.ts b/src/Vegasco-Web/src/app/modules/entries/entries/entries.component.ts index dcc4e4d..c409771 100644 --- a/src/Vegasco-Web/src/app/modules/entries/entries/entries.component.ts +++ b/src/Vegasco-Web/src/app/modules/entries/entries/entries.component.ts @@ -1,26 +1,20 @@ import {AsyncPipe, CommonModule} from '@angular/common'; import { Component, inject } from '@angular/core'; -import { FormControl, ReactiveFormsModule } from '@angular/forms'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { ReactiveFormsModule } from '@angular/forms'; import { RouterLink } from '@angular/router'; -import { MessageService } from 'primeng/api'; +import { CarClient } from '@vegasco-web/api/cars/car-client'; +import { ConsumptionClient } from '@vegasco-web/api/consumptions/consumption-client'; import { ButtonModule } from 'primeng/button'; import { DataViewModule } from 'primeng/dataview'; -import { SelectModule } from 'primeng/select'; import { ScrollTopModule } from 'primeng/scrolltop'; +import { SelectModule } from 'primeng/select'; import { SkeletonModule } from 'primeng/skeleton'; import { - BehaviorSubject, - combineLatest, map, Observable, - of, - startWith, - tap, + tap } from 'rxjs'; -import { HttpClient } from '@angular/common/http'; -import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; -import {CarClient} from '../../../api/cars/car-client'; -import {ConsumptionClient} from '../../../api/consumptions/consumption-client'; @Component({ selector: 'app-entries', diff --git a/src/Vegasco-Web/tsconfig.json b/src/Vegasco-Web/tsconfig.json index e4955f2..7d4ffae 100644 --- a/src/Vegasco-Web/tsconfig.json +++ b/src/Vegasco-Web/tsconfig.json @@ -3,6 +3,12 @@ { "compileOnSave": false, "compilerOptions": { + "baseUrl": "./", + "paths": { + "@vegasco-web/*": ["src/app/*"], + "@vegasco-web/assets/*": ["assets/*"], + "@vegasco-web/environments/*": ["src/environments/*"] + }, "strict": true, "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true,