Skip to content

Commit

Permalink
Lint prettier (PnX-SI#281)
Browse files Browse the repository at this point in the history
* Lint prettier 3.1.0
  • Loading branch information
amandine-sahl authored Dec 11, 2023
1 parent 616a5a6 commit c27c601
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 51 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- name: Frontend code formatting check (Prettier)
run: npm install prettier@~3.1.0 && npm run format:check
working-directory: ./frontend
uses: creyD/prettier_action@v4.3
with:
dry: True
prettier_version: 3.1.0
prettier_options: --config frontend/.prettierrc --check frontend/**/*.ts
2 changes: 1 addition & 1 deletion frontend/app/class/monitoring-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class MonitoringObject extends MonitoringObjectBase {

let parentOut = null;

if (parentType!='module' && !(this.parentId(parentType))) {
if (parentType != 'module' && !this.parentId(parentType)) {
return of(null);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<div class="flex-container" id="object">
<div id="geometry" class="monitoring-map-container" class="cadre" *ngIf="displayMap">
<pnx-map
*ngIf="heightMap"
[height]="heightMap"
[ngClass]="{ 'hide-draw-form': !(bEdit && obj) }">
<pnx-draw-form
[parentFormControl]="objForm && objForm.controls && objForm.controls['geometry']"
[geometryType]="obj && obj.config && obj.config['geometry_type']"
[bZoomOnPoint]="false"
[bEdit]="bEdit"
[geomFromProtocol]="false"
></pnx-draw-form>
</pnx-map>
</div>
<div id="monitoring-elem-container" class="cadre scroll">
<pnx-monitoring-breadcrumbs></pnx-monitoring-breadcrumbs>
<!-- <button (click)="displayMap = !displayMap">HIDE MAP</button> -->
<router-outlet (activate)="onActivate($event)"></router-outlet>
</div>
<div id="geometry" class="monitoring-map-container" class="cadre" *ngIf="displayMap">
<pnx-map
*ngIf="heightMap"
[height]="heightMap"
[ngClass]="{ 'hide-draw-form': !(bEdit && obj) }"
>
<pnx-draw-form
[parentFormControl]="objForm && objForm.controls && objForm.controls['geometry']"
[geometryType]="obj && obj.config && obj.config['geometry_type']"
[bZoomOnPoint]="false"
[bEdit]="bEdit"
[geomFromProtocol]="false"
></pnx-draw-form>
</pnx-map>
</div>
<div id="monitoring-elem-container" class="cadre scroll">
<pnx-monitoring-breadcrumbs></pnx-monitoring-breadcrumbs>
<!-- <button (click)="displayMap = !displayMap">HIDE MAP</button> -->
<router-outlet (activate)="onActivate($event)"></router-outlet>
</div>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class MonitoringMapListComponent {
obj: any;
bEdit: boolean;
objForm: FormGroup;
heightMap: string="80vh";
heightMap: string = '80vh';
//
displayMap: boolean = true;
siteSiteGroup: SiteSiteGroup | null = null;
Expand All @@ -37,7 +37,6 @@ export class MonitoringMapListComponent {
setTimeout(() => {
this.heightMap = height - 80 + 'px';
});

}

onActivate(component) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,31 @@
</mat-tab>
<!-- TODO: tester l'ajout de médias et voir le comportement de obj.properties -->
<mat-tab
*ngIf="obj?.properties['medias'] && obj.properties['medias'].length"
label="Médias ({{(obj.properties['medias'] && obj.properties['medias'].length) || 0}})"
>
<ng-container *ngFor="let media of obj.properties['medias']; index as i">
<div class="medias-tab">
<div [matTooltip]="ms.toString(media)">
<a [href]="ms.href(media)" target="_blank">{{ media.title_fr }}</a>
<i>
({{ ms.typeMedia(media)
}}<span *ngIf="media.author"> par {{ media.author }}</span
>)
</i>
</div>
<p *ngIf="media.description_fr">{{media.description_fr}}</p>
<div>
<pnx-display-medias
[medias]="obj.properties['medias']"
[index]="i"
display="medium"
diaporama="true"
>
</pnx-display-medias>
*ngIf="obj?.properties['medias'] && obj.properties['medias'].length"
label="Médias ({{ (obj.properties['medias'] && obj.properties['medias'].length) || 0 }})"
>
<ng-container *ngFor="let media of obj.properties['medias']; index as i">
<div class="medias-tab">
<div [matTooltip]="ms.toString(media)">
<a [href]="ms.href(media)" target="_blank">{{ media.title_fr }}</a>
<i>
({{ ms.typeMedia(media) }}<span *ngIf="media.author"> par {{ media.author }}</span
>)
</i>
</div>
<p *ngIf="media.description_fr">{{ media.description_fr }}</p>
<div>
<pnx-display-medias
[medias]="obj.properties['medias']"
[index]="i"
display="medium"
diaporama="true"
>
</pnx-display-medias>
</div>
</div>
</div>
</ng-container>
</mat-tab>
</ng-container>
</mat-tab>
</mat-tab-group>

<div class="tab-content" id="nav-tabContent" [ngStyle]="{ 'background-color': color }">
Expand Down

0 comments on commit c27c601

Please sign in to comment.