Mise à jour articles et produits

This commit is contained in:
Rampeur
2025-08-19 05:12:16 +02:00
parent 977104aac2
commit ed6104ed21
137 changed files with 1498 additions and 681 deletions
@@ -1,14 +1,14 @@
<div class="banner bg-navy light text-center mat-elevation-z2">
<div class="d-flex justify-content-center text-start">
<img [src]="user.image" class="user-img" [alt]="user.username" />
<div class="ms-3">
<h4>{{ bannerTitle }}</h4>
<div class="banner bg-accent mat-elevation-z2">
<div class="d-flex mx-2 mx-md-3 mx-lg-4">
<img [src]="user.image" class="user-img me-3" [alt]="user.username" />
<div class="flex-spacer">
<h3 class="mb-0">{{bannerTitle}}</h3>
<span class="fs-6">{{user.firstname}} {{user.lastname}}</span>
</div>
<div class="align-self-center text-end">
<button mat-raised-button color="cyan" [routerLink]="['/profile', user.username]">
<mat-icon aria-label="Voir le compte" fontIcon="person"></mat-icon> Mon compte
</button>
<button mat-raised-button color="warn" [routerLink]="['/settings', 'credentials']" class="ms-2">
<mat-icon aria-label="Modifier le compte" fontIcon="password"></mat-icon> {{ btnPasswordTitle }}
</button>
</div>
</div>
</div>
@@ -18,10 +18,22 @@
<app-list-errors [errors]="errors"></app-list-errors>
<div class="container page mt-4">
<div class="row">
<div class="col-md-6 offset-md-3 col-xs-12">
<div class="col-lg-8 offset-lg-2 col-xl-6 offset-xl-3 col-xs-12">
<form class="row row-cols-lg-auto" [formGroup]="settingsForm" (ngSubmit)="submitForm()">
<fieldset [disabled]="isSubmitting" class="w-100">
<legend [hidden]="true">Informations personnelles</legend>
<div class="col-12">
<mat-form-field appearance="fill" class="w-100">
<mat-label>Nom d'utilisateur</mat-label>
<input matInput type="text" placeholder="Choisissez un nom d'utilisateur" formControlName="username">
</mat-form-field>
</div>
<div class="col-12">
<mat-form-field appearance="fill" class="w-100">
<mat-label>eMail</mat-label>
<input matInput readonly type="email" placeholder="Indiquez votre adresse email" formControlName="email">
</mat-form-field>
</div>
<div class="col-12">
<mat-form-field appearance="fill" class="w-100">
<mat-label>Nom</mat-label>
@@ -40,48 +52,33 @@
<input matInput type="tel" placeholder="Indiquez votre numéro de téléphone" formControlName="phone">
</mat-form-field>
</div>
<div class="col-12">
<mat-form-field appearance="fill" class="w-100">
<mat-label>Licence</mat-label>
<input matInput type="number" placeholder="Indiquez le un nom de votre société" formControlName="licence">
</mat-form-field>
</div>
<div class="col-12">
<mat-form-field appearance="fill" class="w-100">
<mat-label>Poids</mat-label>
<input matInput type="number" placeholder="Indiquez le poids en Kg" formControlName="poids">
</mat-form-field>
</div>
<div class="col-12">
<mat-form-field appearance="fill" class="w-100">
<mat-label>Photo de profil</mat-label>
<input matInput type="url" placeholder="URL de votre photo" formControlName="image">
</mat-form-field>
</div>
<div class="col-12">
<mat-form-field appearance="fill" class="w-100">
<mat-label>Arrière plan</mat-label>
<input matInput type="url" placeholder="URL de votre arrière plan" formControlName="bg_image">
<mat-select formControlName="image" [(value)]="user.image">
@for (avatar of avatars; track avatar; let idx = $index) {
<mat-option [value]="avatar">
<img src="{{ avatar }}" alt="Avatar {{ idx + 1 }}" class="avatar">
<span>Image {{ idx + 1 }}</span>
</mat-option>
}
</mat-select>
</mat-form-field>
</div>
</fieldset>
<fieldset [disabled]="isSubmitting" class="w-100">
<legend [hidden]="true">Informations de connexion</legend>
<div class="col-12">
<mat-form-field appearance="fill" class="w-100">
<mat-label>Nom d'utilisateur</mat-label>
<input matInput type="text" placeholder="Choisissez un nom d'utilisateur" formControlName="username">
</mat-form-field>
</div>
<div class="col-12">
<mat-form-field appearance="fill" class="w-100">
<mat-label>eMail</mat-label>
<input matInput readonly type="email" placeholder="Indiquez votre adresse email" formControlName="email">
</mat-form-field>
</div>
<div class="col-12 clearfix">
<button mat-raised-button color="primary" [disabled]="!settingsForm.valid" type="submit" class="float-sm-end">{{ btnUpdateTitle }}</button>
<button mat-stroked-button color="warn" class="me-3" type="button" (click)="logout()">{{ btnLogoutTitle }}</button>
<mat-divider class="mb-3"></mat-divider>
<button mat-raised-button color="primary" [disabled]="!settingsForm.valid" type="submit" class="mb-2 float-end">
<i class="icosvg-floppy-disk"></i> {{ btnUpdateTitle }}
</button>
<button mat-stroked-button color="warn" class="me-2 mb-2" type="button" (click)="logout()">
<i class="icosvg-switch"></i> {{ btnLogoutTitle }}
</button>
<button mat-stroked-button color="orange" class="me-2 mb-2" type="button" [routerLink]="['/settings', 'credentials']">
<mat-icon aria-label="Modifier le compte" fontIcon="password"></mat-icon> {{ btnPasswordTitle }}
</button>
</div>
</fieldset>
</form>