Compare commits
2 Commits
c75f0cdb15
...
4962d16abd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4962d16abd | ||
|
|
cad574b8fb |
|
|
@ -5,6 +5,7 @@ import com.alttd.altitudeweb.database.web_db.KeyPairMapper;
|
|||
import com.alttd.altitudeweb.database.web_db.PrivilegedUserMapper;
|
||||
import com.alttd.altitudeweb.database.web_db.SettingsMapper;
|
||||
import com.alttd.altitudeweb.database.web_db.forms.AppealMapper;
|
||||
import com.alttd.altitudeweb.database.web_db.mail.EmailVerificationMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
|
@ -22,7 +23,7 @@ public class InitializeWebDb {
|
|||
configuration.addMapper(KeyPairMapper.class);
|
||||
configuration.addMapper(PrivilegedUserMapper.class);
|
||||
configuration.addMapper(AppealMapper.class);
|
||||
configuration.addMapper(com.alttd.altitudeweb.database.web_db.mail.EmailVerificationMapper.class);
|
||||
configuration.addMapper(EmailVerificationMapper.class);
|
||||
}).join()
|
||||
.runQuery(sqlSession -> {
|
||||
createSettingsTable(sqlSession);
|
||||
|
|
|
|||
|
|
@ -81,8 +81,7 @@
|
|||
<mat-label>Email</mat-label>
|
||||
<input matInput
|
||||
formControlName="email"
|
||||
placeholder="Email"
|
||||
[defaultValue]="verifiedEmails().length > 0 ? verifiedEmails()[0] : ''">
|
||||
placeholder="Email">
|
||||
@if (form.controls.email.invalid && form.controls.email.touched) {
|
||||
<mat-error>
|
||||
@if (form.controls.email.errors?.['required']) {
|
||||
|
|
|
|||
|
|
@ -79,7 +79,12 @@ export class AppealComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
this.emailIsValid.set(false);
|
||||
}
|
||||
});
|
||||
|
||||
computed(() => {
|
||||
if (this.verifiedEmails().length > 0) {
|
||||
this.form.get('email')?.setValue(this.verifiedEmails()[0]);
|
||||
this.emailIsValid.set(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user