@worksafevictoria/wcl7.5 1.13.0 → 1.14.0-beta.10
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/assets/icons/Mental-injury.svg +40 -0
- package/src/assets/icons/Physical-injury.svg +11 -0
- package/src/assets/icons/icon-view-off.svg +1 -0
- package/src/assets/icons/other.svg +19 -0
- package/src/components/Containers/Carousel/index.vue +45 -28
- package/src/components/Containers/HomepageHeader/index.vue +2 -11
- package/src/components/Containers/HomepageHeaderNew/index.stories.js +5 -0
- package/src/components/Containers/HomepageHeaderNew/index.vue +40 -11
- package/src/components/Containers/SectionGroup/index.vue +23 -23
- package/src/components/Global/AppHeaderNew/index.vue +31 -24
- package/src/components/Global/AppHeaderNew/mobile.scss +50 -12
- package/src/components/Global/AppHeaderNew/styles.scss +26 -33
- package/src/components/Paragraphs/Accordion/index.stories.js +3 -3
- package/src/components/Paragraphs/Accordion/index.vue +3 -3
- package/src/components/Paragraphs/BrowseContent/index.vue +226 -231
- package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.stories.js +7 -7
- package/src/components/Paragraphs/Directory/Asbestos/Records/SingleRecord/index.vue +21 -23
- package/src/components/Paragraphs/Directory/Asbestos/Records/index.vue +41 -40
- package/src/components/Paragraphs/Directory/Records/PRS/recordContent.vue +11 -0
- package/src/components/Paragraphs/RTWPlanner/Home/index.vue +83 -0
- package/src/components/Paragraphs/RTWPlanner/NavBar/index.vue +44 -0
- package/src/components/Paragraphs/RTWPlanner/Planners/PlanTasks.vue +169 -0
- package/src/components/Paragraphs/RTWPlanner/Planners/index.vue +239 -0
- package/src/components/Paragraphs/RTWPlanner/icons/ChevRightIcon.vue +16 -0
- package/src/components/Paragraphs/RTWPlanner/icons/DeleteIcon.vue +13 -0
- package/src/components/Paragraphs/RTWPlanner/icons/MentalInjury.vue +42 -0
- package/src/components/Paragraphs/RTWPlanner/icons/NotepadIcon.vue +95 -0
- package/src/components/Paragraphs/RTWPlanner/icons/OtherInjury.vue +20 -0
- package/src/components/Paragraphs/RTWPlanner/icons/PhysicalInjury.vue +13 -0
- package/src/components/Paragraphs/RTWPlanner/icons/PlusCircleIcon.vue +36 -0
- package/src/components/Paragraphs/RTWPlanner/icons/TickCircleIcon.vue +13 -0
- package/src/components/Paragraphs/RTWPlanner/index.stories.js +26 -0
- package/src/components/Paragraphs/RTWPlanner/index.vue +41 -0
- package/src/components/Paragraphs/TextMedia/index.vue +107 -9
- package/src/components/Paragraphs/VideoPlayer/index.vue +157 -23
- package/src/components/SubComponents/VideoThumbnail/index.vue +5 -1
- package/src/includes/scss/mixins/src/fp.scss +1 -1
- package/src/index.js +3 -13
- package/src/mock/asbestos-removalists.js +224 -196
- package/src/components/Paragraphs/BrowseContent/setup.vue +0 -284
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section-group class="paragraph--directory dir-filters">
|
|
3
3
|
<!-- Filters -->
|
|
4
|
-
<row style="column-gap:
|
|
4
|
+
<row style="column-gap: 10px">
|
|
5
5
|
<!-- Keyword Filters -->
|
|
6
6
|
<column xxl="2" xl="3" md="4" sm="6">
|
|
7
7
|
<label class="col-form-label visually-hidden" for="keyword-search">
|
|
@@ -44,21 +44,21 @@
|
|
|
44
44
|
<option class="placeholder" value="" disabled hidden selected>
|
|
45
45
|
Service class
|
|
46
46
|
</option>
|
|
47
|
-
<option value="Class A
|
|
48
|
-
Class A
|
|
47
|
+
<option value="Class A - Friable and non-friable">
|
|
48
|
+
Class A - Friable and non-friable
|
|
49
49
|
</option>
|
|
50
|
-
<option value="Class B
|
|
51
|
-
Class B
|
|
50
|
+
<option value="Class B - Non-friable">
|
|
51
|
+
Class B - Non-friable
|
|
52
52
|
</option>
|
|
53
|
-
<option value="Class A - Restricted - Asbestos Removalists">
|
|
53
|
+
<!-- <option value="Class A - Restricted - Asbestos Removalists">
|
|
54
54
|
Class A - Restricted - Asbestos Removalists
|
|
55
55
|
</option>
|
|
56
56
|
<option value="Class B - Restricted - Asbestos Removalists">
|
|
57
57
|
Class B - Restricted - Asbestos Removalists
|
|
58
|
-
</option>
|
|
58
|
+
</option> -->
|
|
59
59
|
</select>
|
|
60
60
|
</column>
|
|
61
|
-
<column xxl="2" xl="3" md="4" sm="6">
|
|
61
|
+
<!-- <column xxl="2" xl="3" md="4" sm="6">
|
|
62
62
|
<label class="col-form-label visually-hidden" for="search-services">
|
|
63
63
|
Search by suburb (typed suburb automatically filters below results)
|
|
64
64
|
</label>
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
aria-label="Search by suburb (typed suburb automatically filters below results)"
|
|
71
71
|
class="search"
|
|
72
72
|
/>
|
|
73
|
-
</column>
|
|
73
|
+
</column> -->
|
|
74
74
|
<column md="2">
|
|
75
75
|
<filter-button
|
|
76
76
|
v-if="!hideReset"
|
|
@@ -120,7 +120,7 @@ export default {
|
|
|
120
120
|
searchRem: '',
|
|
121
121
|
searchSub: '',
|
|
122
122
|
searchClass: '',
|
|
123
|
-
searchServices: '',
|
|
123
|
+
// searchServices: '',
|
|
124
124
|
filteredItems: null,
|
|
125
125
|
perPage: 10,
|
|
126
126
|
page: 0,
|
|
@@ -159,21 +159,21 @@ export default {
|
|
|
159
159
|
.includes(this.searchClass.toLowerCase()),
|
|
160
160
|
)
|
|
161
161
|
}
|
|
162
|
-
if (this.searchServices.length) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
162
|
+
// if (this.searchServices.length) {
|
|
163
|
+
// this.hideReset = false
|
|
164
|
+
// results = results.filter((item) =>
|
|
165
|
+
// item.services
|
|
166
|
+
// .toLowerCase()
|
|
167
|
+
// .includes(this.searchServices.toLowerCase()),
|
|
168
|
+
// )
|
|
169
|
+
// }
|
|
170
170
|
this.filteredItems = results
|
|
171
171
|
|
|
172
172
|
if (
|
|
173
173
|
this.searchRem.length ||
|
|
174
174
|
this.searchSub.length ||
|
|
175
|
-
this.searchClass.length
|
|
176
|
-
this.searchServices.length
|
|
175
|
+
this.searchClass.length
|
|
176
|
+
// || this.searchServices.length
|
|
177
177
|
) {
|
|
178
178
|
this.pageChanged(1)
|
|
179
179
|
}
|
|
@@ -184,7 +184,7 @@ export default {
|
|
|
184
184
|
flatRecords() {
|
|
185
185
|
let flatRecords = []
|
|
186
186
|
const sortedItems = this.items.sort((a, b) =>
|
|
187
|
-
a.
|
|
187
|
+
a.Account.localeCompare(b.Account, 'en', {
|
|
188
188
|
sensitivity: 'base',
|
|
189
189
|
}),
|
|
190
190
|
)
|
|
@@ -192,21 +192,22 @@ export default {
|
|
|
192
192
|
sortedItems.forEach((record) => {
|
|
193
193
|
flatRecords.push({
|
|
194
194
|
type: 'ar',
|
|
195
|
-
title: record.
|
|
196
|
-
fullAddress: record.
|
|
197
|
-
workPhone: record.Phone,
|
|
198
|
-
mobilePhone: record.
|
|
199
|
-
email: record.
|
|
200
|
-
website: this.formatWebsite(record.
|
|
201
|
-
contact1: this.returnContact(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
),
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
195
|
+
title: record.Account,
|
|
196
|
+
fullAddress: record.Regbusinessaddresssuburb + ' ' + record.Regbusinessaddresspostcode,
|
|
197
|
+
// workPhone: record.Phone,
|
|
198
|
+
mobilePhone: record.PrimaryContactMobile,
|
|
199
|
+
email: record.PrimaryContactEmail,
|
|
200
|
+
website: record.Website ? this.formatWebsite(record.Website) : '',
|
|
201
|
+
// contact1: this.returnContact(
|
|
202
|
+
// record.ContactFirstName,
|
|
203
|
+
// record.ContactLastName,
|
|
204
|
+
// ),
|
|
205
|
+
contact1: record.PrimaryContactAccountName,
|
|
206
|
+
// email1: record.PrimaryContactEmail,
|
|
207
|
+
// phone1: record.ContactPhoneDisp,
|
|
208
|
+
// mobile1: record.PrimaryContactMobile,
|
|
209
|
+
// services: record.ServicesAll.replace(/,$/, ''),
|
|
210
|
+
serviceCategory: record.AsbestosClass,
|
|
210
211
|
})
|
|
211
212
|
})
|
|
212
213
|
return flatRecords
|
|
@@ -245,10 +246,10 @@ export default {
|
|
|
245
246
|
return returnUrl
|
|
246
247
|
},
|
|
247
248
|
|
|
248
|
-
returnContact(firstN, lastN) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
},
|
|
249
|
+
// returnContact(firstN, lastN) {
|
|
250
|
+
// let retContact = [firstN, lastN].filter(Boolean).join(' ')
|
|
251
|
+
// return retContact
|
|
252
|
+
// },
|
|
252
253
|
|
|
253
254
|
chunkify(arr, n) {
|
|
254
255
|
if (arr) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- eslint-disable vue/no-v-html -->
|
|
3
3
|
<container>
|
|
4
|
+
<div>
|
|
5
|
+
<hr />
|
|
6
|
+
</div>
|
|
4
7
|
<row>
|
|
5
8
|
<column sm="9">
|
|
6
9
|
<div v-if="item.outcome" class="record-details__outcome">
|
|
@@ -89,3 +92,11 @@ export default {
|
|
|
89
92
|
}
|
|
90
93
|
}
|
|
91
94
|
</script>
|
|
95
|
+
|
|
96
|
+
<style lang="scss" scoped>
|
|
97
|
+
|
|
98
|
+
.record-details__outcome {
|
|
99
|
+
margin-left: 20px !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<TextMedia
|
|
4
|
+
:media-type="'image'"
|
|
5
|
+
:title-text="textMedia.title"
|
|
6
|
+
:title-tag="textMedia.titleTag"
|
|
7
|
+
:content="textMedia.content"
|
|
8
|
+
:image="textMedia.image"
|
|
9
|
+
:rtl="textMedia.rtl"
|
|
10
|
+
/>
|
|
11
|
+
|
|
12
|
+
<Container fluid class="my-4">
|
|
13
|
+
<h2>Select your injury</h2>
|
|
14
|
+
|
|
15
|
+
<TextMedia
|
|
16
|
+
:media-type="'icon'"
|
|
17
|
+
:title-text="'Physical injuries'"
|
|
18
|
+
:content="`<p>
|
|
19
|
+
Physical injuries include anything that occurs to an employees body.
|
|
20
|
+
This tool supports employers to manage the return to work process
|
|
21
|
+
for non-complex physical injuries only.
|
|
22
|
+
</p><p><a href="#" class="cta-button">Continue to planner</a></p>`"
|
|
23
|
+
:glyph="PhysicalInjury"
|
|
24
|
+
:icon-alt="'PhysicalInjury icon'"
|
|
25
|
+
:glyph-height="60"
|
|
26
|
+
:glyph-width="60"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<TextMedia
|
|
30
|
+
:media-type="'icon'"
|
|
31
|
+
:title-text="'Mental injuries'"
|
|
32
|
+
:content="`<p>
|
|
33
|
+
Mental injuries are complex and require tailored information for
|
|
34
|
+
employers to support injured workers with their return to work. This
|
|
35
|
+
tool does not currently give guidance for mental injuries.
|
|
36
|
+
</p><p><a href="#" class="cta-button white">Continue to planner</a></p>`"
|
|
37
|
+
:glyph="MentalInjury"
|
|
38
|
+
:icon-alt="'MentalInjury icon'"
|
|
39
|
+
:glyph-height="60"
|
|
40
|
+
:glyph-width="60"
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
<TextMedia
|
|
44
|
+
:media-type="'icon'"
|
|
45
|
+
:title-text="'Other'"
|
|
46
|
+
:content="`<p>
|
|
47
|
+
If you are unsure about the injury type of your employee, gaining
|
|
48
|
+
additional support, reach out to your agent to get more information.
|
|
49
|
+
</p><p><a href="#" class="cta-button white">More information</a></p>`"
|
|
50
|
+
:glyph="OtherInjury"
|
|
51
|
+
:icon-alt="'Other icon'"
|
|
52
|
+
:glyph-height="60"
|
|
53
|
+
:glyph-width="60"
|
|
54
|
+
/>
|
|
55
|
+
</Container>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script setup>
|
|
60
|
+
import { defineProps } from 'vue'
|
|
61
|
+
|
|
62
|
+
import Container from './../../../Containers/Container/index.vue'
|
|
63
|
+
import TextMedia from './../../TextMedia/index.vue'
|
|
64
|
+
import PhysicalInjury from './../../../../assets/icons/Physical-injury.svg?url'
|
|
65
|
+
import MentalInjury from './../../../../assets/icons/Mental-injury.svg?url'
|
|
66
|
+
import OtherInjury from './../../../../assets/icons/other.svg?url'
|
|
67
|
+
const emit = defineEmits(['newPlan'])
|
|
68
|
+
|
|
69
|
+
const props = defineProps({
|
|
70
|
+
textMedia: {
|
|
71
|
+
type: Object,
|
|
72
|
+
required: true,
|
|
73
|
+
},
|
|
74
|
+
})
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<style scoped>
|
|
78
|
+
.lightgrey-bg {
|
|
79
|
+
border-radius: 12px;
|
|
80
|
+
border: 4px solid #727272;
|
|
81
|
+
background: #f5f5f5;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<BNavbar variant="light" class="border-bottom bg-white pb-0">
|
|
3
|
+
<BNavbarBrand>
|
|
4
|
+
<ChevRightIcon
|
|
5
|
+
class="ws-yellow"
|
|
6
|
+
style="width: 32px; height: 32px"
|
|
7
|
+
></ChevRightIcon>
|
|
8
|
+
<strong>Return to Work Planner</strong>
|
|
9
|
+
</BNavbarBrand>
|
|
10
|
+
<BNavbarToggle target="nav-collapse" />
|
|
11
|
+
<BNavbarNav class="ms-auto align-items-center">
|
|
12
|
+
<BNavItem href="/return-work-home">
|
|
13
|
+
<strong>Home</strong>
|
|
14
|
+
</BNavItem>
|
|
15
|
+
<BNavItem href="/return-work-poc">
|
|
16
|
+
<NotepadIcon class="me-2" style="width: 1em; height: 1em" />
|
|
17
|
+
<strong>My Planners</strong>
|
|
18
|
+
</BNavItem>
|
|
19
|
+
</BNavbarNav>
|
|
20
|
+
</BNavbar>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup>
|
|
24
|
+
import ChevRightIcon from './../icons/ChevRightIcon.vue'
|
|
25
|
+
import NotepadIcon from './../icons/NotepadIcon.vue'
|
|
26
|
+
import {
|
|
27
|
+
BNavbar,
|
|
28
|
+
BNavbarBrand,
|
|
29
|
+
BNavbarToggle,
|
|
30
|
+
BNavbarNav,
|
|
31
|
+
BNavItem,
|
|
32
|
+
} from 'bootstrap-vue-next'
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<style lang="scss" scoped>
|
|
36
|
+
@import './../../../../includes/scss/all.scss';
|
|
37
|
+
.active {
|
|
38
|
+
color: black !important;
|
|
39
|
+
border-bottom: 5px solid $yellow;
|
|
40
|
+
}
|
|
41
|
+
.ws-yellow {
|
|
42
|
+
color: $yellow;
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Container>
|
|
3
|
+
<Row>
|
|
4
|
+
<Column col="12">
|
|
5
|
+
<h2 class="fw-bold my-4">{{ props.activePlanner?.name }}'s planner</h2>
|
|
6
|
+
</Column>
|
|
7
|
+
</Row>
|
|
8
|
+
<Row>
|
|
9
|
+
<Column col="12" md="8">
|
|
10
|
+
<div class="card shadow-sm border-3 rounded-3 p-4">
|
|
11
|
+
<BCardText v-html="activeContent.html"></BCardText>
|
|
12
|
+
<CtaButton
|
|
13
|
+
:rtl="
|
|
14
|
+
isTaskCompleted(activeTask.id, activeContent.id) ? true : false
|
|
15
|
+
"
|
|
16
|
+
:workwell="
|
|
17
|
+
isTaskCompleted(activeTask.id, activeContent.id) ? true : false
|
|
18
|
+
"
|
|
19
|
+
@click="toggleTask(activeTask.id, activeContent.id)"
|
|
20
|
+
class="mt-1"
|
|
21
|
+
>
|
|
22
|
+
{{
|
|
23
|
+
isTaskCompleted(activeTask.id, activeContent.id)
|
|
24
|
+
? 'Completed'
|
|
25
|
+
: 'Mark Done'
|
|
26
|
+
}}
|
|
27
|
+
</CtaButton>
|
|
28
|
+
</div>
|
|
29
|
+
<div
|
|
30
|
+
role="button"
|
|
31
|
+
class="card shadow-sm border-3 rounded-3 p-4 mt-4 text-end"
|
|
32
|
+
:class="getNextTask() ? '' : 'disabled'"
|
|
33
|
+
@click="setActiveContent(getNextTask().task, getNextTask().content)"
|
|
34
|
+
>
|
|
35
|
+
<h4 class="fw-bold mt-0 mb-3">Go to next task</h4>
|
|
36
|
+
<p class="text-muted mb-0">
|
|
37
|
+
<span class="text-decoration-underline">
|
|
38
|
+
{{
|
|
39
|
+
getNextTask() ? getNextTask().content.btnText : 'No more tasks'
|
|
40
|
+
}}
|
|
41
|
+
</span>
|
|
42
|
+
</p>
|
|
43
|
+
</div>
|
|
44
|
+
</Column>
|
|
45
|
+
<Column col="12" md="4">
|
|
46
|
+
<div class="card shadow-sm border-3 rounded-3 p-4">
|
|
47
|
+
<h4 class="fw-bold mb-3">All tasks</h4>
|
|
48
|
+
<div v-for="task in props.tasks" :key="task.id" class="mb-3">
|
|
49
|
+
<p class="fw-bold">{{ task.title }}</p>
|
|
50
|
+
<div v-for="content in task.content" :key="content.id">
|
|
51
|
+
<button
|
|
52
|
+
class="d-flex justify-content-between align-items-center w-100 border-0 rounded-2 p-2 mb-2 text-start"
|
|
53
|
+
:class="
|
|
54
|
+
isTaskCompleted(task.id, content.id)
|
|
55
|
+
? activeContent.id === content.id
|
|
56
|
+
? 'bg-success-subtle text-dark fw-bold active-done'
|
|
57
|
+
: 'bg-success-subtle text-dark fw-bold'
|
|
58
|
+
: activeContent.id === content.id
|
|
59
|
+
? 'active'
|
|
60
|
+
: 'bg-light text-muted'
|
|
61
|
+
"
|
|
62
|
+
@click="setActiveContent(task, content)"
|
|
63
|
+
>
|
|
64
|
+
<span class="text-decoration-underline">
|
|
65
|
+
{{ content.btnText }}
|
|
66
|
+
</span>
|
|
67
|
+
<span
|
|
68
|
+
v-if="isTaskCompleted(task.id, content.id)"
|
|
69
|
+
class="text-success"
|
|
70
|
+
>
|
|
71
|
+
<TickCircleIcon
|
|
72
|
+
class="ms-2"
|
|
73
|
+
style="width: 2em; height: 2em"
|
|
74
|
+
/>
|
|
75
|
+
</span>
|
|
76
|
+
<span v-else class="text-muted">
|
|
77
|
+
<TickCircleIcon
|
|
78
|
+
class="ms-2"
|
|
79
|
+
style="width: 2em; height: 2em"
|
|
80
|
+
/>
|
|
81
|
+
</span>
|
|
82
|
+
</button>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</Column>
|
|
87
|
+
</Row>
|
|
88
|
+
</Container>
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<script setup>
|
|
92
|
+
import { ref } from 'vue'
|
|
93
|
+
import { CtaButton, Row, Column, Container } from '@worksafevictoria/wcl7.5'
|
|
94
|
+
import TickCircleIcon from './icons/TickCircleIcon.vue'
|
|
95
|
+
|
|
96
|
+
const props = defineProps({
|
|
97
|
+
activePlanner: { type: Object, required: true },
|
|
98
|
+
tasks: { type: Array, required: true }
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
const emit = defineEmits(['updatePlanner'])
|
|
102
|
+
const tasks = ref([])
|
|
103
|
+
const activeTask = ref(props.tasks[0] || { id: '', title: '', content: [] })
|
|
104
|
+
const activeContent = ref(
|
|
105
|
+
props.tasks[0]?.content[0] || { btnText: '', html: '' }
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
const toggleTask = (taskId, contentId) => {
|
|
109
|
+
const key = `${taskId}_${contentId}`
|
|
110
|
+
const updatedPlanner = {
|
|
111
|
+
...props.activePlanner,
|
|
112
|
+
tasksCompleted: [...props.activePlanner.tasksCompleted]
|
|
113
|
+
}
|
|
114
|
+
const index = updatedPlanner.tasksCompleted.indexOf(key)
|
|
115
|
+
if (index === -1) {
|
|
116
|
+
updatedPlanner.tasksCompleted.push(key)
|
|
117
|
+
} else {
|
|
118
|
+
updatedPlanner.tasksCompleted.splice(index, 1)
|
|
119
|
+
}
|
|
120
|
+
emit('updatePlanner', updatedPlanner)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const isTaskCompleted = (taskId, contentId) => {
|
|
124
|
+
const key = `${taskId}_${contentId}`
|
|
125
|
+
return props.activePlanner.tasksCompleted.includes(key)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const setActiveContent = (task, content) => {
|
|
129
|
+
console.log('🚀 ~ setActiveContent ~ task:', task)
|
|
130
|
+
activeTask.value = task
|
|
131
|
+
activeContent.value = content
|
|
132
|
+
scrollTo(0, 0)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const getNextTask = () => {
|
|
136
|
+
for (const task of props.tasks) {
|
|
137
|
+
for (const content of task.content) {
|
|
138
|
+
if (activeContent.value.id === content.id) {
|
|
139
|
+
const currentTaskIndex = props.tasks.indexOf(task)
|
|
140
|
+
const currentContentIndex = task.content.indexOf(content)
|
|
141
|
+
if (currentContentIndex + 1 < task.content.length) {
|
|
142
|
+
return { task, content: task.content[currentContentIndex + 1] }
|
|
143
|
+
} else if (currentTaskIndex + 1 < props.tasks.length) {
|
|
144
|
+
const nextTask = props.tasks[currentTaskIndex + 1]
|
|
145
|
+
return { task: nextTask, content: nextTask.content[0] }
|
|
146
|
+
} else {
|
|
147
|
+
return null
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
</script>
|
|
154
|
+
|
|
155
|
+
<style lang="scss" scoped>
|
|
156
|
+
@import '@worksafevictoria/wcl7.5/src/includes/scss/all.scss';
|
|
157
|
+
.active {
|
|
158
|
+
color: black !important;
|
|
159
|
+
background-color: $yellow !important;
|
|
160
|
+
}
|
|
161
|
+
.active-done {
|
|
162
|
+
border-left: 10px solid $green !important;
|
|
163
|
+
}
|
|
164
|
+
.disabled {
|
|
165
|
+
pointer-events: none;
|
|
166
|
+
opacity: 0.5;
|
|
167
|
+
cursor: not-allowed;
|
|
168
|
+
}
|
|
169
|
+
</style>
|