|
|
@@ -20,7 +20,7 @@ export class KakochoService {
|
|
20
|
20
|
},
|
|
21
|
21
|
{
|
|
22
|
22
|
id: '2',
|
|
23
|
|
- dankaId: '1',
|
|
|
23
|
+ dankaId: '2',
|
|
24
|
24
|
familyId: '',
|
|
25
|
25
|
name: '鈴木 ハナ',
|
|
26
|
26
|
furigana: 'すずき はな',
|
|
|
@@ -30,6 +30,18 @@ export class KakochoService {
|
|
30
|
30
|
ageAtDeath: '82',
|
|
31
|
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
|
47
|
getKakochoByDankaId(dankaId: string): Kakocho[] {
|
|
|
@@ -43,7 +55,7 @@ export class KakochoService {
|
|
43
|
55
|
|
|
44
|
56
|
// 1件取得
|
|
45
|
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,10 +65,7 @@ export class KakochoService {
|
|
53
|
65
|
|
|
54
|
66
|
// 更新
|
|
55
|
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
|
70
|
if (index !== -1) {
|
|
62
|
71
|
this.kakochoList[index] = updatedData;
|
|
|
@@ -65,8 +74,6 @@ export class KakochoService {
|
|
65
|
74
|
|
|
66
|
75
|
// 削除
|
|
67
|
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
|
}
|