Browse Source

[add]

檀家一覧画面を作成
IDで一覧を取得
IDごとに各ページへ遷移
poohr 1 month ago
parent
commit
038e148a0a

+ 82
- 0
src/app/pages/danka-list/danka-list.html View File

@@ -0,0 +1,82 @@
1
+<app-header></app-header>
2
+
3
+<div class="danka-list-page">
4
+  <app-side-menu></app-side-menu>
5
+
6
+  <main class="danka-list-main">
7
+    <section class="danka-list-panel">
8
+      <div class="page-title-area">
9
+        <h1>檀家(世帯)一覧</h1>
10
+      </div>
11
+
12
+      <div class="search-area">
13
+        <div class="search-box">
14
+          <span class="search-icon">⌕</span>
15
+          <input
16
+            type="text"
17
+            placeholder="氏名・ふりがな・住所・電話番号で探す"
18
+          />
19
+        </div>
20
+
21
+        <button type="button" class="search-button">
22
+          検索
23
+        </button>
24
+
25
+        <button type="button" class="new-button">
26
+          新規登録
27
+        </button>
28
+
29
+        <button type="button" class="condition-button">
30
+          条件
31
+        </button>
32
+      </div>
33
+
34
+      <div class="filter-row">
35
+        <div class="filter-button-list">
36
+          <button type="button" class="filter-button active">
37
+            全件
38
+          </button>
39
+
40
+          <button type="button" class="filter-button">
41
+            過去帳あり
42
+          </button>
43
+
44
+          <button type="button" class="filter-button">
45
+            法要あり
46
+          </button>
47
+
48
+          <button type="button" class="filter-button">
49
+            電話番号あり
50
+          </button>
51
+        </div>
52
+
53
+        <p class="result-count">
54
+          表示 124 件 / 1-20 件目
55
+        </p>
56
+      </div>
57
+
58
+      <div class="list-content">
59
+        <div class="danka-table">
60
+          <div class="danka-table-header">
61
+            <div>世帯主</div>
62
+            <div>世帯名</div>
63
+            <div>住所</div>
64
+            <div>電話</div>
65
+            <div>家族</div>
66
+          </div>
67
+
68
+          @for (danka of dankaList; track danka.id) {
69
+            <a class="danka-table-row" [routerLink]="['/danka-detail', danka.id]">
70
+              <div class="strong">{{ danka.householder }}</div>
71
+              <div>{{ danka.householdName }}</div>
72
+              <div>{{ danka.address }}</div>
73
+              <div>{{ danka.phones[0]?.tel }}</div>
74
+              <div>{{ danka.phones.length }}件</div>
75
+            </a>
76
+          }
77
+        </div>
78
+
79
+      </div>
80
+    </section>
81
+  </main>
82
+</div>

+ 292
- 0
src/app/pages/danka-list/danka-list.scss View File

@@ -0,0 +1,292 @@
1
+:host {
2
+  display: block;
3
+  min-height: 100vh;
4
+  background: #f4eee4;
5
+  color: #2f2720;
6
+}
7
+
8
+.danka-list-page {
9
+  display: flex;
10
+  align-items: flex-start;
11
+  gap: 8px;
12
+  background: #f4eee4;
13
+}
14
+
15
+.danka-list-main {
16
+  flex: 1;
17
+  padding-right: 34px;
18
+  box-sizing: border-box;
19
+}
20
+
21
+.danka-list-panel {
22
+  position: relative;
23
+  min-height: 650px;
24
+  padding: 26px 36px 40px;
25
+  background: #ffffff;
26
+  border: 2px solid #d8caba;
27
+  border-radius: 76px;
28
+  box-sizing: border-box;
29
+}
30
+
31
+.page-title-area {
32
+  margin-bottom: 8px;
33
+}
34
+
35
+.page-title-area h1 {
36
+  margin: 0;
37
+  font-size: 32px;
38
+  line-height: 1.2;
39
+  font-weight: 800;
40
+  color: #2f2720;
41
+  letter-spacing: 0.02em;
42
+}
43
+
44
+.search-area {
45
+  display: grid;
46
+  grid-template-columns: 1fr 140px 190px 110px;
47
+  gap: 18px;
48
+  align-items: center;
49
+  margin-bottom: 18px;
50
+}
51
+
52
+.search-box {
53
+  height: 58px;
54
+  position: relative;
55
+  display: flex;
56
+  align-items: center;
57
+  background: #ffffff;
58
+  border: 2px solid #d8caba;
59
+  border-radius: 8px;
60
+  box-sizing: border-box;
61
+}
62
+
63
+.search-icon {
64
+  width: 42px;
65
+  display: flex;
66
+  align-items: center;
67
+  justify-content: center;
68
+  color: #6f6257;
69
+  font-size: 34px;
70
+  line-height: 1;
71
+}
72
+
73
+.search-box input {
74
+  width: 100%;
75
+  height: 100%;
76
+  padding: 0 16px 0 0;
77
+  border: none;
78
+  outline: none;
79
+  background: transparent;
80
+  color: #2f2720;
81
+  font-size: 17px;
82
+  box-sizing: border-box;
83
+}
84
+
85
+.search-box input::placeholder {
86
+  color: #6f6257;
87
+}
88
+
89
+.search-button,
90
+.new-button,
91
+.condition-button {
92
+  height: 58px;
93
+  border: 2px solid #d8caba;
94
+  border-radius: 8px;
95
+  color: #2f2720;
96
+  font-size: 18px;
97
+  font-weight: 800;
98
+  cursor: pointer;
99
+  box-sizing: border-box;
100
+}
101
+
102
+.search-button {
103
+  background: #8a6543;
104
+  border-color: #8a6543;
105
+  color: #ffffff;
106
+}
107
+
108
+.new-button {
109
+  background: #e6d8c4;
110
+}
111
+
112
+.condition-button {
113
+  background: #ffffff;
114
+}
115
+
116
+.search-button:hover {
117
+  background: #765639;
118
+}
119
+
120
+.new-button:hover,
121
+.condition-button:hover {
122
+  background: #f6efe6;
123
+}
124
+
125
+.filter-row {
126
+  display: flex;
127
+  align-items: center;
128
+  justify-content: space-between;
129
+  margin-bottom: 14px;
130
+  padding-right: 24px;
131
+}
132
+
133
+.filter-button-list {
134
+  display: flex;
135
+  align-items: center;
136
+  gap: 8px;
137
+}
138
+
139
+.filter-button {
140
+  min-width: 140px;
141
+  height: 40px;
142
+  padding: 0 18px;
143
+  border: 2px solid #d8caba;
144
+  border-radius: 6px;
145
+  background: #f4eee4;
146
+  color: #2f2720;
147
+  font-size: 16px;
148
+  font-weight: 700;
149
+  cursor: pointer;
150
+  box-sizing: border-box;
151
+}
152
+
153
+.filter-button.active {
154
+  background: #8a6543;
155
+  border-color: #8a6543;
156
+  color: #ffffff;
157
+}
158
+
159
+.filter-button:hover {
160
+  background: #eadfce;
161
+}
162
+
163
+.filter-button.active:hover {
164
+  background: #765639;
165
+}
166
+
167
+.result-count {
168
+  margin: 0;
169
+  color: #8a7d6d;
170
+  font-size: 15px;
171
+}
172
+
173
+.list-content {
174
+  position: relative;
175
+  padding-right: 172px;
176
+}
177
+
178
+.danka-table {
179
+  width: 100%;
180
+}
181
+
182
+.danka-table-header,
183
+.danka-table-row {
184
+  display: grid;
185
+  grid-template-columns: 1.5fr 1.1fr 2.8fr 1.25fr 0.65fr;
186
+  align-items: center;
187
+  column-gap: 16px;
188
+}
189
+
190
+.danka-table-header {
191
+  min-height: 40px;
192
+  padding: 0 12px;
193
+  background: #eadfce;
194
+  border: 2px solid #d8caba;
195
+  border-radius: 6px;
196
+  box-sizing: border-box;
197
+  color: #5a4a3c;
198
+  font-size: 15px;
199
+  font-weight: 700;
200
+}
201
+
202
+.danka-table-row {
203
+  min-height: 66px;
204
+  margin-top: 4px;
205
+  padding: 0 12px;
206
+  background: #fbf7f1;
207
+  border: 2px solid #d8caba;
208
+  border-radius: 8px;
209
+  box-sizing: border-box;
210
+  color: #2f2720;
211
+  font-size: 16px;
212
+  text-decoration: none;
213
+}
214
+
215
+.danka-table-row:hover {
216
+  background: #f3eadc;
217
+}
218
+
219
+.danka-table-row .strong {
220
+  font-weight: 800;
221
+}
222
+
223
+.help-panel {
224
+  position: absolute;
225
+  top: 0;
226
+  right: 18px;
227
+  width: 158px;
228
+  min-height: 446px;
229
+  padding: 28px 14px 18px;
230
+  background: #fffdf9;
231
+  border: 2px solid #d8caba;
232
+  border-radius: 24px;
233
+  box-sizing: border-box;
234
+}
235
+
236
+.help-panel h2 {
237
+  margin: 0 0 16px;
238
+  color: #2f2720;
239
+  font-size: 20px;
240
+  font-weight: 800;
241
+}
242
+
243
+.help-panel ol {
244
+  margin: 0;
245
+  padding-left: 22px;
246
+  color: #6f6257;
247
+  font-size: 14px;
248
+  line-height: 1.45;
249
+}
250
+
251
+.help-title-secondary {
252
+  margin-top: 28px !important;
253
+}
254
+
255
+.help-button-list {
256
+  display: flex;
257
+  flex-direction: column;
258
+  gap: 8px;
259
+}
260
+
261
+.help-button {
262
+  min-height: 46px;
263
+  padding: 0 8px;
264
+  border: 2px solid #d8caba;
265
+  border-radius: 8px;
266
+  background: #ffffff;
267
+  color: #2f2720;
268
+  font-size: 16px;
269
+  font-weight: 800;
270
+  text-decoration: none;
271
+  display: flex;
272
+  align-items: center;
273
+  justify-content: center;
274
+  text-align: center;
275
+  box-sizing: border-box;
276
+}
277
+
278
+.help-button:hover {
279
+  background: #f6efe6;
280
+}
281
+
282
+.bottom-note {
283
+  width: 700px;
284
+  margin: 18px 0 22px 36px;
285
+  padding: 4px 12px;
286
+  border: 2px solid #d8caba;
287
+  border-radius: 4px;
288
+  background: #eadfce;
289
+  color: #7b6b5c;
290
+  font-size: 14px;
291
+  box-sizing: border-box;
292
+}

+ 22
- 0
src/app/pages/danka-list/danka-list.spec.ts View File

@@ -0,0 +1,22 @@
1
+import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { DankaList } from './danka-list';
4
+
5
+describe('DankaList', () => {
6
+  let component: DankaList;
7
+  let fixture: ComponentFixture<DankaList>;
8
+
9
+  beforeEach(async () => {
10
+    await TestBed.configureTestingModule({
11
+      imports: [DankaList],
12
+    }).compileComponents();
13
+
14
+    fixture = TestBed.createComponent(DankaList);
15
+    component = fixture.componentInstance;
16
+    await fixture.whenStable();
17
+  });
18
+
19
+  it('should create', () => {
20
+    expect(component).toBeTruthy();
21
+  });
22
+});

+ 20
- 0
src/app/pages/danka-list/danka-list.ts View File

@@ -0,0 +1,20 @@
1
+import { Component } from '@angular/core';
2
+import { RouterLink } from '@angular/router';
3
+import { DankaService } from '../../services/dankaService';
4
+import { AppHeader } from '../../share/header/app-header';
5
+import { AppSideMenu } from '../../share/side-menu/app-side-menu';
6
+import { Danka } from '../../models/danka';
7
+
8
+@Component({
9
+  selector: 'app-danka-list',
10
+  imports: [AppHeader, AppSideMenu, RouterLink],
11
+  templateUrl: './danka-list.html',
12
+  styleUrl: './danka-list.scss',
13
+})
14
+export class DankaList {
15
+  dankaList: Danka[] = [];
16
+
17
+  constructor(private dankaService: DankaService) {
18
+    this.dankaList = this.dankaService.getDankaList();
19
+  }
20
+}

Loading…
Cancel
Save