poohr 3 weeks ago
parent
commit
0de4a70860

+ 609
- 594
src/app/pages/danka-detail/danka-detail.html
File diff suppressed because it is too large
View File


+ 143
- 40
src/app/pages/danka-detail/danka-detail.scss View File

100
 
100
 
101
 .family-summary {
101
 .family-summary {
102
   min-height: 64px;
102
   min-height: 64px;
103
-  margin-bottom: 28px;
104
-  padding: 12px 22px;
103
+  margin-bottom: 22px;
104
+  padding: 14px 24px;
105
   border: 2px solid #d8caba;
105
   border: 2px solid #d8caba;
106
-  border-radius: 14px;
107
-  background: #eadfce;
106
+  border-radius: 8px;
107
+  background: #f1e7d8;
108
   display: flex;
108
   display: flex;
109
   align-items: center;
109
   align-items: center;
110
   box-sizing: border-box;
110
   box-sizing: border-box;
112
 
112
 
113
 .family-name-area {
113
 .family-name-area {
114
   display: flex;
114
   display: flex;
115
-  align-items: baseline;
115
+  align-items: center;
116
   gap: 18px;
116
   gap: 18px;
117
 }
117
 }
118
 
118
 
119
+.family-summary-mark {
120
+  width: 42px;
121
+  height: 42px;
122
+  border-radius: 999px;
123
+  background: #8a6543;
124
+  color: #ffffff;
125
+  font-weight: 800;
126
+  display: flex;
127
+  align-items: center;
128
+  justify-content: center;
129
+  flex: 0 0 auto;
130
+}
131
+
119
 .family-name {
132
 .family-name {
120
   margin: 0;
133
   margin: 0;
121
   color: #2f2720;
134
   color: #2f2720;
195
 
208
 
196
 .detail-content {
209
 .detail-content {
197
   display: grid;
210
   display: grid;
198
-  grid-template-columns: minmax(0, 1fr) 460px;
199
-  gap: 28px;
211
+  grid-template-columns: minmax(0, 1fr) 420px;
212
+  gap: 18px;
200
   align-items: start;
213
   align-items: start;
201
 }
214
 }
202
 
215
 
203
 .basic-info-section {
216
 .basic-info-section {
204
-  padding-left: 0;
217
+  padding: 24px 20px 18px;
218
+  border: 2px solid #d8caba;
219
+  border-radius: 12px;
220
+  background: #fffdf9;
221
+  box-sizing: border-box;
205
 }
222
 }
206
 
223
 
207
 .section-heading {
224
 .section-heading {
226
 }
243
 }
227
 
244
 
228
 .info-pair-row {
245
 .info-pair-row {
246
+  border-top: 1px solid #eadfce;
247
+}
248
+
249
+.info-pair-row:first-child {
250
+  border-top: 0;
251
+}
252
+
253
+.info-two-column {
229
   display: grid;
254
   display: grid;
230
-  grid-template-columns: 1fr 1fr;
231
-  gap: 14px;
232
-  margin-top: 10px;
255
+  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
256
+  gap: 18px;
233
 }
257
 }
234
 
258
 
235
 .info-row {
259
 .info-row {
236
   display: grid;
260
   display: grid;
237
-  grid-template-columns: 96px 1fr;
261
+  grid-template-columns: 154px 1fr;
238
   align-items: center;
262
   align-items: center;
239
   margin-top: 0;
263
   margin-top: 0;
264
+  min-height: 62px;
265
+  padding: 6px 0;
266
+  box-sizing: border-box;
240
 }
267
 }
241
 
268
 
242
 .info-form > .info-row {
269
 .info-form > .info-row {
244
 }
271
 }
245
 
272
 
246
 .info-label {
273
 .info-label {
274
+  min-height: 42px;
275
+  padding: 0 14px;
276
+  border-radius: 6px;
277
+  background: #f3eee8;
247
   color: #4b3c31;
278
   color: #4b3c31;
248
   font-size: 17px;
279
   font-size: 17px;
249
   font-weight: 800;
280
   font-weight: 800;
281
+  display: flex;
282
+  align-items: center;
283
+  box-sizing: border-box;
250
 }
284
 }
251
 
285
 
252
 .info-value {
286
 .info-value {
253
-  min-height: 40px;
254
-  padding: 8px 12px;
255
-  border: 2px solid #d8caba;
256
-  border-radius: 6px;
257
-  background: #fffdf9;
287
+  min-height: 42px;
288
+  padding: 8px 18px;
289
+  border: 0;
290
+  border-radius: 0;
291
+  background: transparent;
258
   color: #2f2720;
292
   color: #2f2720;
259
   font-size: 17px;
293
   font-size: 17px;
260
   box-sizing: border-box;
294
   box-sizing: border-box;
264
 
298
 
265
 .phone-row {
299
 .phone-row {
266
   align-items: start;
300
   align-items: start;
301
+  min-height: 104px;
267
 }
302
 }
268
 
303
 
269
 .phone-row .info-label {
304
 .phone-row .info-label {
270
-  padding-top: 8px;
305
+  min-height: 104px;
306
+  align-items: flex-start;
307
+  padding-top: 16px;
271
 }
308
 }
272
 
309
 
273
 .phone-table {
310
 .phone-table {
274
   width: 100%;
311
   width: 100%;
312
+  padding: 8px 18px;
313
+  box-sizing: border-box;
275
 }
314
 }
276
 
315
 
277
 .phone-header,
316
 .phone-header,
294
 }
333
 }
295
 
334
 
296
 .phone-item {
335
 .phone-item {
297
-  min-height: 52px;
298
-  margin-top: 4px;
299
-  padding: 0 10px;
300
-  border: 2px solid #d8caba;
301
-  border-radius: 8px;
302
-  background: #fffdf9;
336
+  min-height: 36px;
337
+  padding: 0;
338
+  border: 0;
339
+  border-radius: 0;
340
+  border-top: 1px solid #eadfce;
341
+  background: transparent;
303
   color: #2f2720;
342
   color: #2f2720;
304
   font-size: 16px;
343
   font-size: 16px;
305
   box-sizing: border-box;
344
   box-sizing: border-box;
306
 }
345
 }
307
 
346
 
347
+.phone-item:first-child {
348
+  border-top: 0;
349
+}
350
+
351
+.phone-note {
352
+  min-height: 28px;
353
+  width: fit-content;
354
+  min-width: 88px;
355
+  border-radius: 6px;
356
+  background: #f3eee8;
357
+  display: flex;
358
+  align-items: center;
359
+  justify-content: center;
360
+  justify-self: start;
361
+  padding: 0 14px;
362
+  box-sizing: border-box;
363
+}
364
+
365
+.note-info-row {
366
+  align-items: center;
367
+}
368
+
369
+.note-info-row .info-label {
370
+  margin-top: 0;
371
+}
372
+
373
+.note-info-value {
374
+  align-items: center;
375
+  min-height: 64px;
376
+  white-space: pre-wrap;
377
+}
378
+
308
 .status-panel {
379
 .status-panel {
309
-  min-height: 382px;
310
-  padding: 24px 22px 22px;
380
+  min-height: 100%;
381
+  padding: 26px 20px 24px;
311
   border: 2px solid #d8caba;
382
   border: 2px solid #d8caba;
312
-  border-radius: 62px;
383
+  border-radius: 12px;
313
   background: #fffdf9;
384
   background: #fffdf9;
314
   box-sizing: border-box;
385
   box-sizing: border-box;
315
 }
386
 }
316
 
387
 
317
 .status-panel h2 {
388
 .status-panel h2 {
318
-  margin: 0 0 18px;
389
+  margin: 0 0 24px;
319
   color: #2f2720;
390
   color: #2f2720;
320
   font-size: 22px;
391
   font-size: 22px;
321
   font-weight: 800;
392
   font-weight: 800;
393
+  display: flex;
394
+  align-items: center;
395
+  gap: 12px;
396
+}
397
+
398
+.panel-heading-icon {
399
+  color: #8a6543;
400
+  font-weight: 800;
322
 }
401
 }
323
 
402
 
324
 .status-card-list {
403
 .status-card-list {
325
   display: grid;
404
   display: grid;
326
   grid-template-columns: 1fr 1fr;
405
   grid-template-columns: 1fr 1fr;
327
-  gap: 14px;
328
-  margin-bottom: 20px;
406
+  gap: 16px;
407
+  margin-bottom: 28px;
329
 }
408
 }
330
 
409
 
331
 .status-card {
410
 .status-card {
332
-  min-height: 104px;
333
-  padding: 14px 18px;
411
+  min-height: 126px;
412
+  padding: 18px 16px;
334
   border: 2px solid #d8caba;
413
   border: 2px solid #d8caba;
335
-  border-radius: 14px;
414
+  border-radius: 8px;
336
   background: #ffffff;
415
   background: #ffffff;
337
   color: #2f2720;
416
   color: #2f2720;
338
   text-decoration: none;
417
   text-decoration: none;
347
   margin: 0;
426
   margin: 0;
348
   color: #7b6b5c;
427
   color: #7b6b5c;
349
   font-size: 16px;
428
   font-size: 16px;
429
+  text-align: center;
350
 }
430
 }
351
 
431
 
352
 .status-count {
432
 .status-count {
353
-  margin: 2px 0 0;
433
+  margin: 10px 0 0;
354
   color: #2f2720;
434
   color: #2f2720;
355
   font-size: 32px;
435
   font-size: 32px;
356
   font-weight: 800;
436
   font-weight: 800;
357
   line-height: 1.1;
437
   line-height: 1.1;
438
+  text-align: center;
358
 }
439
 }
359
 
440
 
360
 .status-link {
441
 .status-link {
361
-  margin: 4px 0 0;
442
+  margin: 10px 0 0;
362
   color: #7b6b5c;
443
   color: #7b6b5c;
363
   font-size: 14px;
444
   font-size: 14px;
445
+  text-align: center;
364
 }
446
 }
365
 
447
 
366
 .next-memorial {
448
 .next-memorial {
368
 }
450
 }
369
 
451
 
370
 .next-memorial h3 {
452
 .next-memorial h3 {
371
-  margin: 0 0 8px;
453
+  margin: 0 0 16px;
372
   color: #4b3c31;
454
   color: #4b3c31;
373
   font-size: 17px;
455
   font-size: 17px;
374
   font-weight: 800;
456
   font-weight: 800;
457
+  display: flex;
458
+  align-items: center;
459
+  gap: 12px;
375
 }
460
 }
376
 
461
 
377
 .memorial-card {
462
 .memorial-card {
378
-  min-height: 72px;
379
-  padding: 14px 20px;
463
+  min-height: 116px;
464
+  padding: 24px 18px;
380
   border: 2px solid #d8caba;
465
   border: 2px solid #d8caba;
381
-  border-radius: 10px;
466
+  border-radius: 8px;
382
   background: #ffffff;
467
   background: #ffffff;
383
   box-sizing: border-box;
468
   box-sizing: border-box;
469
+  display: flex;
470
+  flex-direction: column;
471
+  justify-content: center;
472
+  text-align: center;
384
 }
473
 }
385
 
474
 
386
 .memorial-title {
475
 .memorial-title {
1186
 
1275
 
1187
 /* 家族表が狭い画面では横スクロール */
1276
 /* 家族表が狭い画面では横スクロール */
1188
 @media (max-width: 800px) {
1277
 @media (max-width: 800px) {
1278
+  .detail-content,
1279
+  .info-two-column {
1280
+    grid-template-columns: 1fr;
1281
+  }
1282
+
1283
+  .info-row {
1284
+    grid-template-columns: 1fr;
1285
+    gap: 8px;
1286
+  }
1287
+
1288
+  .phone-row .info-label {
1289
+    min-height: 42px;
1290
+  }
1291
+
1189
   .family-list-summary {
1292
   .family-list-summary {
1190
     align-items: flex-start;
1293
     align-items: flex-start;
1191
     flex-direction: column;
1294
     flex-direction: column;
1303
 .family-text {
1406
 .family-text {
1304
   writing-mode: vertical-rl;
1407
   writing-mode: vertical-rl;
1305
   text-orientation: upright;
1408
   text-orientation: upright;
1306
-}
1409
+}

+ 5
- 4
src/app/pages/danka-detail/danka-detail.ts View File

17
 import { MarriageRelationService } from '../../services/marriage-relation-service';
17
 import { MarriageRelationService } from '../../services/marriage-relation-service';
18
 import { FormsModule } from '@angular/forms';
18
 import { FormsModule } from '@angular/forms';
19
 import { EventStatus, EventTarget, EventType } from '../../models/event';
19
 import { EventStatus, EventTarget, EventType } from '../../models/event';
20
+import { EventService } from '../../services/event-service';
20
 import {
21
 import {
21
   FamilyTreeBuilderService,
22
   FamilyTreeBuilderService,
22
   FamilyTreeNode
23
   FamilyTreeNode
56
   familySearchKeyword = '';
57
   familySearchKeyword = '';
57
   eventSearchKeyword = '';
58
   eventSearchKeyword = '';
58
   eventStatuses: EventStatus[] = ['未案内', '案内済'];
59
   eventStatuses: EventStatus[] = ['未案内', '案内済'];
59
-  private eventStatusByTargetId: Record<string, EventStatus> = {};
60
   treeNodes: FamilyTreeNode[] = [];
60
   treeNodes: FamilyTreeNode[] = [];
61
   layoutNodes: LayoutNode[] = [];
61
   layoutNodes: LayoutNode[] = [];
62
   layoutNodeMap = new Map<string, LayoutNode>();
62
   layoutNodeMap = new Map<string, LayoutNode>();
90
     private familyTreeBuilder: FamilyTreeBuilderService,
90
     private familyTreeBuilder: FamilyTreeBuilderService,
91
     private familyTreeLayout: FamilyTreeLayoutService,
91
     private familyTreeLayout: FamilyTreeLayoutService,
92
     private familyUnitLayout: FamilyUnitLayoutService,
92
     private familyUnitLayout: FamilyUnitLayoutService,
93
+    private eventService: EventService,
93
   ) {
94
   ) {
94
     const tab = this.route.snapshot.queryParams['tab'];
95
     const tab = this.route.snapshot.queryParams['tab'];
95
     if (tab === 'family') {
96
     if (tab === 'family') {
288
         const age = this.currentYear - birthDate.getFullYear();
289
         const age = this.currentYear - birthDate.getFullYear();
289
         return this.getEventTypes(age).map((eventType) => {
290
         return this.getEventTypes(age).map((eventType) => {
290
           const id = `${family.id}-${eventType}`;
291
           const id = `${family.id}-${eventType}`;
292
+          const defaultStatus: EventStatus = Number(family.id) % 2 === 0 ? '案内済' : '未案内';
291
           return {
293
           return {
292
             id,
294
             id,
293
             dankaId: family.dankaId,
295
             dankaId: family.dankaId,
299
             age,
301
             age,
300
             eventType,
302
             eventType,
301
             note: family.note,
303
             note: family.note,
302
-            status:
303
-              this.eventStatusByTargetId[id] ?? (Number(family.id) % 2 === 0 ? '案内済' : '未案内'),
304
+            status: this.eventService.getEventStatus(id, defaultStatus),
304
           };
305
           };
305
         });
306
         });
306
       })
307
       })
335
 
336
 
336
   changeEventStatus(target: EventTarget, status: EventStatus): void {
337
   changeEventStatus(target: EventTarget, status: EventStatus): void {
337
     target.status = status;
338
     target.status = status;
338
-    this.eventStatusByTargetId[target.id] = status;
339
+    this.eventService.saveEventStatus(target.id, status);
339
   }
340
   }
340
 
341
 
341
   getKaiki(deathDate: string): number {
342
   getKaiki(deathDate: string): number {

+ 5
- 3
src/app/pages/event/event.ts View File

2
 import { FormsModule } from '@angular/forms';
2
 import { FormsModule } from '@angular/forms';
3
 import { DankaService } from '../../services/dankaService';
3
 import { DankaService } from '../../services/dankaService';
4
 import { FamilyService } from '../../services/family-service';
4
 import { FamilyService } from '../../services/family-service';
5
+import { EventService } from '../../services/event-service';
5
 import { EventStatus, EventTarget, EventType } from '../../models/event';
6
 import { EventStatus, EventTarget, EventType } from '../../models/event';
6
 import { AppHeader } from '../../share/header/app-header';
7
 import { AppHeader } from '../../share/header/app-header';
7
 import { AppSideMenu } from '../../share/side-menu/app-side-menu';
8
 import { AppSideMenu } from '../../share/side-menu/app-side-menu';
37
     { label: '未案内', value: '未案内' },
38
     { label: '未案内', value: '未案内' },
38
     { label: '案内済', value: '案内済' },
39
     { label: '案内済', value: '案内済' },
39
   ];
40
   ];
40
-  private statusByTargetId: Record<string, EventStatus> = {};
41
 
41
 
42
   constructor(
42
   constructor(
43
     private dankaService: DankaService,
43
     private dankaService: DankaService,
44
     private familyService: FamilyService,
44
     private familyService: FamilyService,
45
+    private eventService: EventService,
45
   ) {
46
   ) {
46
     this.createEventTargetList();
47
     this.createEventTargetList();
47
   }
48
   }
68
         }
69
         }
69
 
70
 
70
         const id = `${family.id}-${eventType}`;
71
         const id = `${family.id}-${eventType}`;
72
+        const defaultStatus: EventStatus = Number(family.id) % 2 === 0 ? '案内済' : '未案内';
71
         this.eventTargets.push({
73
         this.eventTargets.push({
72
           id,
74
           id,
73
           dankaId: family.dankaId,
75
           dankaId: family.dankaId,
79
           age,
81
           age,
80
           eventType,
82
           eventType,
81
           note: family.note,
83
           note: family.note,
82
-          status: this.statusByTargetId[id] ?? (Number(family.id) % 2 === 0 ? '案内済' : '未案内'),
84
+          status: this.eventService.getEventStatus(id, defaultStatus),
83
         });
85
         });
84
       });
86
       });
85
     });
87
     });
121
 
123
 
122
   changeStatus(target: EventTarget, status: EventStatus): void {
124
   changeStatus(target: EventTarget, status: EventStatus): void {
123
     target.status = status;
125
     target.status = status;
124
-    this.statusByTargetId[target.id] = status;
126
+    this.eventService.saveEventStatus(target.id, status);
125
   }
127
   }
126
 
128
 
127
   private getEventTypes(age: number): EventType[] {
129
   private getEventTypes(age: number): EventType[] {

+ 69
- 67
src/app/pages/family-edit/family-edit.scss View File

7
 }
7
 }
8
 
8
 
9
 .danka-edit-page {
9
 .danka-edit-page {
10
-  display: flex;
11
-  align-items: flex-start;
12
-  gap: 8px;
10
+  display: grid;
11
+  grid-template-columns: 172px minmax(0, 1fr);
12
+  gap: 20px;
13
+  padding: 0 38px 36px 0;
13
   background: #f4eee4;
14
   background: #f4eee4;
14
 }
15
 }
15
 
16
 
16
 .danka-edit-main {
17
 .danka-edit-main {
17
-  flex: 1;
18
-  padding-right: 34px;
18
+  min-width: 0;
19
   box-sizing: border-box;
19
   box-sizing: border-box;
20
 }
20
 }
21
 
21
 
22
 .edit-panel {
22
 .edit-panel {
23
-  min-height: 650px;
24
-  padding: 26px 34px 36px;
23
+  min-height: 760px;
24
+  padding: 34px 42px 40px;
25
   background: #ffffff;
25
   background: #ffffff;
26
   border: 2px solid #d8caba;
26
   border: 2px solid #d8caba;
27
-  border-radius: 76px;
27
+  border-radius: 64px;
28
   box-sizing: border-box;
28
   box-sizing: border-box;
29
 }
29
 }
30
 
30
 
31
 .page-title-area {
31
 .page-title-area {
32
-  margin-bottom: 28px;
32
+  margin-bottom: 22px;
33
 }
33
 }
34
 
34
 
35
 .page-title-area h1 {
35
 .page-title-area h1 {
36
   margin: 0;
36
   margin: 0;
37
   color: #2f2720;
37
   color: #2f2720;
38
-  font-size: 32px;
39
-  line-height: 1.2;
38
+  font-size: 34px;
39
+  line-height: 1.1;
40
   font-weight: 800;
40
   font-weight: 800;
41
-  letter-spacing: 0.02em;
42
 }
41
 }
43
 
42
 
44
 .edit-form {
43
 .edit-form {
44
+  display: block;
45
   width: 100%;
45
   width: 100%;
46
+  margin: 0;
47
+  color: #2f2720;
48
+}
49
+
50
+.edit-form input,
51
+.edit-form select,
52
+.edit-form textarea,
53
+.edit-form button {
54
+  font-family: inherit;
46
 }
55
 }
47
 
56
 
48
 .edit-content {
57
 .edit-content {
49
   display: grid;
58
   display: grid;
50
   grid-template-columns: minmax(0, 1fr) 500px;
59
   grid-template-columns: minmax(0, 1fr) 500px;
51
-  gap: 48px;
60
+  gap: 32px;
52
   align-items: start;
61
   align-items: start;
53
 }
62
 }
54
 
63
 
55
 .basic-edit-section {
64
 .basic-edit-section {
56
-  padding-left: 8px;
65
+  padding-left: 0;
57
 }
66
 }
58
 
67
 
59
 .basic-edit-section h2,
68
 .basic-edit-section h2,
60
 .section-heading h2 {
69
 .section-heading h2 {
61
-  margin: 0 0 18px;
70
+  margin: 0;
62
   color: #2f2720;
71
   color: #2f2720;
63
   font-size: 22px;
72
   font-size: 22px;
73
+  line-height: 1.3;
64
   font-weight: 800;
74
   font-weight: 800;
65
 }
75
 }
66
 
76
 
75
 }
85
 }
76
 
86
 
77
 .form-list {
87
 .form-list {
78
-  width: 650px;
88
+  width: 100%;
89
+  margin-top: 12px;
79
 }
90
 }
80
 
91
 
81
 .form-row {
92
 .form-row {
82
   display: grid;
93
   display: grid;
83
-  grid-template-columns: 150px 1fr;
84
-  align-items: start;
85
-  column-gap: 18px;
86
-  margin-top: 14px;
94
+  grid-template-columns: 140px 1fr;
95
+  align-items: center;
96
+  gap: 14px;
97
+  margin-bottom: 12px;
87
 }
98
 }
88
 
99
 
89
 .form-row label {
100
 .form-row label {
90
-  padding-top: 10px;
91
   color: #4b3c31;
101
   color: #4b3c31;
92
-  font-size: 17px;
102
+  font-size: 15px;
93
   font-weight: 800;
103
   font-weight: 800;
94
 }
104
 }
95
 
105
 
101
 .form-row select,
111
 .form-row select,
102
 .form-row textarea {
112
 .form-row textarea {
103
   width: 100%;
113
   width: 100%;
104
-  min-height: 46px;
105
-  padding: 8px 12px;
106
   border: 2px solid #d8caba;
114
   border: 2px solid #d8caba;
107
-  border-radius: 6px;
115
+  border-radius: 8px;
108
   background: #fffdf9;
116
   background: #fffdf9;
109
   color: #2f2720;
117
   color: #2f2720;
110
-  font-size: 17px;
118
+  font-size: 16px;
119
+  font-weight: 600;
111
   font-family: inherit;
120
   font-family: inherit;
112
   box-sizing: border-box;
121
   box-sizing: border-box;
113
   outline: none;
122
   outline: none;
114
 }
123
 }
115
 
124
 
125
+.form-row input,
126
+.form-row select {
127
+  height: 46px;
128
+  padding: 0 14px;
129
+}
130
+
116
 .form-row textarea {
131
 .form-row textarea {
117
   min-height: 104px;
132
   min-height: 104px;
133
+  padding: 12px 14px;
118
   resize: vertical;
134
   resize: vertical;
119
   line-height: 1.6;
135
   line-height: 1.6;
120
 }
136
 }
124
 .form-row textarea:focus {
140
 .form-row textarea:focus {
125
   border-color: #8a6543;
141
   border-color: #8a6543;
126
   background: #ffffff;
142
   background: #ffffff;
143
+  box-shadow: 0 0 0 3px rgba(138, 101, 67, 0.15);
127
 }
144
 }
128
 
145
 
129
 .form-row input[readonly] {
146
 .form-row input[readonly] {
139
 }
156
 }
140
 
157
 
141
 .form-row-heading {
158
 .form-row-heading {
142
-  margin-top: 30px;
159
+  margin: 24px 0 14px;
160
+  align-items: start;
143
 }
161
 }
144
 
162
 
145
 .form-row-heading label {
163
 .form-row-heading label {
149
 .sub-section-title {
167
 .sub-section-title {
150
   margin: 0;
168
   margin: 0;
151
   color: #2f2720;
169
   color: #2f2720;
152
-  font-size: 18px;
170
+  font-size: 17px;
153
   font-weight: 800;
171
   font-weight: 800;
154
 }
172
 }
155
 
173
 
161
 }
179
 }
162
 
180
 
163
 .phone-edit-section {
181
 .phone-edit-section {
164
-  min-height: 382px;
165
-  padding: 30px 24px 22px;
182
+  min-height: 240px;
183
+  padding: 18px 20px;
166
   border: 2px solid #d8caba;
184
   border: 2px solid #d8caba;
167
-  border-radius: 62px;
185
+  border-radius: 8px;
168
   background: #fffdf9;
186
   background: #fffdf9;
169
   box-sizing: border-box;
187
   box-sizing: border-box;
170
 }
188
 }
186
 }
204
 }
187
 
205
 
188
 .householder-area {
206
 .householder-area {
189
-  margin-top: 28px;
190
-  padding: 22px 26px;
207
+  margin-top: 0;
208
+  padding: 18px 20px;
191
   border: 2px solid #d8caba;
209
   border: 2px solid #d8caba;
192
-  border-radius: 14px;
210
+  border-radius: 8px;
193
   background: #eadfce;
211
   background: #eadfce;
194
   box-sizing: border-box;
212
   box-sizing: border-box;
195
 }
213
 }
196
 
214
 
197
 .householder-area h3 {
215
 .householder-area h3 {
198
-  margin: 0 0 14px;
216
+  margin: 0 0 12px;
199
   color: #2f2720;
217
   color: #2f2720;
200
-  font-size: 18px;
218
+  font-size: 17px;
201
   font-weight: 800;
219
   font-weight: 800;
202
 }
220
 }
203
 
221
 
204
 .set-householder-button {
222
 .set-householder-button {
205
-  width: 170px;
206
-  height: 42px;
223
+  width: 148px;
224
+  height: 46px;
207
   border: 2px solid #d8caba;
225
   border: 2px solid #d8caba;
208
   border-radius: 6px;
226
   border-radius: 6px;
209
   background: #ffffff;
227
   background: #ffffff;
222
   display: flex;
240
   display: flex;
223
   justify-content: flex-end;
241
   justify-content: flex-end;
224
   align-items: center;
242
   align-items: center;
225
-  gap: 14px;
226
-  margin-top: 72px;
243
+  gap: 12px;
244
+  margin-top: 26px;
227
 }
245
 }
228
 
246
 
229
 .delete-button,
247
 .delete-button,
230
 .cancel-button,
248
 .cancel-button,
231
 .save-button {
249
 .save-button {
232
-  width: 120px;
250
+  min-width: 116px;
233
   height: 46px;
251
   height: 46px;
234
-  border-radius: 6px;
235
-  font-size: 17px;
252
+  border-radius: 8px;
253
+  font-size: 16px;
236
   font-weight: 800;
254
   font-weight: 800;
237
   cursor: pointer;
255
   cursor: pointer;
238
   box-sizing: border-box;
256
   box-sizing: border-box;
271
 
289
 
272
 /* 画面幅が狭い場合 */
290
 /* 画面幅が狭い場合 */
273
 @media (max-width: 1100px) {
291
 @media (max-width: 1100px) {
274
-  .edit-content {
292
+  .danka-edit-page {
275
     grid-template-columns: 1fr;
293
     grid-template-columns: 1fr;
276
-    gap: 28px;
294
+    padding: 0 24px 32px;
277
   }
295
   }
278
 
296
 
279
-  .form-list {
280
-    width: 100%;
297
+  .edit-panel {
298
+    min-height: auto;
299
+    border-radius: 28px;
300
+    padding: 28px 24px 32px;
281
   }
301
   }
282
 
302
 
283
-  .bottom-actions {
284
-    margin-top: 40px;
303
+  .edit-content {
304
+    grid-template-columns: 1fr;
285
   }
305
   }
286
 }
306
 }
287
 
307
 
288
 @media (max-width: 800px) {
308
 @media (max-width: 800px) {
289
-  .danka-edit-page {
290
-    flex-direction: column;
291
-  }
292
-
293
-  .danka-edit-main {
294
-    width: 100%;
295
-    padding: 16px 20px 32px;
296
-  }
297
-
298
-  .edit-panel {
299
-    padding: 24px 20px 30px;
300
-    border-radius: 32px;
301
-  }
302
-
303
   .page-title-area h1 {
309
   .page-title-area h1 {
304
     font-size: 26px;
310
     font-size: 26px;
305
   }
311
   }
313
     padding-top: 0;
319
     padding-top: 0;
314
   }
320
   }
315
 
321
 
316
-  .phone-edit-section {
317
-    border-radius: 28px;
318
-  }
319
-
320
   .bottom-actions {
322
   .bottom-actions {
321
     flex-direction: column;
323
     flex-direction: column;
322
     align-items: stretch;
324
     align-items: stretch;

+ 1
- 1
src/app/pages/kakocho-edit/kakocho-edit.html View File

101
               </div>
101
               </div>
102
 
102
 
103
               <!-- 備考 -->
103
               <!-- 備考 -->
104
-              <div class="form-row">
104
+              <div class="form-row note-row">
105
                 <label for="note">備考</label>
105
                 <label for="note">備考</label>
106
 
106
 
107
                 <textarea
107
                 <textarea

+ 55
- 188
src/app/pages/kakocho-edit/kakocho-edit.scss View File

7
 }
7
 }
8
 
8
 
9
 .danka-edit-page {
9
 .danka-edit-page {
10
-  display: flex;
11
-  align-items: flex-start;
12
-  gap: 8px;
10
+  display: grid;
11
+  grid-template-columns: 172px minmax(0, 1fr);
12
+  gap: 20px;
13
+  padding: 0 38px 36px 0;
13
   background: #f4eee4;
14
   background: #f4eee4;
14
 }
15
 }
15
 
16
 
16
 .danka-edit-main {
17
 .danka-edit-main {
17
-  flex: 1;
18
-  padding-right: 34px;
18
+  min-width: 0;
19
   box-sizing: border-box;
19
   box-sizing: border-box;
20
 }
20
 }
21
 
21
 
22
 .edit-panel {
22
 .edit-panel {
23
-  min-height: 650px;
24
-  padding: 26px 34px 36px;
23
+  min-height: 760px;
24
+  padding: 34px 42px 40px;
25
   background: #ffffff;
25
   background: #ffffff;
26
   border: 2px solid #d8caba;
26
   border: 2px solid #d8caba;
27
-  border-radius: 76px;
27
+  border-radius: 64px;
28
   box-sizing: border-box;
28
   box-sizing: border-box;
29
 }
29
 }
30
 
30
 
31
 .page-title-area {
31
 .page-title-area {
32
-  margin-bottom: 8px;
32
+  margin-bottom: 22px;
33
 }
33
 }
34
 
34
 
35
 .page-title-area h1 {
35
 .page-title-area h1 {
36
   margin: 0;
36
   margin: 0;
37
   color: #2f2720;
37
   color: #2f2720;
38
-  font-size: 32px;
39
-  line-height: 1.2;
38
+  font-size: 34px;
39
+  line-height: 1.1;
40
   font-weight: 800;
40
   font-weight: 800;
41
-  letter-spacing: 0.02em;
42
 }
41
 }
43
 
42
 
44
 .edit-form {
43
 .edit-form {
49
 }
48
 }
50
 
49
 
51
 .edit-form input,
50
 .edit-form input,
51
+.edit-form textarea,
52
 .edit-form button {
52
 .edit-form button {
53
   font-family: inherit;
53
   font-family: inherit;
54
 }
54
 }
55
 
55
 
56
 .edit-content {
56
 .edit-content {
57
   display: grid;
57
   display: grid;
58
-  grid-template-columns: minmax(0, 1fr) 520px;
59
-  gap: 48px;
58
+  grid-template-columns: minmax(0, 1fr) 500px;
59
+  gap: 32px;
60
   align-items: start;
60
   align-items: start;
61
 }
61
 }
62
 
62
 
63
 .basic-edit-section,
63
 .basic-edit-section,
64
 .phone-edit-section {
64
 .phone-edit-section {
65
-  padding-top: 4px;
65
+  padding-top: 0;
66
 }
66
 }
67
 
67
 
68
 .basic-edit-section h2,
68
 .basic-edit-section h2,
71
   margin: 0;
71
   margin: 0;
72
   color: #2f2720;
72
   color: #2f2720;
73
   font-size: 22px;
73
   font-size: 22px;
74
+  line-height: 1.3;
74
   font-weight: 800;
75
   font-weight: 800;
75
 }
76
 }
76
 
77
 
77
 .section-heading p {
78
 .section-heading p {
78
-  margin: 6px 0 14px;
79
+  margin: 4px 0 12px;
79
   color: #7b6b5c;
80
   color: #7b6b5c;
80
-  font-size: 15px;
81
+  font-size: 14px;
81
 }
82
 }
82
 
83
 
83
-/* 基本情報 */
84
+/* 蝓コ譛ャ諠・ア */
84
 .form-list {
85
 .form-list {
85
-  margin-top: 14px;
86
+  margin-top: 12px;
86
 }
87
 }
87
 
88
 
88
 .form-field {
89
 .form-field {
93
 
94
 
94
 .form-row {
95
 .form-row {
95
   display: grid;
96
   display: grid;
96
-  grid-template-columns: 120px 1fr;
97
+  grid-template-columns: 140px 1fr;
97
   align-items: center;
98
   align-items: center;
98
-  gap: 16px;
99
-  margin-bottom: 14px;
99
+  gap: 14px;
100
+  margin-bottom: 12px;
100
 }
101
 }
101
 
102
 
102
 .form-row label {
103
 .form-row label {
103
   color: #4b3c31;
104
   color: #4b3c31;
104
-  font-size: 17px;
105
+  font-size: 15px;
105
   font-weight: 800;
106
   font-weight: 800;
106
 }
107
 }
107
 
108
 
108
 .form-row input,
109
 .form-row input,
109
 .form-row textarea {
110
 .form-row textarea {
110
   width: 100%;
111
   width: 100%;
111
-  padding: 0 14px;
112
   border: 2px solid #d8caba;
112
   border: 2px solid #d8caba;
113
   border-radius: 8px;
113
   border-radius: 8px;
114
   background: #fffdf9;
114
   background: #fffdf9;
115
   color: #2f2720;
115
   color: #2f2720;
116
-  font-size: 18px;
116
+  font-size: 16px;
117
   font-weight: 600;
117
   font-weight: 600;
118
   box-sizing: border-box;
118
   box-sizing: border-box;
119
   outline: none;
119
   outline: none;
120
 }
120
 }
121
 
121
 
122
 .form-row input {
122
 .form-row input {
123
-  height: 54px;
123
+  height: 46px;
124
+  padding: 0 14px;
124
 }
125
 }
125
 
126
 
126
 .form-row textarea {
127
 .form-row textarea {
127
-  min-height: 108px;
128
-  padding-top: 14px;
128
+  min-height: 104px;
129
+  padding: 12px 14px;
130
+  line-height: 1.6;
129
   resize: vertical;
131
   resize: vertical;
130
 }
132
 }
131
 
133
 
132
-.form-row input:focus,
133
-.form-row textarea:focus {
134
-  border-color: #8a6543;
135
-  box-shadow: 0 0 0 3px rgba(138, 101, 67, 0.15);
136
-}
137
-
138
-/* 電話番号 */
139
-.phone-table {
140
-  width: 100%;
141
-}
142
-
143
-.phone-table-header,
144
-.phone-table-row {
145
-  display: grid;
146
-  grid-template-columns: 1.35fr 1.45fr 84px;
147
-  align-items: center;
148
-  column-gap: 10px;
149
-}
150
-
151
-.phone-table-header {
152
-  min-height: 38px;
153
-  padding: 0 10px;
154
-  border: 2px solid #d8caba;
155
-  border-radius: 6px;
156
-  background: #eadfce;
157
-  color: #5a4a3c;
158
-  font-size: 15px;
159
-  font-weight: 800;
160
-  box-sizing: border-box;
161
-}
162
-
163
-.phone-table-row {
164
-  min-height: 56px;
165
-  margin-top: 4px;
166
-  padding: 6px 10px;
167
-  border: 2px solid #d8caba;
168
-  border-radius: 8px;
169
-  background: #fffdf9;
170
-  color: #2f2720;
171
-  font-size: 16px;
172
-  box-sizing: border-box;
173
-}
174
-
175
-.phone-table-row > div {
176
-  display: flex;
177
-  align-items: center;
178
-}
179
-
180
-.phone-table-row input {
181
-  width: 100%;
182
-  height: 38px;
183
-  padding: 0 10px;
184
-  border: none;
185
-  border-radius: 6px;
186
-  background: transparent;
187
-  color: #2f2720;
188
-  font-size: 16px;
189
-  font-weight: 600;
190
-  box-sizing: border-box;
191
-  outline: none;
192
-}
193
-
194
-.phone-table-row input:focus {
195
-  background: #ffffff;
196
-  box-shadow: inset 0 0 0 2px #8a6543;
197
-}
198
-
199
-.phone-table-row input::placeholder {
200
-  color: #9b8b7a;
201
-  font-weight: 500;
202
-}
203
-
204
-.phone-row-action {
205
-  justify-content: flex-end;
206
-}
207
-
208
-.remove-phone-button {
209
-  width: 68px;
210
-  height: 34px;
211
-  border: 2px solid #d8caba;
212
-  border-radius: 6px;
213
-  background: #ffffff;
214
-  color: #6a4a35;
215
-  font-size: 14px;
216
-  font-weight: 800;
217
-  cursor: pointer;
218
-  box-sizing: border-box;
219
-}
220
-
221
-.remove-phone-button:hover {
222
-  background: #f6efe6;
223
-}
224
-
225
-.phone-action {
226
-  display: flex;
227
-  justify-content: flex-end;
228
-  margin-top: 8px;
229
-}
230
-
231
-.add-phone-button {
232
-  width: 170px;
233
-  height: 46px;
234
-  border: 2px solid #d8caba;
235
-  border-radius: 8px;
236
-  background: #ffffff;
237
-  color: #2f2720;
238
-  font-size: 16px;
239
-  font-weight: 800;
240
-  cursor: pointer;
241
-  box-sizing: border-box;
242
-}
243
-
244
-.add-phone-button:hover {
245
-  background: #f6efe6;
134
+.note-row {
135
+  align-items: start;
246
 }
136
 }
247
 
137
 
248
-/* 入力補助 */
249
-.support-box {
250
-  min-height: 142px;
251
-  margin-top: 56px;
252
-  padding: 28px 30px;
253
-  border: 2px solid #d8caba;
254
-  border-radius: 24px;
255
-  background: #fffdf9;
256
-  box-sizing: border-box;
138
+.note-row label {
139
+  padding-top: 12px;
257
 }
140
 }
258
 
141
 
259
-.support-box ul {
260
-  margin: 12px 0 0;
261
-  padding-left: 22px;
262
-  color: #6f6257;
263
-  font-size: 15px;
264
-  line-height: 1.65;
142
+.form-row input:focus,
143
+.form-row textarea:focus {
144
+  border-color: #8a6543;
145
+  box-shadow: 0 0 0 3px rgba(138, 101, 67, 0.15);
265
 }
146
 }
266
 
147
 
267
-/* 下部ボタン */
148
+/* 荳矩Κ繝懊ち繝ウ */
268
 .bottom-actions {
149
 .bottom-actions {
269
   display: flex;
150
   display: flex;
270
   justify-content: flex-end;
151
   justify-content: flex-end;
271
   align-items: center;
152
   align-items: center;
272
   gap: 12px;
153
   gap: 12px;
273
-  margin-top: 22px;
154
+  margin-top: 26px;
274
 }
155
 }
275
 
156
 
276
 .delete-button,
157
 .delete-button,
277
 .cancel-button,
158
 .cancel-button,
278
 .save-button {
159
 .save-button {
279
   min-width: 116px;
160
   min-width: 116px;
280
-  height: 52px;
161
+  height: 46px;
281
   border: 2px solid #d8caba;
162
   border: 2px solid #d8caba;
282
   border-radius: 8px;
163
   border-radius: 8px;
283
-  font-size: 17px;
164
+  font-size: 16px;
284
   font-weight: 800;
165
   font-weight: 800;
285
   cursor: pointer;
166
   cursor: pointer;
286
   box-sizing: border-box;
167
   box-sizing: border-box;
307
   background: #765639;
188
   background: #765639;
308
 }
189
 }
309
 
190
 
310
-.bottom-note {
311
-  width: 700px;
312
-  margin: 18px 0 22px 36px;
313
-  padding: 4px 12px;
314
-  border: 2px solid #d8caba;
315
-  border-radius: 4px;
316
-  background: #eadfce;
317
-  color: #7b6b5c;
318
-  font-size: 14px;
319
-  box-sizing: border-box;
320
-}
321
-
322
 .error-message {
191
 .error-message {
323
   margin: 6px 0 0;
192
   margin: 6px 0 0;
324
   color: #b33a2f;
193
   color: #b33a2f;
336
   opacity: 0.7;
205
   opacity: 0.7;
337
 }
206
 }
338
 
207
 
339
-.phone-field {
340
-  width: 100%;
341
-  display: flex;
342
-  flex-direction: column;
343
-}
208
+@media (max-width: 1100px) {
209
+  .danka-edit-page {
210
+    grid-template-columns: 1fr;
211
+    padding: 0 24px 32px;
212
+  }
344
 
213
 
345
-.phone-error-message {
346
-  margin: 4px 0 0;
347
-  color: #b33a2f;
348
-  font-size: 12px;
349
-  font-weight: 700;
350
-  line-height: 1.4;
351
-}
214
+  .edit-panel {
215
+    min-height: auto;
216
+    border-radius: 28px;
217
+    padding: 28px 24px 32px;
218
+  }
352
 
219
 
353
-.remove-phone-button:disabled {
354
-  opacity: 0.5;
355
-  cursor: not-allowed;
220
+  .edit-content {
221
+    grid-template-columns: 1fr;
222
+  }
356
 }
223
 }

+ 20
- 2
src/app/pages/kakocho-edit/kakocho-edit.ts View File

16
 
16
 
17
 import { DankaService } from '../../services/dankaService';
17
 import { DankaService } from '../../services/dankaService';
18
 import { KakochoService } from '../../services/kakocho-service';
18
 import { KakochoService } from '../../services/kakocho-service';
19
+import { FamilyService } from '../../services/family-service';
19
 
20
 
20
 import { Danka } from '../../models/danka';
21
 import { Danka } from '../../models/danka';
21
 import { Kakocho } from '../../models/kakocho';
22
 import { Kakocho } from '../../models/kakocho';
23
+import { Family } from '../../models/family';
22
 
24
 
23
 @Component({
25
 @Component({
24
   selector: 'app-kakocho-edit',
26
   selector: 'app-kakocho-edit',
33
 export class KakochoEdit {
35
 export class KakochoEdit {
34
   danka?: Danka;
36
   danka?: Danka;
35
   kakocho?: Kakocho;
37
   kakocho?: Kakocho;
38
+  sourceFamily?: Family;
36
   kakochoForm: FormGroup;
39
   kakochoForm: FormGroup;
37
   dankaId: string;
40
   dankaId: string;
41
+  returnTab: 'family' | 'kakocho' = 'kakocho';
38
 
42
 
39
   constructor(
43
   constructor(
40
     private fb: FormBuilder,
44
     private fb: FormBuilder,
41
     private dankaService: DankaService,
45
     private dankaService: DankaService,
42
     private kakochoService: KakochoService,
46
     private kakochoService: KakochoService,
47
+    private familyService: FamilyService,
43
     private route: ActivatedRoute,
48
     private route: ActivatedRoute,
44
     private router: Router,
49
     private router: Router,
45
   ) {
50
   ) {
64
         this.dankaService.getDankaById(dankaId);
69
         this.dankaService.getDankaById(dankaId);
65
     }
70
     }
66
 
71
 
72
+    const familyId = this.route.snapshot.queryParams['familyId'];
73
+    if (familyId) {
74
+      this.sourceFamily = this.familyService.getFamilyById(familyId);
75
+      this.returnTab = 'family';
76
+    }
77
+
67
     // 編集対象ID
78
     // 編集対象ID
68
     const kakochoId =
79
     const kakochoId =
69
       this.route.snapshot.params['kakochoId'];
80
       this.route.snapshot.params['kakochoId'];
87
         });
98
         });
88
 
99
 
89
       }
100
       }
101
+    } else if (this.sourceFamily) {
102
+      this.kakochoForm.patchValue({
103
+        name: this.sourceFamily.name,
104
+        furigana: this.sourceFamily.furigana,
105
+        relationship: this.sourceFamily.relationship,
106
+      });
90
     }
107
     }
91
   }
108
   }
92
 
109
 
115
 
132
 
116
         dankaId: this.danka?.id ?? '',
133
         dankaId: this.danka?.id ?? '',
117
 
134
 
118
-        familyId: '',
135
+        familyId: this.sourceFamily?.id ?? '',
119
 
136
 
120
         name: formValue.name,
137
         name: formValue.name,
121
         furigana: formValue.furigana,
138
         furigana: formValue.furigana,
149
   }
166
   }
150
 
167
 
151
   cancelKakochoEdit() {
168
   cancelKakochoEdit() {
152
-    this.router.navigate(['/danka-detail', this.danka?.id], { queryParams: { tab: 'kakocho' } });  }
169
+    this.router.navigate(['/danka-detail', this.danka?.id], { queryParams: { tab: this.returnTab } });
170
+  }
153
 }
171
 }

+ 32
- 0
src/app/services/event-service.ts View File

1
+import { Injectable } from '@angular/core';
2
+import { EventStatus } from '../models/event';
3
+
4
+interface EventStatusRecord {
5
+  targetId: string;
6
+  status: EventStatus;
7
+}
8
+
9
+@Injectable({
10
+  providedIn: 'root',
11
+})
12
+export class EventService {
13
+  private eventStatuses: EventStatusRecord[] = [];
14
+
15
+  getEventStatus(targetId: string, defaultStatus: EventStatus): EventStatus {
16
+    return this.eventStatuses.find((item) => item.targetId === targetId)?.status ?? defaultStatus;
17
+  }
18
+
19
+  saveEventStatus(targetId: string, status: EventStatus): void {
20
+    const current = this.eventStatuses.find((item) => item.targetId === targetId);
21
+
22
+    if (current) {
23
+      current.status = status;
24
+      return;
25
+    }
26
+
27
+    this.eventStatuses.push({
28
+      targetId,
29
+      status,
30
+    });
31
+  }
32
+}

Loading…
Cancel
Save