vc-error-handlers 0.2.8 → 0.3.0

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.
@@ -333,61 +333,61 @@ const COMPONENT_LEVEL_API_CONFIG = [
333
333
  },
334
334
  {
335
335
  method: 'POST',
336
- path: '/risk/?mode=risk/ListingReportedRisks',
336
+ path: 'risk/ListingReportedRisks',
337
337
  query: null,
338
338
  body: null,
339
339
  },
340
340
  {
341
341
  method: 'POST',
342
- path: '/risk/?mode=risk/myAssessments&type',
342
+ path: 'risk/myAssessments&type',
343
343
  query: null,
344
344
  body: null,
345
345
  },
346
346
  {
347
347
  method: 'POST',
348
- path: '/risk/?mode=workshop/list',
348
+ path: 'workshop/list',
349
349
  query: null,
350
350
  body: null,
351
351
  },
352
352
  {
353
353
  method: 'POST',
354
- path: '/risk/?mode=risk/DueDateList',
354
+ path: 'risk/DueDateList',
355
355
  query: null,
356
356
  body: null,
357
357
  },
358
358
  {
359
359
  method: 'POST',
360
- path: '/risk/?mode=risk/RiskDetailsById',
360
+ path: 'risk/RiskDetailsById',
361
361
  query: null,
362
362
  body: null,
363
363
  },
364
364
  {
365
365
  method: 'POST',
366
- path: '/risk/?mode=score/assessment',
366
+ path: 'score/assessment',
367
367
  query: null,
368
368
  body: null,
369
369
  },
370
370
  {
371
371
  method: 'POST',
372
- path: '/risk/?mode=score/treatment',
372
+ path: 'score/treatment',
373
373
  query: null,
374
374
  body: null,
375
375
  },
376
376
  {
377
377
  method: 'POST',
378
- path: '/risk/?mode=score/treatmentPlan',
378
+ path: 'score/treatmentPlan',
379
379
  query: null,
380
380
  body: null,
381
381
  },
382
382
  {
383
383
  method: 'POST',
384
- path: 'risk/?mode=category/list',
384
+ path: 'category/list&returnType',
385
385
  query: null,
386
386
  body: null,
387
387
  },
388
388
  {
389
389
  method: 'POST',
390
- path: 'risk/?mode=risk/list',
390
+ path: 'risk/list&return_list',
391
391
  query: null,
392
392
  body: null,
393
393
  },
@@ -471,37 +471,169 @@ const COMPONENT_LEVEL_API_CONFIG = [
471
471
  },
472
472
  {
473
473
  method: 'GET',
474
- path: '/policy/?mode=announcements/listAll&type=past',
474
+ path: '/policy/?mode=announcements/listAll',
475
475
  query: null,
476
476
  body: null,
477
477
  },
478
478
  {
479
479
  method: 'GET',
480
- path: '/policy/?mode=announcements/listAll&type=current',
480
+ path: '/policy/?mode=announcements/list',
481
+ query: null,
482
+ body: null,
483
+ },
484
+ {
485
+ method: 'POST',
486
+ path: '/policy_post/?mode=dashboard/overdue/attestation',
487
+ query: null,
488
+ body: null,
489
+ },
490
+ {
491
+ method: 'POST',
492
+ path: '/policy_post/?mode=dashboard/overdue/review',
481
493
  query: null,
482
494
  body: null,
483
495
  },
484
496
  {
485
497
  method: 'GET',
486
- path: '/policy/?mode=announcements/list',
498
+ path: '/policy/?mode=dashboard/calendar&date',
499
+ query: null,
500
+ body: null,
501
+ },
502
+ {
503
+ method: 'GET',
504
+ path: 'policy/?mode=dashboard/dueForAttestation/dueToday',
505
+ query: null,
506
+ body: null,
507
+ },
508
+ {
509
+ method: 'GET',
510
+ path: '/policy/?mode=dashboard/dueForAttestation/overdue',
511
+ query: null,
512
+ body: null,
513
+ },
514
+ {
515
+ method: 'GET',
516
+ path: 'policy/?mode=dashboard/dueForAttestation/upcoming',
517
+ query: null,
518
+ body: null,
519
+ },
520
+ {
521
+ method: 'GET',
522
+ path: 'policy/?mode=dashboard/dueForAttestation/upcoming',
523
+ query: null,
524
+ body: null,
525
+ },
526
+ {
527
+ method: 'GET',
528
+ path: 'Assurance/Issue/Category/CatList',
487
529
  query: null,
488
530
  body: null,
489
531
  },
490
532
  {
491
533
  method: 'POST',
492
- path: '/policy_post/?mode=dashboard/overdue/attestation',
534
+ path: 'Assurance/Issue/MyIssues/',
493
535
  query: null,
494
536
  body: null,
495
537
  },
496
538
  {
497
539
  method: 'POST',
498
- path: '/policy_post/?mode=dashboard/overdue/review',
540
+ path: 'Assurance/Issue/Overview/',
541
+ query: null,
542
+ body: null,
543
+ },
544
+ {
545
+ method: 'POST',
546
+ path: 'Assurance/Issue/Overseeing/',
499
547
  query: null,
500
548
  body: null,
501
549
  },
502
550
  {
503
551
  method: 'GET',
504
- path: '/policy/?mode=dashboard/calendar&date',
552
+ path: 'Assurance/Issue/Workroom/',
553
+ query: null,
554
+ body: null,
555
+ },
556
+ {
557
+ method: 'GET',
558
+ path: 'Assurance/Issue/GetIssueDueDates/',
559
+ query: null,
560
+ body: null,
561
+ },
562
+ {
563
+ method: 'GET',
564
+ path: '/Assurance/Workroom/Issue/FilesAndFolders/',
565
+ query: null,
566
+ body: null,
567
+ },
568
+ {
569
+ method: 'GET',
570
+ path: 'Assurance/Workroom/Issue/ActivitiesViewLog/',
571
+ query: null,
572
+ body: null,
573
+ },
574
+ {
575
+ method: 'GET',
576
+ path: '/Assurance/ActivityLog/IssueLog/',
577
+ query: null,
578
+ body: null,
579
+ },
580
+ {
581
+ method: 'GET',
582
+ path: 'Assurance/Workroom/Issue/IssueDuedateListForTimeline',
583
+ query: null,
584
+ body: null,
585
+ },
586
+ {
587
+ method: 'GET',
588
+ path: 'Assurance/Issue/ListByCategoryIdRC/',
589
+ query: null,
590
+ body: null,
591
+ },
592
+ {
593
+ method: 'GET',
594
+ path: 'Assurance/Issue/DashboardCalendar',
595
+ query: null,
596
+ body: null,
597
+ },
598
+ {
599
+ method: 'GET',
600
+ path: '/Assurance/Issue/Priority',
601
+ query: null,
602
+ body: null,
603
+ },
604
+ {
605
+ method: 'POST',
606
+ path: 'risk_dashboard/heatmap',
607
+ query: null,
608
+ body: null,
609
+ },
610
+ {
611
+ method: 'POST',
612
+ path: 'risk_dashboard/risk_category_overview',
613
+ query: null,
614
+ body: null,
615
+ },
616
+ {
617
+ method: 'POST',
618
+ path: 'risk_dashboard/risk_score_by_rc',
619
+ query: null,
620
+ body: null,
621
+ },
622
+ {
623
+ method: 'POST',
624
+ path: 'risk_dashboard/scorebycategory',
625
+ query: null,
626
+ body: null,
627
+ },
628
+ {
629
+ method: 'POST',
630
+ path: 'risk_dashboard/list',
631
+ query: null,
632
+ body: null,
633
+ },
634
+ {
635
+ method: 'GET',
636
+ path: 'dashboard/missedResponsibilities',
505
637
  query: null,
506
638
  body: null,
507
639
  },
@@ -554,13 +686,9 @@ class UtilsService {
554
686
  return query;
555
687
  }
556
688
  isStringEqual(apiMethod, requestMethod) {
557
- console.log('apiMethod', apiMethod);
558
689
  return apiMethod === requestMethod;
559
690
  }
560
691
  isSubstringInString(apiPath, requestPath) {
561
- console.log('apiPath', apiPath);
562
- console.log('requestPath', requestPath);
563
- console.log('apiPathtttttttttt', requestPath.includes(apiPath));
564
692
  return requestPath.includes(apiPath);
565
693
  }
566
694
  isSubsetOfObject(apiQuery, requestQuery) {
@@ -775,10 +903,12 @@ const REDIRECTION_URL = {
775
903
  COMPLIANCE_DASHBOARD: '/global-dashboard/compliance_dashboard',
776
904
  RISK_DASHBOARD: '/global-dashboard/risk_dashboard?module=risk',
777
905
  POLICY_DASHBOARD: '/global-dashboard/policy_dashboard?module=policy',
906
+ ISSUE_DASHBOARD: '/global-dashboard/issue_dashboard?module=issue',
778
907
  };
779
908
  const MODULE_NAMES = {
780
909
  RISK: 'risk',
781
910
  POLICY: 'policy',
911
+ ISSUE: 'issue',
782
912
  };
783
913
  const MODAL_ERROR_TYPES = {
784
914
  CHUNK_NOT_FOUND: 'chunk_not_found',
@@ -1422,6 +1552,9 @@ class PageNotFoundComponent {
1422
1552
  case MODULE_NAMES.POLICY:
1423
1553
  targetPath = REDIRECTION_URL.POLICY_DASHBOARD;
1424
1554
  break;
1555
+ case MODULE_NAMES.ISSUE:
1556
+ targetPath = REDIRECTION_URL.ISSUE_DASHBOARD;
1557
+ break;
1425
1558
  default:
1426
1559
  targetPath = REDIRECTION_URL.COMPLIANCE_DASHBOARD;
1427
1560
  break;
@@ -1764,18 +1897,19 @@ class HttpReqInterceptor {
1764
1897
  this.featureFlagService = featureFlagService;
1765
1898
  }
1766
1899
  intercept(req, next) {
1767
- // if (this.featureFlagService.isFeatureEnabled(ERROR_FEATURE_FLAG)) {
1768
- return next.handle(req).pipe(timeout(API_TIMEOUT_TIME), tap((event) => {
1769
- if (event instanceof HttpResponse) {
1770
- this.errorService.handleSoftErrors(event);
1771
- }
1772
- }), catchError((error) => {
1773
- this.errorService.handleError(error, req);
1774
- return throwError(error);
1775
- }));
1776
- // } else {
1777
- // return next.handle(req);
1778
- // }
1900
+ if (this.featureFlagService.isFeatureEnabled(ERROR_FEATURE_FLAG)) {
1901
+ return next.handle(req).pipe(timeout(API_TIMEOUT_TIME), tap((event) => {
1902
+ if (event instanceof HttpResponse) {
1903
+ this.errorService.handleSoftErrors(event);
1904
+ }
1905
+ }), catchError((error) => {
1906
+ this.errorService.handleError(error, req);
1907
+ return throwError(error);
1908
+ }));
1909
+ }
1910
+ else {
1911
+ return next.handle(req);
1912
+ }
1779
1913
  }
1780
1914
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpReqInterceptor, deps: [{ token: GlobalErrorService }, { token: FeatureFlagService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1781
1915
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpReqInterceptor }); }