Skip to content

Commit e5b432d

Browse files
committed
fixed prural setting
1 parent d40b917 commit e5b432d

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/app/pages/settings/settings.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ <h2>Terminology</h2>
174174
[(ngModel)]="customTeamLabel"
175175
(ngModelChange)="onTeamLabelChange()" />
176176
</mat-form-field>
177-
<mat-form-field appearance="fill">
177+
<mat-form-field appearance="fill" floatLabel="always">
178178
<mat-label>Team (plural)</mat-label>
179179
<input
180180
matInput
@@ -194,7 +194,7 @@ <h2>Terminology</h2>
194194
[(ngModel)]="customGroupLabel"
195195
(ngModelChange)="onGroupLabelChange()" />
196196
</mat-form-field>
197-
<mat-form-field appearance="fill">
197+
<mat-form-field appearance="fill" floatLabel="always">
198198
<mat-label>Group (plural)</mat-label>
199199
<input
200200
matInput

src/app/pages/settings/settings.component.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,15 @@ export class SettingsComponent implements OnInit {
155155
this.customGroupLabel = this.settings.getGroupLabel();
156156
this.customGroupLabelPlural = this.settings.getGroupLabelPlural();
157157

158+
// If the plural is just the auto-generated default (singular + 's'),
159+
// leave the field empty so the dynamic placeholder shows instead.
160+
if (this.customTeamLabelPlural === this.customTeamLabel + 's') {
161+
this.customTeamLabelPlural = '';
162+
}
163+
if (this.customGroupLabelPlural === this.customGroupLabel + 's') {
164+
this.customGroupLabelPlural = '';
165+
}
166+
158167
// Init dates
159168
let date: Date = new Date();
160169
date = new Date(date.getFullYear(), 0, 31); // 31 Jan current year

0 commit comments

Comments
 (0)