Skip to content

Commit 7f94503

Browse files
authored
fix: #763 fix table styling (#766)
* Use word-wrap class to break FOM name and expend the search table with container-fluid. * Adjust search table column width
1 parent 258e1ac commit 7f94503

File tree

4 files changed

+47
-28
lines changed

4 files changed

+47
-28
lines changed

admin/src/app/search/search.component.html

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<form #searchForm="ngForm" (ngSubmit)="onSubmit()">
22
<div class="top-container" style="overflow-y: hidden;">
3-
<div class="container">
3+
<div class="container-fluid">
44
<div class="title-container">
55
<div class="title-container__title">
66
<h1 class="text-muted">Search FOMs</h1>
@@ -23,7 +23,7 @@ <h1 class="text-muted">Search FOMs</h1>
2323
</div>
2424

2525
<div class="bottom-container scroll">
26-
<div class="container" style="background: #f7f8fa; padding-bottom: 0;">
26+
<div class="container-fluid" style="background: #f7f8fa; padding-bottom: 0;">
2727
<div class="row">
2828
<div class="form-group col-md-2">
2929
<label for="fomNumberInput" style="white-space: nowrap;">
@@ -99,7 +99,7 @@ <h1 class="text-muted">Search FOMs</h1>
9999
</div>
100100
</div>
101101

102-
<div class="container">
102+
<div class="container-fluid">
103103
<div>
104104
<h2 *ngIf="searched && !searching && count == 0">
105105
<strong>No results found.</strong>
@@ -109,23 +109,23 @@ <h2 *ngIf="!searching && count > 0">
109109
</h2>
110110
<table class="table" *ngIf="count > 0" aria-label="Search Results">
111111
<thead>
112-
<tr>
113-
<th id="fomId" class="disp">FOM Number</th>
114-
<th id="fomName" class="client">FOM Name</th>
115-
<th id="projectPlanNumber" class="plan">Plan Number</th>
116-
<th id="fomHolder" class="client">FOM Holder Name</th>
117-
<th id="district">District</th>
118-
<th id="fomStatus" class="status">FOM Status</th>
119-
<th id="commentClosed">Commenting Closed Date</th>
120-
<th id="actions" class="actions"></th>
121-
</tr>
112+
<tr>
113+
<th id="fomId" class="disp">FOM Number</th>
114+
<th id="fomName" class="fom-name">FOM Name</th>
115+
<th id="projectPlanNumber" class="plan">Plan Number</th>
116+
<th id="fomHolder" class="client">FOM Holder Name</th>
117+
<th id="district">District</th>
118+
<th id="fomStatus" class="status">FOM Status</th>
119+
<th id="commentClosed" class="cc-date">Commenting Closed Date</th>
120+
<th id="actions" class="actions"></th>
121+
</tr>
122122
</thead>
123123
<ng-template ngFor let-project [ngForOf]="projects">
124124
<tr class="app-details">
125125
<td class="disp">
126126
<strong>{{project.id }}</strong>
127127
</td>
128-
<td
128+
<td class="word-wrap"
129129
[innerHTML]="project.name ? project.name : '<em>No FOM name on this File</em>'">
130130
</td>
131131
<td>
@@ -140,7 +140,7 @@ <h2 *ngIf="!searching && count > 0">
140140
<td>
141141
{{project.workflowState? project.workflowState.description : 'Unknown'}}
142142
</td>
143-
<td>
143+
<td class="cc-date">
144144
{{project.commentingClosedDate | date:'mediumDate'}}
145145
</td>
146146

admin/src/app/search/search.component.scss

+16-11
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ h2 {
3333
grid-auto-rows: minmax(0, auto);
3434
}
3535

36-
// Search Container
37-
.search-container {
38-
padding-top: 2rem;
39-
padding-bottom: 1.5rem;
40-
background: #f7f8fa;
41-
}
42-
4336
.filter-grid {
4437
display: grid;
4538
grid-template-columns: 1fr 1fr;
@@ -169,16 +162,28 @@ $sr-table-row-bg: #f7f8fa;
169162
}
170163

171164
.disp {
172-
min-width: 5rem;
165+
width: 7%;
173166
text-align: center;
174167
}
175168

176-
.status, .plan {
177-
width: 7rem;
169+
.fom-name {
170+
width: 18%;
171+
}
172+
173+
.cc-date {
174+
width: 8%;
175+
text-align: right;
176+
}
177+
178+
.status {
179+
width: 11%
180+
}
181+
.plan {
182+
width: 10%;
178183
}
179184

180185
.actions {
181-
width: 7rem;
186+
width: 6rem;
182187
text-align: right;
183188
padding-top: 0;
184189
padding-bottom: 0;

admin/src/assets/styles/components/table.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
}
4848
}
4949

50-
tbody {
50+
tbody, tr {
5151
td {
52-
padding: 0.25rem 0.5rem;
52+
padding: 0.25rem 0.3rem;
5353
vertical-align: top;
5454
}
5555
}

admin/src/assets/styles/layout/layout.scss

+14
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ hr {
211211
padding-top: 1.5rem;
212212
padding-bottom: 1.5rem;
213213
}
214+
215+
.container-fluid {
216+
padding-top: 1.5rem;
217+
padding-bottom: 1.5rem;
218+
}
214219
}
215220

216221
.bottom-container {
@@ -222,6 +227,11 @@ hr {
222227
.container {
223228
padding-bottom: 1.5rem;
224229
}
230+
231+
.container-fluid {
232+
padding-top: 1.5rem;
233+
padding-bottom: 1.5rem;
234+
}
225235
}
226236

227237
.bold {
@@ -246,4 +256,8 @@ input, textarea {
246256

247257
.spacer-height-1 {
248258
height: 1rem;
259+
}
260+
261+
.word-wrap {
262+
word-wrap: break-word;
249263
}

0 commit comments

Comments
 (0)