Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend): fix small bugs #3608

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading