Skip to content

Commit

Permalink
fix: improvement from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
anninowak committed Feb 26, 2024
1 parent 683a827 commit 5197a47
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion libs/portal-integration-angular/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
},
"OCX_SEARCH_CONFIG": {
"PLACEHOLDER": "Bitte geben Sie den Namen der Search Config ein.",
"PLACEHOLDER": "Bitte geben Sie den Namen der Suchkonfiguration an.",
"SAVE_COLUMNS_OPTION": "Möchten Sie die angezeigten Spalten speichern?",
"SAVE_INPUT_FIELDS_OPTION": "Möchten Sie die Werte aus den Suchfeldern speichern?"
},
Expand Down
2 changes: 1 addition & 1 deletion libs/portal-integration-angular/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
},
"OCX_SEARCH_CONFIG": {
"PLACEHOLDER": "Please enter the name of the search config",
"PLACEHOLDER": "Please enter the name of the search configuration",
"SAVE_COLUMNS_OPTION": "Do you want to save the shown columns?",
"SAVE_INPUT_FIELDS_OPTION": "Do you want to save the input values from the input fields?"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class CreateOrEditSearchConfigDialogComponent
@Input() searchConfigName: string | undefined
@Input() saveInputValues: boolean | undefined
@Input() saveColumns: boolean | undefined
@Input() placeHolderKey = 'OCX_SEARCH_CONFIG.PLACEHOLDER'
placeHolderKey = 'OCX_SEARCH_CONFIG.PLACEHOLDER'
@Output() primaryButtonEnabled: EventEmitter<boolean> = new EventEmitter()
searchConfigFormGroup: FormGroup = new FormGroup({
searchConfigName: new FormControl<string>(''),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class SearchConfigComponent implements OnInit {
@Input() placeholderKey = 'OCX_SEARCH_HEADER.OCX_SEARCH_CONFIG.DROPDOWN_DEFAULT'

@Output()
selectedSearchConfig: EventEmitter<SearchConfig> = new EventEmitter()
selectedSearchConfigChanged: EventEmitter<SearchConfig> = new EventEmitter()

formGroup: FormGroup | undefined
ngOnInit(): void {
Expand All @@ -23,7 +23,7 @@ export class SearchConfigComponent implements OnInit {
})
}

onSearchConfigChange(event: SearchConfig) {
this.selectedSearchConfig?.emit(event)
onSearchConfigChange(searchConfig: SearchConfig) {
this.selectedSearchConfigChanged?.emit(searchConfig)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[actions]="headerActions"
>
<ng-template #additionalToolbarContent>
<ocx-search-config [searchConfigs]="searchConfigs" (selectedSearchConfig)="confirmSearchConfig($event)">
<ocx-search-config [searchConfigs]="searchConfigs" (selectedSearchConfigChanged)="confirmSearchConfig($event)">
</ocx-search-config>
<ng-container *ngIf="_additionalToolbarContent" [ngTemplateOutlet]="_additionalToolbarContent"></ng-container>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class SearchHeaderComponent implements AfterViewInit {

@Output() searched: EventEmitter<any> = new EventEmitter()
@Output() resetted: EventEmitter<any> = new EventEmitter()
@Output() selectedSearchConfig: EventEmitter<SearchConfig> = new EventEmitter()
@Output() selectedSearchConfigChanged: EventEmitter<SearchConfig> = new EventEmitter()
@Output() viewModeChanged: EventEmitter<string> = new EventEmitter()
@ContentChild('additionalToolbarContent')
additionalToolbarContent: TemplateRef<any> | undefined
Expand Down Expand Up @@ -105,7 +105,7 @@ export class SearchHeaderComponent implements AfterViewInit {
}
}

confirmSearchConfig(event: SearchConfig) {
this.selectedSearchConfig?.emit(event)
confirmSearchConfig(searchConfig: SearchConfig) {
this.selectedSearchConfigChanged?.emit(searchConfig)
}
}

0 comments on commit 5197a47

Please sign in to comment.