Skip to content

Commit 47107d4

Browse files
committed
Revert "[NAE-1758] Task on single task view is not rendering"
This reverts commit 6c31093.
1 parent 6c31093 commit 47107d4

File tree

5 files changed

+13
-19
lines changed

5 files changed

+13
-19
lines changed

projects/netgrif-components-core/src/lib/data-fields/enumeration-field/enumeration-autocomplete-select-field/abstract-enumeration-autocomplete-select-field.component.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Component, Input, OnDestroy, OnInit, ViewChild} from '@angular/core';
2-
import { AbstractControl, FormControl, NgModel, ValidationErrors } from '@angular/forms';
2+
import {FormControl, NgModel} from '@angular/forms';
33
import {Observable, of} from 'rxjs';
44
import {map, startWith} from 'rxjs/operators';
55
import {EnumerationField, EnumerationFieldValidation, EnumerationFieldValue} from '../models/enumeration-field';
@@ -21,14 +21,12 @@ export abstract class AbstractEnumerationAutocompleteSelectFieldComponent implem
2121
public tmpValue: string;
2222

2323
filteredOptions: Observable<Array<EnumerationFieldValue>>;
24-
filteredOptionsArray: Array<EnumerationFieldValue>;
2524

2625
constructor(protected _translate: TranslateService) {
2726
}
2827

2928
ngOnInit() {
3029
this.tmpValue = this.formControlRef.value ?? '';
31-
this.formControlRef.addValidators(this.checkFilteredOptions);
3230
this.filteredOptions = this.formControlRef.valueChanges.pipe(
3331
startWith(''),
3432
map(value => this._filter(value))
@@ -123,12 +121,4 @@ export abstract class AbstractEnumerationAutocompleteSelectFieldComponent implem
123121
return this._translate.instant('dataField.validations.enumeration');
124122
}
125123
}
126-
127-
private checkFilteredOptions(control: AbstractControl): ValidationErrors | null {
128-
if (!!this.filteredOptionsArray && this.filteredOptionsArray.length === 0) {
129-
return {wrongValue: true};
130-
}
131-
return null;
132-
}
133-
134124
}

projects/netgrif-components/src/lib/panel/panel.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<mat-expansion-panel [@.disabled]="expansionDisabled" hideToggle (afterExpand)="emitExpand()"
22
(afterCollapse)="emitCollapse()" #matExpansionPanel class="panel-margin"
3-
[ngClass]="{'margin-top':first, 'margin-bottom':last}">
4-
<mat-expansion-panel-header (click)="expandPanel()" class="panel-color header-padding header-min-height"
3+
[ngClass]="{'margin-top':first, 'margin-bottom':last}" [disabled]='preventCollapse'>
4+
<mat-expansion-panel-header *ngIf="showPanelHeader()"
5+
(click)="expandPanel()" class="panel-color header-padding header-min-height"
56
[ngStyle]="{'background': caseColor, 'color': getCaseFontColor()}">
67
<mat-panel-description *ngTemplateOutlet="panelHeader">
78
</mat-panel-description>

projects/netgrif-components/src/lib/panel/task-panel-single/single-task.component.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<span class='font-size-20'>{{ 'tasks.view.noTasksSatisfyingThisFilter' | translate }}</span>
88
</div>
99

10-
<div class='full-width full-height task-tab-background' fxFlex='100'>
10+
<div class='full-width full-heigh task-tab-background' fxFlex='100'>
1111
<div *ngTemplateOutlet='pageHeader ?? defaultPageHeader'></div>
1212
<nc-task-panel
1313
[textEllipsis]='textEllipsis'
@@ -16,8 +16,10 @@
1616
[responsiveBody]='responsiveBody'
1717
(taskEvent)='emitTaskEvent($event)'
1818
(panelRefOutput)='setPanelRef($event)'
19-
[first]='true'
20-
[last]='true'
19+
[preventCollapse]='preventCollapse'
20+
[hidePanelHeader]='hidePanelHeader'
21+
[actionButtonTemplates]='actionButtonTemplates'
22+
[actionRowJustifyContent]='actionRowJustifyContent'
2123
class='panel-expanded-spacing'>
2224
</nc-task-panel>
2325

@@ -34,7 +36,7 @@
3436
</ng-template>
3537

3638
<ng-template #defaultPageFooter>
37-
<mat-card class='bottom-card footer'>
39+
<mat-card class='bootom-card footer'>
3840
<span class="bottom-card-title footer-font"><strong>{{footerText ?? 'tasks.footer.defaultText' | translate}}</strong></span>
3941
</mat-card>
4042
</ng-template>

projects/netgrif-components/src/lib/panel/task-panel-single/single-task.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.full-height {
10-
height: 100vh;
10+
height: 100%;
1111
}
1212

1313
.task-panel-scroll-container {

projects/netgrif-components/src/lib/panel/task-panel/task-panel.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<nc-app-panel [panelContent]="taskPanelContent" [panelHeader]="taskPanelHeader"
2-
(stopLoading)="stopLoading()" (getExpansionPanelRef)="setPanelRef($event)" [first]="first" [last]="last">
2+
(stopLoading)="stopLoading()" (getExpansionPanelRef)="setPanelRef($event)" [first]="first" [last]="last"
3+
[preventCollapse]='preventCollapse' [hidePanelHeader]='hidePanelHeader'>
34
<ng-template #taskPanelHeader>
45
<div fxLayoutAlign="start center" fxLayout="row" fxFlex="95" (click)="preventSelectionClick($event)">
56
<div *ngFor="let field of featuredFieldsValues; let i = index" fxFlex

0 commit comments

Comments
 (0)