@worksafevictoria/wcl7.5 1.1.0-beta.100 → 1.1.0-beta.101
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/Paragraphs/Directory/{Records/HSCP → HSCP/Records/SingleRecord}/index.stories.js +4 -3
- package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +321 -0
- package/src/components/Paragraphs/Directory/HSCP/Records/index.stories.js +19 -0
- package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +348 -0
- package/src/components/Paragraphs/Directory/HSCP/Records/pagination.vue +179 -0
- package/src/components/Paragraphs/Directory/Records/CJ/index.vue +1 -1
- package/src/components/Paragraphs/Directory/Records/ISP/index.vue +1 -1
- package/src/components/Paragraphs/Directory/Records/PRS/index.vue +1 -1
- package/src/components/Paragraphs/Directory/Records/index.storieshide.js +47 -0
- package/src/components/Paragraphs/Directory/Records/index.vue +18 -35
- package/src/components/Paragraphs/Directory/{Records/styles.scss → styles.scss} +4 -3
- package/src/index.js +2 -0
- package/src/mock/course-provider.js +273 -0
- package/src/components/Paragraphs/Directory/Records/HSCP/index.vue +0 -334
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ const cpData =
|
|
|
4
4
|
{
|
|
5
5
|
title: 'Australian Nurses and Midwifery Federation - Victorian Branch',
|
|
6
6
|
fullAddress: 'Level 8/535 Elizabeth St Melbourne VIC 3000',
|
|
7
|
+
orgAcronym: 'ANMF',
|
|
7
8
|
workPhone: '03 9555 9333',
|
|
8
9
|
tollfreePhone: '1800 555 333',
|
|
9
10
|
email: 'ohs@test.com.au',
|
|
@@ -14,14 +15,14 @@ const cpData =
|
|
|
14
15
|
contact2: 'Joey Bradford',
|
|
15
16
|
phone2: '03 9555 0666',
|
|
16
17
|
email2: 'jbradford@test.com.au',
|
|
17
|
-
courses:
|
|
18
|
-
trainingVenues:
|
|
18
|
+
courses: 'HSR Initial, HSR Refresher',
|
|
19
|
+
trainingVenues: 'Melbourne CBD, All Regional Victoria - HQ in Melbourne',
|
|
19
20
|
id: '1'
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
export default {
|
|
24
|
-
title: 'Paragraphs/Directory/SingleRecord',
|
|
25
|
+
title: 'Paragraphs/Directory/HSCP/SingleRecord',
|
|
25
26
|
component: hscpRecord,
|
|
26
27
|
tags: ['autodocs']
|
|
27
28
|
}
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="paragraph--directory__records--hscp">
|
|
3
|
+
<!-- Main details -->
|
|
4
|
+
<container>
|
|
5
|
+
<row class="records">
|
|
6
|
+
<column md="2" sm="12" class="title" >
|
|
7
|
+
<a v-if="item.title" href="javascript:void(0)" @click="this.visible = !this.visible">
|
|
8
|
+
{{ item.title }}
|
|
9
|
+
</a>
|
|
10
|
+
</column>
|
|
11
|
+
<column md="2" sm="12" class="address" >
|
|
12
|
+
<a v-if="item.fullAddress" target="_blank" :href="gMapLink"><span class="sr-only visually-hidden">Address</span>
|
|
13
|
+
{{ item.fullAddress }}
|
|
14
|
+
</a>
|
|
15
|
+
</column>
|
|
16
|
+
<column md="2" sm="12" class="coldata longstring" >
|
|
17
|
+
<div class="label">Email</div>
|
|
18
|
+
<a v-if="item.email" target="_blank" :href="`mailto:${item.email}`"><span class="sr-only visually-hidden">Email address</span>
|
|
19
|
+
{{ item.email }}
|
|
20
|
+
</a>
|
|
21
|
+
</column>
|
|
22
|
+
<column md="3" sm="12" class="coldata longstring" >
|
|
23
|
+
<div class="label">Website</div>
|
|
24
|
+
<a v-if="item.website" target="_blank" :href="`${item.website}`"><span class="sr-only visually-hidden">Website address</span>
|
|
25
|
+
{{ item.website }}
|
|
26
|
+
</a>
|
|
27
|
+
</column>
|
|
28
|
+
<column md="2" sm="12" class="coldata" >
|
|
29
|
+
<div class="label">Phone</div>
|
|
30
|
+
<a v-if="item.tollfreePhone || item.workPhone" :href="`tel:${item.tollfreephone || item.workphone}`"><span class="sr-only visually-hidden">Phone number</span>
|
|
31
|
+
{{ item.tollfreePhone || item.workPhone }}
|
|
32
|
+
</a>
|
|
33
|
+
</column>
|
|
34
|
+
</row>
|
|
35
|
+
<div class="hscp-caret" >
|
|
36
|
+
<a v-if="visible" href="javascript:void(0)" @click="this.visible = false">
|
|
37
|
+
<img
|
|
38
|
+
:src="CaretUp"
|
|
39
|
+
height="12"
|
|
40
|
+
width="17"
|
|
41
|
+
alt="Expand Detail">
|
|
42
|
+
</a>
|
|
43
|
+
<a v-if="!visible" href="javascript:void(0)" @click="this.visible = true">
|
|
44
|
+
<img
|
|
45
|
+
:src="CaretDown"
|
|
46
|
+
height="12"
|
|
47
|
+
width="17"
|
|
48
|
+
alt="Expand Detail">
|
|
49
|
+
</a>
|
|
50
|
+
</div>
|
|
51
|
+
</container>
|
|
52
|
+
|
|
53
|
+
<!-- Additional Content -->
|
|
54
|
+
<container>
|
|
55
|
+
<div v-if="this.visible">
|
|
56
|
+
<div style="padding-top: 20px;">
|
|
57
|
+
<hr>
|
|
58
|
+
</div>
|
|
59
|
+
<row >
|
|
60
|
+
<column >
|
|
61
|
+
<h4>Contact Information</h4>
|
|
62
|
+
</column>
|
|
63
|
+
</row>
|
|
64
|
+
<row>
|
|
65
|
+
<column sm="2" class="label">
|
|
66
|
+
Contact
|
|
67
|
+
</column>
|
|
68
|
+
<column sm="4" class="hscp-additional-records">
|
|
69
|
+
{{item.contact1}}
|
|
70
|
+
</column>
|
|
71
|
+
<column sm="2" class="label">
|
|
72
|
+
Contact
|
|
73
|
+
</column>
|
|
74
|
+
<column sm="4" class="hscp-additional-records">
|
|
75
|
+
{{item.contact2}}
|
|
76
|
+
</column>
|
|
77
|
+
</row>
|
|
78
|
+
<row>
|
|
79
|
+
<column sm="2" class="label">
|
|
80
|
+
Phone
|
|
81
|
+
</column>
|
|
82
|
+
<column sm="4" class="hscp-additional-records">
|
|
83
|
+
{{item.phone1}}
|
|
84
|
+
</column>
|
|
85
|
+
<column sm="2" class="label">
|
|
86
|
+
Phone
|
|
87
|
+
</column>
|
|
88
|
+
<column sm="4" class="hscp-additional-records">
|
|
89
|
+
{{item.phone2}}
|
|
90
|
+
</column>
|
|
91
|
+
</row>
|
|
92
|
+
<row>
|
|
93
|
+
<column sm="2" class="label">
|
|
94
|
+
Email
|
|
95
|
+
</column>
|
|
96
|
+
<column sm="4" class="hscp-additional-records">
|
|
97
|
+
{{item.email1}}
|
|
98
|
+
</column>
|
|
99
|
+
<column sm="2" class="label">
|
|
100
|
+
Email
|
|
101
|
+
</column>
|
|
102
|
+
<column sm="4" class="hscp-additional-records">
|
|
103
|
+
{{item.email2}}
|
|
104
|
+
</column>
|
|
105
|
+
</row>
|
|
106
|
+
<row class="row-hscp-additional">
|
|
107
|
+
<column>
|
|
108
|
+
<h4>Training Venue Locations</h4>
|
|
109
|
+
</column>
|
|
110
|
+
</row>
|
|
111
|
+
<row class="hscp-additional-records">
|
|
112
|
+
<column v-if="item.trainingVenues.length" >
|
|
113
|
+
<ul>
|
|
114
|
+
<li v-for="(venue) in item.trainingVenues.split(',')" :key="venue.id">
|
|
115
|
+
{{venue}}
|
|
116
|
+
</li>
|
|
117
|
+
</ul>
|
|
118
|
+
</column>
|
|
119
|
+
<column v-else-if="!item.trainingVenues.length">
|
|
120
|
+
<p>No training venues</p>
|
|
121
|
+
</column>
|
|
122
|
+
</row>
|
|
123
|
+
<row class="row-hscp-additional">
|
|
124
|
+
<column>
|
|
125
|
+
<h4>Training Courses</h4>
|
|
126
|
+
</column>
|
|
127
|
+
</row>
|
|
128
|
+
<row class="hscp-additional-records">
|
|
129
|
+
<column>
|
|
130
|
+
<ul>
|
|
131
|
+
<li v-for="(course) in item.courses.split(',')" :key="course.id">
|
|
132
|
+
{{course}}
|
|
133
|
+
</li>
|
|
134
|
+
</ul>
|
|
135
|
+
</column>
|
|
136
|
+
</row>
|
|
137
|
+
</div>
|
|
138
|
+
</container>
|
|
139
|
+
|
|
140
|
+
</div>
|
|
141
|
+
</template>
|
|
142
|
+
<script>
|
|
143
|
+
import Container from '../../../../../Containers/Container/index.vue'
|
|
144
|
+
import Row from '../../../../../Containers/Row/index.vue'
|
|
145
|
+
import Column from '../../../../../Containers/Column/index.vue'
|
|
146
|
+
import CaretUp from './../../../../../../assets/icons/caret-up.svg?url'
|
|
147
|
+
import CaretDown from './../../../../../../assets/icons/caret-down.svg?url'
|
|
148
|
+
|
|
149
|
+
export default {
|
|
150
|
+
components: {
|
|
151
|
+
Container,
|
|
152
|
+
Row,
|
|
153
|
+
Column,
|
|
154
|
+
},
|
|
155
|
+
props: {
|
|
156
|
+
item: {
|
|
157
|
+
type: Object,
|
|
158
|
+
required: true
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
data() {
|
|
162
|
+
return {
|
|
163
|
+
visible: false,
|
|
164
|
+
CaretUp,
|
|
165
|
+
CaretDown,
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
computed: {
|
|
169
|
+
gMapLink() {
|
|
170
|
+
return `https://google.com/maps?q=${this.item.title}%20${this.item.fullAddress}`
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
methods: {
|
|
174
|
+
handleClick(title) {
|
|
175
|
+
this.visible = !this.visible
|
|
176
|
+
if (this.$gtm) {
|
|
177
|
+
if (this.visible) {
|
|
178
|
+
this.$gtm.push({ event: 'custom.search.prs.open', title })
|
|
179
|
+
} else {
|
|
180
|
+
this.$gtm.push({
|
|
181
|
+
event: 'custom.search.prs.close',
|
|
182
|
+
title
|
|
183
|
+
})
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
</script>
|
|
190
|
+
|
|
191
|
+
<style lang="scss" scoped>
|
|
192
|
+
@import '../../../styles.scss';
|
|
193
|
+
|
|
194
|
+
.row-hscp-additional {
|
|
195
|
+
margin-top: 20px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.hscp-additional-records {
|
|
199
|
+
font-size: 16px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.hscp-caret {
|
|
203
|
+
justify-content: end;
|
|
204
|
+
align-content: end;
|
|
205
|
+
max-width: 20px;
|
|
206
|
+
padding-right: 0px;
|
|
207
|
+
padding-bottom: 10px;
|
|
208
|
+
float:right;
|
|
209
|
+
}
|
|
210
|
+
.paragraph--directory__records--hscp {
|
|
211
|
+
|
|
212
|
+
padding-bottom: 20px !important;
|
|
213
|
+
|
|
214
|
+
a {
|
|
215
|
+
color: $black;
|
|
216
|
+
text-decoration: none;
|
|
217
|
+
}
|
|
218
|
+
a:hover {
|
|
219
|
+
text-decoration: underline;
|
|
220
|
+
}
|
|
221
|
+
a:focus {
|
|
222
|
+
text-decoration: underline;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.name {
|
|
226
|
+
font-size: 1rem;
|
|
227
|
+
color: $black;
|
|
228
|
+
font-weight: 700;
|
|
229
|
+
}
|
|
230
|
+
.address {
|
|
231
|
+
font-size: 15px;
|
|
232
|
+
a {
|
|
233
|
+
color: inherit;
|
|
234
|
+
text-decoration: none;
|
|
235
|
+
}
|
|
236
|
+
a:hover {
|
|
237
|
+
text-decoration: underline;
|
|
238
|
+
}
|
|
239
|
+
a:focus {
|
|
240
|
+
text-decoration: underline;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
.coldata {
|
|
244
|
+
a {
|
|
245
|
+
color: inherit;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
.label {
|
|
249
|
+
font-size: 16px;
|
|
250
|
+
font-weight: bold;
|
|
251
|
+
}
|
|
252
|
+
.longstring {
|
|
253
|
+
word-break: break-all;
|
|
254
|
+
}
|
|
255
|
+
.search {
|
|
256
|
+
color: $black;
|
|
257
|
+
border: 1px solid $gray;
|
|
258
|
+
border-radius: 8px;
|
|
259
|
+
padding: 10px 12px;
|
|
260
|
+
height: 42px;
|
|
261
|
+
background-repeat: no-repeat;
|
|
262
|
+
background-position: 96% 12px;
|
|
263
|
+
margin-bottom: 16px;
|
|
264
|
+
transition: none;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.paragraph--directory.hscp-filters {
|
|
269
|
+
.search {
|
|
270
|
+
color: $black;
|
|
271
|
+
border: 1px solid $gray;
|
|
272
|
+
border-radius: 8px;
|
|
273
|
+
padding: 10px 12px;
|
|
274
|
+
height: 42px;
|
|
275
|
+
background-repeat: no-repeat;
|
|
276
|
+
background-position: 96% 12px;
|
|
277
|
+
margin-bottom: 16px;
|
|
278
|
+
transition: none;
|
|
279
|
+
}
|
|
280
|
+
select {
|
|
281
|
+
-moz-appearance: none; /* Firefox */
|
|
282
|
+
-webkit-appearance: none; /* Safari and Chrome */
|
|
283
|
+
appearance: none;
|
|
284
|
+
height: 42px;
|
|
285
|
+
border-radius: 8px;
|
|
286
|
+
padding: 10px 12px;
|
|
287
|
+
width: 100%;
|
|
288
|
+
border: 1px solid $gray;
|
|
289
|
+
background-image: url('@worksafevictoria/wcl7.5/src/assets/icons/caret-down.svg');
|
|
290
|
+
background-position: 95% 50%;
|
|
291
|
+
background-repeat: no-repeat;
|
|
292
|
+
text-transform: capitalise;
|
|
293
|
+
}
|
|
294
|
+
.grid-column {
|
|
295
|
+
display: inline-block;
|
|
296
|
+
width: 25%;
|
|
297
|
+
|
|
298
|
+
@media (max-width: 767px) {
|
|
299
|
+
width: 50%;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@media (max-width: 539px) {
|
|
303
|
+
display: block;
|
|
304
|
+
width: 100%;
|
|
305
|
+
float: none;
|
|
306
|
+
margin-bottom: 16px;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
.right {
|
|
310
|
+
float: right;
|
|
311
|
+
position: relative;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.records {
|
|
315
|
+
padding: 0px;
|
|
316
|
+
margin: 0;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
}
|
|
320
|
+
</style>
|
|
321
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Records from './index.vue'
|
|
2
|
+
import { hscpData } from '../../../../../mock/course-provider'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Paragraphs/Directory/HSCP/Records',
|
|
7
|
+
component: Records,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
data() {
|
|
10
|
+
return {
|
|
11
|
+
hscpData
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
items: hscpData,
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const CourseProvider = {}
|