Skip to content

Commit

Permalink
Upgrade to prettier v3
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Aug 8, 2023
1 parent da73867 commit 5242f2a
Show file tree
Hide file tree
Showing 36 changed files with 92 additions and 65 deletions.
5 changes: 4 additions & 1 deletion client/app/admin/comments/comments/comments.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ export class CommentsComponent extends NaturalAbstractList<CommentService> imple
{id: 'news', label: 'Actualité'},
];

public constructor(service: CommentService, public readonly permissionsService: PermissionsService) {
public constructor(
service: CommentService,
public readonly permissionsService: PermissionsService,
) {
super(service);
}
}
2 changes: 1 addition & 1 deletion client/app/admin/events/events/events.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<ng-container matColumnDef="date">
<th *matHeaderCellDef mat-header-cell mat-sort-header>Date</th>
<td *matCellDef="let element" mat-cell>{{ element.date | date : 'dd.MM.y' }}</td>
<td *matCellDef="let element" mat-cell>{{ element.date | date: 'dd.MM.y' }}</td>
</ng-container>

<ng-container matColumnDef="name">
Expand Down
5 changes: 4 additions & 1 deletion client/app/admin/events/events/events.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ export class EventsComponent extends NaturalAbstractList<EventService> implement
{id: 'type', label: 'Type'},
];

public constructor(service: EventService, public readonly permissionsService: PermissionsService) {
public constructor(
service: EventService,
public readonly permissionsService: PermissionsService,
) {
super(service);
}
}
2 changes: 1 addition & 1 deletion client/app/admin/newses/newses/newses.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<ng-container matColumnDef="date">
<th *matHeaderCellDef mat-header-cell mat-sort-header>Date</th>
<td *matCellDef="let element" mat-cell>{{ element.date | date : 'dd.MM.y' }}</td>
<td *matCellDef="let element" mat-cell>{{ element.date | date: 'dd.MM.y' }}</td>
</ng-container>

<ng-container matColumnDef="name">
Expand Down
5 changes: 4 additions & 1 deletion client/app/admin/newses/newses/newses.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export class NewsesComponent extends NaturalAbstractList<NewsService> implements
{id: 'isActive', label: 'Active'},
];

public constructor(service: NewsService, public readonly permissionsService: PermissionsService) {
public constructor(
service: NewsService,
public readonly permissionsService: PermissionsService,
) {
super(service);
}
}
10 changes: 5 additions & 5 deletions client/app/admin/order/order-lines/order-lines.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<ng-container matColumnDef="productType">
<th *matHeaderCellDef mat-header-cell mat-sort-header>Type</th>
<td *matCellDef="let element" mat-cell>{{ element.type | enum : 'ProductType' | async }}</td>
<td *matCellDef="let element" mat-cell>{{ element.type | enum: 'ProductType' | async }}</td>
<td *matFooterCellDef mat-footer-cell></td>
</ng-container>

Expand Down Expand Up @@ -72,23 +72,23 @@
<th *matHeaderCellDef mat-header-cell natural-5em-column>Montant</th>
<td *matCellDef="let element" mat-cell>
<ng-container *ngIf="element.balanceCHF > 0">{{
element.balanceCHF | currency : 'CHF'
element.balanceCHF | currency: 'CHF'
}}</ng-container>
<ng-container *ngIf="element.balanceEUR > 0">{{
element.balanceEUR | currency : 'EUR'
element.balanceEUR | currency: 'EUR'
}}</ng-container>
</td>
<td *matFooterCellDef mat-footer-cell>
<span *ngIf="dataSource?.data?.totalBalanceCHF > 0">{{
dataSource.data?.totalBalanceCHF | currency : 'CHF'
dataSource.data?.totalBalanceCHF | currency: 'CHF'
}}</span>
<ng-container
*ngIf="dataSource?.data?.totalBalanceCHF > 0 && dataSource?.data.totalBalanceEUR > 0"
>
-
</ng-container>
<span *ngIf="dataSource?.data?.totalBalanceEUR > 0">{{
dataSource.data?.totalBalanceEUR | currency : 'EUR'
dataSource.data?.totalBalanceEUR | currency: 'EUR'
}}</span>
</td>
</ng-container>
Expand Down
4 changes: 2 additions & 2 deletions client/app/admin/order/order/order.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ <h2 fxFlex mat-dialog-title>Commande du {{ data.model.creationDate | swissDate }
<div class="mat-h1">
<div>Total :</div>
<div *ngIf="data.model.balanceCHF > 0" style="text-align: right">
{{ data.model.balanceCHF | currency : 'CHF' }}
{{ data.model.balanceCHF | currency: 'CHF' }}
</div>
<div *ngIf="data.model.balanceEUR > 0" style="text-align: right">
{{ data.model.balanceEUR | currency : 'EUR' }}
{{ data.model.balanceEUR | currency: 'EUR' }}
</div>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions client/app/admin/order/orders/orders.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

<ng-container matColumnDef="status">
<th *matHeaderCellDef mat-header-cell>Statut</th>
<td *matCellDef="let element" mat-cell>{{ element.status | enum : 'OrderStatus' | async }}</td>
<td *matCellDef="let element" mat-cell>{{ element.status | enum: 'OrderStatus' | async }}</td>
<td *matFooterCellDef mat-footer-cell></td>
</ng-container>

Expand All @@ -77,12 +77,12 @@
</th>
<td *matCellDef="let element" mat-cell natural-align-right>
<ng-container *ngIf="element.balanceCHF > 0">{{
element.balanceCHF | currency : 'CHF'
element.balanceCHF | currency: 'CHF'
}}</ng-container>
</td>
<td *matFooterCellDef mat-footer-cell natural-align-right>
<span *ngIf="dataSource?.data?.totalBalanceCHF > 0">{{
dataSource.data?.totalBalanceCHF | currency : 'CHF'
dataSource.data?.totalBalanceCHF | currency: 'CHF'
}}</span>
</td>
</ng-container>
Expand All @@ -93,12 +93,12 @@
</th>
<td *matCellDef="let element" mat-cell natural-align-right>
<ng-container *ngIf="element.balanceEUR > 0">{{
element.balanceEUR | currency : 'EUR'
element.balanceEUR | currency: 'EUR'
}}</ng-container>
</td>
<td *matFooterCellDef mat-footer-cell natural-align-right>
<span *ngIf="dataSource?.data?.totalBalanceEUR > 0">{{
dataSource.data?.totalBalanceEUR | currency : 'EUR'
dataSource.data?.totalBalanceEUR | currency: 'EUR'
}}</span>
</td>
</ng-container>
Expand Down
6 changes: 3 additions & 3 deletions client/app/admin/products/products/products.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@

<ng-container matColumnDef="type">
<th *matHeaderCellDef mat-header-cell mat-sort-header>Type</th>
<td *matCellDef="let element" mat-cell>{{ element.type | enum : 'ProductType' | async }}</td>
<td *matCellDef="let element" mat-cell>{{ element.type | enum: 'ProductType' | async }}</td>
</ng-container>

<ng-container matColumnDef="pricePerUnitCHF">
<th *matHeaderCellDef mat-header-cell mat-sort-header natural-align-right>Prix CHF</th>
<td *matCellDef="let element" mat-cell natural-align-right>
<span *ngIf="element.pricePerUnitCHF !== '0.00'">{{
element.pricePerUnitCHF | currency : 'CHF'
element.pricePerUnitCHF | currency: 'CHF'
}}</span>
</td>
</ng-container>
Expand All @@ -74,7 +74,7 @@
<th *matHeaderCellDef mat-header-cell mat-sort-header natural-align-right>Prix EUR</th>
<td *matCellDef="let element" mat-cell natural-align-right>
<span *ngIf="element.pricePerUnitEUR !== '0.00'">{{
element.pricePerUnitEUR | currency : 'EUR'
element.pricePerUnitEUR | currency: 'EUR'
}}</span>
</td>
</ng-container>
Expand Down
5 changes: 4 additions & 1 deletion client/app/admin/sessions/session/session.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ export class SessionComponent extends NaturalAbstractDetail<SessionService> impl
*/
public override data!: SessionResolve & {seo: NaturalSeoBasic};

public constructor(private readonly sessionService: SessionService, public readonly userService: UserService) {
public constructor(
private readonly sessionService: SessionService,
public readonly userService: UserService,
) {
super('session', sessionService);
}

Expand Down
4 changes: 2 additions & 2 deletions client/app/admin/sessions/sessions/sessions.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@

<ng-container matColumnDef="startDate">
<th *matHeaderCellDef mat-header-cell mat-sort-header>Date</th>
<td *matCellDef="let element" mat-cell>{{ element.startDate | date : 'dd.MM.y' }}</td>
<td *matCellDef="let element" mat-cell>{{ element.startDate | date: 'dd.MM.y' }}</td>
</ng-container>

<ng-container matColumnDef="endDate">
<th *matHeaderCellDef mat-header-cell mat-sort-header>Date contrib.</th>
<td *matCellDef="let element" mat-cell>{{ element.endDate | date : 'dd.MM.y' }}</td>
<td *matCellDef="let element" mat-cell>{{ element.endDate | date: 'dd.MM.y' }}</td>
</ng-container>

<ng-container matColumnDef="street">
Expand Down
2 changes: 1 addition & 1 deletion client/app/admin/users/user/user.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h2 class="mat-h2">Statut</h2>
<div>
<span class="mat-subtitle-2">Abonnement : </span>
<ng-container *ngIf="data.model.subscriptionLastReviewNumber">
Abonné {{ data.model.subscriptionType | enum : 'ProductType' | async }} jusqu'au numéro
Abonné {{ data.model.subscriptionType | enum: 'ProductType' | async }} jusqu'au numéro
{{ data.model.subscriptionLastReviewNumber }}
</ng-container>

Expand Down
5 changes: 4 additions & 1 deletion client/app/admin/users/user/user.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ export class UserComponent extends NaturalAbstractDetail<UserService> implements
*/
public override data!: UserResolve & {seo: NaturalSeoBasic};

public constructor(private readonly userService: UserService, public readonly sessionService: SessionService) {
public constructor(
private readonly userService: UserService,
public readonly sessionService: SessionService,
) {
super('user', userService);
}

Expand Down
2 changes: 1 addition & 1 deletion client/app/admin/users/users/users.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<th *matHeaderCellDef class="app-date-column" mat-header-cell mat-sort-header>
Membre des artisans
</th>
<td *matCellDef="let element" mat-cell>{{ element.membership | enum : 'Membership' | async }}</td>
<td *matCellDef="let element" mat-cell>{{ element.membership | enum: 'Membership' | async }}</td>
</ng-container>

<ng-container matColumnDef="phone">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
fxLayoutAlign="start baseline"
>
<span>{{ comment.authorName }}</span>
<span class="mat-body text-light"> Posté le {{ comment.creationDate | date : 'longDate' }}</span>
<span class="mat-body text-light"> Posté le {{ comment.creationDate | date: 'longDate' }}</span>
<a
[routerLink]="['/admin/comment', comment.id]"
mat-icon-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ export class CommentListComponent extends NaturalAbstractList<CommentService> im

public newCommentValue = '';

public constructor(service: CommentService, public readonly permissionsService: PermissionsService) {
public constructor(
service: CommentService,
public readonly permissionsService: PermissionsService,
) {
super(service);
this.persistSearch = false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="container" fxLayout="column" fxLayoutGap="30px">
<div fxLayout="column" fxLayoutGap="10px">
<div fxLayout="row" fxLayoutGap="15px" class="mat-h3 text-light">
<div>{{ data.model.date | date : 'EEEE d MMMM yyyy' | capitalize }}</div>
<div>{{ data.model.date | date: 'EEEE d MMMM yyyy' | capitalize }}</div>
</div>

<h1 class="mat-headline-4 no-margin-bottom">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h1 class="mat-headline-4">AGENDA</h1>
<div fxLayout="column" fxLayoutGap="30px">
<div *ngFor="let event of items" fxLayout="column" fxLayoutGap="5px">
<a [routerLink]="[event.id]" class="mat-h2">{{ event.name }}</a>
<div class="text-light">{{ event.date | date : 'EEEE d MMMM yyyy' | capitalize }}</div>
<div class="text-light">{{ event.date | date: 'EEEE d MMMM yyyy' | capitalize }}</div>
<div>{{ event.place }}</div>
<div>{{ event.type }}</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div class="newses-list" fxLayout="column" fxLayoutGap="20px">
<div *ngFor="let news of newses" class="news">
<div class="mat-body-strong text-light">
{{ news.date | date : 'EEE dd.MM.yy' | capitalize }}
{{ news.date | date: 'EEE dd.MM.yy' | capitalize }}
</div>
<a class="mat-h2" [routerLink]="['/actualite', news.id]" matRipple>{{ news.name }}</a>
<div class="mat-h3 description line-break">{{ news.description }}</div>
Expand Down Expand Up @@ -74,7 +74,7 @@
event.name
}}</a>
<div class="mat-h3 no-margin-bottom">
<span class="text-light">{{ event.date | date : 'EEE dd.MM.yy' | capitalize }}</span>
<span class="text-light">{{ event.date | date: 'EEE dd.MM.yy' | capitalize }}</span>
<span class="description"> - {{ event.place }} - {{ event.type }}</span>
</div>
</div>
Expand Down Expand Up @@ -117,7 +117,7 @@
<div fxLayout="row" fxLayoutGap="10px" fxLayoutAlign="start baseline" class="mat-h2 text-thin">
<span>{{ currentReview.reviewNumber }}</span>
<span>|</span>
<span>{{ currentReview.releaseDate | date : 'MMMM yyyy' | capitalize }}</span>
<span>{{ currentReview.releaseDate | date: 'MMMM yyyy' | capitalize }}</span>
</div>
<a [routerLink]="['/larevuedurable/article', currentReview.id]" class="mat-headline-4">{{
currentReview.name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container" fxLayout="column" fxLayoutGap="60px">
<div fxLayout="column" fxLayoutGap="10px">
<div class="mat-h2 text-light">{{ data.model.date | date : 'EEEE d MMMM yyyy' | capitalize }}</div>
<div class="mat-h2 text-light">{{ data.model.date | date: 'EEEE d MMMM yyyy' | capitalize }}</div>

<h1 class="mat-headline-4 no-margin-bottom">
{{ data.model.name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h1 class="mat-headline-4">ACTUALITÉS</h1>

<div fxLayout="column" fxLayoutGap="60px">
<div *ngFor="let news of items">
<div class="text-light">{{ news.date | date : 'EEEE d MMMM yyyy' | capitalize }}</div>
<div class="text-light">{{ news.date | date: 'EEEE d MMMM yyyy' | capitalize }}</div>
<a [routerLink]="[news.id]" class="mat-h2">{{ news.name }}</a>
<div class="mat-body">{{ news.description }}</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h1 class="mat-headline-4">
<div class="mat-h2">Les autres sessions à {{ data.model.locality | lowercase }}</div>
<div *ngFor="let session of otherSessions">
<a [routerLink]="['../', session.id]" class="mat-body-strong">{{ session.name }}</a>
<div>à partir du {{ session.startDate | date : 'EEE d MMMM y' }}</div>
<div>à partir du {{ session.startDate | date: 'EEE d MMMM y' }}</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export class SessionPageComponent extends NaturalAbstractDetail<SessionService>

public viewer: CurrentUserForProfile['viewer'] = null;

public constructor(private readonly sessionService: SessionService, public readonly userService: UserService) {
public constructor(
private readonly sessionService: SessionService,
public readonly userService: UserService,
) {
super('session', sessionService);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export class SessionSideColumnComponent implements OnInit {

@Input() public hiddenBlocName?: string;

public constructor(private readonly sessionService: SessionService, private readonly route: ActivatedRoute) {}
public constructor(
private readonly sessionService: SessionService,
private readonly route: ActivatedRoute,
) {}

public ngOnInit(): void {
const qvm = new NaturalQueryVariablesManager<SessionsVariables>();
Expand Down
5 changes: 4 additions & 1 deletion client/app/front-office/modules/cart/classes/cart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ export class Cart {
* On new cart, never recover from session storage
* @param id Use id param only for global cart
*/
public constructor(private readonly cartCollectionService: CartCollectionService, id?: number) {
public constructor(
private readonly cartCollectionService: CartCollectionService,
id?: number,
) {
this._id = id ?? this.cartCollectionService.length;
this.cartCollectionService.add(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
></a>

<a [routerLink]="['/larevuedurable/article', line.product.id]" class="item-body item-button" mat-button>
{{ line.product.name }}, {{ line.type | enum : 'ProductType' | async }}
{{ line.product.name }}, {{ line.type | enum: 'ProductType' | async }}
</a>

<ng-container *ngIf="line.quantity > 1">
Expand All @@ -34,7 +34,7 @@

<div fxLayout="row" fxLayoutAlign="start end" fxLayoutGap="5px" style="white-space: nowrap">
<div class="price mat-body-strong">
{{ line.totalTaxInc | currency : currencyService.current.value }}
{{ line.totalTaxInc | currency: currencyService.current.value }}
</div>
</div>

Expand Down Expand Up @@ -72,7 +72,7 @@
></a>

<a routerLink="/larevuedurable/abonnements" mat-button class="item-body item-button">
{{ cart.subscription.subscription.name }}, {{ cart.subscription.type | enum : 'ProductType' | async }}
{{ cart.subscription.subscription.name }}, {{ cart.subscription.type | enum: 'ProductType' | async }}
</a>

<div *ngIf="cart.subscription.emails">{{ cart.subscription.emails.join(', ') }}</div>
Expand Down Expand Up @@ -102,7 +102,7 @@

<div fxLayout="row" fxLayoutAlign="start end" fxLayoutGap="5px" style="white-space: nowrap">
<div class="price mat-body-strong">
{{ cart.donationAmount | currency : currencyService.current.value }}
{{ cart.donationAmount | currency: currencyService.current.value }}
</div>
</div>

Expand All @@ -121,7 +121,7 @@

<div fxLayout="row" fxLayoutAlign="end">
<div class="mat-h1 padding-v">
Total TTC : {{ cart.totalTaxInc | currency : currencyService.current.value }}
Total TTC : {{ cart.totalTaxInc | currency: currencyService.current.value }}
</div>
</div>

Expand Down
Loading

0 comments on commit 5242f2a

Please sign in to comment.