Merge remote-tracking branch 'origin/feat/cad-bill' into feat/cad-bill
All checks were successful
PR Checks / prettier-autofix (pull_request) Successful in 7s
PR Checks / security-sast (pull_request) Successful in 28s
PR Checks / test-backend (pull_request) Successful in 24s
PR Checks / test-frontend (pull_request) Successful in 59s

This commit is contained in:
2026-03-04 12:25:43 +01:00
6 changed files with 33 additions and 15 deletions

View File

@@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { RouterLink, RouterLinkActive } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import { LanguageService } from '../services/language.service';
import {routes} from '../../app.routes';
import { routes } from '../../app.routes';
@Component({
selector: 'app-navbar',

View File

@@ -96,7 +96,9 @@
<td>{{ row.cadTotalChf | currency: "CHF" }}</td>
<td>{{ row.grandTotalChf | currency: "CHF" }}</td>
<td>{{ row.sessionStatus }}</td>
<td class="notes-cell" [title]="row.notes || ''">{{ row.notes || "-" }}</td>
<td class="notes-cell" [title]="row.notes || ''">
{{ row.notes || "-" }}
</td>
<td>
<span
*ngIf="row.convertedOrderId; else noOrder"
@@ -110,10 +112,18 @@
<ng-template #noOrder>-</ng-template>
</td>
<td class="actions">
<button type="button" class="ghost" (click)="openCheckout(row.checkoutPath)">
<button
type="button"
class="ghost"
(click)="openCheckout(row.checkoutPath)"
>
Apri checkout
</button>
<button type="button" class="ghost" (click)="copyCheckout(row.checkoutPath)">
<button
type="button"
class="ghost"
(click)="copyCheckout(row.checkoutPath)"
>
Copia link
</button>
<button

View File

@@ -77,9 +77,11 @@
<h3>Dettaglio richiesta</h3>
<p class="request-id">
<span>ID</span>
<code [title]="selectedRequest.id" [appCopyOnClick]="selectedRequest.id">{{
selectedRequest.id
}}</code>
<code
[title]="selectedRequest.id"
[appCopyOnClick]="selectedRequest.id"
>{{ selectedRequest.id }}</code
>
</p>
</div>
<div class="detail-chips">

View File

@@ -98,9 +98,11 @@
<h2>Dettaglio ordine {{ selectedOrder.orderNumber }}</h2>
<p class="order-uuid">
UUID:
<code [title]="selectedOrder.id" [appCopyOnClick]="selectedOrder.id">{{
selectedOrder.id
}}</code>
<code
[title]="selectedOrder.id"
[appCopyOnClick]="selectedOrder.id"
>{{ selectedOrder.id }}</code
>
</p>
<p *ngIf="detailLoading">Caricamento dettaglio...</p>
</div>

View File

@@ -16,9 +16,7 @@
>Richieste contatto</a
>
<a routerLink="sessions" routerLinkActive="active">Sessioni</a>
<a routerLink="cad-invoices" routerLinkActive="active"
>Fatture CAD</a
>
<a routerLink="cad-invoices" routerLinkActive="active">Fatture CAD</a>
</nav>
</div>

View File

@@ -277,7 +277,9 @@ export class CalculatorPageComponent implements OnInit {
const segments = this.cadSessionLocked()
? ['/', this.languageService.selectedLang(), 'checkout', 'cad']
: ['/', this.languageService.selectedLang(), 'checkout'];
this.router.navigate(segments, { queryParams: { session: res.sessionId } });
this.router.navigate(segments, {
queryParams: { session: res.sessionId },
});
} else {
console.error('No session ID found in quote result');
// Fallback or error handling
@@ -356,7 +358,11 @@ export class CalculatorPageComponent implements OnInit {
onConsult() {
if (!this.currentRequest) {
this.router.navigate(['/', this.languageService.selectedLang(), 'contact']);
this.router.navigate([
'/',
this.languageService.selectedLang(),
'contact',
]);
return;
}