-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AAE-19610] Add specific date range settings to search filter #9250
Conversation
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 2 New issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry that I reviewed it a bit late, I couldn't do it earlier, overall PR looks okay I only pointed out some small improvements that can be added in other PR
this.combinedDisplayValue = this.combinedDisplayValue ? `${this.combinedDisplayValue} ${displayLabelForField}` : `${displayLabelForField}`; | ||
} | ||
}); | ||
} | ||
|
||
private getDisplayLabelForField(fieldForDisplayLabel: string): string { | ||
return this.settings && this.settings.displayedLabelsByField && this.settings.displayedLabelsByField[fieldForDisplayLabel] ? this.settings.displayedLabelsByField[fieldForDisplayLabel] : fieldForDisplayLabel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be way shorter like: return this.settings?.displayedLabelsByField?.[fieldForDisplayLabel] ?? fieldForDisplayLabel;
} | ||
|
||
private setDefaultDateFormatSettings() { | ||
if (this.settings && !this.settings.dateFormat) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (this.settings && !this.settings.dateFormat) { | |
if (!this.settings?.dateFormat) { |
export class TabLabelsPipe implements PipeTransform { | ||
|
||
transform(field: string, settings?: SearchWidgetSettings): string { | ||
return settings && settings.displayedLabelsByField && settings.displayedLabelsByField[field] ? settings.displayedLabelsByField[field] : field; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be way shorter like: return this.settings?.displayedLabelsByField?.[field] ?? field;
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behaviour? (You can also link to an open issue here)
Search filter was missing important settings for
date-range
typeWhat is the new behaviour?
Important settings for
date-range
type were introduced to fix this bug:https://alfresco.atlassian.net/browse/AAE-19610
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: