tango-app-ui-manage-tickets 3.7.0-beta.86 → 3.7.0-beta.87

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.
@@ -3486,6 +3486,7 @@ class TicketFilterPanelComponent {
3486
3486
  'Open',
3487
3487
  'In-Progress',
3488
3488
  'Closed',
3489
+ 'Under Tango Review',
3489
3490
  // 'Open - Accuracy Issue',
3490
3491
  // 'Closed - Accuracy Issue',
3491
3492
  'Expired',
@@ -5380,7 +5381,7 @@ class TicketFootfallNewComponent {
5380
5381
  this.footfallTicketsData = [];
5381
5382
  this.footfallNoData = true;
5382
5383
  this.footfallLoading = false;
5383
- this.ts.getErrorToast("No open tickets available based on the applied filters");
5384
+ // this.ts.getErrorToast("No open tickets available based on the applied filters");
5384
5385
  }
5385
5386
  else {
5386
5387
  this.footfallTicketsData = res?.data?.result ?? [];
@@ -5764,23 +5765,33 @@ class TicketFootfallNewComponent {
5764
5765
  return;
5765
5766
  }
5766
5767
  const actions = original.actions;
5767
- // 1) Check if there is a decision (review/approve → approved/rejected)
5768
- const hasDecision = actions.some((a) => (a.actionType === "review" || a.actionType === "approve") &&
5769
- (a.action === "approved" || a.action === "rejected"));
5770
- // If NO approved/rejected do nothing
5768
+ // NEW: detect approve decision
5769
+ const hasApproveDecision = actions.some((a) => a.actionType === 'approve' &&
5770
+ (a.action === 'approved' || a.action === 'rejected'));
5771
+ // 1) Existing decision check (unchanged logic intent)
5772
+ const hasDecision = actions.some((a) => (a.actionType === 'review' || a.actionType === 'approve') &&
5773
+ (a.action === 'approved' || a.action === 'rejected'));
5771
5774
  if (!hasDecision) {
5772
5775
  return;
5773
5776
  }
5774
- // 2) Remove only decision actions
5775
- original.actions = actions.filter((a) => !((a.actionType === "review" || a.actionType === "approve") &&
5776
- (a.action === "approved" || a.action === "rejected")));
5777
- // 3) Remove from selected array
5777
+ // 2) 🔥 EXTRA CONDITION ADDED HERE
5778
+ original.actions = actions.filter((a) => {
5779
+ // If approve decision exists remove ONLY approve
5780
+ if (hasApproveDecision) {
5781
+ return !(a.actionType === 'approve' &&
5782
+ (a.action === 'approved' || a.action === 'rejected'));
5783
+ }
5784
+ // Otherwise → existing behavior (review reset)
5785
+ return !(a.actionType === 'review' &&
5786
+ (a.action === 'approved' || a.action === 'rejected'));
5787
+ });
5788
+ // 3) Existing logic (unchanged)
5778
5789
  const tempId = original.tempId;
5779
5790
  const arr = this.selectedByType[type] || [];
5780
5791
  const i = arr.indexOf(tempId);
5781
5792
  if (i > -1)
5782
5793
  arr.splice(i, 1);
5783
- // 4) Uncheck select all for that type
5794
+ // 4) Existing logic (unchanged)
5784
5795
  this.selectAllByType[type] = false;
5785
5796
  }
5786
5797
  viewMode = "tagging";
@@ -6248,8 +6259,11 @@ class TicketFootfallNewComponent {
6248
6259
  next: (res) => {
6249
6260
  if (res && res.code === 200) {
6250
6261
  // success
6251
- this.ts.getSuccessToast("Tickets closed successfully");
6262
+ this.ts.getSuccessToast(res?.data?.message
6263
+ ? res?.data?.message
6264
+ : "Tickets closed successfully");
6252
6265
  this.viewTicket(this.tangoType);
6266
+ this.multipleCloseCancel();
6253
6267
  this.selectedStores = [];
6254
6268
  this.newallSelected = false;
6255
6269
  this.closeMultiple = true;
@@ -8670,8 +8684,8 @@ class AuditReportPopupComponent {
8670
8684
  let ticketList = res?.data;
8671
8685
  let findstoreticket = ticketList.filter((data) => data?._source?.type === 'store' && data?._source?.status != "Closed")[0]?._source;
8672
8686
  if (findstoreticket && findstoreticket?.mappingInfo.length > 0) {
8673
- this.centralOpsData = findstoreticket.mappingInfo.filter((data) => data.type != "tangoreview")[0];
8674
- console.log("🚀 ~ TicketclosepopupComponent ~ ngOnInit ~ this.centralOpsData:", this.centralOpsData);
8687
+ this.centralOpsData = findstoreticket.mappingInfo.filter((data) => data.type != "tangoreview").at(-1);
8688
+ // console.log("🚀 ~ TicketclosepopupComponent ~ ngOnInit ~ this.centralOpsData:", this.centralOpsData)
8675
8689
  }
8676
8690
  this.tangoAccuracy = Math.round((this.Retagcustomercount / this.totalfiles?.totalfiles) * 100);
8677
8691
  this.tangoData = {