@senior-gestao-pessoas/payroll-core 9.0.0-a54a83b8-d0f5-46e0-83fa-7aa62e5f2733 → 9.0.0-c4899b4a-0967-4eae-90b5-b17be4646913

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.
@@ -3533,8 +3533,9 @@
3533
3533
  }());
3534
3534
 
3535
3535
  var InputRestAutoCompleteEmployeeModelComponent = /** @class */ (function () {
3536
- function InputRestAutoCompleteEmployeeModelComponent(service) {
3536
+ function InputRestAutoCompleteEmployeeModelComponent(service, activatedRoute) {
3537
3537
  this.service = service;
3538
+ this.activatedRoute = activatedRoute;
3538
3539
  this.forceSelection = true;
3539
3540
  this.keyName = 'name';
3540
3541
  this.onBlur = new core.EventEmitter();
@@ -3542,8 +3543,15 @@
3542
3543
  this.onClear = new core.EventEmitter();
3543
3544
  this.modelChange = new core.EventEmitter();
3544
3545
  this.suggestions = [];
3546
+ this.ngUnsubscribe = new rxjs.Subject();
3545
3547
  }
3546
- InputRestAutoCompleteEmployeeModelComponent.prototype.ngOnInit = function () { };
3548
+ InputRestAutoCompleteEmployeeModelComponent.prototype.ngOnInit = function () {
3549
+ var _this = this;
3550
+ this.activatedRoute.data.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (data) {
3551
+ _this._useWorkflow = !!(data && data.useWorkflow);
3552
+ console.log('useWorkflow: ', _this._useWorkflow);
3553
+ });
3554
+ };
3547
3555
  InputRestAutoCompleteEmployeeModelComponent.prototype.filterQuery = function (event) {
3548
3556
  var _this = this;
3549
3557
  var query = event.query;
@@ -3603,9 +3611,12 @@
3603
3611
  if (this.employeeType) {
3604
3612
  returnFilter['employeeType'] = this.employeeType;
3605
3613
  }
3606
- console.log('Teste filter: ', returnFilter);
3607
- console.log('WORKFLOW');
3608
- returnFilter['timeTrackingResumeType'] = { key: "FIRED" };
3614
+ if (!this._useWorkflow) {
3615
+ returnFilter['timeTrackingResumeType'] = { key: "AWAY" };
3616
+ }
3617
+ // if (this._useWorkflow === false) {
3618
+ // returnFilter['timeTrackingResumeType'] = {key: "AWAY"};
3619
+ // }
3609
3620
  return returnFilter;
3610
3621
  };
3611
3622
  /**
@@ -3634,7 +3645,8 @@
3634
3645
  configurable: true
3635
3646
  });
3636
3647
  InputRestAutoCompleteEmployeeModelComponent.ctorParameters = function () { return [
3637
- { type: InputRestAutoCompleteEmployeeModelService }
3648
+ { type: InputRestAutoCompleteEmployeeModelService },
3649
+ { type: router.ActivatedRoute }
3638
3650
  ]; };
3639
3651
  __decorate([
3640
3652
  core.Input()