feat(landlord-profile): enhance profile completion dialog and form layout

This commit is contained in:
nessar committed 2026-08-17 14:18:16 +02:00
1 parent 12316b8604
commit 62d0f171f4
6 files changed
+82 -12

No files matched your search

@@ -3,9 +3,8 @@
width: min(36rem, calc(100vw - 3rem));
max-width: 100%;
gap: var(--space-4, 1rem);
max-height: 75vh;
overscroll-behavior-y: contain;
container-type: inline-size;
padding-inline: var(--space-6, 1.5rem);
padding-block-end: var(--space-6, 1.5rem);
}
.profile-dialog-content > p,
@@ -1,5 +1,5 @@
<h2 mat-dialog-title>Complétez votre profil</h2>
<mat-dialog-content class="profile-dialog-content">
<div class="profile-dialog-content">
<p>Vos coordonnées sont nécessaires pour créer vos baux et vos quittances.</p>
@if (profileStatus() === 'loading') {
@@ -13,13 +13,26 @@
</div>
} @else {
<app-landlord-profile-form
class="profile-completion-form"
[profile]="profile()"
[saving]="saving()"
[saveError]="error()"
(saveRequested)="save($event)"
/>
>
<button
profile-form-secondary-action
mat-button
type="button"
(click)="logout()"
[disabled]="saving()"
>
Déconnexion
</button>
</app-landlord-profile-form>
}
</mat-dialog-content>
<mat-dialog-actions align="end">
<button mat-button type="button" (click)="logout()" [disabled]="saving()">Déconnexion</button>
</mat-dialog-actions>
</div>
@if (profileStatus() !== 'ready') {
<mat-dialog-actions align="end">
<button mat-button type="button" (click)="logout()" [disabled]="saving()">Déconnexion</button>
</mat-dialog-actions>
}
@@ -3,6 +3,11 @@
container-type: inline-size;
}
:host(.profile-completion-form) {
--mat-button-text-horizontal-padding: var(--space-1, 0.25rem);
--mat-button-filled-horizontal-padding: var(--space-1, 0.25rem);
}
.profile-form {
display: grid;
gap: var(--space-4, 1rem);
@@ -32,6 +37,12 @@
justify-content: flex-end;
}
:host(.profile-completion-form) .profile-actions {
flex-wrap: nowrap;
justify-content: space-between;
gap: var(--space-1, 0.25rem);
}
@container (min-width: 32rem) {
.profile-fields {
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -52,6 +52,7 @@
/></mat-form-field>
</fieldset>
<div class="profile-actions">
<ng-content select="[profile-form-secondary-action]" />
<button mat-flat-button type="submit" class="primary-action">
@if (saving()) {
<mat-spinner diameter="18" aria-hidden="true" /> Enregistrement…