Explorar el Código

[add]

年次法要のテスト用データを作成
poohr hace 3 semanas
padre
commit
138559650f
Se han modificado 1 ficheros con 17 adiciones y 10 borrados
  1. 17
    10
      src/app/services/kakocho-service.ts

+ 17
- 10
src/app/services/kakocho-service.ts Ver fichero

20
     },
20
     },
21
     {
21
     {
22
       id: '2',
22
       id: '2',
23
-      dankaId: '1',
23
+      dankaId: '2',
24
       familyId: '',
24
       familyId: '',
25
       name: '鈴木 ハナ',
25
       name: '鈴木 ハナ',
26
       furigana: 'すずき はな',
26
       furigana: 'すずき はな',
30
       ageAtDeath: '82',
30
       ageAtDeath: '82',
31
       note: '',
31
       note: '',
32
     },
32
     },
33
+    {
34
+      id: '2',
35
+      dankaId: '2',
36
+      familyId: '',
37
+      name: '鈴木 太郎',
38
+      furigana: 'すずき たろう',
39
+      relationship: '息子',
40
+      kaimyo: '〇〇院〇〇大姉',
41
+      deathDate: '2025-01-08',
42
+      ageAtDeath: '50',
43
+      note: '',
44
+    },
33
   ];
45
   ];
34
 
46
 
35
   getKakochoByDankaId(dankaId: string): Kakocho[] {
47
   getKakochoByDankaId(dankaId: string): Kakocho[] {
43
 
55
 
44
   // 1件取得
56
   // 1件取得
45
   getKakochoById(id: string): Kakocho | undefined {
57
   getKakochoById(id: string): Kakocho | undefined {
46
-    return this.kakochoList.find(item => item.id === id);
58
+    return this.kakochoList.find((item) => item.id === id);
47
   }
59
   }
48
 
60
 
49
   // 新規登録
61
   // 新規登録
53
 
65
 
54
   // 更新
66
   // 更新
55
   updateKakocho(updatedData: Kakocho): void {
67
   updateKakocho(updatedData: Kakocho): void {
56
-
57
-    const index = this.kakochoList.findIndex(
58
-      item => item.id === updatedData.id
59
-    );
68
+    const index = this.kakochoList.findIndex((item) => item.id === updatedData.id);
60
 
69
 
61
     if (index !== -1) {
70
     if (index !== -1) {
62
       this.kakochoList[index] = updatedData;
71
       this.kakochoList[index] = updatedData;
65
 
74
 
66
   // 削除
75
   // 削除
67
   deleteKakocho(id: string): void {
76
   deleteKakocho(id: string): void {
68
-    this.kakochoList = this.kakochoList.filter(
69
-      item => item.id !== id
70
-    );
71
-  }  
77
+    this.kakochoList = this.kakochoList.filter((item) => item.id !== id);
78
+  }
72
 }
79
 }

Loading…
Cancelar
Guardar