Compare commits

...

18 Commits

Author SHA1 Message Date
ff361495b5 root namens änderung
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 45s
2026-01-12 12:12:10 +01:00
489b08ddf7 navbar route korrigiert
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 45s
2026-01-12 12:07:42 +01:00
2bd38f43bb routes array korrigiert
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 45s
2026-01-12 12:05:53 +01:00
05ba7bda45 base href server test
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 46s
2026-01-12 12:00:15 +01:00
990be3d786 Navbar home route richtig gestellt
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 46s
2026-01-12 11:35:45 +01:00
003fa07151 base href updated
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 46s
2026-01-12 11:16:52 +01:00
a2e9469498 Default Route sollte nicht auf /Produktbaum weiterleiten.
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 46s
2026-01-12 10:58:55 +01:00
aa91b15547 Default Route leitet nicht direkt auf Produktbaum um.
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 51s
2026-01-12 10:37:38 +01:00
3031a9e10b Produktbaum Seite bleibt bestehen, auch wenn auf eine andere Seite wie /risikoobjekte gewechselt wird
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 46s
2026-01-07 15:19:30 +01:00
6eaeaaa658 proxy.conf.json so angepasst, dass api requests auch lokal funktionieren
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 44s
2026-01-07 14:45:30 +01:00
cee99688ae Schreibfehler nginx Proxy config ausgebessert
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 45s
2026-01-07 14:31:29 +01:00
f9e0bb526f nginx Proxy config angepasst
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 44s
2026-01-07 14:22:11 +01:00
745996f864 api call pfad und base href angepasst
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 45s
2026-01-07 14:18:38 +01:00
13f43d4575 api call pfad angepasst
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 45s
2026-01-07 13:52:05 +01:00
fe1bbc136f base URL in index.html angepasst versuch 2
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 45s
2026-01-07 13:32:01 +01:00
643c58b161 Merge remote-tracking branch 'origin/main'
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 47s
# Conflicts:
#	src/index.html
2026-01-07 13:17:47 +01:00
292dec587c base URL angepasst 2026-01-07 13:07:30 +01:00
84878fdd95 yaml wieder zurück geändert
All checks were successful
Angular Build & Deploy / deploy (push) Successful in 1m24s
2025-12-31 15:26:45 +01:00
9 changed files with 61 additions and 30 deletions

View File

@@ -13,4 +13,5 @@ jobs:
- name: Build and Run
run: |
docker compose up -d --build --base-href /productclients/
# Startet den Build-Prozess auf deinem Server
docker compose up -d --build

View File

@@ -7,7 +7,7 @@ server {
try_files $uri $uri/ /index.html;
}
location /ProductsRequest {
location /produktApi/ProductsRequest {
proxy_pass http://192.168.2.186:9090/ProductsRequest;
proxy_set_header Host $host;
@@ -15,7 +15,7 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /CalculateRequest {
location /produktApi/CalculateRequest {
proxy_pass http://192.168.2.186:9090/CalculateRequest;
proxy_set_header Host $host;

View File

@@ -1,14 +1,16 @@
import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import {provideRouter, RouteReuseStrategy} from '@angular/router';
import { routes } from './app.routes';
import {provideHttpClient} from '@angular/common/http';
import {CustomRouteReuseStrategy} from './route-reuse.strategy';
export const appConfig: ApplicationConfig = {
providers: [
provideBrowserGlobalErrorListeners(),
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes),
provideHttpClient()
provideHttpClient(),
{ provide: RouteReuseStrategy, useClass: CustomRouteReuseStrategy }
]
};

View File

@@ -4,7 +4,8 @@ import { RisikoobjektView} from './risikoobjektView/risikoobjektView';
import {Produktbaum} from './produktbaum/produktbaum';
export const routes: Routes = [
{ path: '', redirectTo: '/produktbaum', pathMatch: 'full' },
{ path: 'produktbaum', component: Produktbaum },
// { path: '', redirectTo: '/produktbaum', pathMatch: 'full' },
{ path: '', component: Produktbaum },
// { path: 'produktbaum', component: Produktbaum },
{ path: 'risikoobjekte', component: RisikoobjektView },
];

View File

@@ -54,9 +54,9 @@
<strong> {{meldung.errorMsg}} </strong>
</div>
<div *ngIf="risikoobjekte.length > 0" class="risikoobjekt-container">
<div *ngIf="risikoobjektService.risikoobjekte().length > 0" class="risikoobjekt-container">
<strong>Mit dem Baustein assoziiertes Risikoobjekt</strong>
<div *ngFor="let ro of risikoobjekte" class="risikoobjekt-item-container">
<div *ngFor="let ro of risikoobjektService.risikoobjekte()" class="risikoobjekt-item-container">
<label [for]="'check-' + '{{ro.id}}'">
{{ro.handelsbezeichnung}} ({{ro.baujahr}})
</label>

View File

@@ -85,8 +85,8 @@ interface Plausi {
})
@Injectable({providedIn: 'root'})
export class Produktbaum {
private risikoobjektService = inject(RisikoobjektService);
risikoobjekte = this.risikoobjektService.risikoobjekte();
protected risikoobjektService = inject(RisikoobjektService);
risikoobjekte = this.risikoobjektService.risikoobjekte;
protected readonly title = signal('OMDSAngularWebClient');
@@ -98,7 +98,7 @@ export class Produktbaum {
meldungen : Meldung[] = []
aprioriProdukte : Produktbaustein[] = [];
apriori(){
this.http.post<any[]>('/ProductsRequest', { "stichtag": "2022-02-11" })
this.http.post<any[]>('/produktApi/ProductsRequest', { "stichtag": "2022-02-11" })
.subscribe(result => {
this.produkte = [];
this.attribute = [];
@@ -361,7 +361,7 @@ export class Produktbaum {
for (const v of values) {
const value = this.extractValue(v);
const ro = this.risikoobjekte.find(
const ro = this.risikoobjektService.risikoobjekte().find(
r => r.id === value.substring(24)
);
@@ -417,15 +417,14 @@ export class Produktbaum {
produkt.unterbausteine = [];
produkt.attribute = [];
produkt.actualOcc = {value: 1};
produkt.occByParent = 1;
produkt.occByParent = (produkt.parent === undefined || produkt.minOcc > 0) ? 1 : 0;
produkt.actualOcc = { value: produkt.occByParent };
return produkt as Produktbaustein;
}
buildTree() {
this.addMissingAprioriItems();
for (const baustein of this.produkte) {
if (baustein.parent !== undefined){
@@ -438,6 +437,7 @@ export class Produktbaum {
}
}
}
this.addMissingAprioriItems();
}
async addProdukt(produkt : Produktbaustein) {
@@ -644,7 +644,7 @@ export class Produktbaum {
async calculate(verkaufsprodukt: Produktbaustein) {
const request = (await this.modelToJsonld(await this.buildRDFModel(verkaufsprodukt)));
this.produkte = [];
this.http.post<any[]>('/CalculateRequest', request )
this.http.post<any[]>('/produktApi/CalculateRequest', request )
.subscribe(result => {
this.produkte = [];
this.attribute = [];
@@ -668,7 +668,7 @@ export class Produktbaum {
const fahrzeug = this.buildFahrzeug(p);
let fahrzeugAlt =
this.risikoobjekte.find(r =>
this.risikoobjektService.risikoobjekte().find(r =>
r.handelsbezeichnung === fahrzeug.handelsbezeichnung
&& new Date(r.erstzulassung).getTime() === fahrzeug.erstzulassung.getTime())
@@ -678,7 +678,7 @@ export class Produktbaum {
fahrzeugAlt.baujahr = fahrzeug.baujahr;
} else {
console.log("neues fahrzeug")
this.risikoobjekte.push(fahrzeug);
this.risikoobjektService.addRisikoobjekt(fahrzeug);
}
}
})

View File

@@ -0,0 +1,27 @@
import { RouteReuseStrategy, ActivatedRouteSnapshot, DetachedRouteHandle } from '@angular/router';
export class CustomRouteReuseStrategy implements RouteReuseStrategy {
private handlers: { [key: string]: DetachedRouteHandle } = {};
// Soll die Route gespeichert werden?
shouldDetach(route: ActivatedRouteSnapshot): boolean {
// Hier kannst du filtern, welche Route gespeichert werden soll (z.B. 'produktbaum')
return route.routeConfig?.path === 'produktbaum';
}
store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle): void {
this.handlers[route.routeConfig?.path!] = handle;
}
shouldAttach(route: ActivatedRouteSnapshot): boolean {
return !!this.handlers[route.routeConfig?.path!];
}
retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle {
return this.handlers[route.routeConfig?.path!];
}
shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {
return future.routeConfig === curr.routeConfig;
}
}

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>OMDSAngularWebClient</title>
<base href="./">
<base href="/produktwissen-app/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>

View File

@@ -1,11 +1,11 @@
{
"/ProductsRequest": {
"target": "http://192.168.2.186:9090",
"/produktApi/ProductsRequest": {
"target": "http://localhost:9090",
"secure": false,
"logLevel": "debug"
},
"/CalculateRequest": {
"target": "http://192.168.2.186:9090",
"/produktApi/CalculateRequest": {
"target": "http://localhost:9090",
"secure": false,
"logLevel": "debug"
}