@lancom/shared 0.0.457 → 0.0.459
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/components/products/products_aside/products-aside.vue +5 -5
- package/components/products/products_colors/products-colors.vue +10 -3
- package/components/quotes/quote_view/quote-view.scss +76 -22
- package/components/quotes/quote_view/quote-view.vue +79 -91
- package/components/quotes/quote_view/quote_option_view/quote-option-view.scss +103 -4
- package/components/quotes/quote_view/quote_option_view/quote-option-view.vue +202 -26
- package/components/quotes/quote_view/quote_view_accept/quote-view-accept.scss +33 -0
- package/components/quotes/quote_view/quote_view_accept/quote-view-accept.vue +85 -0
- package/components/quotes/quote_view/quote_view_address_form/quote-view-address-form.scss +17 -0
- package/components/quotes/quote_view/quote_view_address_form/quote-view-address-form.vue +259 -0
- package/components/quotes/quote_view/quote_view_banner/quote-view-banner.scss +67 -0
- package/components/quotes/quote_view/quote_view_banner/quote-view-banner.vue +69 -0
- package/components/quotes/quote_view/quote_view_billing_information/quote-view-billing-information.scss +5 -0
- package/components/quotes/quote_view/quote_view_billing_information/quote-view-billing-information.vue +108 -0
- package/components/quotes/quote_view/quote_view_header/quote-view-header.scss +65 -0
- package/components/quotes/quote_view/quote_view_header/quote-view-header.vue +69 -0
- package/components/quotes/quote_view/quote_view_info/quote-view-info.scss +36 -0
- package/components/quotes/quote_view/quote_view_info/quote-view-info.vue +42 -0
- package/components/quotes/quote_view/quote_view_invalid_stock_modal/quote-view-invalid-stock-modal.scss +17 -0
- package/components/quotes/quote_view/quote_view_invalid_stock_modal/quote-view-invalid-stock-modal.vue +29 -0
- package/components/quotes/quote_view/quote_view_menu/quote-view-menu.scss +74 -0
- package/components/quotes/quote_view/quote_view_menu/quote-view-menu.vue +102 -0
- package/components/quotes/quote_view/quote_view_message/quote-view-message.scss +53 -0
- package/components/quotes/quote_view/quote_view_message/quote-view-message.vue +40 -0
- package/components/quotes/quote_view/quote_view_mobile_menu/quote-view-mobile-menu.scss +1 -0
- package/components/quotes/quote_view/quote_view_mobile_menu/quote-view-mobile-menu.vue +23 -0
- package/components/quotes/quote_view/quote_view_payment/quote-view-payment.scss +58 -0
- package/components/quotes/quote_view/quote_view_payment/quote-view-payment.vue +191 -0
- package/components/quotes/quote_view/quote_view_payment/quote_payment_success/quote-payment-success.scss +40 -0
- package/components/quotes/quote_view/quote_view_payment/quote_payment_success/quote-payment-success.vue +50 -0
- package/components/quotes/quote_view/quote_view_payment_modal/quote-view-payment-modal.scss +10 -0
- package/components/quotes/quote_view/quote_view_payment_modal/quote-view-payment-modal.vue +49 -0
- package/components/quotes/quote_view/quote_view_print/quote-view-print.scss +54 -0
- package/components/quotes/quote_view/quote_view_print/quote-view-print.vue +74 -0
- package/components/quotes/quote_view/quote_view_question/quote-view-question.scss +84 -0
- package/components/quotes/quote_view/quote_view_question/quote-view-question.vue +203 -0
- package/components/quotes/quote_view/quote_view_questions/quote-view-questions.scss +39 -0
- package/components/quotes/quote_view/quote_view_questions/quote-view-questions.vue +50 -0
- package/components/quotes/quote_view_preview/quote-view.scss +29 -0
- package/components/quotes/quote_view_preview/quote-view.vue +121 -0
- package/components/quotes/quote_view_preview/quote_option_view/quote-option-view.scss +10 -0
- package/components/quotes/quote_view_preview/quote_option_view/quote-option-view.vue +73 -0
- package/package.json +1 -1
- package/pages/quotes/view/_id/option/_option.vue +1 -1
- package/plugins/crisp.js +13 -0
- package/store/products.js +4 -1
- /package/components/quotes/{quote_view → quote_view_preview}/quote-view.mixin.js +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_product_color_simple_products/quote-product-color-simple-products.mixin.js +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_product_color_simple_products/quote-product-color-simple-products.scss +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_product_color_simple_products/quote-product-color-simple-products.vue +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_product_color_simple_products/quote_product_color_simple_product/quote-product-color-simple-product.scss +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_product_color_simple_products/quote_product_color_simple_product/quote-product-color-simple-product.vue +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_product_prints/quote-product-prints.scss +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_product_prints/quote-product-prints.vue +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_product_prints/quote_product_print/quote-product-print.scss +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_product_prints/quote_product_print/quote-product-print.vue +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_view_product/quote-view-product.scss +0 -0
- /package/components/quotes/{quote_view → quote_view_preview}/quote_view_product/quote-view-product.vue +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@import "@/assets/scss/variables";
|
|
2
|
+
|
|
3
|
+
.QuoteViewQuestion {
|
|
4
|
+
&__wrapper {
|
|
5
|
+
border: 2px solid $gray;
|
|
6
|
+
padding: 54px;
|
|
7
|
+
@media (max-width: $bp-extra-small-max) {
|
|
8
|
+
padding: 24px;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
&__content {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
&__message {
|
|
17
|
+
width: 549px;
|
|
18
|
+
font-weight: 800;
|
|
19
|
+
font-size: 30px;
|
|
20
|
+
line-height: 41px;
|
|
21
|
+
text-align: center;
|
|
22
|
+
color: $black;
|
|
23
|
+
margin-bottom: 40px;
|
|
24
|
+
@media (max-width: $bp-extra-small-max) {
|
|
25
|
+
width: 280px;
|
|
26
|
+
font-size: 25px;
|
|
27
|
+
line-height: 35px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
&__form {
|
|
31
|
+
width: 100%;
|
|
32
|
+
}
|
|
33
|
+
&__label {
|
|
34
|
+
font-style: normal;
|
|
35
|
+
font-weight: 800;
|
|
36
|
+
font-size: 18px;
|
|
37
|
+
line-height: 25px;
|
|
38
|
+
text-transform: uppercase;
|
|
39
|
+
color: $black;
|
|
40
|
+
margin-bottom: 10px;
|
|
41
|
+
}
|
|
42
|
+
&__upload {
|
|
43
|
+
display: flex;
|
|
44
|
+
&--uploading {
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
opacity: 0.7;
|
|
47
|
+
}
|
|
48
|
+
&-btn {
|
|
49
|
+
font-weight: bold;
|
|
50
|
+
font-size: 16px;
|
|
51
|
+
line-height: 22px;
|
|
52
|
+
text-transform: uppercase;
|
|
53
|
+
background-color: $green;
|
|
54
|
+
padding: 8px 14px;
|
|
55
|
+
&--disabled {
|
|
56
|
+
background-color: $gray;
|
|
57
|
+
}
|
|
58
|
+
&--uploaded {
|
|
59
|
+
opacity: 0.5;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
&-info {
|
|
63
|
+
font-size: 12px;
|
|
64
|
+
line-height: 16px;
|
|
65
|
+
color: $black;
|
|
66
|
+
margin-left: 12px;
|
|
67
|
+
}
|
|
68
|
+
&-progress {
|
|
69
|
+
position: absolute;
|
|
70
|
+
left: 0;
|
|
71
|
+
top: 0;
|
|
72
|
+
right: 0;
|
|
73
|
+
bottom: 0;
|
|
74
|
+
}
|
|
75
|
+
&-file {
|
|
76
|
+
margin-top: 5px;
|
|
77
|
+
font-size: 12px;
|
|
78
|
+
a {
|
|
79
|
+
text-decoration: none;
|
|
80
|
+
color: $black;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="QuoteViewQuestion__wrapper">
|
|
3
|
+
<div
|
|
4
|
+
v-if="!enabledForm"
|
|
5
|
+
class="QuoteViewQuestion__content">
|
|
6
|
+
<div class="QuoteViewQuestion__message">
|
|
7
|
+
For any requests regarding this quote, use the live chat or send us an offline message here:
|
|
8
|
+
</div>
|
|
9
|
+
<btn
|
|
10
|
+
btn-class="green"
|
|
11
|
+
btn-label="ASK A QUESTION"
|
|
12
|
+
@onclick="enableForm()" />
|
|
13
|
+
</div>
|
|
14
|
+
<div
|
|
15
|
+
v-else
|
|
16
|
+
class="QuoteViewQuestion__form">
|
|
17
|
+
<validation-observer
|
|
18
|
+
v-slot="{ invalid, handleSubmit }"
|
|
19
|
+
tag="form">
|
|
20
|
+
<validation-provider
|
|
21
|
+
v-slot="{ errors }"
|
|
22
|
+
tag="div"
|
|
23
|
+
name="Description"
|
|
24
|
+
class="form-row">
|
|
25
|
+
<textarea
|
|
26
|
+
id="quote-request-description"
|
|
27
|
+
v-model="question.text"
|
|
28
|
+
name="quote-request-description"
|
|
29
|
+
class="form-textarea--size3 labelless"
|
|
30
|
+
placeholder="Your message here"
|
|
31
|
+
:class="{
|
|
32
|
+
'is-danger': errors.length,
|
|
33
|
+
filled: question.text
|
|
34
|
+
}">
|
|
35
|
+
</textarea>
|
|
36
|
+
<span
|
|
37
|
+
v-if="errors.length"
|
|
38
|
+
class="form-help is-danger">
|
|
39
|
+
{{ errors[0] }}
|
|
40
|
+
</span>
|
|
41
|
+
</validation-provider>
|
|
42
|
+
<div class="form-row">
|
|
43
|
+
<div class="QuoteViewQuestion__label">
|
|
44
|
+
Upload image or file
|
|
45
|
+
</div>
|
|
46
|
+
<file-uploader
|
|
47
|
+
:multiple="false"
|
|
48
|
+
:url="`image/editor/${shop._id}/undefined`"
|
|
49
|
+
:has-conversion-error-modal="false"
|
|
50
|
+
:show-error-message="false"
|
|
51
|
+
@onchange="handleUploadChange"
|
|
52
|
+
@onerror="handleUploadError"
|
|
53
|
+
@onuploaded="handleUploaded">
|
|
54
|
+
<template v-slot:toggle="{ uploading }">
|
|
55
|
+
<div
|
|
56
|
+
class="QuoteViewQuestion__upload"
|
|
57
|
+
:class="{
|
|
58
|
+
'QuoteViewQuestion__upload--uploading': uploading
|
|
59
|
+
}">
|
|
60
|
+
<div
|
|
61
|
+
class="QuoteViewQuestion__upload-btn"
|
|
62
|
+
:class="{
|
|
63
|
+
'QuoteViewQuestion__upload-btn--disabled': uploading,
|
|
64
|
+
'QuoteViewQuestion__upload-btn--uploaded': question.file
|
|
65
|
+
}">
|
|
66
|
+
Upload
|
|
67
|
+
</div>
|
|
68
|
+
<div class="QuoteViewQuestion__upload-info">
|
|
69
|
+
<div>Note: accepted file types:</div>
|
|
70
|
+
<div><b>JPEG / PNG / AI / EPS / PDF</b></div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</template>
|
|
74
|
+
<template v-slot:progress="{ progress }">
|
|
75
|
+
<div
|
|
76
|
+
v-if="progress"
|
|
77
|
+
class="QuoteViewQuestion__upload-progress">
|
|
78
|
+
<spinner background="black" />
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
</file-uploader>
|
|
82
|
+
<div
|
|
83
|
+
v-if="uploadError"
|
|
84
|
+
class="QuoteViewQuestion__error">
|
|
85
|
+
{{ uploadError }}
|
|
86
|
+
</div>
|
|
87
|
+
<div
|
|
88
|
+
v-if="question.file"
|
|
89
|
+
class="QuoteViewQuestion__upload-file">
|
|
90
|
+
<span @click="question.file = null">x</span>
|
|
91
|
+
Logo:
|
|
92
|
+
<a
|
|
93
|
+
:href="question.file.origin"
|
|
94
|
+
target="_blank">
|
|
95
|
+
{{ question.file.fileName }}
|
|
96
|
+
</a>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
<div class="QuoteViewQuestion__btn form-actions full">
|
|
100
|
+
<div class="row">
|
|
101
|
+
<div class="col-sm-6 col-5">
|
|
102
|
+
<btn
|
|
103
|
+
btn-class="white"
|
|
104
|
+
:btn-block="true"
|
|
105
|
+
btn-label="Cancel"
|
|
106
|
+
@onclick="disableForm(submit)" />
|
|
107
|
+
</div>
|
|
108
|
+
<div class="col-sm-6 col-7">
|
|
109
|
+
<btn
|
|
110
|
+
btn-class="green"
|
|
111
|
+
:btn-disabled="processing || invalid"
|
|
112
|
+
:btn-processing="processing"
|
|
113
|
+
:btn-block="true"
|
|
114
|
+
btn-label="Submit Question"
|
|
115
|
+
@onclick="handleSubmit(submit)" />
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</btn>
|
|
119
|
+
</div>
|
|
120
|
+
</validation-observer>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</template>
|
|
124
|
+
|
|
125
|
+
<script>
|
|
126
|
+
import { mapGetters } from 'vuex';
|
|
127
|
+
import FileUploader from '@lancom/shared/components/common/file_uploader';
|
|
128
|
+
import api from '@lancom/shared/assets/js/api';
|
|
129
|
+
|
|
130
|
+
export default {
|
|
131
|
+
name: 'QuoteViewQuestion',
|
|
132
|
+
components: {
|
|
133
|
+
FileUploader
|
|
134
|
+
},
|
|
135
|
+
data() {
|
|
136
|
+
return {
|
|
137
|
+
uploadError: null,
|
|
138
|
+
processing: false,
|
|
139
|
+
enabledForm: false,
|
|
140
|
+
question: null
|
|
141
|
+
};
|
|
142
|
+
},
|
|
143
|
+
computed: {
|
|
144
|
+
...mapGetters('quote', ['quote']),
|
|
145
|
+
...mapGetters(['shop'])
|
|
146
|
+
},
|
|
147
|
+
methods: {
|
|
148
|
+
enableForm() {
|
|
149
|
+
this.question = {
|
|
150
|
+
phone: null,
|
|
151
|
+
email: null,
|
|
152
|
+
file: null,
|
|
153
|
+
text: null
|
|
154
|
+
};
|
|
155
|
+
this.enabledForm = true;
|
|
156
|
+
},
|
|
157
|
+
disableForm() {
|
|
158
|
+
this.enabledForm = false;
|
|
159
|
+
},
|
|
160
|
+
handleUploaded(file) {
|
|
161
|
+
this.question.file = file;
|
|
162
|
+
},
|
|
163
|
+
handleUploadError(e) {
|
|
164
|
+
const { error, data } = e?.response?.data || {};
|
|
165
|
+
if (data) {
|
|
166
|
+
this.question.file = {
|
|
167
|
+
fileName: data.fileName,
|
|
168
|
+
origin: data.source
|
|
169
|
+
};
|
|
170
|
+
} else {
|
|
171
|
+
this.uploadError = error;
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
handleUploadChange() {
|
|
175
|
+
this.uploadError = null;
|
|
176
|
+
this.question.file = null;
|
|
177
|
+
},
|
|
178
|
+
async submit() {
|
|
179
|
+
try {
|
|
180
|
+
this.processing = true;
|
|
181
|
+
const recaptchaToken = await this.getRecaptcha('add_quote_question');
|
|
182
|
+
const body = {
|
|
183
|
+
recaptchaToken,
|
|
184
|
+
question: this.question
|
|
185
|
+
};
|
|
186
|
+
const review = await api.addQuoteQuestion(this.quote, this.shop._id, body);
|
|
187
|
+
this.$toastr.s('Your question will be processed within 24 hours. Thank You.');
|
|
188
|
+
this.$emit('added', review);
|
|
189
|
+
this.quote.questions = [...(this.quote.questions || []), this.question];
|
|
190
|
+
this.disableForm();
|
|
191
|
+
} catch (error) {
|
|
192
|
+
this.$toastr.e(error);
|
|
193
|
+
} finally {
|
|
194
|
+
this.processing = false;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
</script>
|
|
200
|
+
|
|
201
|
+
<style lang="scss" scoped>
|
|
202
|
+
@import 'quote-view-question.scss';
|
|
203
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import "@/assets/scss/variables";
|
|
2
|
+
|
|
3
|
+
.QuoteViewQuestions {
|
|
4
|
+
&__wrapper {
|
|
5
|
+
border: 2px solid $gray;
|
|
6
|
+
}
|
|
7
|
+
&__title {
|
|
8
|
+
padding: 24px;
|
|
9
|
+
font-weight: 800;
|
|
10
|
+
font-size: 22px;
|
|
11
|
+
line-height: 30px;
|
|
12
|
+
text-align: center;
|
|
13
|
+
color: $black;
|
|
14
|
+
background: $gray;
|
|
15
|
+
}
|
|
16
|
+
&__questions {
|
|
17
|
+
padding: 10px 25px;
|
|
18
|
+
text-align: center;
|
|
19
|
+
}
|
|
20
|
+
&__question {
|
|
21
|
+
margin: 15px 0;
|
|
22
|
+
&-text {
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
font-size: 16px;
|
|
25
|
+
line-height: 23px;
|
|
26
|
+
color: $black;
|
|
27
|
+
a {
|
|
28
|
+
color: $black;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
&-answer {
|
|
32
|
+
margin-top: 0px;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
font-size: 16px;
|
|
35
|
+
line-height: 23px;
|
|
36
|
+
color: $gray_main;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="hasQuestions"
|
|
4
|
+
class="QuoteViewQuestions__wrapper">
|
|
5
|
+
<div class="QuoteViewQuestions__title">
|
|
6
|
+
Your questions
|
|
7
|
+
</div>
|
|
8
|
+
<div class="QuoteViewQuestions__questions">
|
|
9
|
+
<div
|
|
10
|
+
v-for="question in questions"
|
|
11
|
+
:key="question._id"
|
|
12
|
+
class="QuoteViewQuestions__question">
|
|
13
|
+
<div class="QuoteViewQuestions__question-text">
|
|
14
|
+
You: {{ question.text }}
|
|
15
|
+
<div v-if="question.file">
|
|
16
|
+
<a
|
|
17
|
+
:href="question.file.origin"
|
|
18
|
+
target="_blank">
|
|
19
|
+
{{ question.file.fileName }}
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="QuoteViewQuestions__question-answer">
|
|
24
|
+
Support: {{ question.answer }}
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
import { mapGetters } from 'vuex';
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
name: 'QuoteViewQuestions',
|
|
36
|
+
computed: {
|
|
37
|
+
...mapGetters('quote', ['quote']),
|
|
38
|
+
hasQuestions() {
|
|
39
|
+
return this.questions.length > 0;
|
|
40
|
+
},
|
|
41
|
+
questions() {
|
|
42
|
+
return (this.quote.questions || []).slice(0, 20); // .filter(q => !!q.answer);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<style lang="scss" scoped>
|
|
49
|
+
@import 'quote-view-questions.scss';
|
|
50
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.QuoteView {
|
|
2
|
+
&__wrapper {
|
|
3
|
+
margin-top: 50px;
|
|
4
|
+
}
|
|
5
|
+
&__option {
|
|
6
|
+
border: 1px solid #dee2e6;
|
|
7
|
+
padding: 30px;
|
|
8
|
+
margin-bottom: 50px;
|
|
9
|
+
}
|
|
10
|
+
&__info {
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
margin-bottom: 10px;
|
|
14
|
+
}
|
|
15
|
+
&__logo {
|
|
16
|
+
margin-bottom: 20px;
|
|
17
|
+
}
|
|
18
|
+
&__table {
|
|
19
|
+
margin-top: 20px;
|
|
20
|
+
margin-bottom: 10px;
|
|
21
|
+
td {
|
|
22
|
+
width: 50%;
|
|
23
|
+
padding: 20px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
.uppercase {
|
|
28
|
+
text-transform: uppercase;
|
|
29
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="QuoteView__wrapper">
|
|
3
|
+
<div
|
|
4
|
+
v-if="quote.shop.logo"
|
|
5
|
+
class="QuoteView__logo">
|
|
6
|
+
<img :src="quote.shop.logo.small" />
|
|
7
|
+
</div>
|
|
8
|
+
<div class="QuoteView__info">
|
|
9
|
+
<div>
|
|
10
|
+
<h2 class="lc_h2"> {{ quote.shop.name }} </h2>
|
|
11
|
+
<h4 v-if="shopContacts" class="lc_h4"> ABN: {{ shopContacts.abn }} </h4>
|
|
12
|
+
</div>
|
|
13
|
+
<h1 class="text-secondary lc_h1">
|
|
14
|
+
QUOTE
|
|
15
|
+
</h1>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="QuoteView__info">
|
|
18
|
+
<div v-if="shopContacts">
|
|
19
|
+
<div class="lc_regular16">
|
|
20
|
+
{{ shopContacts.company }}
|
|
21
|
+
</div>
|
|
22
|
+
<div class="lc_regular16">
|
|
23
|
+
{{ shopContacts.address }}
|
|
24
|
+
</div>
|
|
25
|
+
<div class="lc_regular16">
|
|
26
|
+
{{ shopContacts.phone }}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div>
|
|
30
|
+
<div class="lc_regular16">
|
|
31
|
+
DATE: {{ quote.createdAt | shortDate }}
|
|
32
|
+
</div>
|
|
33
|
+
<div class="lc_regular16">
|
|
34
|
+
QUOTE ID: {{ quoteId }}
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<table class="QuoteView__table mt-4 lc_table bordered">
|
|
40
|
+
<tr>
|
|
41
|
+
<td>
|
|
42
|
+
<div><b>QUOTE</b></div>
|
|
43
|
+
<div v-if="quote.address">
|
|
44
|
+
<div class="lc_regular16">
|
|
45
|
+
{{ quote.address.fullName }}
|
|
46
|
+
</div>
|
|
47
|
+
<div v-if="quote.address.company" class="lc_regular16">
|
|
48
|
+
{{ quote.address.company }}
|
|
49
|
+
</div>
|
|
50
|
+
<div v-if="quote.address.phone" class="lc_regular16">
|
|
51
|
+
{{ quote.address.phone }}
|
|
52
|
+
</div>
|
|
53
|
+
<div class="lc_regular16">
|
|
54
|
+
{{ quote.address.email }}
|
|
55
|
+
</div>
|
|
56
|
+
<div class="lc_regular16">
|
|
57
|
+
{{ quoteAddress }}
|
|
58
|
+
</div>
|
|
59
|
+
<div class="lc_regular16">
|
|
60
|
+
{{ quote.address.additionalInfo }}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</td>
|
|
64
|
+
<td class="w-50">
|
|
65
|
+
<div class="lc_regular16">
|
|
66
|
+
<b>{{ MESSAGES.DIRECT_DEPOSIT_DETAILS || 'DIRECT DEPOSIT DETAILS' }}</b>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="lc_regular16">
|
|
69
|
+
Bank: {{ depositInfo.bank }}
|
|
70
|
+
</div>
|
|
71
|
+
<div class="lc_regular16">
|
|
72
|
+
Account name: {{ depositInfo.accountName }}
|
|
73
|
+
</div>
|
|
74
|
+
<div class="lc_regular16">
|
|
75
|
+
{{ bsbLabel }}: {{ depositInfo.BSB }}
|
|
76
|
+
</div>
|
|
77
|
+
<div class="lc_regular16">
|
|
78
|
+
Account: {{ depositInfo.account }}
|
|
79
|
+
</div>
|
|
80
|
+
</td>
|
|
81
|
+
</tr>
|
|
82
|
+
</table>
|
|
83
|
+
<div class="mt-3">
|
|
84
|
+
<quote-option-view
|
|
85
|
+
v-for="(optionItem, index) of options"
|
|
86
|
+
:key="`option-${index}`"
|
|
87
|
+
:option="optionItem"
|
|
88
|
+
:quote="quote"
|
|
89
|
+
class="QuoteView__option" />
|
|
90
|
+
</div>
|
|
91
|
+
<h6
|
|
92
|
+
v-if="quote.expiredAt"
|
|
93
|
+
class="mt-3 lc_title mb-5 lc_h3">
|
|
94
|
+
THIS QUOTE IS VALID UNTIL {{ quote.expiredAt | shortDate }}
|
|
95
|
+
</h6>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<script>
|
|
100
|
+
import { mapGetters } from 'vuex';
|
|
101
|
+
import QuoteViewMixin from './quote-view.mixin';
|
|
102
|
+
import QuoteOptionView from './quote_option_view/quote-option-view';
|
|
103
|
+
|
|
104
|
+
export default {
|
|
105
|
+
name: 'LancomQuoteView',
|
|
106
|
+
components: {
|
|
107
|
+
QuoteOptionView
|
|
108
|
+
},
|
|
109
|
+
mixins: [QuoteViewMixin],
|
|
110
|
+
computed: {
|
|
111
|
+
...mapGetters(['MESSAGES']),
|
|
112
|
+
bsbLabel() {
|
|
113
|
+
return this.MESSAGES.DIRECT_DEPOSIT_BSB || 'BSB';
|
|
114
|
+
},
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
</script>
|
|
118
|
+
|
|
119
|
+
<style lang="scss" scoped>
|
|
120
|
+
@import 'quote-view.scss';
|
|
121
|
+
</style>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="QuoteOptionView__wrapper">
|
|
3
|
+
<div class="QuoteOptionView__info">
|
|
4
|
+
<quote-view-product
|
|
5
|
+
v-for="product of option.products"
|
|
6
|
+
:key="product._id"
|
|
7
|
+
:product="product"
|
|
8
|
+
class="QuoteOptionView__product" />
|
|
9
|
+
</div>
|
|
10
|
+
<div class="QuoteOptionView__totals">
|
|
11
|
+
<div class="lc_regular16">
|
|
12
|
+
Products Total: <b>{{ option.productsTotal | price(currency) }}</b>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="lc_regular16">
|
|
15
|
+
Prints Total: <b>{{ option.printsTotal | price(currency) }}</b>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="lc_regular16">
|
|
18
|
+
Shipping Total: <b>{{ option.shippingTotal | price(currency) }}</b>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="lc_regular16">
|
|
21
|
+
Total ex {{ taxName }}: <b>{{ option.total | price(currency) }}</b>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="lc_regular16">
|
|
24
|
+
{{ taxName }}: <b>{{ optionGst(option) | price(currency) }}</b>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="lc_regular16">
|
|
27
|
+
Total inc {{ taxName }}: <b>{{ option.total | tax(gstTax) | price(currency) }}</b>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
import { mapGetters } from 'vuex';
|
|
35
|
+
import { tax, price } from '@lancom/shared/assets/js/utils/filters';
|
|
36
|
+
import QuoteViewProduct from './../quote_view_product/quote-view-product';
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
name: 'LancomQuoteOptionView',
|
|
40
|
+
filters: {
|
|
41
|
+
tax,
|
|
42
|
+
price
|
|
43
|
+
},
|
|
44
|
+
components: {
|
|
45
|
+
QuoteViewProduct
|
|
46
|
+
},
|
|
47
|
+
props: {
|
|
48
|
+
quote: {
|
|
49
|
+
type: Object,
|
|
50
|
+
require: true
|
|
51
|
+
},
|
|
52
|
+
option: {
|
|
53
|
+
type: Object,
|
|
54
|
+
require: true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
computed: {
|
|
58
|
+
...mapGetters([
|
|
59
|
+
'gstTax',
|
|
60
|
+
'taxName'
|
|
61
|
+
])
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
optionGst(option) {
|
|
65
|
+
return tax(option.total, this.gstTax) - option.total;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
@import 'quote-option-view.scss';
|
|
73
|
+
</style>
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<script>
|
|
13
13
|
import QuoteViewPage from '@lancom/shared/pages/quotes/view/_id';
|
|
14
|
-
import LancomQuoteView from '@lancom/shared/components/quotes/
|
|
14
|
+
import LancomQuoteView from '@lancom/shared/components/quotes/quote_view_preview/quote-view';
|
|
15
15
|
|
|
16
16
|
export default {
|
|
17
17
|
name: 'QuoteOptionView',
|
package/plugins/crisp.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default () => {
|
|
2
|
+
window.$crisp = [['safe', true], ['do', 'chat:close'], ['do', 'chat:hide']];
|
|
3
|
+
window.CRISP_WEBSITE_ID = '8c07b4ea-6446-4fe5-ad43-4aae73ca6652';
|
|
4
|
+
|
|
5
|
+
(function () {
|
|
6
|
+
const d = document;
|
|
7
|
+
const s = d.createElement('script');
|
|
8
|
+
|
|
9
|
+
s.src = 'https://client.crisp.chat/l.js';
|
|
10
|
+
s.async = 1;
|
|
11
|
+
d.getElementsByTagName('head')[0].appendChild(s);
|
|
12
|
+
})();
|
|
13
|
+
};
|
package/store/products.js
CHANGED
|
@@ -23,7 +23,10 @@ export const state = () => ({
|
|
|
23
23
|
export const getters = {
|
|
24
24
|
products: ({ products }) => products,
|
|
25
25
|
types: ({ types }) => types || [],
|
|
26
|
-
colors: ({ colors }) =>
|
|
26
|
+
colors: ({ colors, colorGroups }) => {
|
|
27
|
+
const colorGroupsSet = new Set(colorGroups?.map(g => g._id));
|
|
28
|
+
return colors.filter(c => c.colorGroups?.some(g => colorGroupsSet.has(g)));
|
|
29
|
+
},
|
|
27
30
|
colorGroups: ({ colorGroups }) => colorGroups || [],
|
|
28
31
|
brands: ({ brands }) => brands || [],
|
|
29
32
|
categories: ({ categories }) => categories || [],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|