@worksafevictoria/wcl7.5 1.9.0-beta.14 → 1.9.0-beta.16
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/package.json +1 -1
- package/src/components/Common/CardGridItem/card-grid-item-caret.vue +1 -1
- package/src/components/Common/CardGridItem/index.vue +147 -115
- package/src/components/Global/AppFooter/index.vue +126 -109
- package/src/components/Global/AppHeaderNew/includes.scss +4 -2
- package/src/components/Global/AppHeaderNew/index.vue +59 -331
- package/src/components/Global/AppHeaderNew/styles.scss +49 -45
- package/src/components/Global/DirectoryFilters/index.vue +24 -18
- package/src/components/Global/Strip/index.vue +34 -34
- package/src/components/Paragraphs/Directory/Asbestos/Records/index.vue +121 -88
- package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +116 -100
- package/src/components/Paragraphs/Statistics/index.vue +9 -9
- package/src/components/Paragraphs/TabulatedData/index.vue +6 -0
- package/src/components/SubComponents/ResourceGroup/cardbody.vue +52 -38
- package/src/index.js +1 -1
|
@@ -4,21 +4,43 @@
|
|
|
4
4
|
<row style="column-gap: 16px">
|
|
5
5
|
<!-- Keyword Filters -->
|
|
6
6
|
<column xxl="2" xl="3" md="4" sm="6">
|
|
7
|
-
<label class="visually-hidden" for="search
|
|
7
|
+
<label class="col-form-label visually-hidden" for="keyword-search">
|
|
8
8
|
Search by keyword (typed keyword automatically filters below results)
|
|
9
9
|
</label>
|
|
10
|
-
<input
|
|
10
|
+
<input
|
|
11
|
+
id="keyword-search"
|
|
12
|
+
type="text"
|
|
13
|
+
v-model="searchRem"
|
|
14
|
+
placeholder="Removalist"
|
|
15
|
+
aria-label="Search by keyword (typed keyword automatically filters below results)"
|
|
16
|
+
class="search"
|
|
17
|
+
/>
|
|
11
18
|
</column>
|
|
12
19
|
<column xxl="2" xl="3" md="4" sm="6">
|
|
13
|
-
<label class="visually-hidden" for="search
|
|
20
|
+
<label class="col-form-label visually-hidden" for="suburb-search">
|
|
14
21
|
Search by suburb (typed suburb automatically filters below results)
|
|
15
22
|
</label>
|
|
16
|
-
<input
|
|
23
|
+
<input
|
|
24
|
+
id="suburb-search"
|
|
25
|
+
type="text"
|
|
26
|
+
v-model="searchSub"
|
|
27
|
+
placeholder="Location"
|
|
28
|
+
aria-label="Search by suburb (typed suburb automatically filters below results)"
|
|
29
|
+
class="search"
|
|
30
|
+
/>
|
|
17
31
|
</column>
|
|
18
32
|
<!-- Other Filters -->
|
|
19
33
|
<column xxl="2" xl="3" md="4" sm="6">
|
|
20
|
-
<label class="visually-hidden" for="filterType">
|
|
21
|
-
|
|
34
|
+
<label class="col-form-label visually-hidden" for="filterType">
|
|
35
|
+
Filter Type
|
|
36
|
+
</label>
|
|
37
|
+
<select
|
|
38
|
+
id="filterType"
|
|
39
|
+
v-model="searchClass"
|
|
40
|
+
name="filter"
|
|
41
|
+
class="selectClass"
|
|
42
|
+
aria-label="Filter Type"
|
|
43
|
+
>
|
|
22
44
|
<option class="placeholder" value="" disabled hidden selected>
|
|
23
45
|
Service class
|
|
24
46
|
</option>
|
|
@@ -37,13 +59,15 @@
|
|
|
37
59
|
</select>
|
|
38
60
|
</column>
|
|
39
61
|
<column xxl="2" xl="3" md="4" sm="6">
|
|
40
|
-
<label class="visually-hidden" for="search-
|
|
62
|
+
<label class="col-form-label visually-hidden" for="search-services">
|
|
41
63
|
Search by suburb (typed suburb automatically filters below results)
|
|
42
64
|
</label>
|
|
43
65
|
<input
|
|
66
|
+
id="search-services"
|
|
44
67
|
type="text"
|
|
45
68
|
v-model="searchServices"
|
|
46
69
|
placeholder="Services"
|
|
70
|
+
aria-label="Search by suburb (typed suburb automatically filters below results)"
|
|
47
71
|
class="search"
|
|
48
72
|
/>
|
|
49
73
|
</column>
|
|
@@ -77,14 +101,14 @@
|
|
|
77
101
|
</template>
|
|
78
102
|
|
|
79
103
|
<script>
|
|
80
|
-
import arRecord from
|
|
81
|
-
import searchIcon from
|
|
82
|
-
import SectionGroup from
|
|
83
|
-
import FilterButton from
|
|
84
|
-
import Pagination from
|
|
104
|
+
import arRecord from './SingleRecord/index.vue'
|
|
105
|
+
import searchIcon from './../../../../../assets/icons/search.svg?url'
|
|
106
|
+
import SectionGroup from '../../../../Containers/SectionGroup/index.vue'
|
|
107
|
+
import FilterButton from '../../../../Common/FilterButton/index.vue' //Reset
|
|
108
|
+
import Pagination from '../../HSCP/Records/pagination.vue'
|
|
85
109
|
|
|
86
110
|
export default {
|
|
87
|
-
name:
|
|
111
|
+
name: 'Asbestos',
|
|
88
112
|
components: {
|
|
89
113
|
arRecord,
|
|
90
114
|
SectionGroup,
|
|
@@ -93,16 +117,16 @@ export default {
|
|
|
93
117
|
},
|
|
94
118
|
data() {
|
|
95
119
|
return {
|
|
96
|
-
searchRem:
|
|
97
|
-
searchSub:
|
|
98
|
-
searchClass:
|
|
99
|
-
searchServices:
|
|
120
|
+
searchRem: '',
|
|
121
|
+
searchSub: '',
|
|
122
|
+
searchClass: '',
|
|
123
|
+
searchServices: '',
|
|
100
124
|
filteredItems: null,
|
|
101
125
|
perPage: 10,
|
|
102
126
|
page: 0,
|
|
103
127
|
searchIcon,
|
|
104
128
|
hideReset: true,
|
|
105
|
-
}
|
|
129
|
+
}
|
|
106
130
|
},
|
|
107
131
|
props: {
|
|
108
132
|
items: {
|
|
@@ -113,33 +137,37 @@ export default {
|
|
|
113
137
|
|
|
114
138
|
computed: {
|
|
115
139
|
filteredRecords() {
|
|
116
|
-
let results = this.flatRecords
|
|
140
|
+
let results = this.flatRecords
|
|
117
141
|
|
|
118
142
|
if (this.searchRem.length) {
|
|
119
|
-
this.hideReset = false
|
|
143
|
+
this.hideReset = false
|
|
120
144
|
results = results.filter((item) =>
|
|
121
|
-
item.title.toLowerCase().includes(this.searchRem.toLowerCase())
|
|
122
|
-
)
|
|
145
|
+
item.title.toLowerCase().includes(this.searchRem.toLowerCase()),
|
|
146
|
+
)
|
|
123
147
|
}
|
|
124
148
|
if (this.searchSub.length) {
|
|
125
|
-
this.hideReset = false
|
|
149
|
+
this.hideReset = false
|
|
126
150
|
results = results.filter((item) =>
|
|
127
|
-
item.fullAddress.toLowerCase().includes(this.searchSub.toLowerCase())
|
|
128
|
-
)
|
|
151
|
+
item.fullAddress.toLowerCase().includes(this.searchSub.toLowerCase()),
|
|
152
|
+
)
|
|
129
153
|
}
|
|
130
154
|
if (this.searchClass.length) {
|
|
131
|
-
this.hideReset = false
|
|
155
|
+
this.hideReset = false
|
|
132
156
|
results = results.filter((item) =>
|
|
133
|
-
item.serviceCategory
|
|
134
|
-
|
|
157
|
+
item.serviceCategory
|
|
158
|
+
.toLowerCase()
|
|
159
|
+
.includes(this.searchClass.toLowerCase()),
|
|
160
|
+
)
|
|
135
161
|
}
|
|
136
162
|
if (this.searchServices.length) {
|
|
137
|
-
this.hideReset = false
|
|
163
|
+
this.hideReset = false
|
|
138
164
|
results = results.filter((item) =>
|
|
139
|
-
item.services
|
|
140
|
-
|
|
165
|
+
item.services
|
|
166
|
+
.toLowerCase()
|
|
167
|
+
.includes(this.searchServices.toLowerCase()),
|
|
168
|
+
)
|
|
141
169
|
}
|
|
142
|
-
this.filteredItems = results
|
|
170
|
+
this.filteredItems = results
|
|
143
171
|
|
|
144
172
|
if (
|
|
145
173
|
this.searchRem.length ||
|
|
@@ -147,102 +175,107 @@ export default {
|
|
|
147
175
|
this.searchClass.length ||
|
|
148
176
|
this.searchServices.length
|
|
149
177
|
) {
|
|
150
|
-
this.pageChanged(1)
|
|
178
|
+
this.pageChanged(1)
|
|
151
179
|
}
|
|
152
180
|
|
|
153
|
-
return results
|
|
181
|
+
return results
|
|
154
182
|
},
|
|
155
183
|
|
|
156
184
|
flatRecords() {
|
|
157
|
-
let flatRecords = []
|
|
185
|
+
let flatRecords = []
|
|
158
186
|
const sortedItems = this.items.sort((a, b) =>
|
|
159
|
-
a.ResourceName.localeCompare(b.ResourceName,
|
|
160
|
-
|
|
187
|
+
a.ResourceName.localeCompare(b.ResourceName, 'en', {
|
|
188
|
+
sensitivity: 'base',
|
|
189
|
+
}),
|
|
190
|
+
)
|
|
161
191
|
|
|
162
192
|
sortedItems.forEach((record) => {
|
|
163
193
|
flatRecords.push({
|
|
164
|
-
type:
|
|
194
|
+
type: 'ar',
|
|
165
195
|
title: record.ResourceName,
|
|
166
196
|
fullAddress: record.AddressLine2,
|
|
167
197
|
workPhone: record.Phone,
|
|
168
198
|
mobilePhone: record.CompanyMobile,
|
|
169
199
|
email: record.CompanyEmailDisp,
|
|
170
200
|
website: this.formatWebsite(record.CompanyWebURLDisp),
|
|
171
|
-
contact1: this.returnContact(
|
|
201
|
+
contact1: this.returnContact(
|
|
202
|
+
record.ContactFirstName,
|
|
203
|
+
record.ContactLastName,
|
|
204
|
+
),
|
|
172
205
|
email1: record.ContactEmail,
|
|
173
206
|
phone1: record.ContactPhoneDisp,
|
|
174
207
|
mobile1: record.ContactMobileDisp,
|
|
175
|
-
services: record.ServicesAll.replace(/,$/,
|
|
208
|
+
services: record.ServicesAll.replace(/,$/, ''),
|
|
176
209
|
serviceCategory: record.ServiceAll,
|
|
177
|
-
})
|
|
178
|
-
})
|
|
179
|
-
return flatRecords
|
|
210
|
+
})
|
|
211
|
+
})
|
|
212
|
+
return flatRecords
|
|
180
213
|
},
|
|
181
214
|
resultChunks() {
|
|
182
|
-
return this.chunkify(this.filteredItems || this.items, this.perPage)
|
|
215
|
+
return this.chunkify(this.filteredItems || this.items, this.perPage)
|
|
183
216
|
},
|
|
184
217
|
noRecordsFound() {
|
|
185
|
-
return this.resultChunks[0].length === 0
|
|
218
|
+
return this.resultChunks[0].length === 0
|
|
186
219
|
},
|
|
187
220
|
totalResults() {
|
|
188
|
-
return Array.isArray(this.filteredItems) ? this.filteredItems.length : 0
|
|
221
|
+
return Array.isArray(this.filteredItems) ? this.filteredItems.length : 0
|
|
189
222
|
},
|
|
190
223
|
totalPages() {
|
|
191
|
-
return this.resultChunks.length
|
|
224
|
+
return this.resultChunks.length
|
|
192
225
|
},
|
|
193
226
|
pageResultCount() {
|
|
194
|
-
return this.resultChunks[this.page].length
|
|
227
|
+
return this.resultChunks[this.page].length
|
|
195
228
|
},
|
|
196
229
|
},
|
|
197
230
|
|
|
198
231
|
methods: {
|
|
199
232
|
formatWebsite(url) {
|
|
200
|
-
let startUrl = url.slice(0, 3)
|
|
201
|
-
let returnUrl = url
|
|
202
|
-
if (startUrl.toLowerCase() ===
|
|
203
|
-
returnUrl =
|
|
233
|
+
let startUrl = url.slice(0, 3)
|
|
234
|
+
let returnUrl = url
|
|
235
|
+
if (startUrl.toLowerCase() === 'www') {
|
|
236
|
+
returnUrl = 'https://' + url
|
|
204
237
|
}
|
|
205
238
|
if (
|
|
206
|
-
startUrl.toLowerCase() !==
|
|
207
|
-
startUrl.toLowerCase() !==
|
|
208
|
-
url !==
|
|
239
|
+
startUrl.toLowerCase() !== 'htt' &&
|
|
240
|
+
startUrl.toLowerCase() !== 'www' &&
|
|
241
|
+
url !== ''
|
|
209
242
|
) {
|
|
210
|
-
returnUrl =
|
|
243
|
+
returnUrl = 'https://www.' + url
|
|
211
244
|
}
|
|
212
|
-
return returnUrl
|
|
245
|
+
return returnUrl
|
|
213
246
|
},
|
|
214
247
|
|
|
215
248
|
returnContact(firstN, lastN) {
|
|
216
|
-
let retContact = [firstN, lastN].filter(Boolean).join(
|
|
217
|
-
return retContact
|
|
249
|
+
let retContact = [firstN, lastN].filter(Boolean).join(' ')
|
|
250
|
+
return retContact
|
|
218
251
|
},
|
|
219
252
|
|
|
220
253
|
chunkify(arr, n) {
|
|
221
254
|
if (arr) {
|
|
222
255
|
const chunked = arr.reduce(
|
|
223
256
|
(chunk, val) => {
|
|
224
|
-
if (chunk[chunk.length - 1].length === n) chunk.push([])
|
|
225
|
-
chunk[chunk.length - 1].push(val)
|
|
226
|
-
return chunk
|
|
257
|
+
if (chunk[chunk.length - 1].length === n) chunk.push([])
|
|
258
|
+
chunk[chunk.length - 1].push(val)
|
|
259
|
+
return chunk
|
|
227
260
|
},
|
|
228
|
-
[[]]
|
|
229
|
-
)
|
|
230
|
-
return chunked
|
|
261
|
+
[[]],
|
|
262
|
+
)
|
|
263
|
+
return chunked
|
|
231
264
|
}
|
|
232
|
-
return [[]]
|
|
265
|
+
return [[]]
|
|
233
266
|
},
|
|
234
267
|
|
|
235
268
|
reset() {
|
|
236
|
-
this.collapseOrgs(
|
|
237
|
-
this.hideReset = true
|
|
238
|
-
this.searchRem =
|
|
239
|
-
this.searchClass =
|
|
240
|
-
this.searchSub =
|
|
241
|
-
this.searchServices =
|
|
269
|
+
this.collapseOrgs('No')
|
|
270
|
+
this.hideReset = true
|
|
271
|
+
this.searchRem = ''
|
|
272
|
+
this.searchClass = ''
|
|
273
|
+
this.searchSub = ''
|
|
274
|
+
this.searchServices = ''
|
|
242
275
|
},
|
|
243
276
|
|
|
244
277
|
pageChanged(ev) {
|
|
245
|
-
this.page = ev - 1
|
|
278
|
+
this.page = ev - 1
|
|
246
279
|
|
|
247
280
|
if (
|
|
248
281
|
this.searchRem.length ||
|
|
@@ -254,41 +287,41 @@ export default {
|
|
|
254
287
|
// don't collapseOrgs
|
|
255
288
|
} else {
|
|
256
289
|
// set focus to top element - used instead of scrollTo
|
|
257
|
-
this.collapseOrgs(
|
|
290
|
+
this.collapseOrgs('Yes')
|
|
258
291
|
}
|
|
259
292
|
},
|
|
260
293
|
|
|
261
294
|
collapseOrgs(focusLink) {
|
|
262
295
|
// called by pageChanged and reset. pageChanged called by filter and by pagination links
|
|
263
|
-
const aLinks = document.getElementsByName(
|
|
296
|
+
const aLinks = document.getElementsByName('titleLink')
|
|
264
297
|
// Convert nodelist to array
|
|
265
|
-
let linksArr = Array.from(aLinks)
|
|
298
|
+
let linksArr = Array.from(aLinks)
|
|
266
299
|
if (Array.isArray(linksArr) && linksArr.length > 0) {
|
|
267
300
|
linksArr
|
|
268
|
-
.filter((link) => link.getAttribute(
|
|
269
|
-
.forEach((link) => link.click())
|
|
301
|
+
.filter((link) => link.getAttribute('aria-expanded') === 'true')
|
|
302
|
+
.forEach((link) => link.click())
|
|
270
303
|
|
|
271
|
-
if (focusLink ===
|
|
272
|
-
linksArr[0].focus()
|
|
304
|
+
if (focusLink === 'Yes') {
|
|
305
|
+
linksArr[0].focus()
|
|
273
306
|
}
|
|
274
307
|
}
|
|
275
308
|
},
|
|
276
309
|
|
|
277
310
|
toTitleCase(strVal) {
|
|
278
|
-
let retVal = strVal.trim()
|
|
311
|
+
let retVal = strVal.trim()
|
|
279
312
|
|
|
280
|
-
const firstChar = retVal.charAt(0)
|
|
281
|
-
const firstCharU = firstChar.toUpperCase()
|
|
282
|
-
const remChar = retVal.slice(1)
|
|
313
|
+
const firstChar = retVal.charAt(0)
|
|
314
|
+
const firstCharU = firstChar.toUpperCase()
|
|
315
|
+
const remChar = retVal.slice(1)
|
|
283
316
|
|
|
284
|
-
retVal = firstCharU + remChar
|
|
317
|
+
retVal = firstCharU + remChar
|
|
285
318
|
|
|
286
|
-
return retVal
|
|
319
|
+
return retVal
|
|
287
320
|
},
|
|
288
321
|
},
|
|
289
|
-
}
|
|
322
|
+
}
|
|
290
323
|
</script>
|
|
291
324
|
|
|
292
325
|
<style lang="scss" scoped>
|
|
293
|
-
@import
|
|
326
|
+
@import '../../HSCP/styles.scss';
|
|
294
327
|
</style>
|