Skip to content

Commit

Permalink
fix(frontend): fix small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pYassine committed Dec 24, 2024
1 parent 5f645c5 commit afaa32f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/auth/guards/usager-access.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class UsagerAccessGuard implements CanActivate {
return r;
} catch (e) {
appLogger.error(
`[UsagerAccessGuard] usager not found ${usagerRef} ${structureId} ${r?.user?._id}`,
`[UsagerAccessGuard] usager not found ${usagerRef} ${structureId}`,
{
sentry: true,
context: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ export class ManageFiltersComponent implements OnInit, OnChanges {
"EXCEEDED",
"NEXT_TWO_WEEKS",
"NEXT_TWO_MONTHS",
"PREVIOUS_YEAR",
"PREVIOUS_TWO_YEARS",
]);

public readonly labelsEcheanceRadiation =
extractDeadlines<UsagersFilterCriteriaEcheance>([
"PREVIOUS_YEAR",
"PREVIOUS_TWO_YEARS",
"PREVIOUS_YEAR",
]);

public readonly labelsDernierPassage =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export class SetInteractionOutFormComponent implements OnInit, OnDestroy {

public toggleProcurationIndex(value: number | null): void {
this.procurationIndex = value;
this.returnToSender = false;
}

public setInteractionForm(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export class AdminStructuresListComponent
private readonly titleService: Title
) {
this.titleService.setTitle("Liste des structures");
this.filters = new Search(this.getFilters());
this.filters.sortKey = "id";
}

ngAfterViewInit() {
Expand Down Expand Up @@ -113,6 +115,7 @@ export class AdminStructuresListComponent
this.subscription.add(
combineLatest([this.allstructures$, this.filters$]).subscribe(
([allstructures, filters]) => {
this.setFilters();
this.applyFilters({
filters,
structures: allstructures,
Expand Down Expand Up @@ -243,4 +246,13 @@ export class AdminStructuresListComponent
endIndex
) as StructureAdmin[];
}

private setFilters() {
localStorage.setItem("ADMIN", JSON.stringify(this.filters));
}

private getFilters(): null | Partial<Search> {
const filters = localStorage.getItem("ADMIN");
return filters === null ? {} : JSON.parse(filters);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<div class="container">
<div class="row">
<div class="col-md-9 col-12">
<h1 class="title">
{{ structure.nom }}
</h1>
<h1 class="title">{{ structure.id }} {{ structure.nom }}</h1>
</div>
</div>

Expand Down

0 comments on commit afaa32f

Please sign in to comment.