poohr 3 semanas atrás
pai
commit
0de4a70860

+ 609
- 594
src/app/pages/danka-detail/danka-detail.html
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 143
- 40
src/app/pages/danka-detail/danka-detail.scss Ver arquivo

@@ -100,11 +100,11 @@
100 100
 
101 101
 .family-summary {
102 102
   min-height: 64px;
103
-  margin-bottom: 28px;
104
-  padding: 12px 22px;
103
+  margin-bottom: 22px;
104
+  padding: 14px 24px;
105 105
   border: 2px solid #d8caba;
106
-  border-radius: 14px;
107
-  background: #eadfce;
106
+  border-radius: 8px;
107
+  background: #f1e7d8;
108 108
   display: flex;
109 109
   align-items: center;
110 110
   box-sizing: border-box;
@@ -112,10 +112,23 @@
112 112
 
113 113
 .family-name-area {
114 114
   display: flex;
115
-  align-items: baseline;
115
+  align-items: center;
116 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 132
 .family-name {
120 133
   margin: 0;
121 134
   color: #2f2720;
@@ -195,13 +208,17 @@
195 208
 
196 209
 .detail-content {
197 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 213
   align-items: start;
201 214
 }
202 215
 
203 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 224
 .section-heading {
@@ -226,17 +243,27 @@
226 243
 }
227 244
 
228 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 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 259
 .info-row {
236 260
   display: grid;
237
-  grid-template-columns: 96px 1fr;
261
+  grid-template-columns: 154px 1fr;
238 262
   align-items: center;
239 263
   margin-top: 0;
264
+  min-height: 62px;
265
+  padding: 6px 0;
266
+  box-sizing: border-box;
240 267
 }
241 268
 
242 269
 .info-form > .info-row {
@@ -244,17 +271,24 @@
244 271
 }
245 272
 
246 273
 .info-label {
274
+  min-height: 42px;
275
+  padding: 0 14px;
276
+  border-radius: 6px;
277
+  background: #f3eee8;
247 278
   color: #4b3c31;
248 279
   font-size: 17px;
249 280
   font-weight: 800;
281
+  display: flex;
282
+  align-items: center;
283
+  box-sizing: border-box;
250 284
 }
251 285
 
252 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 292
   color: #2f2720;
259 293
   font-size: 17px;
260 294
   box-sizing: border-box;
@@ -264,14 +298,19 @@
264 298
 
265 299
 .phone-row {
266 300
   align-items: start;
301
+  min-height: 104px;
267 302
 }
268 303
 
269 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 310
 .phone-table {
274 311
   width: 100%;
312
+  padding: 8px 18px;
313
+  box-sizing: border-box;
275 314
 }
276 315
 
277 316
 .phone-header,
@@ -294,45 +333,85 @@
294 333
 }
295 334
 
296 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 342
   color: #2f2720;
304 343
   font-size: 16px;
305 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 379
 .status-panel {
309
-  min-height: 382px;
310
-  padding: 24px 22px 22px;
380
+  min-height: 100%;
381
+  padding: 26px 20px 24px;
311 382
   border: 2px solid #d8caba;
312
-  border-radius: 62px;
383
+  border-radius: 12px;
313 384
   background: #fffdf9;
314 385
   box-sizing: border-box;
315 386
 }
316 387
 
317 388
 .status-panel h2 {
318
-  margin: 0 0 18px;
389
+  margin: 0 0 24px;
319 390
   color: #2f2720;
320 391
   font-size: 22px;
321 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 403
 .status-card-list {
325 404
   display: grid;
326 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 410
 .status-card {
332
-  min-height: 104px;
333
-  padding: 14px 18px;
411
+  min-height: 126px;
412
+  padding: 18px 16px;
334 413
   border: 2px solid #d8caba;
335
-  border-radius: 14px;
414
+  border-radius: 8px;
336 415
   background: #ffffff;
337 416
   color: #2f2720;
338 417
   text-decoration: none;
@@ -347,20 +426,23 @@
347 426
   margin: 0;
348 427
   color: #7b6b5c;
349 428
   font-size: 16px;
429
+  text-align: center;
350 430
 }
351 431
 
352 432
 .status-count {
353
-  margin: 2px 0 0;
433
+  margin: 10px 0 0;
354 434
   color: #2f2720;
355 435
   font-size: 32px;
356 436
   font-weight: 800;
357 437
   line-height: 1.1;
438
+  text-align: center;
358 439
 }
359 440
 
360 441
 .status-link {
361
-  margin: 4px 0 0;
442
+  margin: 10px 0 0;
362 443
   color: #7b6b5c;
363 444
   font-size: 14px;
445
+  text-align: center;
364 446
 }
365 447
 
366 448
 .next-memorial {
@@ -368,19 +450,26 @@
368 450
 }
369 451
 
370 452
 .next-memorial h3 {
371
-  margin: 0 0 8px;
453
+  margin: 0 0 16px;
372 454
   color: #4b3c31;
373 455
   font-size: 17px;
374 456
   font-weight: 800;
457
+  display: flex;
458
+  align-items: center;
459
+  gap: 12px;
375 460
 }
376 461
 
377 462
 .memorial-card {
378
-  min-height: 72px;
379
-  padding: 14px 20px;
463
+  min-height: 116px;
464
+  padding: 24px 18px;
380 465
   border: 2px solid #d8caba;
381
-  border-radius: 10px;
466
+  border-radius: 8px;
382 467
   background: #ffffff;
383 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 475
 .memorial-title {
@@ -1186,6 +1275,20 @@
1186 1275
 
1187 1276
 /* 家族表が狭い画面では横スクロール */
1188 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 1292
   .family-list-summary {
1190 1293
     align-items: flex-start;
1191 1294
     flex-direction: column;
@@ -1303,4 +1406,4 @@
1303 1406
 .family-text {
1304 1407
   writing-mode: vertical-rl;
1305 1408
   text-orientation: upright;
1306
-}
1409
+}

+ 5
- 4
src/app/pages/danka-detail/danka-detail.ts Ver arquivo

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

+ 5
- 3
src/app/pages/event/event.ts Ver arquivo

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

+ 69
- 67
src/app/pages/family-edit/family-edit.scss Ver arquivo

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

+ 1
- 1
src/app/pages/kakocho-edit/kakocho-edit.html Ver arquivo

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

+ 55
- 188
src/app/pages/kakocho-edit/kakocho-edit.scss Ver arquivo

@@ -7,38 +7,37 @@
7 7
 }
8 8
 
9 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 14
   background: #f4eee4;
14 15
 }
15 16
 
16 17
 .danka-edit-main {
17
-  flex: 1;
18
-  padding-right: 34px;
18
+  min-width: 0;
19 19
   box-sizing: border-box;
20 20
 }
21 21
 
22 22
 .edit-panel {
23
-  min-height: 650px;
24
-  padding: 26px 34px 36px;
23
+  min-height: 760px;
24
+  padding: 34px 42px 40px;
25 25
   background: #ffffff;
26 26
   border: 2px solid #d8caba;
27
-  border-radius: 76px;
27
+  border-radius: 64px;
28 28
   box-sizing: border-box;
29 29
 }
30 30
 
31 31
 .page-title-area {
32
-  margin-bottom: 8px;
32
+  margin-bottom: 22px;
33 33
 }
34 34
 
35 35
 .page-title-area h1 {
36 36
   margin: 0;
37 37
   color: #2f2720;
38
-  font-size: 32px;
39
-  line-height: 1.2;
38
+  font-size: 34px;
39
+  line-height: 1.1;
40 40
   font-weight: 800;
41
-  letter-spacing: 0.02em;
42 41
 }
43 42
 
44 43
 .edit-form {
@@ -49,20 +48,21 @@
49 48
 }
50 49
 
51 50
 .edit-form input,
51
+.edit-form textarea,
52 52
 .edit-form button {
53 53
   font-family: inherit;
54 54
 }
55 55
 
56 56
 .edit-content {
57 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 60
   align-items: start;
61 61
 }
62 62
 
63 63
 .basic-edit-section,
64 64
 .phone-edit-section {
65
-  padding-top: 4px;
65
+  padding-top: 0;
66 66
 }
67 67
 
68 68
 .basic-edit-section h2,
@@ -71,18 +71,19 @@
71 71
   margin: 0;
72 72
   color: #2f2720;
73 73
   font-size: 22px;
74
+  line-height: 1.3;
74 75
   font-weight: 800;
75 76
 }
76 77
 
77 78
 .section-heading p {
78
-  margin: 6px 0 14px;
79
+  margin: 4px 0 12px;
79 80
   color: #7b6b5c;
80
-  font-size: 15px;
81
+  font-size: 14px;
81 82
 }
82 83
 
83
-/* 基本情報 */
84
+/* 蝓コ譛ャ諠・ア */
84 85
 .form-list {
85
-  margin-top: 14px;
86
+  margin-top: 12px;
86 87
 }
87 88
 
88 89
 .form-field {
@@ -93,194 +94,74 @@
93 94
 
94 95
 .form-row {
95 96
   display: grid;
96
-  grid-template-columns: 120px 1fr;
97
+  grid-template-columns: 140px 1fr;
97 98
   align-items: center;
98
-  gap: 16px;
99
-  margin-bottom: 14px;
99
+  gap: 14px;
100
+  margin-bottom: 12px;
100 101
 }
101 102
 
102 103
 .form-row label {
103 104
   color: #4b3c31;
104
-  font-size: 17px;
105
+  font-size: 15px;
105 106
   font-weight: 800;
106 107
 }
107 108
 
108 109
 .form-row input,
109 110
 .form-row textarea {
110 111
   width: 100%;
111
-  padding: 0 14px;
112 112
   border: 2px solid #d8caba;
113 113
   border-radius: 8px;
114 114
   background: #fffdf9;
115 115
   color: #2f2720;
116
-  font-size: 18px;
116
+  font-size: 16px;
117 117
   font-weight: 600;
118 118
   box-sizing: border-box;
119 119
   outline: none;
120 120
 }
121 121
 
122 122
 .form-row input {
123
-  height: 54px;
123
+  height: 46px;
124
+  padding: 0 14px;
124 125
 }
125 126
 
126 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 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 149
 .bottom-actions {
269 150
   display: flex;
270 151
   justify-content: flex-end;
271 152
   align-items: center;
272 153
   gap: 12px;
273
-  margin-top: 22px;
154
+  margin-top: 26px;
274 155
 }
275 156
 
276 157
 .delete-button,
277 158
 .cancel-button,
278 159
 .save-button {
279 160
   min-width: 116px;
280
-  height: 52px;
161
+  height: 46px;
281 162
   border: 2px solid #d8caba;
282 163
   border-radius: 8px;
283
-  font-size: 17px;
164
+  font-size: 16px;
284 165
   font-weight: 800;
285 166
   cursor: pointer;
286 167
   box-sizing: border-box;
@@ -307,18 +188,6 @@
307 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 191
 .error-message {
323 192
   margin: 6px 0 0;
324 193
   color: #b33a2f;
@@ -336,21 +205,19 @@
336 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 Ver arquivo

@@ -16,9 +16,11 @@ import { AppSideMenu } from '../../share/side-menu/app-side-menu';
16 16
 
17 17
 import { DankaService } from '../../services/dankaService';
18 18
 import { KakochoService } from '../../services/kakocho-service';
19
+import { FamilyService } from '../../services/family-service';
19 20
 
20 21
 import { Danka } from '../../models/danka';
21 22
 import { Kakocho } from '../../models/kakocho';
23
+import { Family } from '../../models/family';
22 24
 
23 25
 @Component({
24 26
   selector: 'app-kakocho-edit',
@@ -33,13 +35,16 @@ import { Kakocho } from '../../models/kakocho';
33 35
 export class KakochoEdit {
34 36
   danka?: Danka;
35 37
   kakocho?: Kakocho;
38
+  sourceFamily?: Family;
36 39
   kakochoForm: FormGroup;
37 40
   dankaId: string;
41
+  returnTab: 'family' | 'kakocho' = 'kakocho';
38 42
 
39 43
   constructor(
40 44
     private fb: FormBuilder,
41 45
     private dankaService: DankaService,
42 46
     private kakochoService: KakochoService,
47
+    private familyService: FamilyService,
43 48
     private route: ActivatedRoute,
44 49
     private router: Router,
45 50
   ) {
@@ -64,6 +69,12 @@ export class KakochoEdit {
64 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 78
     // 編集対象ID
68 79
     const kakochoId =
69 80
       this.route.snapshot.params['kakochoId'];
@@ -87,6 +98,12 @@ export class KakochoEdit {
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,7 +132,7 @@ export class KakochoEdit {
115 132
 
116 133
         dankaId: this.danka?.id ?? '',
117 134
 
118
-        familyId: '',
135
+        familyId: this.sourceFamily?.id ?? '',
119 136
 
120 137
         name: formValue.name,
121 138
         furigana: formValue.furigana,
@@ -149,5 +166,6 @@ export class KakochoEdit {
149 166
   }
150 167
 
151 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 Ver arquivo

@@ -0,0 +1,32 @@
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
+}

Carregando…
Cancelar
Salvar