@worksafevictoria/wcl7.5 1.5.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.
- package/.storybook/preview.js +20 -13
- package/bin/deploy.sh +1 -1
- package/lib/utility.js +10 -8
- package/package.json +6 -5
- package/src/assets/icons/AppFooter/x-ws-footer.svg +10 -0
- package/src/assets/icons/AppFooter/x-ww-footer.svg +28 -0
- package/src/assets/icons/SocialShare/x-icon-white.svg +28 -0
- package/src/assets/styles/modal.scss +51 -0
- package/src/components/Common/CardGrid/index.vue +56 -51
- package/src/components/Common/CardGridItem/card-grid-item-caret.vue +7 -4
- package/src/components/Common/CardGridItem/card-grid-item-icon.vue +15 -19
- package/src/components/Common/CardGridItem/index.vue +77 -63
- package/src/components/Containers/Carousel/index.vue +14 -7
- package/src/components/Containers/HomepageHeader/index.stories.js +60 -36
- package/src/components/Containers/HomepageHeader/index.vue +2 -26
- package/src/components/Containers/HomepageHeaderNew/index.stories.js +15 -15
- package/src/components/Containers/HomepageHeaderNew/index.vue +97 -68
- package/src/components/Containers/SectionGroup/index.vue +1 -1
- package/src/components/Containers/Subheader/index.vue +5 -1
- package/src/components/Global/AppFooter/FooterSocialShare/index.vue +1 -1
- package/src/components/Global/AppFooter/index.vue +14 -7
- package/src/components/Global/AppFooter/styles.scss +3 -0
- package/src/components/Global/AppHeaderNew/styles.scss +10 -15
- package/src/components/Global/BackToTop/index.vue +8 -8
- package/src/components/Global/Cookies/index.stories.js +16 -10
- package/src/components/Global/Cookies/index.vue +280 -243
- package/src/components/Global/Cookies/styles.scss +54 -54
- package/src/components/Global/DirectoryFilters/SingleTaxonomy/index.vue +50 -133
- package/src/components/Global/DirectoryFilters/index.vue +3 -0
- package/src/components/Global/GlobalNotice/index.vue +79 -100
- package/src/components/Global/SocialShare/index.vue +1 -1
- package/src/components/Global/Strip/index.vue +1 -1
- package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +8 -4
- package/src/components/Paragraphs/Accordion/StepperItem/index.vue +23 -23
- package/src/components/Paragraphs/Accordion/index.stories.js +21 -18
- package/src/components/Paragraphs/Accordion/index.vue +52 -48
- package/src/components/Paragraphs/BrowseContent/index.vue +1 -1
- package/src/components/Paragraphs/BrowseContent/setup.vue +284 -0
- package/src/components/Paragraphs/Chart/Constants.js +952 -952
- package/src/components/Paragraphs/Chart/index.vue +232 -241
- package/src/components/Paragraphs/Directory/HSCP/Records/SingleRecord/index.stories.js +34 -0
- 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 +345 -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.stories.js +34 -0
- package/src/components/Paragraphs/Directory/Records/PRS/index.vue +5 -1
- package/src/components/Paragraphs/Directory/Records/index.storieshide.js +47 -0
- package/src/components/Paragraphs/Directory/Records/index.vue +52 -33
- package/src/components/Paragraphs/Directory/constants.js +23 -5
- package/src/components/Paragraphs/Directory/index.vue +14 -14
- package/src/components/Paragraphs/Directory/{Records/styles.scss → styles.scss} +5 -3
- package/src/components/Paragraphs/ListGroup/index.vue +5 -1
- package/src/components/Paragraphs/Map/Constants.js +4790 -0
- package/src/components/Paragraphs/Map/index.mdx +29 -0
- package/src/components/Paragraphs/Map/index.stories.js +15 -0
- package/src/components/Paragraphs/Map/index.vue +295 -0
- package/src/components/Paragraphs/Map/postcode_location.json +3543 -0
- package/src/components/Paragraphs/ScrollSpy/index.vue +23 -14
- package/src/components/Paragraphs/SelectableCards/index.vue +15 -12
- package/src/components/Paragraphs/TabbedCards/index.vue +13 -14
- package/src/components/Paragraphs/Tabs/index.vue +19 -17
- package/src/components/Paragraphs/TextMedia/MediaTypes/Video/index.vue +9 -9
- package/src/components/Paragraphs/TextMedia/index.vue +20 -16
- package/src/components/Paragraphs/VideoGrid/index.stories.js +43 -19
- package/src/components/Paragraphs/VideoGrid/index.vue +13 -13
- package/src/components/Paragraphs/Webform/index.stories.js +82 -69
- package/src/components/SubComponents/Breadcrumb/index.vue +4 -0
- package/src/components/SubComponents/CardGroup/index.vue +5 -1
- package/src/components/SubComponents/FormAddressPostcode/index.vue +35 -37
- package/src/components/SubComponents/FormInstance/components/handler/index.vue +25 -29
- package/src/components/SubComponents/FormInstance/components/renderer/index.vue +81 -30
- package/src/components/SubComponents/FormInstance/models/overrides/file.js +38 -40
- package/src/components/SubComponents/FormInstance/services/form-submit-parser.js +22 -15
- package/src/components/SubComponents/FormInstance/services/registry-factory.js +1 -1
- package/src/components/SubComponents/FormInstance/stories/fileupload.stories.js +57 -0
- package/src/components/SubComponents/FormInstance/stories/mocks/fileupload.json +25 -0
- package/src/components/SubComponents/FormInstance/style.scss +2 -2
- package/src/components/SubComponents/FormInstance/tests/address.test.js +4 -4
- package/src/components/SubComponents/FormInstance/tests/checkboxes.test.js +7 -7
- package/src/components/SubComponents/FormInstance/tests/customcomposite.test.js +15 -15
- package/src/components/SubComponents/FormInstance/tests/date.test.js +8 -8
- package/src/components/SubComponents/FormInstance/tests/form-test-utils.js +9 -9
- package/src/components/SubComponents/FormInstance/tests/multiple.test.js +13 -13
- package/src/components/SubComponents/FormInstance/tests/rule-visible.test.js +120 -120
- package/src/components/SubComponents/FormInstance/tests/scale.test.js +6 -6
- package/src/components/SubComponents/FormInstance/tests/url.test.js +13 -10
- package/src/components/SubComponents/Pagination/index.vue +19 -18
- package/src/components/SubComponents/ResourceGroup/index.vue +5 -1
- package/src/components/SubComponents/Search/SearchListing/index.vue +20 -20
- package/src/components/SubComponents/Search/index.vue +42 -35
- package/src/components/SubComponents/VideoThumbnail/index.vue +48 -133
- package/src/includes/scss/vars/src/colors.module.scss +28 -1
- package/src/index.js +25 -3
- package/src/main.js +2 -10
- package/src/mock/carousel-items.js +71 -46
- package/src/mock/course-provider.js +273 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
<!-- Copied from pagination used by ISP in the website repository - paginates a list in place instead of search for BE values. -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="pagination">
|
|
4
|
+
<div>
|
|
5
|
+
{{ `${totalPages} ${pageOrPages} of results` }}
|
|
6
|
+
</div>
|
|
7
|
+
<ul>
|
|
8
|
+
<li v-if="!isFirstPage" class="pagination-item">
|
|
9
|
+
<button type="button" :disabled="isFirstPage" @click="onClickFirstPage">
|
|
10
|
+
First
|
|
11
|
+
</button>
|
|
12
|
+
</li>
|
|
13
|
+
<li v-if="!isFirstPage" class="pagination-item">
|
|
14
|
+
<button
|
|
15
|
+
type="button"
|
|
16
|
+
:disabled="isFirstPage"
|
|
17
|
+
@click="onClickPreviousPage"
|
|
18
|
+
>
|
|
19
|
+
Previous
|
|
20
|
+
</button>
|
|
21
|
+
</li>
|
|
22
|
+
<!-- Visible Buttons Start -->
|
|
23
|
+
<li v-for="(page, i) in pages" :key="i" class="pagination-item">
|
|
24
|
+
<button
|
|
25
|
+
type="button"
|
|
26
|
+
:disabled="page.isDisabled"
|
|
27
|
+
:class="{ active: isPageActive(page.name) }"
|
|
28
|
+
:aria-current="isPageActive(page.name) ? 'page' : false"
|
|
29
|
+
@click="onClickPage(page.name)"
|
|
30
|
+
>
|
|
31
|
+
{{ page.name }}
|
|
32
|
+
</button>
|
|
33
|
+
</li>
|
|
34
|
+
<!-- Visible Buttons End -->
|
|
35
|
+
<li v-if="!isLastPage" class="pagination-item">
|
|
36
|
+
<button type="button" :disabled="isLastPage" @click="onClickNextPage">
|
|
37
|
+
Next
|
|
38
|
+
</button>
|
|
39
|
+
</li>
|
|
40
|
+
<li v-if="!isLastPage" class="pagination-item">
|
|
41
|
+
<button type="button" :disabled="isLastPage" @click="onClickLastPage">
|
|
42
|
+
Last
|
|
43
|
+
</button>
|
|
44
|
+
</li>
|
|
45
|
+
</ul>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
<script>
|
|
49
|
+
export default {
|
|
50
|
+
props: {
|
|
51
|
+
maxVisibleButtons: {
|
|
52
|
+
type: Number,
|
|
53
|
+
required: false,
|
|
54
|
+
default: 3
|
|
55
|
+
},
|
|
56
|
+
totalPages: {
|
|
57
|
+
type: Number,
|
|
58
|
+
required: true
|
|
59
|
+
},
|
|
60
|
+
total: {
|
|
61
|
+
type: Number,
|
|
62
|
+
required: true
|
|
63
|
+
},
|
|
64
|
+
perPage: {
|
|
65
|
+
type: Number,
|
|
66
|
+
required: true
|
|
67
|
+
},
|
|
68
|
+
currentPage: {
|
|
69
|
+
type: Number,
|
|
70
|
+
required: true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
computed: {
|
|
74
|
+
startPage() {
|
|
75
|
+
// When on the first page
|
|
76
|
+
if (this.currentPage === 1) {
|
|
77
|
+
return 1
|
|
78
|
+
}
|
|
79
|
+
// When on the last page
|
|
80
|
+
if (this.currentPage === this.totalPages) {
|
|
81
|
+
return this.totalPages - 1
|
|
82
|
+
}
|
|
83
|
+
// When inbetween
|
|
84
|
+
return this.currentPage - 1
|
|
85
|
+
},
|
|
86
|
+
pages() {
|
|
87
|
+
const range = []
|
|
88
|
+
for (
|
|
89
|
+
let i = this.startPage;
|
|
90
|
+
i <=
|
|
91
|
+
Math.min(this.startPage + this.maxVisibleButtons - 1, this.totalPages);
|
|
92
|
+
i++
|
|
93
|
+
) {
|
|
94
|
+
range.push({
|
|
95
|
+
name: i,
|
|
96
|
+
isDisabled: i === this.currentPage
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
return range
|
|
100
|
+
},
|
|
101
|
+
isFirstPage() {
|
|
102
|
+
return this.currentPage === 1
|
|
103
|
+
},
|
|
104
|
+
isLastPage() {
|
|
105
|
+
return this.currentPage === this.totalPages
|
|
106
|
+
},
|
|
107
|
+
pageOrPages() {
|
|
108
|
+
return this.totalPages > 1 ? 'pages' : 'page'
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
methods: {
|
|
112
|
+
onClickFirstPage() {
|
|
113
|
+
this.$emit('pagechanged', 1)
|
|
114
|
+
},
|
|
115
|
+
onClickPreviousPage() {
|
|
116
|
+
this.$emit('pagechanged', this.currentPage - 1)
|
|
117
|
+
},
|
|
118
|
+
onClickPage(page) {
|
|
119
|
+
this.$emit('pagechanged', page)
|
|
120
|
+
},
|
|
121
|
+
onClickNextPage() {
|
|
122
|
+
this.$emit('pagechanged', this.currentPage + 1)
|
|
123
|
+
},
|
|
124
|
+
onClickLastPage() {
|
|
125
|
+
this.$emit('pagechanged', this.totalPages)
|
|
126
|
+
},
|
|
127
|
+
isPageActive(page) {
|
|
128
|
+
return this.currentPage === page
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
</script>
|
|
133
|
+
|
|
134
|
+
<style lang="scss" scoped>
|
|
135
|
+
@import '../../../../../includes/scss/all.scss';
|
|
136
|
+
|
|
137
|
+
.pagination {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
justify-content: center;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
ul {
|
|
143
|
+
display: flex;
|
|
144
|
+
margin: 16px 0;
|
|
145
|
+
padding: 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
li {
|
|
149
|
+
list-style: none;
|
|
150
|
+
padding: 0;
|
|
151
|
+
margin-right: 6px;
|
|
152
|
+
margin-left: 0;
|
|
153
|
+
margin-top: 0;
|
|
154
|
+
margin-bottom: 0;
|
|
155
|
+
|
|
156
|
+
button {
|
|
157
|
+
background: $white;
|
|
158
|
+
color: $black;
|
|
159
|
+
border: 1px solid $gray;
|
|
160
|
+
padding: 10px 12px;
|
|
161
|
+
font-weight: normal;
|
|
162
|
+
border-radius: 8px;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
|
|
165
|
+
&:hover {
|
|
166
|
+
background: $lightgray;
|
|
167
|
+
}
|
|
168
|
+
&:disabled,
|
|
169
|
+
&[disabled] {
|
|
170
|
+
background: $black;
|
|
171
|
+
color: $white;
|
|
172
|
+
font-weight: 700;
|
|
173
|
+
border: 1px solid transparent;
|
|
174
|
+
cursor: default;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import prsRecord from './index.vue'
|
|
2
|
+
|
|
3
|
+
const cpData = {
|
|
4
|
+
id: '1',
|
|
5
|
+
title: 'Australian Nurses and Midwifery Federation - Victorian Branch',
|
|
6
|
+
meta: {
|
|
7
|
+
court: ['Federal Court of Australia'],
|
|
8
|
+
legislation: ['Work Health and Safety Act 2011'],
|
|
9
|
+
section: '21(1); 21(2)(a) & 5A(1)',
|
|
10
|
+
dateOutcome: '2023-09-15',
|
|
11
|
+
fine: '$10,000',
|
|
12
|
+
costs: '$2,000',
|
|
13
|
+
restitution: '$5,000',
|
|
14
|
+
datePublished: '2023-09-20',
|
|
15
|
+
appeal: 'None',
|
|
16
|
+
category: ['Workplace Safety']
|
|
17
|
+
},
|
|
18
|
+
field_prs_sentence: 'Company fined for OH&S breach.',
|
|
19
|
+
outcome: '<div><p><strong>Background</strong></p><p>Company found guilty of OH&S breach and fined.</p></div>',
|
|
20
|
+
attachment: 'case_details.pdf',
|
|
21
|
+
attachment_src: 'https://www.example.com/case_details.pdf'
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
title: 'Paragraphs/Directory/PRS',
|
|
26
|
+
component: prsRecord,
|
|
27
|
+
tags: ['autodocs']
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const CourseProvider = {};
|
|
31
|
+
|
|
32
|
+
CourseProvider.args = {
|
|
33
|
+
item: cpData,
|
|
34
|
+
};
|
|
@@ -21,8 +21,12 @@
|
|
|
21
21
|
<script>
|
|
22
22
|
import RecordDetails from './recordDetails.vue'
|
|
23
23
|
import RecordContent from './recordContent.vue'
|
|
24
|
+
import { BButton, BCollapse } from 'bootstrap-vue-next'
|
|
25
|
+
|
|
24
26
|
export default {
|
|
25
27
|
components: {
|
|
28
|
+
BButton,
|
|
29
|
+
BCollapse,
|
|
26
30
|
RecordDetails,
|
|
27
31
|
RecordContent
|
|
28
32
|
},
|
|
@@ -55,5 +59,5 @@ export default {
|
|
|
55
59
|
}
|
|
56
60
|
</script>
|
|
57
61
|
<style lang="scss" scoped>
|
|
58
|
-
@import '
|
|
62
|
+
@import '../../styles.scss';
|
|
59
63
|
</style>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import Records from './index.vue'
|
|
2
|
+
import { hscpData } from '../../../../mock/course-provider'
|
|
3
|
+
|
|
4
|
+
const hscpOptions =
|
|
5
|
+
{
|
|
6
|
+
field_directory_exposefilters: 'full',
|
|
7
|
+
field_directory_rows: 15,
|
|
8
|
+
field_directory_type: 'hscp'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const hscpTaxonomies = [
|
|
12
|
+
{
|
|
13
|
+
name: 'Service Type',
|
|
14
|
+
record_id: 'record_hscp_course',
|
|
15
|
+
terms: ['HSR Iniitial', 'HSR Refresher']
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
title: 'Paragraphs/Directory/Records',
|
|
21
|
+
component: Records,
|
|
22
|
+
tags: ['autodocs'],
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
hscpData
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
argTypes: {
|
|
29
|
+
fetchRecords: {
|
|
30
|
+
control: 'function',
|
|
31
|
+
table: { disable: true }
|
|
32
|
+
},
|
|
33
|
+
fetchFilters: {
|
|
34
|
+
control: 'function',
|
|
35
|
+
table: { disable: true }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const CourseProvider = {
|
|
41
|
+
args: {
|
|
42
|
+
options: hscpOptions,
|
|
43
|
+
items: hscpData,
|
|
44
|
+
taxonomies: hscpTaxonomies,
|
|
45
|
+
showFilters: true
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
<div v-if="items.length" class="paragraph--directory__records">
|
|
3
3
|
<template v-for="(item, index) in flatRecords">
|
|
4
4
|
<prs-record v-if="item.type === 'prs'" :key="index" :item="item" />
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
:key="index"
|
|
8
|
-
:item="item"
|
|
9
|
-
:location="baseLocation"
|
|
10
|
-
/>
|
|
5
|
+
<hscp-record v-if="item.type === 'hscp'" :key="index" :item="item" />
|
|
6
|
+
<isp-record v-if="item.type === 'isp'" :key="index" :item="item" :location="baseLocation" />
|
|
11
7
|
<cj-record v-if="item.type === 'cj'" :key="index" :item="item" />
|
|
12
8
|
</template>
|
|
13
9
|
</div>
|
|
@@ -16,26 +12,28 @@
|
|
|
16
12
|
import PrsRecord from './PRS/index.vue'
|
|
17
13
|
import IspRecord from './ISP/index.vue'
|
|
18
14
|
import CjRecord from './CJ/index.vue'
|
|
15
|
+
import HscpRecord from './../HSCP/Records/SingleRecord/index.vue'
|
|
19
16
|
|
|
20
17
|
export default {
|
|
21
18
|
components: {
|
|
22
19
|
PrsRecord,
|
|
23
20
|
IspRecord,
|
|
24
|
-
CjRecord
|
|
21
|
+
CjRecord,
|
|
22
|
+
HscpRecord
|
|
25
23
|
},
|
|
26
24
|
props: {
|
|
27
25
|
items: {
|
|
28
26
|
type: Array,
|
|
29
|
-
required: true
|
|
27
|
+
required: true,
|
|
30
28
|
},
|
|
31
29
|
taxonomies: {
|
|
32
30
|
type: Array,
|
|
33
|
-
required: true
|
|
31
|
+
required: true,
|
|
34
32
|
},
|
|
35
33
|
baseLocation: {
|
|
36
34
|
type: [Object, Boolean],
|
|
37
|
-
default: false
|
|
38
|
-
}
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
39
37
|
},
|
|
40
38
|
computed: {
|
|
41
39
|
flatRecords() {
|
|
@@ -66,13 +64,15 @@ export default {
|
|
|
66
64
|
field_prs_datepublished,
|
|
67
65
|
attachmentFormatted,
|
|
68
66
|
file_src_root,
|
|
69
|
-
file_src
|
|
70
|
-
} = {}
|
|
71
|
-
} = {}
|
|
67
|
+
file_src,
|
|
68
|
+
} = {},
|
|
69
|
+
} = {},
|
|
72
70
|
} = record
|
|
73
71
|
|
|
74
72
|
if (record_attachment !== undefined) {
|
|
75
|
-
file_src_root =
|
|
73
|
+
file_src_root = this.$config
|
|
74
|
+
? this.$config.public.apiURL
|
|
75
|
+
: process.env.CONTENT_API_URL
|
|
76
76
|
file_src = file_src_root + record_attachment
|
|
77
77
|
attachmentFormatted = record_attachment
|
|
78
78
|
.split(/.*[\/|\\]/)[1]
|
|
@@ -101,17 +101,17 @@ export default {
|
|
|
101
101
|
court: this.getTaxonomyLabelsByTid('Court', record_prs_court),
|
|
102
102
|
category: this.getTaxonomyLabelsByTid(
|
|
103
103
|
'Category',
|
|
104
|
-
record_prs_category
|
|
104
|
+
record_prs_category,
|
|
105
105
|
),
|
|
106
106
|
legislation: this.getTaxonomyLabelsByTid(
|
|
107
107
|
'Legislation',
|
|
108
|
-
record_prs_legislation
|
|
109
|
-
)
|
|
108
|
+
record_prs_legislation,
|
|
109
|
+
),
|
|
110
110
|
// coram: this.getTaxonomyLabelsByTid(
|
|
111
111
|
// 'record_prs_coram',
|
|
112
112
|
// record_prs_coram
|
|
113
113
|
// )
|
|
114
|
-
}
|
|
114
|
+
},
|
|
115
115
|
})
|
|
116
116
|
}
|
|
117
117
|
if (record.record_type === 'isp') {
|
|
@@ -121,9 +121,9 @@ export default {
|
|
|
121
121
|
attributes: {
|
|
122
122
|
title,
|
|
123
123
|
field_location,
|
|
124
|
-
isp: { suburb, postcode, phone_number, mobile_number } = {}
|
|
125
|
-
} = {}
|
|
126
|
-
} = {}
|
|
124
|
+
isp: { suburb, postcode, phone_number, mobile_number } = {},
|
|
125
|
+
} = {},
|
|
126
|
+
} = {},
|
|
127
127
|
} = record
|
|
128
128
|
flatRecords.push({
|
|
129
129
|
id: record_id,
|
|
@@ -131,15 +131,34 @@ export default {
|
|
|
131
131
|
title,
|
|
132
132
|
contact: {
|
|
133
133
|
mobile: mobile_number,
|
|
134
|
-
phone: phone_number
|
|
134
|
+
phone: phone_number,
|
|
135
135
|
},
|
|
136
136
|
address: {
|
|
137
137
|
suburb,
|
|
138
138
|
postcode,
|
|
139
139
|
map: {
|
|
140
|
-
field_location
|
|
141
|
-
}
|
|
142
|
-
}
|
|
140
|
+
field_location,
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
})
|
|
144
|
+
}
|
|
145
|
+
if (record.type === 'hscp') {
|
|
146
|
+
flatRecords.push({
|
|
147
|
+
type: 'hscp',
|
|
148
|
+
title: record.title,
|
|
149
|
+
fullAddress: record.fullAddress,
|
|
150
|
+
workPhone: record.workPhone,
|
|
151
|
+
tollfreePhone: record.tollfreePhone,
|
|
152
|
+
email: record.email,
|
|
153
|
+
website: record.website,
|
|
154
|
+
contact1: record.contact1,
|
|
155
|
+
email1: record.email1,
|
|
156
|
+
phone1: record.phone1,
|
|
157
|
+
contact2: record.contact2,
|
|
158
|
+
email2: record.email2,
|
|
159
|
+
phone2: record.phone2,
|
|
160
|
+
courses: record.courses,
|
|
161
|
+
trainingVenues: record.trainingVenues
|
|
143
162
|
})
|
|
144
163
|
}
|
|
145
164
|
if (record.record_type === 'cj') {
|
|
@@ -152,9 +171,9 @@ export default {
|
|
|
152
171
|
data: {
|
|
153
172
|
attributes: {
|
|
154
173
|
field_cj_datejudgement,
|
|
155
|
-
field_cj_datepublished
|
|
156
|
-
} = {}
|
|
157
|
-
} = {}
|
|
174
|
+
field_cj_datepublished,
|
|
175
|
+
} = {},
|
|
176
|
+
} = {},
|
|
158
177
|
} = record
|
|
159
178
|
flatRecords.push({
|
|
160
179
|
id: record_id,
|
|
@@ -164,12 +183,12 @@ export default {
|
|
|
164
183
|
appeal: record_cj_appeal,
|
|
165
184
|
court: record_cj_court,
|
|
166
185
|
judge: record_cj_judge,
|
|
167
|
-
judgement: field_cj_datejudgement
|
|
186
|
+
judgement: field_cj_datejudgement,
|
|
168
187
|
})
|
|
169
188
|
}
|
|
170
189
|
})
|
|
171
190
|
return flatRecords
|
|
172
|
-
}
|
|
191
|
+
},
|
|
173
192
|
},
|
|
174
193
|
methods: {
|
|
175
194
|
getTaxonomyLabelsByTid(taxName, listOfIds) {
|
|
@@ -197,7 +216,7 @@ export default {
|
|
|
197
216
|
}
|
|
198
217
|
return foundTerms
|
|
199
218
|
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
219
|
+
},
|
|
220
|
+
},
|
|
202
221
|
}
|
|
203
222
|
</script>
|
|
@@ -22,6 +22,29 @@ export const DIR_CONFIG = {
|
|
|
22
22
|
}
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
|
+
hscp: {
|
|
26
|
+
taxonomies: [
|
|
27
|
+
{
|
|
28
|
+
name: 'Service Type',
|
|
29
|
+
id: 'hscp_services',
|
|
30
|
+
record_id: 'record_hscp_services'
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
sorting: [
|
|
34
|
+
{
|
|
35
|
+
label: 'Name A-Z',
|
|
36
|
+
field: 'record_title',
|
|
37
|
+
order: 'asc',
|
|
38
|
+
type: 'az'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: 'Name Z-A',
|
|
42
|
+
field: 'record_title',
|
|
43
|
+
order: 'desc',
|
|
44
|
+
type: 'az'
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
25
48
|
prs: {
|
|
26
49
|
taxonomies: [
|
|
27
50
|
{
|
|
@@ -39,11 +62,6 @@ export const DIR_CONFIG = {
|
|
|
39
62
|
id: 'court',
|
|
40
63
|
record_id: 'record_prs_court'
|
|
41
64
|
}
|
|
42
|
-
// {
|
|
43
|
-
// name: 'Coram',
|
|
44
|
-
// id: 'coram',
|
|
45
|
-
// taxonomy_only: true
|
|
46
|
-
// }
|
|
47
65
|
],
|
|
48
66
|
sorting: [
|
|
49
67
|
{
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
<div v-else class="paragraph--directory__loading-container">
|
|
27
27
|
<loading />
|
|
28
28
|
</div>
|
|
29
|
-
<div v-if="showPagination" align="center">
|
|
29
|
+
<div v-if="showPagination" align-items="center">
|
|
30
30
|
<pagination
|
|
31
|
-
align="center"
|
|
31
|
+
align-items="center"
|
|
32
32
|
aria-label="Page navigation to load more records"
|
|
33
33
|
:rows="qs.rows"
|
|
34
34
|
:offset="qs.start"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
@pageClicked="loadByPageNumber($event)"
|
|
40
40
|
/>
|
|
41
41
|
</div>
|
|
42
|
-
<div v-if="noResultsFound" align="center">
|
|
42
|
+
<div v-if="noResultsFound" align-items="center">
|
|
43
43
|
<div>
|
|
44
44
|
<p>No records found, please try a different search.</p>
|
|
45
45
|
</div>
|
|
@@ -169,9 +169,9 @@ export default {
|
|
|
169
169
|
// Check for search
|
|
170
170
|
//
|
|
171
171
|
if (this.selectedFilters.query) {
|
|
172
|
-
this
|
|
172
|
+
this.qs['query'] = this.selectedFilters.query
|
|
173
173
|
} else {
|
|
174
|
-
|
|
174
|
+
delete this.qs['query']
|
|
175
175
|
}
|
|
176
176
|
//
|
|
177
177
|
// Sort by Date and AZ
|
|
@@ -193,7 +193,7 @@ export default {
|
|
|
193
193
|
Object.keys(this.selectedFilters.filters).forEach((filterName) => {
|
|
194
194
|
if (Array.isArray(this.selectedFilters.filters[filterName])) {
|
|
195
195
|
if (this.selectedFilters.filters[filterName]) {
|
|
196
|
-
this
|
|
196
|
+
this.qs[filterName] = []
|
|
197
197
|
this.selectedFilters.filters[filterName].forEach((item) => {
|
|
198
198
|
if (item.tid) {
|
|
199
199
|
this.qs[filterName].push(item.tid)
|
|
@@ -208,11 +208,11 @@ export default {
|
|
|
208
208
|
//
|
|
209
209
|
if (this.selectedFilters.location?.location) {
|
|
210
210
|
this.qs.sort = 'distance'
|
|
211
|
-
this
|
|
212
|
-
this
|
|
211
|
+
this.qs['lat'] = this.selectedFilters.location.location.lat
|
|
212
|
+
this.qs['lon'] = this.selectedFilters.location.location.lng
|
|
213
213
|
} else {
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
delete this.qs['lat']
|
|
215
|
+
delete this.qs['lon']
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
218
|
},
|
|
@@ -267,18 +267,18 @@ export default {
|
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
269
|
updateFilters(opts) {
|
|
270
|
-
this
|
|
270
|
+
this.selectedFilters['filters'] = opts
|
|
271
271
|
},
|
|
272
272
|
updateSort(opts) {
|
|
273
|
-
this
|
|
273
|
+
this.selectedFilters['sorting'] = opts
|
|
274
274
|
},
|
|
275
275
|
updateSearch(opts) {
|
|
276
|
-
this
|
|
276
|
+
this.selectedFilters['query'] = opts
|
|
277
277
|
},
|
|
278
278
|
updateLocation(opts) {
|
|
279
279
|
this.filters.sorting[0].terms[0].title = 'Nearest'
|
|
280
280
|
this.filters.sorting[0].terms[1].title = 'Farthest'
|
|
281
|
-
this
|
|
281
|
+
this.selectedFilters['location'] = opts
|
|
282
282
|
},
|
|
283
283
|
loadMore() {
|
|
284
284
|
this.qs.start += this.qs.rows
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../../../includes/scss/all.scss';
|
|
2
2
|
|
|
3
3
|
@mixin itemStyle() {
|
|
4
4
|
text-align: left;
|
|
@@ -29,10 +29,12 @@
|
|
|
29
29
|
font-size: 16px;
|
|
30
30
|
|
|
31
31
|
&--isp,
|
|
32
|
-
&--
|
|
32
|
+
&--hscp,
|
|
33
|
+
&--cj {
|
|
33
34
|
@include defaultStyle();
|
|
34
35
|
@include itemStyle();
|
|
35
36
|
}
|
|
37
|
+
|
|
36
38
|
&--prs {
|
|
37
39
|
@include defaultStyle();
|
|
38
40
|
border: 1px solid $gray;
|
|
@@ -80,6 +82,7 @@
|
|
|
80
82
|
font-size: 16px;
|
|
81
83
|
border-top: 2px solid $lightgray;
|
|
82
84
|
padding: 16px;
|
|
85
|
+
}
|
|
83
86
|
|
|
84
87
|
:deep(.attachment_name a) {
|
|
85
88
|
text-decoration: underline;
|
|
@@ -123,7 +126,6 @@
|
|
|
123
126
|
font-weight: bold;
|
|
124
127
|
margin-bottom: 5px;
|
|
125
128
|
}
|
|
126
|
-
}
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
}
|
|
@@ -136,7 +136,11 @@ export default {
|
|
|
136
136
|
},
|
|
137
137
|
selectedCard(card) {
|
|
138
138
|
// Some custom logic for gov caretaker logic
|
|
139
|
-
if (
|
|
139
|
+
if (
|
|
140
|
+
(this.$config
|
|
141
|
+
? this.$config.public.caretaker
|
|
142
|
+
: process.env.CARETAKER) === 'true'
|
|
143
|
+
) {
|
|
140
144
|
if (!isGovSite(card?.selectedCard?.link)) {
|
|
141
145
|
// this.$store.commit('page/SET_CARETAKER_REF', 'list-group')
|
|
142
146
|
// this.$root.$emit('caretaker-open', card?.selectedCard?.link)
|