Skip to content

Commit b4a004e

Browse files
committed
refactor: remove obsolete title compliance feedback
- remove compliance error matching from the job title - keep compliance analysis limited to the job description
1 parent 5f6b2b5 commit b4a004e

3 files changed

Lines changed: 0 additions & 19 deletions

File tree

src/main/webapp/app/job/job-creation-form/job-creation-form.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ <h1 jhiTranslate="{{ pageTitle() }}"></h1>
6161
[required]="true"
6262
[model]="basicInfoForm.get('title')?.value"
6363
[control]="basicInfoForm.get('title') ?? undefined"
64-
[complianceError]="titleComplianceError() ?? undefined"
6564
[suffix]="jobTitleGenderSuffix()"
6665
/>
6766
</div>

src/main/webapp/app/job/job-creation-form/job-creation-form.component.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -344,19 +344,6 @@ export class JobCreationFormComponent {
344344
/** When set, only issues of this category are highlighted in the editor. (undefined = all categories shown) */
345345
readonly activeComplianceFilter = signal<string | undefined>(undefined);
346346

347-
/** Returns the explanation of a compliance issue whose text appears in the job title, if any. */
348-
readonly titleComplianceError = computed(() => {
349-
this.basicInfoFormValueSignal();
350-
const title: string = ((this.basicInfoForm.get('title')?.value ?? '') as string).toLowerCase();
351-
if (title === '') return undefined;
352-
for (const issue of this.complianceIssues()) {
353-
if (hasText(issue.text) && title.includes(issue.text.toLowerCase())) {
354-
return issue.explanation;
355-
}
356-
}
357-
return undefined;
358-
});
359-
360347
// ═══════════════════════════════════════════════════════════════════════════
361348
// FORM GROUPS
362349
// ═══════════════════════════════════════════════════════════════════════════

src/main/webapp/app/shared/components/atoms/base-input/base-input.component.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export abstract class BaseInputDirective<T> {
2323
tooltipText = input<string | undefined>(undefined);
2424
autofocus = input<boolean>(false);
2525
errorEnabled = input<boolean>(true);
26-
complianceError = input<string | undefined>(undefined);
2726
warningText = input<string | undefined>(undefined);
2827
helperTextLeft = input<string | undefined>(undefined);
2928
helperTextLeftParams = input<Record<string, unknown>>({});
@@ -50,7 +49,6 @@ export abstract class BaseInputDirective<T> {
5049

5150
inputState = computed(() => {
5251
this.formValidityVersion();
53-
if (hasText(this.complianceError())) return 'invalid';
5452
if (!this.isTouched()) return 'untouched';
5553
if (this.formControl().invalid) return 'invalid';
5654
return 'valid';
@@ -61,9 +59,6 @@ export abstract class BaseInputDirective<T> {
6159
this.formValidityVersion();
6260
this.langChange();
6361

64-
// compliance error in job creation form title
65-
const compliance = this.complianceError();
66-
if (hasText(compliance)) return compliance;
6762
const ctrl = this.formControl();
6863
const errors = ctrl.errors;
6964
if (!errors) return null;

0 commit comments

Comments
 (0)