@senior-gestao-pessoas/payroll-core 9.0.0-4fc08d3a-4ed6-4916-aa3f-c8e95c6e337d → 9.0.0-652973e6-d210-4887-bc21-4af29bce9a46

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,8 +3611,12 @@
3603
3611
  if (this.employeeType) {
3604
3612
  returnFilter['employeeType'] = this.employeeType;
3605
3613
  }
3606
- console.log(returnFilter);
3607
- returnFilter['timeTrackingResumeType'] = { key: "FIRED" };
3614
+ if (this._useWorkflow) {
3615
+ returnFilter['timeTrackingResumeType'] = { key: "FIRED" };
3616
+ }
3617
+ if (this._useWorkflow != true) {
3618
+ returnFilter['timeTrackingResumeType'] = { key: "AWAY" };
3619
+ }
3608
3620
  return returnFilter;
3609
3621
  };
3610
3622
  /**
@@ -3633,7 +3645,8 @@
3633
3645
  configurable: true
3634
3646
  });
3635
3647
  InputRestAutoCompleteEmployeeModelComponent.ctorParameters = function () { return [
3636
- { type: InputRestAutoCompleteEmployeeModelService }
3648
+ { type: InputRestAutoCompleteEmployeeModelService },
3649
+ { type: router.ActivatedRoute }
3637
3650
  ]; };
3638
3651
  __decorate([
3639
3652
  core.Input()