@worksafevictoria/wcl7.5 1.1.0-beta.93 → 1.1.0-beta.95

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worksafevictoria/wcl7.5",
3
- "version": "1.1.0-beta.93",
3
+ "version": "1.1.0-beta.95",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -2,29 +2,28 @@ import HomepageHeader from './index.vue'
2
2
  import { mockCarouselItems } from '../../../mock/carousel-items'
3
3
 
4
4
 
5
- const fetchMenu = () =>
6
- Promise.resolve([
5
+ const headerLinks = [
7
6
  {
8
- title: 'Report an incident',
9
- relative: '/report-incident'
7
+ text: 'Report an incident',
8
+ path: '/report-incident'
10
9
  },
11
10
  {
12
- title: 'Report a case of COVID-19',
13
- relative: '/report-confirmed-positive-case-covid-19'
11
+ text: 'Report a case of COVID-19',
12
+ path: '/report-confirmed-positive-case-covid-19'
14
13
  },
15
14
  {
16
- title: 'Make a claim',
17
- relative: '/before-claim'
15
+ text: 'Make a claim',
16
+ path: '/before-claim'
18
17
  },
19
18
  {
20
- title: 'Apply for a licence',
21
- relative: '/apply-for-licence'
19
+ text: 'Apply for a licence',
20
+ path: '/apply-for-licence'
22
21
  },
23
22
  {
24
- title: 'Pay or renew your insurance',
25
- relative: '/pay-or-renew-your-workcover-insurance-premium'
23
+ text: 'Pay or renew your insurance',
24
+ path: '/pay-or-renew-your-workcover-insurance-premium'
26
25
  }
27
- ])
26
+ ]
28
27
 
29
28
  const contentParser = () => {
30
29
  return Promise.resolve({
@@ -53,10 +52,10 @@ export default {
53
52
  }
54
53
  },
55
54
  args: {
56
- fetchMenu: fetchMenu,
57
55
  slideList: mockCarouselItems,
58
56
  isStorybook: true,
59
- contentParser: contentParser
57
+ contentParser: contentParser,
58
+ headerLinks: headerLinks,
60
59
  }
61
60
  }
62
61
 
@@ -33,7 +33,7 @@
33
33
  >
34
34
  <div>
35
35
  <cta-button
36
- v-for="(link, i) in links"
36
+ v-for="(link, i) in headerLinks"
37
37
  :key="i"
38
38
  class="iebtn"
39
39
  :url="link.path"
@@ -73,11 +73,7 @@ export default {
73
73
  type: Function,
74
74
  required: true,
75
75
  },
76
- fetchMenu: {
77
- type: Function,
78
- required: true,
79
- },
80
- slideList: {
76
+ slideList: {
81
77
  type: Array,
82
78
  required: true,
83
79
  // default: mockCarouselItems
@@ -85,27 +81,16 @@ export default {
85
81
  isStorybook: {
86
82
  type: Boolean,
87
83
  default: false
88
- }
89
- },
90
- async mounted() {
91
- await this.renderMenu()
84
+ },
85
+ headerLinks: {
86
+ type: Array,
87
+ required: true
88
+ },
92
89
  },
93
90
 
94
91
  data: () => ({
95
- links: [],
96
92
  earthIcon,
97
- }),
98
- methods: {
99
- async renderMenu() {
100
- const menu = await this.fetchMenu()
101
- this.links = (Array.isArray(menu) ? menu : []).map((item) => {
102
- return {
103
- text: item.title,
104
- path: item.relative || item.absolute,
105
- }
106
- })
107
- },
108
- },
93
+ })
109
94
  }
110
95
  </script>
111
96
 
@@ -3,26 +3,27 @@ import hscpRecord from './index.vue'
3
3
  const cpData =
4
4
  {
5
5
  title: 'Australian Nurses and Midwifery Federation - Victorian Branch',
6
- fulladdress: 'Level 8/535 Elizabeth St Melbourne VIC 3000',
7
- workphone: '03 9275 9333',
8
- tollfreephone: '1800 133 353',
9
- email: 'ohs@anmfvic.asn.au',
6
+ fullAddress: 'Level 8/535 Elizabeth St Melbourne VIC 3000',
7
+ workPhone: '03 9555 9333',
8
+ tollfreePhone: '1800 555 333',
9
+ email: 'ohs@test.com.au',
10
10
  website: 'https://www.anmfvic.asn.au/education-and-training/hsr-training/events',
11
+ contact1: 'Christina Groebl',
12
+ phone1: '03 9555 0222',
13
+ email1: 'cgroebl@test.com.au',
14
+ contact2: 'Joey Bradford',
15
+ phone2: '03 9555 0666',
16
+ email2: 'jbradford@test.com.au',
11
17
  courses: ['HSR Initial', 'HSR Refresher'],
12
- // companyid: 'ACAR-A842BA'
18
+ trainingVenues: ['Melbourne CBD', 'All Regional Victoria - HQ in Melbourne'],
19
+ id: '1'
13
20
  }
14
21
 
15
22
 
16
23
  export default {
17
- title: 'Paragraphs/Directory/Record',
24
+ title: 'Paragraphs/Directory/SingleRecord',
18
25
  component: hscpRecord,
19
- tags: ['autodocs'],
20
- argTypes: {
21
- location: {
22
- control: ['object', 'boolean'],
23
- table: { disable: true }
24
- },
25
- }
26
+ tags: ['autodocs']
26
27
  }
27
28
 
28
29
  export const CourseProvider = {}
@@ -1,37 +1,133 @@
1
1
  <template>
2
2
  <div class="paragraph--directory__records--hscp">
3
3
  <container>
4
+ <!-- Main details -->
4
5
  <row>
5
6
  <column class="title">
6
- <!-- <a target="_blank" :href="pageLink"> -->
7
+ <a href="javascript:void(0)" @click="this.visible = !this.visible">
7
8
  {{ item.title }}
8
- <!-- </a> -->
9
+ </a>
9
10
  </column>
10
11
  <column class="address">
11
12
  <a target="_blank" :href="gMapLink">
12
- {{ item.fulladdress }}
13
+ {{ item.fullAddress }}
13
14
  </a>
14
15
  </column>
15
16
  <column class="contact">
16
- <div class="labl">Email</div>
17
+ <div class="label">Email</div>
17
18
  <a target="_blank" :href="`mailto:${item.email}`"><span class="sr-only visually-hidden">Email address</span>
18
19
  {{ item.email }}
19
20
  </a>
20
21
  </column>
21
22
  <column class="contact">
22
- <div class="labl">Website</div>
23
+ <div class="label">Website</div>
23
24
  <a target="_blank" :href="`${item.website}`"><span class="sr-only visually-hidden">Website address</span>
24
25
  {{ item.website }}
25
26
  </a>
26
27
  </column>
27
28
  <column class="contact">
28
- <div class="labl">Phone</div>
29
+ <div class="label">Phone</div>
29
30
  <a :href="`tel:${item.tollfreephone || item.workphone}`"><span class="sr-only visually-hidden">Phone number</span>
30
- {{ item.tollfreephone || item.workphone }}
31
- </a
32
- >
31
+ {{ item.tollfreePhone || item.workPhone }}
32
+ </a>
33
+ </column>
34
+ <column class="hscp-caret" sm="1">
35
+ <a v-if="visible" href="javascript:void(0)" @click="this.visible = false">
36
+ <img
37
+ style="float: right;"
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
+ style="float: right;"
46
+ :src="CaretDown"
47
+ height="12"
48
+ width="17"
49
+ alt="Expand Detail">
50
+ </a>
33
51
  </column>
34
52
  </row>
53
+ <!-- Additional Content -->
54
+ <template v-if="this.visible">
55
+ <row class="row-hscp-additional">
56
+ <column>
57
+ <h4>Contact Information</h4>
58
+ </column>
59
+ </row>
60
+ <row>
61
+ <column sm="3" class="label">
62
+ Contact
63
+ </column>
64
+ <column sm="3">
65
+ {{item.contact1}}
66
+ </column>
67
+ <column sm="3" class="label">
68
+ Contact
69
+ </column>
70
+ <column sm="3">
71
+ {{item.contact2}}
72
+ </column>
73
+ </row>
74
+ <row>
75
+ <column sm="3" class="label">
76
+ Phone
77
+ </column>
78
+ <column sm="3">
79
+ {{item.phone1}}
80
+ </column>
81
+ <column sm="3" class="label">
82
+ Phone
83
+ </column>
84
+ <column sm="3">
85
+ {{item.phone2}}
86
+ </column>
87
+ </row>
88
+ <row>
89
+ <column sm="3" class="label">
90
+ Email
91
+ </column>
92
+ <column sm="3">
93
+ {{item.email1}}
94
+ </column>
95
+ <column sm="3" class="label">
96
+ Email
97
+ </column>
98
+ <column sm="3">
99
+ {{item.email2}}
100
+ </column>
101
+ </row>
102
+ <row class="row-hscp-additional">
103
+ <column>
104
+ <h4>Training Venue Locations</h4>
105
+ </column>
106
+ </row>
107
+ <row>
108
+ <column>
109
+ <ul>
110
+ <li v-for="(venue) in item.trainingVenues" :key="venue.id">
111
+ {{venue}}
112
+ </li>
113
+ </ul>
114
+ </column>
115
+ </row>
116
+ <row class="row-hscp-additional">
117
+ <column>
118
+ <h4>Training Courses</h4>
119
+ </column>
120
+ </row>
121
+ <row>
122
+ <column>
123
+ <ul>
124
+ <li v-for="(course) in item.courses" :key="course.id">
125
+ {{course}}
126
+ </li>
127
+ </ul>
128
+ </column>
129
+ </row>
130
+ </template>
35
131
  </container>
36
132
  </div>
37
133
  </template>
@@ -39,6 +135,8 @@
39
135
  import Container from '../../../../Containers/Container/index.vue'
40
136
  import Row from '../../../../Containers/Row/index.vue'
41
137
  import Column from '../../../../Containers/Column/index.vue'
138
+ import CaretUp from './../../../../../assets/icons/caret-up.svg?url'
139
+ import CaretDown from './../../../../../assets/icons/caret-down.svg?url'
42
140
 
43
141
  export default {
44
142
  components: {
@@ -50,27 +148,50 @@ export default {
50
148
  item: {
51
149
  type: Object,
52
150
  required: true
53
- },
54
- location: {
55
- type: [Object, Boolean],
56
- default: false
151
+ }
152
+ },
153
+ data() {
154
+ return {
155
+ visible: false,
156
+ CaretUp,
157
+ CaretDown,
57
158
  }
58
159
  },
59
160
  computed: {
60
161
  gMapLink() {
61
- // return `https://google.com/maps?q=${this.item.title}%20${this.item.suburb},${this.item.postcode}`
62
- return `https://google.com/maps?q=${this.item.title}%20${this.item.fulladdress}`
162
+ return `https://google.com/maps?q=${this.item.title}%20${this.item.fullAddress}`
63
163
  },
64
- /* pageLink() {
65
- return `https://www1.worksafe.vic.gov.au/vwa/serviceproviderdirec.nsf/pages/${this.item.companyid}`
66
- } */
67
164
  },
165
+ methods: {
166
+ handleClick(title) {
167
+ this.visible = !this.visible
168
+ if (this.$gtm) {
169
+ if (this.visible) {
170
+ this.$gtm.push({ event: 'custom.search.prs.open', title })
171
+ } else {
172
+ this.$gtm.push({
173
+ event: 'custom.search.prs.close',
174
+ title
175
+ })
176
+ }
177
+ }
178
+ }
179
+ }
68
180
  }
69
181
  </script>
70
182
 
71
183
  <style lang="scss" scoped>
72
184
  @import '../styles.scss';
73
185
 
186
+ .row-hscp-additional {
187
+ margin-top: 20px;
188
+ }
189
+
190
+ .hscp-caret {
191
+ justify-content: end;
192
+ align-content: end;
193
+ border-radius: 0px;
194
+ }
74
195
  .paragraph--directory__records--hscp {
75
196
 
76
197
  a {
@@ -107,7 +228,7 @@ export default {
107
228
  color: inherit;
108
229
  }
109
230
  }
110
- .labl {
231
+ .label {
111
232
  font-size: 15px;
112
233
  font-weight: bold;
113
234
  }