tango-app-ui-manage-tickets 3.3.0-beta.5 → 3.3.0-beta.7

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, Input, HostListener, ViewChild, NgModule } from '@angular/core';
2
+ import { Injectable, Input, Component, HostListener, ViewChild, NgModule } from '@angular/core';
3
3
  import * as i6 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2$1 from '@angular/router';
@@ -436,40 +436,48 @@ class TicketsComponent {
436
436
  this.service
437
437
  .getSotresList({ issueType: this.type, clientId: this.headerFilters.clients })
438
438
  .pipe(takeUntil(this.destroy$))
439
- .subscribe((res) => {
440
- if (res && res.code === 200) {
441
- this.storeList = res?.data?.data;
442
- this.storeList.forEach((element) => {
443
- element.text = element.storeId;
444
- element.id = element.storeId;
445
- });
446
- if (this.users.userType === "tango") {
447
- this.getuserlist();
448
- }
449
- else {
450
- if (this.type === 'installation') {
451
- this.dataObject = [
452
- { Description: "Store ID", Issues: this.storeList },
453
- { Description: "Deployed Status", Issues: this.statusType },
454
- ];
455
- }
456
- else if (this.type === 'infra' || this.type === 'dataMismatch') {
457
- this.dataObject = [
458
- { Description: "Store ID", Issues: this.storeList },
459
- { Description: "Status", Issues: this.statusType },
460
- ];
439
+ .subscribe({
440
+ next: (res) => {
441
+ if (res && res.code === 200) {
442
+ this.storeList = res?.data?.data;
443
+ this.storeList.forEach((element) => {
444
+ element.text = element.storeId;
445
+ element.id = element.storeId;
446
+ });
447
+ if (this.users.userType === "tango") {
448
+ this.getuserlist();
461
449
  }
462
- else if (this.type === 'mat') {
463
- this.dataObject = [
464
- { Description: "Status", Issues: this.statusType },
465
- ];
450
+ else {
451
+ if (this.type === 'installation') {
452
+ this.dataObject = [
453
+ { Description: "Store ID", Issues: this.storeList },
454
+ { Description: "Deployed Status", Issues: this.statusType },
455
+ ];
456
+ }
457
+ else if (this.type === 'infra' || this.type === 'dataMismatch') {
458
+ this.dataObject = [
459
+ { Description: "Store ID", Issues: this.storeList },
460
+ { Description: "Status", Issues: this.statusType },
461
+ ];
462
+ }
463
+ else if (this.type === 'mat') {
464
+ this.dataObject = [
465
+ { Description: "Status", Issues: this.statusType },
466
+ ];
467
+ }
466
468
  }
469
+ this.getTable();
467
470
  }
468
- this.getTable();
469
- }
470
- else {
471
- this.getTable();
472
- }
471
+ else {
472
+ this.getTable();
473
+ }
474
+ },
475
+ error: (err) => {
476
+ this.loading = false;
477
+ this.noData = true;
478
+ this.cd.detectChanges();
479
+ },
480
+ complete: () => { },
473
481
  });
474
482
  }
475
483
  getuserlist() {
@@ -1521,10 +1529,40 @@ class TangoManageTicketsComponent {
1521
1529
  setPageData() {
1522
1530
  this.pageInfo.setTitle('Tickets');
1523
1531
  this.pageInfo.setDescription('Summary of queries raised,addresed & resolved');
1524
- this.pageInfo.setBreadcrumbs([
1525
- { title: 'Manage', path: '/manage', isActive: false, isSeparator: false },
1526
- { title: 'Manage', path: '/manage', isActive: false, isSeparator: true },
1527
- ]);
1532
+ let breadcrumbs = [];
1533
+ if (this.gs.userAccess.value?.userType === "tango") {
1534
+ breadcrumbs = [
1535
+ {
1536
+ title: "Manage",
1537
+ path: "/manage/brands",
1538
+ isActive: false,
1539
+ isSeparator: false,
1540
+ },
1541
+ {
1542
+ title: "Manage",
1543
+ path: "/manage/brands",
1544
+ isActive: false,
1545
+ isSeparator: true,
1546
+ },
1547
+ ];
1548
+ }
1549
+ else if (this.gs.userAccess.value?.userType === "client") {
1550
+ breadcrumbs = [
1551
+ {
1552
+ title: "Manage",
1553
+ path: "/manage/summary",
1554
+ isActive: false,
1555
+ isSeparator: false,
1556
+ },
1557
+ {
1558
+ title: "Manage",
1559
+ path: "/manage/summary",
1560
+ isActive: false,
1561
+ isSeparator: true,
1562
+ },
1563
+ ];
1564
+ }
1565
+ this.pageInfo.setBreadcrumbs(breadcrumbs);
1528
1566
  }
1529
1567
  Selectedtabs(value) {
1530
1568
  this.SelectedTab = value;