@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.
@@ -3367,8 +3367,9 @@ var InputRestAutoCompleteEmployeeModelService = /** @class */ (function () {
3367
3367
  }());
3368
3368
 
3369
3369
  var InputRestAutoCompleteEmployeeModelComponent = /** @class */ (function () {
3370
- function InputRestAutoCompleteEmployeeModelComponent(service) {
3370
+ function InputRestAutoCompleteEmployeeModelComponent(service, activatedRoute) {
3371
3371
  this.service = service;
3372
+ this.activatedRoute = activatedRoute;
3372
3373
  this.forceSelection = true;
3373
3374
  this.keyName = 'name';
3374
3375
  this.onBlur = new EventEmitter();
@@ -3376,8 +3377,15 @@ var InputRestAutoCompleteEmployeeModelComponent = /** @class */ (function () {
3376
3377
  this.onClear = new EventEmitter();
3377
3378
  this.modelChange = new EventEmitter();
3378
3379
  this.suggestions = [];
3380
+ this.ngUnsubscribe = new Subject();
3379
3381
  }
3380
- InputRestAutoCompleteEmployeeModelComponent.prototype.ngOnInit = function () { };
3382
+ InputRestAutoCompleteEmployeeModelComponent.prototype.ngOnInit = function () {
3383
+ var _this = this;
3384
+ this.activatedRoute.data.pipe(takeUntil(this.ngUnsubscribe)).subscribe(function (data) {
3385
+ _this._useWorkflow = !!(data && data.useWorkflow);
3386
+ console.log('useWorkflow: ', _this._useWorkflow);
3387
+ });
3388
+ };
3381
3389
  InputRestAutoCompleteEmployeeModelComponent.prototype.filterQuery = function (event) {
3382
3390
  var _this = this;
3383
3391
  var query = event.query;
@@ -3437,9 +3445,12 @@ var InputRestAutoCompleteEmployeeModelComponent = /** @class */ (function () {
3437
3445
  if (this.employeeType) {
3438
3446
  returnFilter['employeeType'] = this.employeeType;
3439
3447
  }
3440
- console.log('Teste filter: ', returnFilter);
3441
- console.log('WORKFLOW');
3442
- returnFilter['timeTrackingResumeType'] = { key: "FIRED" };
3448
+ if (!this._useWorkflow) {
3449
+ returnFilter['timeTrackingResumeType'] = { key: "AWAY" };
3450
+ }
3451
+ // if (this._useWorkflow === false) {
3452
+ // returnFilter['timeTrackingResumeType'] = {key: "AWAY"};
3453
+ // }
3443
3454
  return returnFilter;
3444
3455
  };
3445
3456
  /**
@@ -3468,7 +3479,8 @@ var InputRestAutoCompleteEmployeeModelComponent = /** @class */ (function () {
3468
3479
  configurable: true
3469
3480
  });
3470
3481
  InputRestAutoCompleteEmployeeModelComponent.ctorParameters = function () { return [
3471
- { type: InputRestAutoCompleteEmployeeModelService }
3482
+ { type: InputRestAutoCompleteEmployeeModelService },
3483
+ { type: ActivatedRoute }
3472
3484
  ]; };
3473
3485
  __decorate([
3474
3486
  Input()