@worksafevictoria/wcl7.5 1.6.0 → 1.7.0

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.
Files changed (29) hide show
  1. package/package.json +3 -2
  2. package/src/components/Common/CardGridItem/card-grid-item-icon.vue +15 -19
  3. package/src/components/Global/AppFooter/styles.scss +3 -0
  4. package/src/components/Global/DirectoryFilters/index.vue +3 -0
  5. package/src/components/Paragraphs/Chart/Constants.js +479 -479
  6. package/src/components/Paragraphs/Directory/{Records/HSCP → HSCP/Records/SingleRecord}/index.stories.js +4 -3
  7. package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.vue +321 -0
  8. package/src/components/Paragraphs/Directory/HSCP/Records/index.stories.js +19 -0
  9. package/src/components/Paragraphs/Directory/HSCP/Records/index.vue +345 -0
  10. package/src/components/Paragraphs/Directory/HSCP/Records/pagination.vue +179 -0
  11. package/src/components/Paragraphs/Directory/Records/CJ/index.vue +1 -1
  12. package/src/components/Paragraphs/Directory/Records/ISP/index.vue +1 -1
  13. package/src/components/Paragraphs/Directory/Records/PRS/index.stories.js +34 -0
  14. package/src/components/Paragraphs/Directory/Records/PRS/index.vue +5 -1
  15. package/src/components/Paragraphs/Directory/Records/index.storieshide.js +47 -0
  16. package/src/components/Paragraphs/Directory/Records/index.vue +18 -35
  17. package/src/components/Paragraphs/Directory/{Records/styles.scss → styles.scss} +4 -3
  18. package/src/components/Paragraphs/Map/Constants.js +4790 -0
  19. package/src/components/Paragraphs/Map/index.mdx +29 -0
  20. package/src/components/Paragraphs/Map/index.stories.js +15 -0
  21. package/src/components/Paragraphs/Map/index.vue +295 -0
  22. package/src/components/Paragraphs/Map/postcode_location.json +3543 -0
  23. package/src/components/SubComponents/Breadcrumb/index.vue +4 -0
  24. package/src/components/SubComponents/FormInstance/components/renderer/index.vue +23 -7
  25. package/src/components/SubComponents/FormInstance/models/overrides/file.js +7 -2
  26. package/src/components/SubComponents/Search/index.vue +7 -2
  27. package/src/index.js +4 -0
  28. package/src/mock/course-provider.js +273 -0
  29. package/src/components/Paragraphs/Directory/Records/HSCP/index.vue +0 -334
@@ -42,6 +42,10 @@ export default {
42
42
 
43
43
  .breadcrumb-item a {
44
44
  color: $black !important;
45
+ text-decoration: none;
46
+ &:hover {
47
+ text-decoration: underline;
48
+ }
45
49
  }
46
50
  }
47
51
 
@@ -12,10 +12,14 @@
12
12
  @nextPage="next($event)"
13
13
  @prevPage="prev($event)"
14
14
  ></formio>
15
+ <BModal centered v-model="modal" title="File Error" ok-only>
16
+ {{ fileMessage }}</BModal
17
+ >
15
18
  </div>
16
19
  </template>
17
20
 
18
21
  <script>
22
+ import { BModal } from 'bootstrap-vue-next'
19
23
  import { Form, Formio } from '@formio/vue'
20
24
  import '@fortawesome/fontawesome-free/css/all.min.css'
21
25
  import '@fortawesome/fontawesome-free/css/v4-shims.min.css'
@@ -23,7 +27,7 @@ import 'formiojs/dist/formio.builder.min.css'
23
27
 
24
28
  export default {
25
29
  name: 'FormRenderer',
26
- components: { formio: Form },
30
+ components: { formio: Form, BModal },
27
31
  props: {
28
32
  formiodefinition: {
29
33
  type: Object,
@@ -46,6 +50,8 @@ export default {
46
50
  debouncedSubmission: this.debounce(this.submit, 250),
47
51
  firstEl: null,
48
52
  started: false,
53
+ modal: false,
54
+ fileMessage: '',
49
55
  }
50
56
  },
51
57
  mounted() {
@@ -100,7 +106,7 @@ export default {
100
106
  }
101
107
  }
102
108
  },
103
- changed(_e, event) {
109
+ async changed(_e, event) {
104
110
  // File upload validation
105
111
  if (event.changed?.component.type === 'file') {
106
112
  const maxFiles = event.changed.component.fileMaxCount || 1
@@ -122,17 +128,27 @@ export default {
122
128
  const maxTotalBytes = convertToBytes(maxTotalSize)
123
129
  const files = event.changed.instance.dataValue || []
124
130
  if (files.length > maxFiles) {
125
- event.changed.instance.dataValue = files.slice(0, files.length - 1)
131
+ event.changed.instance.dataValue = files.slice(0, maxFiles)
132
+ this.fileMessage = `You have exceeded the maximum number of files allowed. Only the first ${maxFiles} files have been uploaded.`
133
+ this.modal = true
134
+
126
135
  event.changed.instance.triggerChange()
127
136
  event.changed.instance.triggerRedraw()
128
- alert(`You can only upload up to ${maxFiles} files.`)
129
137
  }
130
- const totalSize = files.reduce((sum, file) => sum + (file.size || 0), 0)
138
+ let totalSize = files.reduce((sum, file) => sum + (file.size || 0), 0)
131
139
  if (totalSize > maxTotalBytes) {
132
- event.changed.instance.dataValue = files.slice(0, files.length - 1)
140
+ let limit = []
141
+ while (totalSize > maxTotalBytes) {
142
+ const file = files.pop()
143
+ limit.push(file.name)
144
+ totalSize -= file.size
145
+ }
146
+ event.changed.instance.dataValue = files //.slice(0, files.length - 1)
147
+ this.fileMessage = `You have exceeded the maximum total file size allowed. Only ${files.length} files have been uploaded.`
148
+ this.modal = true
149
+ console.log('🚀 ~ changed ~ limit.length:', limit.length)
133
150
  event.changed.instance.triggerChange()
134
151
  event.changed.instance.triggerRedraw()
135
- alert(`Total file size cannot exceed ${maxTotalSize}.`)
136
152
  return
137
153
  }
138
154
  }
@@ -39,8 +39,13 @@ export class FileFormElement extends BaseFormElement {
39
39
  webcam: false,
40
40
  multiple: true,
41
41
  description: `No more than ${this.webformElement['#multiple']} files accepted. Maximum total size is ${this.webformElement['#max_filesize']}MB.`,
42
- filePattern:
43
- '*.png,*.jpg,*.jpeg,*.pdf,*.doc,*.docx,*.xls,*.xlsx,*.csv,*.txt',
42
+ filePattern: this.webformElement['#file_extensions']
43
+ ? this.webformElement['#file_extensions']
44
+ .split(' ')
45
+ .map((ext) => `.${ext}`)
46
+ .join(',')
47
+ : '',
48
+
44
49
  fileKey: `files[${this.webformElement['#name']}]`,
45
50
  fileMaxSize: `${this.webformElement['#max_filesize']}MB`,
46
51
  fileMaxCount: this.webformElement['#multiple'],
@@ -16,7 +16,6 @@
16
16
  v-model="searchQuery"
17
17
  name="search"
18
18
  aria-label="searchbar"
19
- debounce="600"
20
19
  autocomplete="off"
21
20
  trim
22
21
  @update="searchType !== 'googlerest' ? onChange : () => {}"
@@ -58,6 +57,7 @@ import searchIcon from '../../../assets/icons/search.svg?url'
58
57
  import SearchListing from './SearchListing/index.vue'
59
58
  import { BButton, BInputGroup, BFormInput } from 'bootstrap-vue-next'
60
59
 
60
+
61
61
  export default {
62
62
  components: { SearchListing, BButton, BInputGroup, BFormInput },
63
63
  props: {
@@ -235,11 +235,14 @@ export default {
235
235
  }
236
236
  },
237
237
  onSearch(e) {
238
+ // debugger
238
239
  const { path } = this.$route || {}
239
240
 
241
+
242
+
240
243
  // Home page
241
244
  if (
242
- (e?.type === 'click' || e?.key === 'Enter') &&
245
+ (e?.type === 'click' || e?.key == 'Enter') &&
243
246
  this.searchQuery &&
244
247
  this.searchQuery.length > 2 &&
245
248
  path === '/'
@@ -279,6 +282,8 @@ export default {
279
282
  }
280
283
  },
281
284
  onChange(e) {
285
+ //debugger
286
+
282
287
  if (this.searchQuery && this.searchQuery.length > 2) {
283
288
  this.onSearch(e)
284
289
  }
package/src/index.js CHANGED
@@ -30,6 +30,7 @@ import TaskFinder from './components/Paragraphs/TaskFinder/index.vue'
30
30
  import ListGroup from './components/Paragraphs/ListGroup/index.vue'
31
31
  import ScrollSpy from './components/Paragraphs/ScrollSpy/index.vue'
32
32
  import Directory from './components/Paragraphs/Directory/index.vue'
33
+ import HscpDirectory from './components/Paragraphs/Directory/HSCP/Records/index.vue'
33
34
  import SelectableCards from './components/Paragraphs/SelectableCards/index.vue'
34
35
  import VideoMedia from './components/Paragraphs/VideoPlayer/index.vue'
35
36
  import VideoGrid from './components/Paragraphs/VideoGrid/index.vue'
@@ -42,6 +43,7 @@ import MarketingBanner from './components/Paragraphs/MarketingBanner/index.vue'
42
43
  import RelatedInformation from './components/Paragraphs/RelatedInformation/index.vue'
43
44
  import Calculator from './components/Paragraphs/Calculator/index.vue'
44
45
  import Chart from './components/Paragraphs/Chart/index.vue'
46
+ import GeoChart from './components/Paragraphs/Map/index.vue'
45
47
 
46
48
  // SubComponents
47
49
  import FormAddressPostcode from './components/SubComponents/FormAddressPostcode/index.vue'
@@ -96,6 +98,7 @@ export {
96
98
  ListGroup,
97
99
  ScrollSpy,
98
100
  Directory,
101
+ HscpDirectory,
99
102
  SelectableCards,
100
103
  Statistics,
101
104
  ProofPoints,
@@ -106,6 +109,7 @@ export {
106
109
  RelatedInformation,
107
110
  Calculator,
108
111
  Chart,
112
+ GeoChart,
109
113
  }
110
114
 
111
115
  // Export Sub Components
@@ -0,0 +1,273 @@
1
+ export const hscpData = [
2
+ {
3
+ type: 'hscp',
4
+ Organisation: 'Australian Nurses and Midwifery Federation - Victorian Branch',
5
+ Main_office_address: 'Level 8/535 Elizabeth St Melbourne VIC 3000',
6
+ Organisation_acronym: 'ANMF',
7
+ Work_phone: '03 9555 9333',
8
+ Toll_free_phone: '1800 555 333',
9
+ Email1: 'ohs@test.com.au',
10
+ Website: 'https://www.anmfvic.asn.au/education-and-training/hsr-training/events',
11
+ Contact_1: 'Christina Groebl',
12
+ Contact_1_Phone: '03 9555 0222',
13
+ Contact_1_Email: 'cgroebl@test.com.au',
14
+ Contact_2_Name: 'Joey Bradford',
15
+ Contact_2_Phone: '03 9555 0666',
16
+ Contact_2_Email: 'jbradford@test.com.au',
17
+ Training_courses: 'HSR initial, HSR refresher',
18
+ Training_venues: 'Melbourne CBD, All Regional Victoria - HQ in Melbourne',
19
+ id: '1'
20
+ },
21
+ {
22
+ type: 'hscp',
23
+ Organisation: 'Chisholm Institute',
24
+ Organisation_acronym: 'Chisholm',
25
+ Main_office_address: '121 Stud Road Dandenong VIC 3175',
26
+ Work_phone: '03 5990 7117',
27
+ Toll_free_phone: '1300 244 746',
28
+ Email1: 'csadmin@chisholm.edu.au',
29
+ Website: 'https://www.chisholm.edu.au/career-fields/workplace-safety',
30
+ Contact_1: 'Francesca Laforgia',
31
+ Contact_1_Email: 'csadmin@chisholm.edu.au',
32
+ Contact_1_Phone: '03 5990 7117',
33
+ Contact_2_Name: '',
34
+ Contact_2_Email: '',
35
+ Contact_2_Phone: '',
36
+ Training_courses: 'HSR initial, HSR refresher - Plant, HSR refresher - Work-related stress',
37
+ Training_venues: 'Cranbourne, Berwick, Mornington Peninsula'
38
+ },
39
+ {
40
+ type: 'hscp',
41
+ Organisation: 'Action OHS Consulting Pty Ltd',
42
+ Organisation_acronym: 'Action OHS',
43
+ Main_office_address: '5 Cubitt Street Cremorne VIC 3121',
44
+ Work_phone: '',
45
+ Toll_free_phone: '1300 101 647',
46
+ Email1: 'admin@actionohs.com.au',
47
+ Website: 'www.actionhs.com.au/training/',
48
+ Contact_1: '',
49
+ Contact_1_Email: '',
50
+ Contact_1_Phone: '',
51
+ Contact_2_Name: '',
52
+ Contact_2_Email: '',
53
+ Contact_2_Phone: '',
54
+ Training_courses: 'HSR initial, HSR refresher - Plant, HSR refresher - Work-related stress',
55
+ Training_venues: 'Melbourne CBD'
56
+ },
57
+ {
58
+ type: 'hscp',
59
+ Organisation: 'Ai Group Centre for Education and Training',
60
+ orgAcronyn: 'Ai Group',
61
+ Main_office_address: 'Level 5 441 St Kilda Road Melbourne VIC 3004',
62
+ Work_phone: '',
63
+ Toll_free_phone: '1300 55 66 77',
64
+ Email1: 'training@aigroup.com.au',
65
+ Website: 'https://www.aigroup.com.au/education-training/training-courses/health-safety/',
66
+ Contact_1: 'Rebecca Hayward',
67
+ Contact_1_Email: 'rebecca.hayward@aigroup.com.au',
68
+ Contact_1_Phone: '02 49258320',
69
+ Contact_2_Name: 'Leeanne Lyme',
70
+ Contact_2_Email: 'leeanne.lyme@aigroup.com.au',
71
+ Contact_2_Phone: '02 4925 8310',
72
+ Training_courses: 'HSR refresher, HSR refresher - Work-related violence, HSR refresher - Plant, HSR refresher - Work-related stress,Onsite only',
73
+ Training_venues: 'Melbourne'
74
+ },
75
+ {
76
+ type: 'hscp',
77
+ Organisation: 'Australian Institute of Leadership and Safety Pty Ltd (AILS)',
78
+ Organisation_acronym: 'AILS',
79
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
80
+ Work_phone: '03 8385 7491',
81
+ Toll_free_phone: '',
82
+ Email1: 'admin@ails.edu.au',
83
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
84
+ Contact_1: '',
85
+ Contact_1_Email: '',
86
+ Contact_1_Phone: '',
87
+ Contact_2_Name: '',
88
+ Contact_2_Email: '',
89
+ Contact_2_Phone: '',
90
+ Training_courses: 'HSR initial, HSR refresher',
91
+ Training_venues: '',
92
+ },
93
+ {
94
+ type: 'hscp',
95
+ Organisation: 'ONE Extra Australian Institute of Leadership and Safety Pty Ltd (AILS)',
96
+ Organisation_acronym: 'AILS',
97
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
98
+ Work_phone: '03 8385 7491',
99
+ Toll_free_phone: '',
100
+ email: 'admin@ails.edu.au',
101
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
102
+ Contact_1: '',
103
+ Contact_1_Email: '',
104
+ Contact_1_Phone: '',
105
+ Contact_2_Name: '',
106
+ Contact_2_Email: '',
107
+ Contact_2_Phone: '',
108
+ Training_courses: 'HSR initial, HSR refresher',
109
+ Training_venues: '',
110
+ },
111
+ {
112
+ type: 'hscp',
113
+ Organisation: 'TWO Extra Australian Institute of Leadership and Safety Pty Ltd (AILS)',
114
+ Organisation_acronym: 'AILS',
115
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
116
+ Work_phone: '03 8385 7491',
117
+ Toll_free_phone: '',
118
+ Email1: 'admin@ails.edu.au',
119
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
120
+ Contact_1: '',
121
+ Contact_1_Email: '',
122
+ Contact_1_Phone: '',
123
+ Contact_2_Name: '',
124
+ Contact_2_Email: '',
125
+ Contact_2_Phone: '',
126
+ Training_courses: 'HSR initial, HSR refresher',
127
+ Training_venues: '',
128
+ },
129
+ {
130
+ type: 'hscp',
131
+ Organisation: 'THREE Extra Australian Institute of Leadership and Safety Pty Ltd (AILS)',
132
+ Organisation_acronym: 'AILS',
133
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
134
+ Work_phone: '03 8385 7491',
135
+ Toll_free_phone: '',
136
+ Email1: 'admin@ails.edu.au',
137
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
138
+ Contact_1: '',
139
+ Contact_1_Email: '',
140
+ Contact_1_Phone: '',
141
+ Contact_2_Name: '',
142
+ Contact_2_Email: '',
143
+ Contact_2_Phone: '',
144
+ Training_courses: 'HSR initial, HSR refresher',
145
+ Training_venues: '',
146
+ },
147
+ {
148
+ type: 'hscp',
149
+ Organisation: 'FOUR Extra Australian Institute of Leadership and Safety Pty Ltd (AILS)',
150
+ Organisation_acronym: 'AILS',
151
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
152
+ Work_phone: '03 8385 7491',
153
+ Toll_free_phone: '',
154
+ Email1: 'admin@ails.edu.au',
155
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
156
+ Contact_1: '',
157
+ Contact_1_Email: '',
158
+ Contact_1_Phone: '',
159
+ Contact_2_Name: '',
160
+ Contact_2_Email: '',
161
+ Contact_2_Phone: '',
162
+ Training_courses: 'HSR initial, HSR refresher',
163
+ Training_venues: '',
164
+ },
165
+ {
166
+ type: 'hscp',
167
+ Organisation: 'FIVE Extra Australian Institute of Leadership and Safety Pty Ltd (AILS)',
168
+ Organisation_acronym: 'AILS',
169
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
170
+ Work_phone: '03 8385 7491',
171
+ Toll_free_phone: '',
172
+ Email1: 'admin@ails.edu.au',
173
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
174
+ Contact_1: '',
175
+ Contact_1_Email: '',
176
+ Contact_1_Phone: '',
177
+ Contact_2_Name: '',
178
+ Contact_2_Email: '',
179
+ Contact_2_Phone: '',
180
+ Training_courses: 'HSR initial, HSR refresher',
181
+ Training_venues: '',
182
+ },
183
+ {
184
+ type: 'hscp',
185
+ Organisation: 'SIX Extra Australian Institute of Leadership and Safety Pty Ltd (AILS)',
186
+ Organisation_acronym: 'AILS',
187
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
188
+ Work_phone: '03 8385 7491',
189
+ Toll_free_phone: '',
190
+ Email1: 'admin@ails.edu.au',
191
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
192
+ Contact_1: '',
193
+ Contact_1_Email: '',
194
+ Contact_1_Phone: '',
195
+ Contact_2_Name: '',
196
+ Contact_2_Email: '',
197
+ Contact_2_Phone: '',
198
+ Training_courses: 'HSR initial, HSR refresher',
199
+ Training_venues: '',
200
+ },
201
+ {
202
+ type: 'hscp',
203
+ Organisation: 'SEVEN Extra Australian Institute of Leadership and Safety Pty Ltd (AILS)',
204
+ Organisation_acronym: 'AILS',
205
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
206
+ Work_phone: '03 8385 7491',
207
+ Toll_free_phone: '',
208
+ Email1: 'admin@ails.edu.au',
209
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
210
+ Contact_1: '',
211
+ Contact_1_Email: '',
212
+ Contact_1_Phone: '',
213
+ Contact_2_Name: '',
214
+ Contact_2_Email: '',
215
+ Contact_2_Phone: '',
216
+ Training_courses: 'HSR initial, HSR refresher',
217
+ Training_venues: '',
218
+ },
219
+ {
220
+ type: 'hscp',
221
+ Organisation: 'EIGHT Extra Australian Institute of Leadership and Safety Pty Ltd (AILS)',
222
+ Organisation_acronym: 'AILS',
223
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
224
+ Work_phone: '03 8385 7491',
225
+ Toll_free_phone: '',
226
+ Email1: 'admin@ails.edu.au',
227
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
228
+ Contact_1: '',
229
+ Contact_1_Email: '',
230
+ Contact_1_Phone: '',
231
+ Contact_2_Name: '',
232
+ Contact_2_Email: '',
233
+ Contact_2_Phone: '',
234
+ Training_courses: 'HSR initial, HSR refresher',
235
+ Training_venues: '',
236
+ },
237
+ {
238
+ type: 'hscp',
239
+ Organisation: 'NINE Extra Australian Institute of Leadership and Safety Pty Ltd (AILS)',
240
+ Organisation_acronym: 'AILS',
241
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
242
+ Work_phone: '03 8385 7491',
243
+ Toll_free_phone: '',
244
+ Email1: 'admin@ails.edu.au',
245
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
246
+ Contact_1: '',
247
+ Contact_1_Email: '',
248
+ Contact_1_Phone: '',
249
+ Contact_2_Name: '',
250
+ Contact_2_Email: '',
251
+ Contact_2_Phone: '',
252
+ Training_courses: 'HSR initial, HSR refresher',
253
+ Training_venues: '',
254
+ },
255
+ {
256
+ type: 'hscp',
257
+ Organisation: 'TEN Extra Australian Institute of Leadership and Safety Pty Ltd (AILS)',
258
+ Organisation_acronym: 'AILS',
259
+ Main_office_address: '37 Wentworth Drive Taylors Lakes VIC 3038',
260
+ Work_phone: '03 8385 7491',
261
+ Toll_free_phone: '',
262
+ Email1: 'admin@ails.edu.au',
263
+ Website: 'www.ails.edu.au/category/short-courses/work-safe/',
264
+ Contact_1: '',
265
+ Contact_1_Email: '',
266
+ Contact_1_Phone: '',
267
+ Contact_2_Name: '',
268
+ Contact_2_Email: '',
269
+ Contact_2_Phone: '',
270
+ Training_courses: 'HSR initial, HSR refresher',
271
+ Training_venues: '',
272
+ }
273
+ ]