Skip to content
This repository was archived by the owner on Sep 21, 2025. It is now read-only.

Commit 29c3ff1

Browse files
committed
fix: providers and imports
1 parent d577354 commit 29c3ff1

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

src/app/app.module.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ import { IconModule } from '~modules/icon.module';
2626
IconModule,
2727
MatDialogModule,
2828
NotificationModule,
29+
],
30+
providers: [
31+
{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'fill' } },
32+
provideHttpClient(withInterceptorsFromDi()),
2933
provideAuth(() => getAuth()),
3034
provideFirebaseApp(() => initializeApp(environment.firebaseConfig)),
3135
provideFirestore(() => getFirestore()),
@@ -39,9 +43,5 @@ import { IconModule } from '~modules/icon.module';
3943
return functions;
4044
}),
4145
],
42-
providers: [
43-
{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'fill' } },
44-
provideHttpClient(withInterceptorsFromDi()),
45-
],
4646
})
4747
export class AppModule {}

src/app/dashboard/applications/components/column/column.component.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
} from '@angular/core';
1010
import { orderBy, query, where } from '@angular/fire/firestore';
1111
import { MatDialog } from '@angular/material/dialog';
12-
import { deepEqual } from '@firebase/util';
1312
import { Observable, Subscription } from 'rxjs';
1413

1514
import { ColumnDialogComponent } from '~components/column-dialog/column-dialog.component';
@@ -18,6 +17,7 @@ import { COLUMN_SORT_OPTIONS } from '~constants/forms.constants';
1817
import { DialogActions } from '~enums/dialog-actions.enum';
1918
import { ConfirmationDialog } from '~interfaces/confirmation-dialog.interface';
2019
import { SortOption } from '~interfaces/sort-option.interface';
20+
import { Sort } from '~interfaces/sort.interface';
2121
import { Application } from '~models/application.model';
2222
import { Column } from '~models/column.model';
2323
import { ApplicationsService } from '~services/applications/applications.service';
@@ -125,7 +125,7 @@ export class ColumnComponent implements OnChanges, OnDestroy {
125125
const isSortChange =
126126
currColumn &&
127127
prevColumn &&
128-
!deepEqual(currColumn.applicationSort, prevColumn.applicationSort);
128+
!this.deepEqualSort(currColumn.applicationSort, prevColumn.applicationSort);
129129

130130
if (currColumn && (changes.column.isFirstChange() || isColumnChange || isSortChange)) {
131131
this.selectedSortOption = this.sortOptions.find((v) =>
@@ -162,6 +162,22 @@ export class ColumnComponent implements OnChanges, OnDestroy {
162162
});
163163
}
164164

165+
private deepEqualSort(a: Sort, b: Sort): boolean {
166+
if (a === b) {
167+
return true;
168+
}
169+
170+
if (!a || !b) {
171+
return false;
172+
}
173+
174+
if (typeof a !== 'object' || typeof b !== 'object') {
175+
return false;
176+
}
177+
178+
return a.direction === b.direction && a.field === b.field;
179+
}
180+
165181
private initApplications(): void {
166182
this.subscription?.unsubscribe();
167183
this.applications$ = this.applicationsService.collection$(

0 commit comments

Comments
 (0)