kuni 3 tygodni temu
rodzic
commit
e094dd1506

+ 22
- 0
src/app/pages/danka-detail/danka-detail.ts Wyświetl plik

@@ -112,6 +112,28 @@ export class DankaDetail implements OnInit, AfterViewInit {
112 112
   }
113 113
   async init(): Promise<void> {
114 114
     const id = this.route.snapshot.params['id'];
115
+
116
+    console.log('id', id);
117
+
118
+    this.danka = await this.dankaService.getDankaById(id);
119
+
120
+    console.log('danka', this.danka);
121
+
122
+    this.marriageRelations =
123
+      await this.marriageRelationService.getMarriageRelationsByDankaId(id);
124
+
125
+    console.log('marriageRelations', this.marriageRelations);
126
+
127
+    this.families =
128
+      await this.familyService.getFamiliesByDankaId(id);
129
+
130
+    console.log('families', this.families);
131
+
132
+    this.kakocholist =
133
+      await this.kakochoService.getKakochoByDankaId(id);
134
+
135
+    console.log('kakocholist', this.kakocholist);
136
+
115 137
     if (!id) return;
116 138
 
117 139
     this.danka = (await this.dankaService.getDankaById(id)) ?? undefined;

+ 2
- 1
src/app/pages/dashboard/dashboard.ts Wyświetl plik

@@ -1,10 +1,11 @@
1 1
 import { Component } from '@angular/core';
2
-import { RouterLink } from '@angular/router';
2
+import { Router, RouterLink } from '@angular/router';
3 3
 import { KakochoService } from '../../services/kakocho-service';
4 4
 import { DankaService } from '../../services/dankaService';
5 5
 import { Danka } from '../../models/danka';
6 6
 import { AppHeader } from '../../share/header/app-header';
7 7
 import { AppSideMenu } from '../../share/side-menu/app-side-menu';
8
+import { FormsModule } from '@angular/forms';
8 9
 
9 10
 interface UpcomingMemorial {
10 11
   id: string;

Ładowanie…
Anuluj
Zapisz