empty strings or zero will be converted to null
This commit is contained in:
parent
83307684ee
commit
fe759f953f
|
|
@ -27,8 +27,8 @@ export class ValidatedInputComponent extends BaseInputComponent {
|
|||
super(validationMessagesService);
|
||||
}
|
||||
|
||||
onInputChange(event: Event): void {
|
||||
this.value = event;
|
||||
this.onChange(event);
|
||||
onInputChange(event: string): void {
|
||||
this.value = event?.length > 0 ? event : null;
|
||||
this.onChange(this.value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ export class ValidatedLocationComponent extends BaseInputComponent {
|
|||
}
|
||||
onInputChange(event: Place): void {
|
||||
this.value = event; //{ ...event, longitude: parseFloat(event.longitude), latitude: parseFloat(event.latitude) };
|
||||
if (event) {
|
||||
this.value = {
|
||||
id: event?.place_id,
|
||||
name: event?.address.city,
|
||||
|
|
@ -51,6 +52,7 @@ export class ValidatedLocationComponent extends BaseInputComponent {
|
|||
latitude: event ? parseFloat(event?.lat) : undefined,
|
||||
longitude: event ? parseFloat(event?.lon) : undefined,
|
||||
};
|
||||
}
|
||||
this.onChange(this.value);
|
||||
}
|
||||
private loadCities() {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ export class ValidatedPriceComponent extends BaseInputComponent {
|
|||
|
||||
onInputChange(event: Event): void {
|
||||
this.value = !event ? null : event;
|
||||
this.onChange(event);
|
||||
this.onChange(this.value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ export class ValidatedTextareaComponent extends BaseInputComponent {
|
|||
super(validationMessagesService);
|
||||
}
|
||||
|
||||
onInputChange(event: Event): void {
|
||||
this.value = event;
|
||||
onInputChange(event: string): void {
|
||||
this.value = event?.length > 0 ? event : null;
|
||||
this.onChange(this.value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="md:col-span-2">
|
||||
<label for="email" class="block text-sm font-medium text-gray-700">E-mail (required)</label>
|
||||
<input type="email" id="email" name="email" [(ngModel)]="user.email" disabled class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500" />
|
||||
<p class="text-xs text-gray-500 mt-1">You can only modify your email by contacting us at support@bizwatch.net</p>
|
||||
<p class="text-xs text-gray-500 mt-1">You can only modify your email by contacting us at support@bizmatch.net</p>
|
||||
</div>
|
||||
@if (isProfessional || isAdmin()){
|
||||
<div class="flex flex-row items-center justify-around md:space-x-4">
|
||||
|
|
|
|||
Loading…
Reference in New Issue