@worksafevictoria/wcl7.5 1.7.3 → 1.8.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utility.js +2 -0
- package/package.json +1 -1
- package/src/components/Common/CardGrid/index.vue +77 -82
- package/src/components/Common/CardGridItem/index.vue +6 -2
- package/src/components/Global/AppHeader/ModalSearch/index.vue +1 -0
- package/src/components/Global/AppHeader/index.vue +194 -284
- package/src/components/Global/AppHeaderNew/ModalSearch/index.vue +16 -14
- package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.stories.js +30 -0
- package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.vue +182 -0
- package/src/components/Paragraphs/Directory/Asbestos/Records/index.stories.js +19 -0
- package/src/components/Paragraphs/Directory/Asbestos/Records/index.vue +254 -0
- package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +38 -152
- package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/styles.scss +127 -0
- package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +41 -87
- package/src/components/Paragraphs/Directory/HSCP/styles.scss +68 -0
- package/src/components/Paragraphs/Directory/Records/PRS/index.stories.js +2 -2
- package/src/components/Paragraphs/Directory/styles.scss +2 -0
- package/src/components/SubComponents/FormInstance/models/overrides/file.js +2 -1
- package/src/components/SubComponents/Search/SearchListing/index.vue +51 -45
- package/src/components/SubComponents/Search/index.stories.js +4 -3
- package/src/components/SubComponents/Search/index.vue +130 -138
- package/src/index.js +2 -0
- package/src/mock/asbestos-removalists.js +226 -0
- package/src/mock/course-provider.js +33 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="paragraph--directory__records--
|
|
2
|
+
<div class="paragraph--directory__records--dir">
|
|
3
3
|
<!-- Main details -->
|
|
4
4
|
<container>
|
|
5
5
|
<row class="records">
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
</a>
|
|
10
10
|
</column>
|
|
11
11
|
<column md="2" sm="12" class="address" >
|
|
12
|
+
<div class="label">Office address</div>
|
|
12
13
|
<a v-if="item.fullAddress" target="_blank" :href="gMapLink"><span class="sr-only visually-hidden">Address</span>
|
|
13
14
|
{{ item.fullAddress }}
|
|
14
15
|
</a>
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
</a>
|
|
33
34
|
</column>
|
|
34
35
|
</row>
|
|
35
|
-
<div class="
|
|
36
|
+
<div class="dir-caret" >
|
|
36
37
|
<a v-if="visible" href="javascript:void(0)" @click="this.visible = false">
|
|
37
38
|
<img
|
|
38
39
|
:src="CaretUp"
|
|
@@ -56,76 +57,79 @@
|
|
|
56
57
|
<div style="padding-top: 20px;">
|
|
57
58
|
<hr>
|
|
58
59
|
</div>
|
|
59
|
-
|
|
60
|
+
<!-- Contacts, if any -->
|
|
61
|
+
<div v-if="validContacts">
|
|
62
|
+
<row >
|
|
60
63
|
<column >
|
|
61
64
|
<h4>Contact Information</h4>
|
|
62
65
|
</column>
|
|
63
66
|
</row>
|
|
64
|
-
<row>
|
|
65
|
-
<column sm="2" class="label">
|
|
67
|
+
<row v-if="item.contact1 !== '' || item.contact2 !== ''">
|
|
68
|
+
<column sm="2" class="label" v-if="item.contact1 !== ''">
|
|
66
69
|
Contact
|
|
67
70
|
</column>
|
|
68
|
-
<column sm="4" class="
|
|
71
|
+
<column sm="4" class="dir-additional-records" v-if="item.contact1 !== ''">
|
|
69
72
|
{{item.contact1}}
|
|
70
73
|
</column>
|
|
71
|
-
<column sm="2" class="label">
|
|
74
|
+
<column sm="2" class="label" v-if="item.contact2 !== ''">
|
|
72
75
|
Contact
|
|
73
76
|
</column>
|
|
74
|
-
<column sm="4" class="
|
|
77
|
+
<column sm="4" class="dir-additional-records" v-if="item.contact2 !== ''">
|
|
75
78
|
{{item.contact2}}
|
|
76
79
|
</column>
|
|
77
80
|
</row>
|
|
78
|
-
<row>
|
|
79
|
-
<column sm="2" class="label">
|
|
81
|
+
<row v-if="item.phone1 !== '' || item.phone2 !== ''">
|
|
82
|
+
<column sm="2" class="label" v-if="item.phone1 !== ''">
|
|
80
83
|
Phone
|
|
81
84
|
</column>
|
|
82
|
-
<column sm="4" class="
|
|
85
|
+
<column sm="4" class="dir-additional-records" v-if="item.phone1 !== ''">
|
|
83
86
|
{{item.phone1}}
|
|
84
87
|
</column>
|
|
85
|
-
<column sm="2" class="label">
|
|
88
|
+
<column sm="2" class="label" v-if="item.phone2 !== ''">
|
|
86
89
|
Phone
|
|
87
90
|
</column>
|
|
88
|
-
<column sm="4" class="
|
|
91
|
+
<column sm="4" class="dir-additional-records" v-if="item.phone2 !== ''">
|
|
89
92
|
{{item.phone2}}
|
|
90
93
|
</column>
|
|
91
94
|
</row>
|
|
92
|
-
<row>
|
|
93
|
-
<column sm="2" class="label">
|
|
95
|
+
<row v-if="item.email1 !== '' || item.email2 !== ''">
|
|
96
|
+
<column sm="2" class="label" v-if="item.email1 !== ''">
|
|
94
97
|
Email
|
|
95
98
|
</column>
|
|
96
|
-
<column sm="4" class="
|
|
99
|
+
<column sm="4" class="dir-additional-records" v-if="item.email1 !== ''">
|
|
97
100
|
{{item.email1}}
|
|
98
101
|
</column>
|
|
99
|
-
<column sm="2" class="label">
|
|
102
|
+
<column sm="2" class="label" v-if="item.email2 !== ''">
|
|
100
103
|
Email
|
|
101
104
|
</column>
|
|
102
|
-
<column sm="4" class="
|
|
105
|
+
<column sm="4" class="dir-additional-records" v-if="item.email1 !== ''">
|
|
103
106
|
{{item.email2}}
|
|
104
107
|
</column>
|
|
105
108
|
</row>
|
|
106
|
-
|
|
109
|
+
</div>
|
|
110
|
+
<div v-if="item.trainingVenues.length">
|
|
111
|
+
<row class="row-dir-additional">
|
|
107
112
|
<column>
|
|
108
113
|
<h4>Training Venue Locations</h4>
|
|
109
114
|
</column>
|
|
110
115
|
</row>
|
|
111
|
-
<row class="
|
|
112
|
-
<column
|
|
116
|
+
<row class="dir-additional-records">
|
|
117
|
+
<column >
|
|
113
118
|
<ul>
|
|
114
119
|
<li v-for="(venue) in item.trainingVenues.split(',')" :key="venue.id">
|
|
115
120
|
{{venue}}
|
|
116
121
|
</li>
|
|
117
122
|
</ul>
|
|
118
123
|
</column>
|
|
119
|
-
<column v-else-if="!item.trainingVenues.length">
|
|
120
|
-
<p>No training venues</p>
|
|
121
|
-
</column>
|
|
122
124
|
</row>
|
|
123
|
-
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<row class="row-dir-additional">
|
|
124
128
|
<column>
|
|
125
129
|
<h4>Training Courses</h4>
|
|
126
130
|
</column>
|
|
127
131
|
</row>
|
|
128
|
-
<row class="
|
|
132
|
+
<row class="dir-additional-records">
|
|
129
133
|
<column>
|
|
130
134
|
<ul>
|
|
131
135
|
<li v-for="(course) in item.courses.split(',')" :key="course.id">
|
|
@@ -169,6 +173,13 @@ export default {
|
|
|
169
173
|
gMapLink() {
|
|
170
174
|
return `https://google.com/maps?q=${this.item.title}%20${this.item.fullAddress}`
|
|
171
175
|
},
|
|
176
|
+
validContacts() {
|
|
177
|
+
if (this.item.contact1 === '' && this.item.contact2 === '' && this.item.phone1 === '' && this.item.phone2 === '' && this.item.email1 === '' && this.item.email2 === '') {
|
|
178
|
+
return false
|
|
179
|
+
} else {
|
|
180
|
+
return true
|
|
181
|
+
}
|
|
182
|
+
}
|
|
172
183
|
|
|
173
184
|
},
|
|
174
185
|
methods: {
|
|
@@ -190,133 +201,8 @@ export default {
|
|
|
190
201
|
</script>
|
|
191
202
|
|
|
192
203
|
<style lang="scss" scoped>
|
|
193
|
-
@import '../../../styles.scss';
|
|
194
|
-
|
|
195
|
-
.row-hscp-additional {
|
|
196
|
-
margin-top: 20px;
|
|
197
|
-
}
|
|
198
204
|
|
|
199
|
-
.
|
|
200
|
-
font-size: 16px;
|
|
201
|
-
}
|
|
205
|
+
@import './styles.scss'
|
|
202
206
|
|
|
203
|
-
.hscp-caret {
|
|
204
|
-
justify-content: end;
|
|
205
|
-
align-content: end;
|
|
206
|
-
max-width: 20px;
|
|
207
|
-
padding-right: 0px;
|
|
208
|
-
padding-bottom: 10px;
|
|
209
|
-
float:right;
|
|
210
|
-
}
|
|
211
|
-
.paragraph--directory__records--hscp {
|
|
212
|
-
|
|
213
|
-
padding-bottom: 20px !important;
|
|
214
|
-
|
|
215
|
-
a {
|
|
216
|
-
color: $black;
|
|
217
|
-
text-decoration: none;
|
|
218
|
-
}
|
|
219
|
-
a:hover {
|
|
220
|
-
text-decoration: underline;
|
|
221
|
-
}
|
|
222
|
-
a:focus {
|
|
223
|
-
text-decoration: underline;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.name {
|
|
227
|
-
font-size: 1rem;
|
|
228
|
-
color: $black;
|
|
229
|
-
font-weight: 700;
|
|
230
|
-
}
|
|
231
|
-
.address {
|
|
232
|
-
font-size: 15px;
|
|
233
|
-
a {
|
|
234
|
-
color: inherit;
|
|
235
|
-
text-decoration: none;
|
|
236
|
-
}
|
|
237
|
-
a:hover {
|
|
238
|
-
text-decoration: underline;
|
|
239
|
-
}
|
|
240
|
-
a:focus {
|
|
241
|
-
text-decoration: underline;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
.coldata {
|
|
245
|
-
a {
|
|
246
|
-
color: inherit;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
.label {
|
|
250
|
-
font-size: 16px;
|
|
251
|
-
font-weight: bold;
|
|
252
|
-
}
|
|
253
|
-
.longstring {
|
|
254
|
-
word-break: break-all;
|
|
255
|
-
}
|
|
256
|
-
.search {
|
|
257
|
-
color: $black;
|
|
258
|
-
border: 1px solid $gray;
|
|
259
|
-
border-radius: 8px;
|
|
260
|
-
padding: 10px 12px;
|
|
261
|
-
height: 42px;
|
|
262
|
-
background-repeat: no-repeat;
|
|
263
|
-
background-position: 96% 12px;
|
|
264
|
-
margin-bottom: 16px;
|
|
265
|
-
transition: none;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.paragraph--directory.hscp-filters {
|
|
270
|
-
.search {
|
|
271
|
-
color: $black;
|
|
272
|
-
border: 1px solid $gray;
|
|
273
|
-
border-radius: 8px;
|
|
274
|
-
padding: 10px 12px;
|
|
275
|
-
height: 42px;
|
|
276
|
-
background-repeat: no-repeat;
|
|
277
|
-
background-position: 96% 12px;
|
|
278
|
-
margin-bottom: 16px;
|
|
279
|
-
transition: none;
|
|
280
|
-
}
|
|
281
|
-
select {
|
|
282
|
-
-moz-appearance: none; /* Firefox */
|
|
283
|
-
-webkit-appearance: none; /* Safari and Chrome */
|
|
284
|
-
appearance: none;
|
|
285
|
-
height: 42px;
|
|
286
|
-
border-radius: 8px;
|
|
287
|
-
padding: 10px 12px;
|
|
288
|
-
width: 100%;
|
|
289
|
-
border: 1px solid $gray;
|
|
290
|
-
background-image: url('@worksafevictoria/wcl7.5/src/assets/icons/caret-down.svg');
|
|
291
|
-
background-position: 95% 50%;
|
|
292
|
-
background-repeat: no-repeat;
|
|
293
|
-
text-transform: capitalise;
|
|
294
|
-
}
|
|
295
|
-
.grid-column {
|
|
296
|
-
display: inline-block;
|
|
297
|
-
width: 25%;
|
|
298
|
-
|
|
299
|
-
@media (max-width: 767px) {
|
|
300
|
-
width: 50%;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
@media (max-width: 539px) {
|
|
304
|
-
display: block;
|
|
305
|
-
width: 100%;
|
|
306
|
-
float: none;
|
|
307
|
-
margin-bottom: 16px;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
.right {
|
|
311
|
-
float: right;
|
|
312
|
-
position: relative;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.records {
|
|
316
|
-
padding: 0px;
|
|
317
|
-
margin: 0;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
}
|
|
321
207
|
</style>
|
|
322
208
|
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
@import '../../../styles.scss';
|
|
2
|
+
|
|
3
|
+
.row-dir-additional {
|
|
4
|
+
margin-top: 20px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.dir-additional-records {
|
|
8
|
+
font-size: 16px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dir-caret {
|
|
12
|
+
justify-content: end;
|
|
13
|
+
align-content: end;
|
|
14
|
+
max-width: 20px;
|
|
15
|
+
padding-right: 0px;
|
|
16
|
+
float:right;
|
|
17
|
+
}
|
|
18
|
+
.paragraph--directory__records--dir {
|
|
19
|
+
|
|
20
|
+
padding-bottom: 30px !important;
|
|
21
|
+
|
|
22
|
+
a {
|
|
23
|
+
color: $black;
|
|
24
|
+
text-decoration: none;
|
|
25
|
+
}
|
|
26
|
+
a:hover {
|
|
27
|
+
text-decoration: underline;
|
|
28
|
+
}
|
|
29
|
+
a:focus {
|
|
30
|
+
text-decoration: underline;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.name {
|
|
34
|
+
font-size: 1rem;
|
|
35
|
+
color: $black;
|
|
36
|
+
font-weight: 700;
|
|
37
|
+
}
|
|
38
|
+
.address {
|
|
39
|
+
font-size: 15px;
|
|
40
|
+
a {
|
|
41
|
+
color: inherit;
|
|
42
|
+
text-decoration: none;
|
|
43
|
+
}
|
|
44
|
+
a:hover {
|
|
45
|
+
text-decoration: underline;
|
|
46
|
+
}
|
|
47
|
+
a:focus {
|
|
48
|
+
text-decoration: underline;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
.coldata {
|
|
52
|
+
a {
|
|
53
|
+
color: inherit;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.label {
|
|
57
|
+
font-size: 16px;
|
|
58
|
+
font-weight: bold;
|
|
59
|
+
}
|
|
60
|
+
.longstring {
|
|
61
|
+
word-break: break-all;
|
|
62
|
+
}
|
|
63
|
+
.search {
|
|
64
|
+
color: $black;
|
|
65
|
+
border: 1px solid $gray;
|
|
66
|
+
border-radius: 8px;
|
|
67
|
+
padding: 10px 12px;
|
|
68
|
+
height: 42px;
|
|
69
|
+
background-repeat: no-repeat;
|
|
70
|
+
background-position: 96% 12px;
|
|
71
|
+
margin-bottom: 16px;
|
|
72
|
+
transition: none;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.paragraph--directory.dir-filters {
|
|
77
|
+
.search {
|
|
78
|
+
color: $black;
|
|
79
|
+
border: 1px solid $gray;
|
|
80
|
+
border-radius: 8px;
|
|
81
|
+
padding: 10px 12px;
|
|
82
|
+
height: 42px;
|
|
83
|
+
background-repeat: no-repeat;
|
|
84
|
+
background-position: 96% 12px;
|
|
85
|
+
margin-bottom: 16px;
|
|
86
|
+
transition: none;
|
|
87
|
+
}
|
|
88
|
+
select {
|
|
89
|
+
-moz-appearance: none; /* Firefox */
|
|
90
|
+
-webkit-appearance: none; /* Safari and Chrome */
|
|
91
|
+
appearance: none;
|
|
92
|
+
height: 42px;
|
|
93
|
+
border-radius: 8px;
|
|
94
|
+
padding: 10px 12px;
|
|
95
|
+
width: 100%;
|
|
96
|
+
border: 1px solid $gray;
|
|
97
|
+
background-image: url('@worksafevictoria/wcl7.5/src/assets/icons/caret-down.svg');
|
|
98
|
+
background-position: 95% 50%;
|
|
99
|
+
background-repeat: no-repeat;
|
|
100
|
+
text-transform: capitalise;
|
|
101
|
+
}
|
|
102
|
+
.grid-column {
|
|
103
|
+
display: inline-block;
|
|
104
|
+
width: 25%;
|
|
105
|
+
|
|
106
|
+
@media (max-width: 767px) {
|
|
107
|
+
width: 50%;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media (max-width: 539px) {
|
|
111
|
+
display: block;
|
|
112
|
+
width: 100%;
|
|
113
|
+
float: none;
|
|
114
|
+
margin-bottom: 16px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
.right {
|
|
118
|
+
float: right;
|
|
119
|
+
position: relative;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.records {
|
|
123
|
+
padding: 0px;
|
|
124
|
+
margin: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section-group class="paragraph--directory
|
|
2
|
+
<section-group class="paragraph--directory dir-filters">
|
|
3
3
|
<!-- Filters -->
|
|
4
4
|
<row style="column-gap: 16px;">
|
|
5
5
|
<!-- Keyword Filters -->
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</column>
|
|
43
43
|
</row>
|
|
44
44
|
<!-- HSCP Records -->
|
|
45
|
-
<div class="
|
|
45
|
+
<div class="dirRecords" >
|
|
46
46
|
<template v-for="(item, index) in resultChunks[page]" >
|
|
47
47
|
<hscp-record v-if="item.type === 'hscp'" :key="index" :item="item"/>
|
|
48
48
|
</template>
|
|
@@ -101,23 +101,20 @@ export default {
|
|
|
101
101
|
computed: {
|
|
102
102
|
|
|
103
103
|
themeOptions() {
|
|
104
|
-
//
|
|
105
|
-
let allThemes = this.flatRecords.map(a => a.
|
|
104
|
+
// Concatenate all themes, remove duplicates, sort and use for a drop-down list
|
|
105
|
+
let allThemes = this.flatRecords.map(a => a.themes)
|
|
106
106
|
allThemes = allThemes.join(',')
|
|
107
|
-
allThemes = allThemes.replace(/HSR initial/g, '')
|
|
108
|
-
allThemes = allThemes.replace(/HSR Initial/g, '')
|
|
109
|
-
allThemes = allThemes.replace(/HSR refresher - /g, '')
|
|
110
|
-
allThemes = allThemes.replace(/HSR Refresher - /g, '')
|
|
111
|
-
allThemes = allThemes.replace(/HSR refresher/g, '')
|
|
112
|
-
allThemes = allThemes.replace(/HSR Refresher/g, '')
|
|
113
107
|
allThemes = allThemes.trim()
|
|
114
108
|
allThemes = allThemes.split(',')
|
|
109
|
+
// Change all themes to title case
|
|
110
|
+
for (var i = 0; i < allThemes.length; i++) {
|
|
111
|
+
let newVal = this.toTitleCase(allThemes[i])
|
|
112
|
+
allThemes[i] = newVal
|
|
113
|
+
}
|
|
115
114
|
// Remove duplicates
|
|
116
115
|
let s = new Set(allThemes)
|
|
117
116
|
allThemes = [...s]
|
|
118
|
-
|
|
119
|
-
allThemes = allThemes.filter(n => n)
|
|
120
|
-
|
|
117
|
+
|
|
121
118
|
// Sort the themes
|
|
122
119
|
let sortedThemes = allThemes.sort((a, b) => {
|
|
123
120
|
if (a.trim() < b.trim()) {
|
|
@@ -128,10 +125,8 @@ export default {
|
|
|
128
125
|
}
|
|
129
126
|
return 0;
|
|
130
127
|
})
|
|
131
|
-
if (sortedThemes[0].type === undefined) {
|
|
132
|
-
sortedThemes.splice(0, 1)
|
|
133
|
-
}
|
|
134
128
|
allThemes = sortedThemes
|
|
129
|
+
|
|
135
130
|
return allThemes
|
|
136
131
|
},
|
|
137
132
|
|
|
@@ -152,7 +147,7 @@ export default {
|
|
|
152
147
|
}
|
|
153
148
|
if (this.searchThemes.length) {
|
|
154
149
|
this.hideReset = false
|
|
155
|
-
results = results.filter(item => item.
|
|
150
|
+
results = results.filter(item => item.themes.toLowerCase().includes(this.searchThemes.toLowerCase()))
|
|
156
151
|
}
|
|
157
152
|
this.filteredItems = results
|
|
158
153
|
|
|
@@ -191,6 +186,7 @@ export default {
|
|
|
191
186
|
email2: record.Contact_2_Email,
|
|
192
187
|
phone2: record.Contact_2_Phone,
|
|
193
188
|
courses: record.Training_courses.replace(/,$/, ''),
|
|
189
|
+
themes: record.Themes.replace(/,$/, ''),
|
|
194
190
|
trainingVenues: record.Training_venues
|
|
195
191
|
})
|
|
196
192
|
})
|
|
@@ -218,7 +214,7 @@ export default {
|
|
|
218
214
|
formatWebsite(url) {
|
|
219
215
|
let startUrl = url.slice(0, 3)
|
|
220
216
|
if (startUrl.toLowerCase() === 'www') {
|
|
221
|
-
return '
|
|
217
|
+
return 'https://' + url
|
|
222
218
|
} else {
|
|
223
219
|
return url
|
|
224
220
|
}
|
|
@@ -240,6 +236,7 @@ export default {
|
|
|
240
236
|
},
|
|
241
237
|
|
|
242
238
|
reset() {
|
|
239
|
+
this.collapseOrgs('No')
|
|
243
240
|
this.hideReset = true
|
|
244
241
|
this.searchOrg = ''
|
|
245
242
|
this.searchCourse = ''
|
|
@@ -249,7 +246,18 @@ export default {
|
|
|
249
246
|
|
|
250
247
|
pageChanged(ev) {
|
|
251
248
|
this.page = ev - 1
|
|
252
|
-
|
|
249
|
+
|
|
250
|
+
if (this.searchOrg.length || this.searchSub.length || this.searchCourse.length || this.searchThemes.length) {
|
|
251
|
+
// don't set focus
|
|
252
|
+
// don't collapseOrgs
|
|
253
|
+
} else {
|
|
254
|
+
// set focus to top element - used instead of scrollTo
|
|
255
|
+
this.collapseOrgs('Yes')
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
|
|
259
|
+
collapseOrgs(focusLink) {
|
|
260
|
+
// called by pageChanged and reset. pageChanged called by filter and by pagination links
|
|
253
261
|
const aLinks = document.getElementsByName('titleLink')
|
|
254
262
|
// Convert nodelist to array
|
|
255
263
|
let linksArr = Array.from(aLinks)
|
|
@@ -258,86 +266,32 @@ export default {
|
|
|
258
266
|
.filter((link) => link.getAttribute('aria-expanded') === 'true')
|
|
259
267
|
.forEach((link) => link.click())
|
|
260
268
|
|
|
261
|
-
if (
|
|
262
|
-
// don't set focus
|
|
263
|
-
} else {
|
|
264
|
-
// set focus to top element - used instead of scrollTo
|
|
265
|
-
console.log('setting focus.')
|
|
269
|
+
if (focusLink === 'Yes') {
|
|
266
270
|
linksArr[0].focus()
|
|
267
|
-
}
|
|
271
|
+
}
|
|
268
272
|
}
|
|
269
|
-
},
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
</script>
|
|
273
273
|
|
|
274
|
-
|
|
275
|
-
@import '../../styles.scss';
|
|
276
|
-
.paragraph--directory.hscp-filters {
|
|
274
|
+
},
|
|
277
275
|
|
|
278
|
-
|
|
279
|
-
display:inline-block;
|
|
280
|
-
height: 42px;
|
|
281
|
-
border-radius: 8px;
|
|
282
|
-
padding: 10px 12px;
|
|
283
|
-
width: 200px;
|
|
284
|
-
border: 1px solid $gray;
|
|
285
|
-
margin-right: 16px;
|
|
286
|
-
margin-bottom: 16px;
|
|
276
|
+
toTitleCase(strVal) {
|
|
287
277
|
|
|
288
|
-
|
|
278
|
+
let retVal = strVal.trim()
|
|
289
279
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
border: 1px solid $gray;
|
|
294
|
-
border-radius: 8px;
|
|
295
|
-
padding: 10px 12px;
|
|
296
|
-
height: 42px;
|
|
297
|
-
background-image: url('./../../../../../assets/icons/search.svg');
|
|
298
|
-
background-repeat: no-repeat !important;
|
|
299
|
-
background-position: 96% 12px;
|
|
300
|
-
margin-bottom: 16px;
|
|
301
|
-
margin-right: 16px;
|
|
302
|
-
transition: none;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.grid-column {
|
|
306
|
-
display: inline-block;
|
|
307
|
-
width: 25%;
|
|
308
|
-
|
|
309
|
-
@media (max-width: 767px) {
|
|
310
|
-
width: 50%;
|
|
311
|
-
}
|
|
280
|
+
const firstChar = retVal.charAt(0)
|
|
281
|
+
const firstCharU = firstChar.toUpperCase()
|
|
282
|
+
const remChar = retVal.slice(1)
|
|
312
283
|
|
|
313
|
-
|
|
314
|
-
display: block;
|
|
315
|
-
width: 100%;
|
|
316
|
-
float: none;
|
|
317
|
-
margin-bottom: 16px;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
.right {
|
|
322
|
-
float: right;
|
|
323
|
-
position: relative;
|
|
324
|
-
}
|
|
284
|
+
retVal = firstCharU + remChar
|
|
325
285
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
margin: 0;
|
|
286
|
+
return retVal
|
|
287
|
+
},
|
|
329
288
|
}
|
|
330
289
|
}
|
|
290
|
+
</script>
|
|
331
291
|
|
|
332
|
-
|
|
333
|
-
display: inline-block !important;
|
|
334
|
-
float: right;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.hscpRecords {
|
|
338
|
-
padding-top: 16px;
|
|
339
|
-
}
|
|
292
|
+
<style lang="scss" scoped>
|
|
340
293
|
|
|
294
|
+
@import '../styles.scss'
|
|
341
295
|
|
|
342
296
|
|
|
343
297
|
</style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
@import '../styles.scss';
|
|
3
|
+
|
|
4
|
+
.paragraph--directory.dir-filters {
|
|
5
|
+
|
|
6
|
+
.selectClass {
|
|
7
|
+
display:inline-block;
|
|
8
|
+
height: 42px;
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
padding: 10px 12px;
|
|
11
|
+
width: 200px;
|
|
12
|
+
border: 1px solid $gray;
|
|
13
|
+
margin-right: 16px;
|
|
14
|
+
margin-bottom: 16px;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.search {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
color: $black;
|
|
21
|
+
border: 1px solid $gray;
|
|
22
|
+
border-radius: 8px;
|
|
23
|
+
padding: 10px 12px;
|
|
24
|
+
height: 42px;
|
|
25
|
+
background-image: url('./../../../../../assets/icons/search.svg');
|
|
26
|
+
background-repeat: no-repeat !important;
|
|
27
|
+
background-position: 96% 12px;
|
|
28
|
+
margin-bottom: 16px;
|
|
29
|
+
margin-right: 16px;
|
|
30
|
+
transition: none;
|
|
31
|
+
width: 200px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.grid-column {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
width: 25%;
|
|
37
|
+
|
|
38
|
+
@media (max-width: 767px) {
|
|
39
|
+
width: 50%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media (max-width: 539px) {
|
|
43
|
+
display: block;
|
|
44
|
+
width: 100%;
|
|
45
|
+
float: none;
|
|
46
|
+
margin-bottom: 16px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
.right {
|
|
51
|
+
float: right;
|
|
52
|
+
position: relative;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.records {
|
|
56
|
+
padding: 0;
|
|
57
|
+
margin: 0;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.filterButton__button--reset {
|
|
62
|
+
display: inline-block !important;
|
|
63
|
+
float: right;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.dirRecords {
|
|
67
|
+
padding-top: 16px;
|
|
68
|
+
}
|