bugfixes
This commit is contained in:
parent
2a9b0f248d
commit
5cf79f7a24
5 changed files with 36 additions and 26 deletions
|
|
@ -18,7 +18,9 @@ export class ContactDeleteComponent {
|
||||||
private sharedService: SharedService,
|
private sharedService: SharedService,
|
||||||
private firebaseService: FirebaseService,
|
private firebaseService: FirebaseService,
|
||||||
private router: Router
|
private router: Router
|
||||||
) {}
|
) {
|
||||||
|
console.log(this.sharedService.isEditContactDialogOpen);
|
||||||
|
}
|
||||||
|
|
||||||
deleteContact() {
|
deleteContact() {
|
||||||
this.firebaseService.deleteUser(this.currentUserId);
|
this.firebaseService.deleteUser(this.currentUserId);
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img src="./../../../../assets/img/logo.svg" alt="" />
|
<img src="./../../../../assets/img/logo.svg" alt="" />
|
||||||
<p>Edit contact</p>
|
<p>Edit contact</p>
|
||||||
<app-btn-close
|
<app-btn-close [isEditContactDialogOpen]="false"></app-btn-close>
|
||||||
[dialogClose]="'sharedService.isDeleteContactDialogOpen'"
|
|
||||||
></app-btn-close>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="badge">
|
<div class="badge">
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,16 @@
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="error-msg">
|
||||||
@if ((!firstName.valid && firstName.touched) && (!lastName.valid &&
|
@if ((!firstName.valid && firstName.touched) && (!lastName.valid &&
|
||||||
lastName.touched)) {
|
lastName.touched)) {
|
||||||
<span>{{ "contact-dialog-form.invalid-name" | translate }}</span>
|
<p>{{ "contact-dialog-form.invalid-name" | translate }}</p>
|
||||||
} @else { @if (!firstName.valid && firstName.touched) {
|
} @else { @if (!firstName.valid && firstName.touched) {
|
||||||
<span>{{ "contact-dialog-form.invalid-firstName" | translate }}</span>
|
<p>{{ "contact-dialog-form.invalid-firstName" | translate }}</p>
|
||||||
} @else { @if (!lastName.valid && lastName.touched) {
|
} @else { @if (!lastName.valid && lastName.touched) {
|
||||||
<span>{{ "contact-dialog-form.invalid-lastName" | translate }}</span>
|
<p>{{ "contact-dialog-form.invalid-lastName" | translate }}</p>
|
||||||
} } }
|
} } }
|
||||||
|
</div>
|
||||||
<input
|
<input
|
||||||
id="email"
|
id="email"
|
||||||
type="email"
|
type="email"
|
||||||
|
|
@ -47,9 +49,11 @@
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
<div class="error-msg">
|
||||||
@if (!email.valid && email.touched) {
|
@if (!email.valid && email.touched) {
|
||||||
<span>{{ "contact-dialog-form.invalid-email" | translate }}</span>
|
<p>{{ "contact-dialog-form.invalid-email" | translate }}</p>
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
<input
|
<input
|
||||||
id="phone"
|
id="phone"
|
||||||
type="phone"
|
type="phone"
|
||||||
|
|
@ -60,9 +64,11 @@
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
<div class="error-msg">
|
||||||
@if (!phone.valid && phone.touched) {
|
@if (!phone.valid && phone.touched) {
|
||||||
<span>{{ "contact-dialog-form.invalid-phone" | translate }}</span>
|
<p>{{ "contact-dialog-form.invalid-phone" | translate }}</p>
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<app-form-btn
|
<app-form-btn
|
||||||
class="btn-delete"
|
class="btn-delete"
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,15 @@ section {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
.error-msg {
|
||||||
font-size: 14px;
|
min-height: 18px;
|
||||||
|
padding: 6px;
|
||||||
|
margin-left: 12px;
|
||||||
|
p {
|
||||||
|
color: var(--red);
|
||||||
|
font-size: 12px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: red;
|
}
|
||||||
padding: 0 0 10px 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
|
|
@ -26,7 +30,7 @@ span {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
margin: 12px 12px;
|
margin: 0 12px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: var(--light-blue);
|
border-color: var(--light-blue);
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ import { SharedService } from '../../../../services/shared.service';
|
||||||
styleUrl: './btn-close.component.scss',
|
styleUrl: './btn-close.component.scss',
|
||||||
})
|
})
|
||||||
export class BtnCloseComponent {
|
export class BtnCloseComponent {
|
||||||
@Input() dialogClose!: string | boolean;
|
@Input() isEditContactDialogOpen: boolean = false;
|
||||||
|
|
||||||
constructor(private sharedService: SharedService) {}
|
constructor(private sharedService: SharedService) {}
|
||||||
|
|
||||||
closeClicked() {
|
closeClicked() {
|
||||||
this.sharedService.isAnyDialogOpen = false;
|
this.sharedService.isAnyDialogOpen = false;
|
||||||
this.dialogClose = false;
|
this.sharedService.isEditContactDialogOpen = this.isEditContactDialogOpen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue