@worksafevictoria/wcl7.5 1.9.0-beta.15 → 1.9.0-beta.17
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/index.vue +37 -54
- package/src/components/Global/AppHeaderNew/mobile.scss +41 -6
- package/src/components/Global/AppHeaderNew/styles.scss +8 -0
- 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
|
@@ -383,6 +383,7 @@
|
|
|
383
383
|
display: flex;
|
|
384
384
|
align-items: center;
|
|
385
385
|
margin-right: 0%;
|
|
386
|
+
background-color: white;
|
|
386
387
|
|
|
387
388
|
&__nav {
|
|
388
389
|
display:inline-block;
|
|
@@ -419,6 +420,12 @@
|
|
|
419
420
|
padding: 10px;
|
|
420
421
|
}
|
|
421
422
|
}
|
|
423
|
+
|
|
424
|
+
.LogoImg {
|
|
425
|
+
height: 55px;
|
|
426
|
+
width: auto;
|
|
427
|
+
}
|
|
428
|
+
|
|
422
429
|
.semi-circle {
|
|
423
430
|
display:block;
|
|
424
431
|
width: 20px;
|
|
@@ -586,6 +593,7 @@
|
|
|
586
593
|
|
|
587
594
|
label {
|
|
588
595
|
margin-bottom: 5px !important;
|
|
596
|
+
color:black
|
|
589
597
|
}
|
|
590
598
|
.last-radio {
|
|
591
599
|
margin-bottom: 0 !important;
|
|
@@ -2,19 +2,23 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<row v-if="!loading" class="wcl-directory-filters">
|
|
4
4
|
<column v-if="bundle" md="4" sm="6">
|
|
5
|
-
|
|
5
|
+
<!-- Hidden label for screen readers -->
|
|
6
|
+
<label class="col-form-label visually-hidden" for="search-directory"
|
|
6
7
|
>Search by keyword (Typed keyword automatically filters below
|
|
7
8
|
results)</label
|
|
8
9
|
>
|
|
9
|
-
|
|
10
|
+
<!-- Search Input uses aria-label -->
|
|
11
|
+
<BFormInput
|
|
10
12
|
id="search-directory"
|
|
11
13
|
v-model="searchQuery"
|
|
12
14
|
class="search"
|
|
13
15
|
autocomplete="off"
|
|
14
16
|
placeholder="Keyword"
|
|
15
17
|
debounce="500"
|
|
18
|
+
aria-label="Search by keyword (Typed keyword automatically filters below
|
|
19
|
+
results)"
|
|
16
20
|
:style="`background-image: url(${searchIcon})`"
|
|
17
|
-
></
|
|
21
|
+
></BFormInput>
|
|
18
22
|
</column>
|
|
19
23
|
<column v-if="bundle === 'isp'" md="4" sm="6">
|
|
20
24
|
<form-address-postcode
|
|
@@ -28,7 +32,9 @@
|
|
|
28
32
|
/>
|
|
29
33
|
</column>
|
|
30
34
|
<span class="d-none">{{ filters }}</span>
|
|
31
|
-
<span class="d-none">{{
|
|
35
|
+
<span class="d-none">{{
|
|
36
|
+
filters.taxonomies.map((taxonomy) => taxonomy.name).join(', ')
|
|
37
|
+
}}</span>
|
|
32
38
|
<column
|
|
33
39
|
:md="!bundle ? 12 : bundle === 'isp' ? 4 : 8"
|
|
34
40
|
:sm="!bundle ? 12 : bundle === 'isp' ? 6 : 12"
|
|
@@ -71,38 +77,38 @@ export default {
|
|
|
71
77
|
SingleTaxonomy,
|
|
72
78
|
FormAddressPostcode,
|
|
73
79
|
FilterButton,
|
|
74
|
-
BFormInput
|
|
80
|
+
BFormInput,
|
|
75
81
|
},
|
|
76
82
|
props: {
|
|
77
83
|
filters: {
|
|
78
84
|
type: Object,
|
|
79
|
-
required: true
|
|
85
|
+
required: true,
|
|
80
86
|
},
|
|
81
87
|
bundle: {
|
|
82
88
|
type: String,
|
|
83
|
-
default: ''
|
|
89
|
+
default: '',
|
|
84
90
|
},
|
|
85
91
|
results: {
|
|
86
92
|
type: Number,
|
|
87
|
-
required: true
|
|
93
|
+
required: true,
|
|
88
94
|
},
|
|
89
95
|
isFiltering: {
|
|
90
96
|
type: Boolean,
|
|
91
|
-
required: false
|
|
92
|
-
}
|
|
97
|
+
required: false,
|
|
98
|
+
},
|
|
93
99
|
},
|
|
94
100
|
data() {
|
|
95
101
|
return {
|
|
96
102
|
searchQuery: '',
|
|
97
103
|
loading: true,
|
|
98
104
|
hideReset: true,
|
|
99
|
-
searchIcon
|
|
105
|
+
searchIcon,
|
|
100
106
|
}
|
|
101
107
|
},
|
|
102
108
|
computed: {
|
|
103
109
|
baseURL() {
|
|
104
110
|
return window ? window.location.origin : ''
|
|
105
|
-
}
|
|
111
|
+
},
|
|
106
112
|
},
|
|
107
113
|
watch: {
|
|
108
114
|
searchQuery() {
|
|
@@ -112,7 +118,7 @@ export default {
|
|
|
112
118
|
this.hideReset = false
|
|
113
119
|
}
|
|
114
120
|
this.$emit('onSearch', this.searchQuery)
|
|
115
|
-
}
|
|
121
|
+
},
|
|
116
122
|
},
|
|
117
123
|
mounted() {
|
|
118
124
|
// wait for hydration,
|
|
@@ -125,9 +131,9 @@ export default {
|
|
|
125
131
|
const allFiltersUnselected = Object.values(this.$refs).every(
|
|
126
132
|
(taxonomy) => {
|
|
127
133
|
return Object.values(taxonomy[0].selectedFilters).every(
|
|
128
|
-
(filter) => filter.filter((item) => !item.preselected).length === 0
|
|
134
|
+
(filter) => filter.filter((item) => !item.preselected).length === 0,
|
|
129
135
|
)
|
|
130
|
-
}
|
|
136
|
+
},
|
|
131
137
|
)
|
|
132
138
|
if (allFiltersUnselected && !this.searchQuery) {
|
|
133
139
|
this.hideReset = true
|
|
@@ -147,8 +153,8 @@ export default {
|
|
|
147
153
|
})
|
|
148
154
|
this.searchQuery = ''
|
|
149
155
|
this.$emit('onReset')
|
|
150
|
-
}
|
|
151
|
-
}
|
|
156
|
+
},
|
|
157
|
+
},
|
|
152
158
|
}
|
|
153
159
|
</script>
|
|
154
160
|
<style lang="scss" scoped>
|
|
@@ -165,7 +171,7 @@ export default {
|
|
|
165
171
|
background-position: 96% 12px;
|
|
166
172
|
margin-bottom: 16px;
|
|
167
173
|
transition: none;
|
|
168
|
-
background-image: url('./../../../assets/icons/search.svg')
|
|
174
|
+
background-image: url('./../../../assets/icons/search.svg');
|
|
169
175
|
}
|
|
170
176
|
&__filterButton {
|
|
171
177
|
display: inline-block;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<div
|
|
13
13
|
:role="mini ? 'link' : null"
|
|
14
14
|
:class="type + '-strip__inner-wrap'"
|
|
15
|
-
:tabindex="mini ? 0 :
|
|
15
|
+
:tabindex="mini ? 0 : -1"
|
|
16
16
|
:style="mini ? 'cursor: pointer;' : false"
|
|
17
17
|
@click="mini ? handleClick() : false"
|
|
18
18
|
@keypress.enter="mini ? handleClick() : false"
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
61
|
<script>
|
|
62
|
-
import exclamationIcon from
|
|
63
|
-
import arrowIcon from
|
|
64
|
-
import dismissIcon from
|
|
65
|
-
import infoIcon from
|
|
66
|
-
import chevronIcon from
|
|
67
|
-
import RichText from
|
|
68
|
-
import { BAlert } from
|
|
62
|
+
import exclamationIcon from '../../../assets/icons/Strip/Exclamation triangle fill.svg?url'
|
|
63
|
+
import arrowIcon from '../../../assets/icons/Strip/Arrow right.svg?url'
|
|
64
|
+
import dismissIcon from '../../../assets/icons/Strip/Dismiss.svg?url'
|
|
65
|
+
import infoIcon from '../../../assets/icons/Strip/Info circle fill.svg?url'
|
|
66
|
+
import chevronIcon from '../../../assets/icons/caret-right.svg?url'
|
|
67
|
+
import RichText from '../../Paragraphs/RichText/index.vue'
|
|
68
|
+
import { BAlert } from 'bootstrap-vue-next'
|
|
69
69
|
|
|
70
70
|
export default {
|
|
71
|
-
name:
|
|
71
|
+
name: 'Strip',
|
|
72
72
|
components: {
|
|
73
73
|
RichText,
|
|
74
74
|
BAlert,
|
|
@@ -80,15 +80,15 @@ export default {
|
|
|
80
80
|
},
|
|
81
81
|
stripHeading: {
|
|
82
82
|
type: String,
|
|
83
|
-
default:
|
|
83
|
+
default: '',
|
|
84
84
|
},
|
|
85
85
|
stripContent: {
|
|
86
86
|
type: String,
|
|
87
|
-
default:
|
|
87
|
+
default: '',
|
|
88
88
|
},
|
|
89
89
|
url: {
|
|
90
90
|
type: String,
|
|
91
|
-
default:
|
|
91
|
+
default: '#',
|
|
92
92
|
},
|
|
93
93
|
type: {
|
|
94
94
|
type: String,
|
|
@@ -103,7 +103,7 @@ export default {
|
|
|
103
103
|
default: false,
|
|
104
104
|
},
|
|
105
105
|
},
|
|
106
|
-
emits: [
|
|
106
|
+
emits: ['update:modelValue', 'dismissed'],
|
|
107
107
|
data() {
|
|
108
108
|
return {
|
|
109
109
|
dismissibleAlert: this.modelValue,
|
|
@@ -112,34 +112,34 @@ export default {
|
|
|
112
112
|
dismissIcon,
|
|
113
113
|
infoIcon,
|
|
114
114
|
chevronIcon,
|
|
115
|
-
}
|
|
115
|
+
}
|
|
116
116
|
},
|
|
117
117
|
watch: {
|
|
118
118
|
modelValue(val) {
|
|
119
|
-
this.dismissibleAlert = val
|
|
119
|
+
this.dismissibleAlert = val
|
|
120
120
|
},
|
|
121
121
|
dismissibleAlert(val) {
|
|
122
122
|
if (val !== this.modelValue) {
|
|
123
|
-
this.$emit(
|
|
123
|
+
this.$emit('update:modelValue', val)
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
},
|
|
127
127
|
computed: {
|
|
128
128
|
layout() {
|
|
129
|
-
return this.mini ?
|
|
129
|
+
return this.mini ? 'mini' : 'full'
|
|
130
130
|
},
|
|
131
131
|
themeColor() {
|
|
132
|
-
return this.type ===
|
|
132
|
+
return this.type === 'alert' ? 'red' : 'blue'
|
|
133
133
|
},
|
|
134
134
|
stripTitle() {
|
|
135
|
-
if (this.mini && this.type ===
|
|
136
|
-
return
|
|
137
|
-
} else if (this.mini && this.type ===
|
|
138
|
-
return
|
|
135
|
+
if (this.mini && this.type === 'alert') {
|
|
136
|
+
return 'Safety alert'
|
|
137
|
+
} else if (this.mini && this.type === 'notice') {
|
|
138
|
+
return 'Information'
|
|
139
139
|
} else if (this.stripHeading) {
|
|
140
|
-
return this.stripHeading
|
|
140
|
+
return this.stripHeading
|
|
141
141
|
} else {
|
|
142
|
-
return
|
|
142
|
+
return ''
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
},
|
|
@@ -151,18 +151,18 @@ export default {
|
|
|
151
151
|
link: this.mini ? this.url : false,
|
|
152
152
|
clickedOnPage: this.$route.path,
|
|
153
153
|
globalStrip: false,
|
|
154
|
-
}
|
|
154
|
+
}
|
|
155
155
|
if (this.$gtm) {
|
|
156
156
|
this.$gtm.push({
|
|
157
157
|
event: `custom.interaction.${this.type}.click`,
|
|
158
158
|
...attrs,
|
|
159
|
-
})
|
|
159
|
+
})
|
|
160
160
|
}
|
|
161
|
-
this.$router.push(this.url)
|
|
161
|
+
this.$router.push(this.url)
|
|
162
162
|
},
|
|
163
163
|
handleDismissed() {
|
|
164
|
-
this.$emit(
|
|
165
|
-
this.$emit(
|
|
164
|
+
this.$emit('update:modelValue', false)
|
|
165
|
+
this.$emit('dismissed')
|
|
166
166
|
|
|
167
167
|
if (this.$gtm) {
|
|
168
168
|
const attrs = {
|
|
@@ -170,19 +170,19 @@ export default {
|
|
|
170
170
|
label: this.stripHeading,
|
|
171
171
|
clickedOnPage: this.$route.path,
|
|
172
172
|
globalStrip: false,
|
|
173
|
-
}
|
|
173
|
+
}
|
|
174
174
|
this.$gtm.push({
|
|
175
175
|
event: `custom.interaction.${this.type}.close`,
|
|
176
176
|
...attrs,
|
|
177
|
-
})
|
|
177
|
+
})
|
|
178
178
|
}
|
|
179
179
|
},
|
|
180
180
|
},
|
|
181
|
-
}
|
|
181
|
+
}
|
|
182
182
|
</script>
|
|
183
183
|
|
|
184
184
|
<style lang="scss" scoped>
|
|
185
|
-
@import
|
|
185
|
+
@import '../../../includes/scss/all';
|
|
186
186
|
.red {
|
|
187
187
|
.alert-strip {
|
|
188
188
|
&__inner {
|
|
@@ -316,7 +316,7 @@ export default {
|
|
|
316
316
|
max-width: 794px;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
@include mq(
|
|
319
|
+
@include mq('sm') {
|
|
320
320
|
flex-direction: column;
|
|
321
321
|
margin-right: 16px;
|
|
322
322
|
|
|
@@ -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>
|