project-booster-vue 10.22.1 → 10.22.2
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,5 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
+
import { useStore } from 'vuex';
|
|
3
4
|
import MLink from '../mozaic/link/MLink.vue';
|
|
4
5
|
import MButton from '../mozaic/buttons/MButton.vue';
|
|
5
6
|
|
|
@@ -7,17 +8,24 @@ const BACK_ICON =
|
|
|
7
8
|
'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
|
|
8
9
|
const props = defineProps(['payload']);
|
|
9
10
|
const emit = defineEmits(['go-back']);
|
|
10
|
-
const
|
|
11
|
+
const store = useStore();
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
moveDate.value = event.target.value;
|
|
14
|
-
}
|
|
13
|
+
const moveDate = ref(store.state.answers.moveDate);
|
|
15
14
|
|
|
16
|
-
function
|
|
15
|
+
function commitStep(moveDateValue) {
|
|
16
|
+
store.commit('setMoveDate', moveDateValue);
|
|
17
17
|
emit('step-completed', {
|
|
18
|
-
answers: [{ moveDate:
|
|
18
|
+
answers: [{ moveDate: moveDateValue }],
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
function handleSubmit() {
|
|
23
|
+
commitStep(moveDate.value);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function skipQuestion() {
|
|
27
|
+
commitStep(null);
|
|
28
|
+
}
|
|
21
29
|
</script>
|
|
22
30
|
|
|
23
31
|
<template>
|
|
@@ -26,14 +34,14 @@ function handleSubmit() {
|
|
|
26
34
|
<div class="date-picker">
|
|
27
35
|
<span class="title">{{ props.payload.viewModel.title }}</span>
|
|
28
36
|
<span class="subtile">{{ props.payload.viewModel.subtitle }}</span>
|
|
29
|
-
<input type="date"
|
|
37
|
+
<input type="date" v-model="moveDate" class="mc-text-input mc-field__input input-text-date" />
|
|
30
38
|
<MButton
|
|
31
39
|
class="button"
|
|
32
40
|
:label="props.payload.viewModel.actionLabel"
|
|
33
41
|
@click="handleSubmit"
|
|
34
42
|
:disabled="!moveDate"
|
|
35
43
|
/>
|
|
36
|
-
<m-link class="skip-link" :label="props.payload.viewModel.skipLabel" @click.once="
|
|
44
|
+
<m-link class="skip-link" :label="props.payload.viewModel.skipLabel" @click.once="skipQuestion" />
|
|
37
45
|
</div>
|
|
38
46
|
</div>
|
|
39
47
|
</template>
|