diff --git a/src/src/app/components/trip/trip.component.html b/src/src/app/components/trip/trip.component.html
index 907ea2c..ab71ab6 100644
--- a/src/src/app/components/trip/trip.component.html
+++ b/src/src/app/components/trip/trip.component.html
@@ -328,8 +328,10 @@
Place
{{ selectedItem.place.name }}
+ @if (selectedItem.place.user == username) {
+ }
}
diff --git a/src/src/app/components/trip/trip.component.ts b/src/src/app/components/trip/trip.component.ts
index a21c9d0..0a1c1a2 100644
--- a/src/src/app/components/trip/trip.component.ts
+++ b/src/src/app/components/trip/trip.component.ts
@@ -83,6 +83,7 @@ import { generateTripCSVFile } from './csv';
})
export class TripComponent implements AfterViewInit {
@ViewChild('menuTripActions') menuTripActions!: Menu;
+ username: string;
tripSharedURL$?: Observable;
statuses: TripStatus[] = [];
trip?: Trip;
@@ -255,6 +256,7 @@ export class TripComponent implements AfterViewInit {
private route: ActivatedRoute,
private clipboard: Clipboard,
) {
+ this.username = this.utilsService.loggedUser;
this.statuses = this.utilsService.statuses;
this.tripTableSearchInput.valueChanges.pipe(debounceTime(300), takeUntilDestroyed()).subscribe({
next: (value) => {
diff --git a/src/src/app/services/utils.service.ts b/src/src/app/services/utils.service.ts
index c9a50d5..2107ef6 100644
--- a/src/src/app/services/utils.service.ts
+++ b/src/src/app/services/utils.service.ts
@@ -23,6 +23,10 @@ export class UtilsService {
constructor(private ngMessageService: MessageService) {}
+ get loggedUser(): string {
+ return localStorage.getItem(JWT_USER) ?? '';
+ }
+
toGithubTRIP() {
window.open('https://github.com/itskovacs/trip', '_blank');
}