@worksafevictoria/wcl7.5 1.8.0-beta.9 → 1.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worksafevictoria/wcl7.5",
3
- "version": "1.8.0-beta.9",
3
+ "version": "1.8.0",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -126,7 +126,6 @@
126
126
  }"
127
127
  >
128
128
  <div
129
- v-if="$slots.cardDescription || description"
130
129
  class="card-grid-item__description"
131
130
  :class="{
132
131
  [descriptionClass]: !!descriptionClass,
@@ -11,12 +11,11 @@
11
11
  :is-selectable="true"
12
12
  :row-spacing="isSingleColumn && !singleLineCards ? 'large' : 'small'"
13
13
  @selected="selectedCard"
14
- @gridColumnSize="
15
- (gridColumnSize) => (isSingleColumn = gridColumnSize === 1)
16
- "
14
+ @gridColumnSize="(gridColumnSize) => (isSingleColumn = gridColumnSize === 1)"
17
15
  >
18
16
  <template v-slot:cardItem="{ card }">
19
17
  <card-grid-item
18
+ v-if="card.description"
20
19
  :show-divider="!singleLineCards"
21
20
  :card-header-title="singleLineCards ? null : card.title"
22
21
  :header-size="card.titleSize"
@@ -38,10 +37,7 @@
38
37
  [`w-100 text-left`]: alignLeft,
39
38
  }"
40
39
  >
41
- <strong
42
- v-if="singleLineCards && card.title"
43
- v-html="card.title + ': '"
44
- >
40
+ <strong v-if="singleLineCards && card.title" v-html="card.title + ': '">
45
41
  </strong>
46
42
  <span v-html="card.description"></span>
47
43
  </div>
@@ -51,12 +47,12 @@
51
47
  </card-grid>
52
48
  </template>
53
49
  <script>
54
- import { navigateToPath, isGovSite } from '../../../../lib/utility'
55
- import CardGrid from '../../Common/CardGrid/index.vue'
56
- import CardGridItem from '../../Common/CardGridItem/index.vue'
50
+ import { navigateToPath, isGovSite } from "../../../../lib/utility";
51
+ import CardGrid from "../../Common/CardGrid/index.vue";
52
+ import CardGridItem from "../../Common/CardGridItem/index.vue";
57
53
 
58
54
  export default {
59
- name: 'Subheader',
55
+ name: "Subheader",
60
56
  components: { CardGrid, CardGridItem },
61
57
  props: {
62
58
  itemList: {
@@ -72,11 +68,11 @@ export default {
72
68
  },
73
69
  background: {
74
70
  type: String,
75
- default: 'none',
71
+ default: "none",
76
72
  },
77
73
  heading: {
78
74
  type: String,
79
- default: '',
75
+ default: "",
80
76
  },
81
77
  alignLeft: {
82
78
  type: Boolean,
@@ -91,48 +87,46 @@ export default {
91
87
  },
92
88
  type: {
93
89
  type: String,
94
- default: '',
90
+ default: "",
95
91
  },
96
92
  },
97
93
  data() {
98
94
  return {
99
95
  isSingleColumn: false,
100
- }
96
+ };
101
97
  },
102
98
  methods: {
103
99
  selectedCard(card) {
104
100
  // Some custom logic for gov caretaker logic
105
101
  if (
106
- (this.$config
107
- ? this.$config.public.caretaker
108
- : process.env.CARETAKER) === 'true'
102
+ (this.$config ? this.$config.public.caretaker : process.env.CARETAKER) === "true"
109
103
  ) {
110
104
  if (!isGovSite(card?.selectedCard?.linkHref)) {
111
105
  // this.$store.commit('page/SET_CARETAKER_REF', 'subheader')
112
106
  // this.$root.$emit('caretaker-open', card?.selectedCard?.linkHref)
113
107
  if (this.$pageStore) {
114
- this.$pageStore.caretaker.referrer = 'subheader'
108
+ this.$pageStore.caretaker.referrer = "subheader";
115
109
  }
116
110
  if (this.$bus) {
117
- this.$bus.$emit('caretaker-open', card?.selectedCard?.linkHref)
111
+ this.$bus.$emit("caretaker-open", card?.selectedCard?.linkHref);
118
112
  }
119
113
  } else {
120
114
  navigateToPath.call(
121
115
  this,
122
116
  card?.selectedCard?.linkHref,
123
- card?.ev?.ctrlKey === true || card?.ev?.metaKey === true,
124
- )
117
+ card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
118
+ );
125
119
  }
126
120
  } else {
127
121
  navigateToPath.call(
128
122
  this,
129
123
  card?.selectedCard?.linkHref,
130
- card?.ev?.ctrlKey === true || card?.ev?.metaKey === true,
131
- )
124
+ card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
125
+ );
132
126
  }
133
127
  },
134
128
  },
135
- }
129
+ };
136
130
  </script>
137
131
  <style lang="scss" scoped>
138
132
  .subheader {
@@ -65,34 +65,34 @@
65
65
  </column>
66
66
  </row>
67
67
  <row v-if="item.contact1 !== ''">
68
- <column sm="2" class="label" v-if="item.contact1 !== ''">
68
+ <column sm="2" class="label" >
69
69
  Contact
70
70
  </column>
71
- <column sm="4" class="dir-additional-records" v-if="item.contact1 !== ''">
71
+ <column sm="4" class="dir-additional-records">
72
72
  {{item.contact1}}
73
73
  </column>
74
74
  </row>
75
75
  <row v-if="item.phone1 !== ''">
76
- <column sm="2" class="label" v-if="item.phone1 !== ''">
76
+ <column sm="2" class="label" >
77
77
  Phone
78
78
  </column>
79
- <column sm="4" class="dir-additional-records" v-if="item.phone1 !== ''">
79
+ <column sm="4" class="dir-additional-records" >
80
80
  {{item.phone1}}
81
81
  </column>
82
82
  </row>
83
83
  <row v-if="item.mobile1 !== ''">
84
- <column sm="2" class="label" v-if="item.mobile1 !== ''">
84
+ <column sm="2" class="label" >
85
85
  Mobile
86
86
  </column>
87
- <column sm="4" class="dir-additional-records" v-if="item.mobile1 !== ''">
87
+ <column sm="4" class="dir-additional-records" >
88
88
  {{item.mobile1}}
89
89
  </column>
90
90
  </row>
91
91
  <row v-if="item.email1 !== ''">
92
- <column sm="2" class="label" v-if="item.email1 !== ''">
92
+ <column sm="2" class="label" >
93
93
  Email
94
94
  </column>
95
- <column sm="4" class="dir-additional-records" v-if="item.email1 !== ''">
95
+ <column sm="4" class="dir-additional-records">
96
96
  {{item.email1}}
97
97
  </column>
98
98
  </row>
@@ -141,7 +141,7 @@ export default {
141
141
  mobilePhone: record.CompanyMobile,
142
142
  email: record.CompanyEmailDisp,
143
143
  website: this.formatWebsite(record.CompanyWebURLDisp),
144
- contact1: record.ContactFirstName + ' ' + record.ContactLastName,
144
+ contact1: this.returnContact(record.ContactFirstName, record.ContactLastName),
145
145
  email1: record.ContactEmail,
146
146
  phone1: record.ContactPhoneDisp,
147
147
  mobile1: record.ContactMobileDisp,
@@ -179,6 +179,11 @@ export default {
179
179
  }
180
180
  },
181
181
 
182
+ returnContact(firstN, lastN) {
183
+ let retContact = [firstN, lastN].filter(Boolean).join(' ')
184
+ return retContact
185
+ },
186
+
182
187
  chunkify(arr, n) {
183
188
  if (arr) {
184
189
  const chunked = arr.reduce(
@@ -40,7 +40,9 @@
40
40
  />
41
41
  <CustomControl position="BOTTOM_CENTER">
42
42
  <h4 v-if="unknownLGA">
43
- <BBadge variant="light"> Unknown LGA {{ unknownLGA }} </BBadge>
43
+ <BBadge variant="light">
44
+ Unspecified locations {{ unknownLGA }}
45
+ </BBadge>
44
46
  </h4>
45
47
  </CustomControl>
46
48
  <AdvancedMarker
@@ -103,8 +103,8 @@ export const arData = [
103
103
  CompanyMobile: '0404 073 745',
104
104
  CompanyEmailDisp: 'ads.asbestos@gmail.com',
105
105
  CompanyWebURLDisp: 'http://www.adsasbestosremoval.com.au',
106
- ContactFirstName: 'Ivan',
107
- ContactLastName: 'Silva',
106
+ ContactFirstName: '',
107
+ ContactLastName: '',
108
108
  ContactPhoneDisp: '0404073745',
109
109
  ContactEmail: 'ads.asbestos@gmail.com',
110
110
  ContactMobileDisp: '1300 064 277',
@@ -121,7 +121,7 @@ export const arData = [
121
121
  CompanyWebURLDisp: 'http://www.adsasbestosremoval.com.au',
122
122
  ContactFirstName: 'Ivan',
123
123
  ContactLastName: 'Silva',
124
- ContactPhoneDisp: '0404073745',
124
+ ContactPhoneDisp: '',
125
125
  ContactEmail: 'ads.asbestos@gmail.com',
126
126
  ContactMobileDisp: '1300 064 277',
127
127
  ServiceAll: 'Class A - Restricted - Asbestos Removalists',
@@ -138,7 +138,7 @@ export const arData = [
138
138
  ContactFirstName: 'Ivan',
139
139
  ContactLastName: 'Silva',
140
140
  ContactPhoneDisp: '0404073745',
141
- ContactEmail: 'ads.asbestos@gmail.com',
141
+ ContactEmail: '',
142
142
  ContactMobileDisp: '1300 064 277',
143
143
  ServiceAll: 'Class A - Restricted - Asbestos Removalists',
144
144
  ServicesAll: 'removal of any asbestos containing material that was previously non-friable but has become friable as a result of a fire and does not require an enclosure with a negative air unit(s) to perform the work.',
@@ -155,7 +155,7 @@ export const arData = [
155
155
  ContactLastName: 'Silva',
156
156
  ContactPhoneDisp: '0404073745',
157
157
  ContactEmail: 'ads.asbestos@gmail.com',
158
- ContactMobileDisp: '1300 064 277',
158
+ ContactMobileDisp: '',
159
159
  ServiceAll: 'Class A - Restricted - Asbestos Removalists',
160
160
  ServicesAll: 'removal of any asbestos containing material that was previously non-friable but has become friable as a result of a fire and does not require an enclosure with a negative air unit(s) to perform the work.',
161
161
  },
@@ -167,11 +167,11 @@ export const arData = [
167
167
  CompanyMobile: '0404 073 745',
168
168
  CompanyEmailDisp: 'ads.asbestos@gmail.com',
169
169
  CompanyWebURLDisp: 'http://www.adsasbestosremoval.com.au',
170
- ContactFirstName: 'Ivan',
171
- ContactLastName: 'Silva',
172
- ContactPhoneDisp: '0404073745',
173
- ContactEmail: 'ads.asbestos@gmail.com',
174
- ContactMobileDisp: '1300 064 277',
170
+ ContactFirstName: '',
171
+ ContactLastName: '',
172
+ ContactPhoneDisp: '',
173
+ ContactEmail: '',
174
+ ContactMobileDisp: '',
175
175
  ServiceAll: 'Class A - Restricted - Asbestos Removalists',
176
176
  ServicesAll: 'removal of any asbestos containing material that was previously non-friable but has become friable as a result of a fire and does not require an enclosure with a negative air unit(s) to perform the work.',
177
177
  },