feat/cad-bill #16

Merged
JoeKung merged 6 commits from feat/cad-bill into dev 2026-03-04 12:45:58 +01:00
6 changed files with 33 additions and 15 deletions
Showing only changes of commit 8f6e74cf02 - Show all commits

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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