tango-app-ui-store-ticket-infra 3.0.10-dev → 3.0.12-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -218,6 +218,9 @@ class TicketInfraComponent {
218
218
  if (this.selectedIssue == 'Camera Issues') {
219
219
  this.cameraList(this.headerFilter?.store);
220
220
  }
221
+ else {
222
+ this.showcamIssue = true;
223
+ }
221
224
  this.secondaryReason(this.selectedIssue);
222
225
  this.cd.detectChanges();
223
226
  }
@@ -565,25 +568,39 @@ class TangoStoreInfraComponent {
565
568
  pageInfo;
566
569
  router;
567
570
  gs;
571
+ route;
568
572
  selectedTab = 'infra';
569
573
  detach = new Subject();
570
574
  storeId;
571
- constructor(pageInfo, router, gs) {
575
+ constructor(pageInfo, router, gs, route) {
572
576
  this.pageInfo = pageInfo;
573
577
  this.router = router;
574
578
  this.gs = gs;
579
+ this.route = route;
580
+ }
581
+ ngOnDestroy() {
582
+ this.detach.next(true);
583
+ this.detach.complete();
575
584
  }
576
585
  ngOnInit() {
577
586
  this.gs.dataRangeValue.pipe(takeUntil(this.detach)).subscribe({
578
587
  next: (data) => {
579
588
  if (data) {
580
- this.storeId = data && data.store ? data.store : this.router.url.split("/")[3];
589
+ this.storeId =
590
+ data && data.store ? data.store : this.router.url.split("/")[3];
591
+ this.updateStoreIdQueryParam(this.storeId);
581
592
  this.setPageData();
582
- // this.router.navigate([`/manage/stores/${this.storeId}/infra-ticket`])
583
593
  }
584
- }
594
+ },
585
595
  });
586
596
  }
597
+ updateStoreIdQueryParam(storeId) {
598
+ const queryParams = { ...this.route.snapshot.queryParams };
599
+ // Update storeId in queryParams
600
+ queryParams.storeId = storeId;
601
+ // Navigate to the same route with updated queryParams
602
+ this.router.navigate([], { queryParams: queryParams, queryParamsHandling: 'merge' });
603
+ }
587
604
  setPageData() {
588
605
  this.pageInfo.setTitle("Tickets");
589
606
  this.pageInfo.setDescription("View, share, download and benchmark the stores performance in one screen");
@@ -602,30 +619,30 @@ class TangoStoreInfraComponent {
602
619
  isActive: false,
603
620
  isSeparator: true,
604
621
  },
605
- // {
606
- // title: this.storeId,
607
- // path: "/manage/stores/" + this.storeId,
608
- // isActive: false,
609
- // isSeparator: false,
610
- // },
611
- // {
612
- // title: this.storeId,
613
- // path: "/manage/stores/" + this.storeId,
614
- // isActive: false,
615
- // isSeparator: true,
616
- // },
622
+ {
623
+ title: this.storeId,
624
+ path: "/manage/stores/" + this.storeId,
625
+ isActive: false,
626
+ isSeparator: false,
627
+ },
628
+ {
629
+ title: this.storeId,
630
+ path: "/manage/stores/" + this.storeId,
631
+ isActive: false,
632
+ isSeparator: true,
633
+ },
617
634
  ]);
618
635
  }
619
636
  selectedTabs(value) {
620
637
  this.selectedTab = value;
621
638
  }
622
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoStoreInfraComponent, deps: [{ token: i1.PageInfoService }, { token: i2.Router }, { token: i1.GlobalStateService }], target: i0.ɵɵFactoryTarget.Component });
639
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoStoreInfraComponent, deps: [{ token: i1.PageInfoService }, { token: i2.Router }, { token: i1.GlobalStateService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
623
640
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: TangoStoreInfraComponent, selector: "lib-tango-store-infra", ngImport: i0, template: "<div class=\"card mb-5 py-3 px-5\">\r\n <ul class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs border-transparent flex-nowrap\">\r\n <li class=\"nav-item\" (click)=\"selectedTabs('infra')\"><a [ngClass]=\"selectedTab ==='infra' ? 'active' :''\"\r\n class=\"nav-link cursor-pointer no-border me-6 \">Infra</a>\r\n </li>\r\n <li class=\"nav-item\" (click)=\"selectedTabs('datamismatch')\">\r\n <a [ngClass]=\"selectedTab ==='datamismatch' ? 'active' :''\" class=\"nav-link cursor-pointer me-6\">Data Mismatch</a>\r\n </li>\r\n </ul>\r\n</div>\r\n<div *ngIf=\"selectedTab ==='infra'\">\r\n <lib-ticket-infra></lib-ticket-infra>\r\n</div>\r\n<router-outlet></router-outlet>", styles: [".nav-item .nav-link.active{border:none;border-radius:6px;background:var(--Primary-50, #EAF8FF);padding:8px 12px}.nav-item .nav-link:hover{border:none}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: TicketInfraComponent, selector: "lib-ticket-infra" }] });
624
641
  }
625
642
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: TangoStoreInfraComponent, decorators: [{
626
643
  type: Component,
627
644
  args: [{ selector: 'lib-tango-store-infra', template: "<div class=\"card mb-5 py-3 px-5\">\r\n <ul class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs border-transparent flex-nowrap\">\r\n <li class=\"nav-item\" (click)=\"selectedTabs('infra')\"><a [ngClass]=\"selectedTab ==='infra' ? 'active' :''\"\r\n class=\"nav-link cursor-pointer no-border me-6 \">Infra</a>\r\n </li>\r\n <li class=\"nav-item\" (click)=\"selectedTabs('datamismatch')\">\r\n <a [ngClass]=\"selectedTab ==='datamismatch' ? 'active' :''\" class=\"nav-link cursor-pointer me-6\">Data Mismatch</a>\r\n </li>\r\n </ul>\r\n</div>\r\n<div *ngIf=\"selectedTab ==='infra'\">\r\n <lib-ticket-infra></lib-ticket-infra>\r\n</div>\r\n<router-outlet></router-outlet>", styles: [".nav-item .nav-link.active{border:none;border-radius:6px;background:var(--Primary-50, #EAF8FF);padding:8px 12px}.nav-item .nav-link:hover{border:none}\n"] }]
628
- }], ctorParameters: () => [{ type: i1.PageInfoService }, { type: i2.Router }, { type: i1.GlobalStateService }] });
645
+ }], ctorParameters: () => [{ type: i1.PageInfoService }, { type: i2.Router }, { type: i1.GlobalStateService }, { type: i2.ActivatedRoute }] });
629
646
 
630
647
  const routes = [
631
648
  {