fix(clients): remove leftover unresolved git conflict markers on Last Name field
An unresolved git stash conflict had been committed as-is, leaving literal <<<<<<< Updated upstream / ======= / >>>>>>> Stashed changes markers inside the template. Angular rendered them as plain text right in the create-client form. Kept the blur-triggered capitalizeControl() version (matches First/Middle Name) and dropped the now-unused formatName() left behind by the other side of the conflict.
This commit is contained in:
@@ -2590,28 +2590,6 @@ export class ClientGeneralStepComponent implements OnInit, OnDestroy, OnChanges
|
||||
dormantFlag: 'ACTIVE'
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Automatically capitalizes the first letter of each word and lowercases the rest.
|
||||
* e.g., "sri rAm" -> "Sri Ram"
|
||||
*/
|
||||
formatName(controlName: string): void {
|
||||
const control = this.createClientForm.get(controlName);
|
||||
if (!control || typeof control.value !== 'string') return;
|
||||
|
||||
const val = control.value;
|
||||
const formatted = val
|
||||
.split(' ')
|
||||
.map((word: string) => {
|
||||
if (!word) return '';
|
||||
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
||||
})
|
||||
.join(' ');
|
||||
|
||||
if (formatted !== val) {
|
||||
control.setValue(formatted, { emitEvent: false });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user