// appli.service.ts import { Injectable, signal } from '@angular/core'; @Injectable({ providedIn: 'root' }) export class CarnetStateStore { headerId = signal(0); applicationName = signal(''); searchedHolder = signal(''); holderid = signal(0); applicationType = signal<'new' | 'additional' | 'duplicate' | 'extend' | null>('new'); isEditMode = signal(false); stepsCompleted = signal({ applicationDetail: false, holderSelection: false, goodsSection: false, travelPlan: false, insurance: false, shipping: false, deliveryMethod: false, payment: false }); resetState() { console.log("CALLED RESET STATE"); this.headerId.set(0); this.applicationName.set(''); this.searchedHolder.set(''); this.holderid.set(0); this.applicationType.set('new'); this.isEditMode.set(false); this.stepsCompleted.set({ applicationDetail: false, // this is intentionally true on reset? holderSelection: false, goodsSection: false, travelPlan: false, insurance: false, shipping: false, deliveryMethod: false, payment: false }); } }