@driveflux/pdf 1.0.1 → 1.0.3
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/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +16 -0
- package/dist/__mocks__/quotation.d.ts +3 -0
- package/dist/__mocks__/quotation.d.ts.map +1 -0
- package/dist/__mocks__/quotation.js +59 -0
- package/dist/cjs/__mocks__/quotation.js +69 -0
- package/dist/cjs/debug.js +33 -1
- package/dist/cjs/templates/QuotationPdf/CustomerSubscriptionSection.js +147 -0
- package/dist/cjs/templates/QuotationPdf/GFV.js +57 -0
- package/dist/cjs/templates/QuotationPdf/Header.js +86 -0
- package/dist/cjs/templates/QuotationPdf/Pricing.js +430 -0
- package/dist/cjs/templates/QuotationPdf/QuotationPdfPage.js +45 -0
- package/dist/cjs/templates/QuotationPdf/SectionBoxNew.js +43 -0
- package/dist/cjs/templates/QuotationPdf/TermsSection.js +60 -0
- package/dist/cjs/templates/QuotationPdf/index.js +208 -0
- package/dist/cjs/templates/QuotationPdf/translations.js +103 -0
- package/dist/cjs/templates/QuotationPdf/utils.js +91 -0
- package/dist/cjs/templates/SubscriptionAgreement/LabelValue.js +1 -1
- package/dist/cjs/templates/index.js +1 -0
- package/dist/debug.js +33 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts +10 -0
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts.map +1 -0
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +132 -0
- package/dist/templates/QuotationPdf/GFV.d.ts +10 -0
- package/dist/templates/QuotationPdf/GFV.d.ts.map +1 -0
- package/dist/templates/QuotationPdf/GFV.js +47 -0
- package/dist/templates/QuotationPdf/Header.d.ts +9 -0
- package/dist/templates/QuotationPdf/Header.d.ts.map +1 -0
- package/dist/templates/QuotationPdf/Header.js +71 -0
- package/dist/templates/QuotationPdf/Pricing.d.ts +10 -0
- package/dist/templates/QuotationPdf/Pricing.d.ts.map +1 -0
- package/dist/templates/QuotationPdf/Pricing.js +415 -0
- package/dist/templates/QuotationPdf/QuotationPdfPage.d.ts +8 -0
- package/dist/templates/QuotationPdf/QuotationPdfPage.d.ts.map +1 -0
- package/dist/templates/QuotationPdf/QuotationPdfPage.js +30 -0
- package/dist/templates/QuotationPdf/SectionBoxNew.d.ts +8 -0
- package/dist/templates/QuotationPdf/SectionBoxNew.d.ts.map +1 -0
- package/dist/templates/QuotationPdf/SectionBoxNew.js +33 -0
- package/dist/templates/QuotationPdf/TermsSection.d.ts +8 -0
- package/dist/templates/QuotationPdf/TermsSection.d.ts.map +1 -0
- package/dist/templates/QuotationPdf/TermsSection.js +50 -0
- package/dist/templates/QuotationPdf/index.d.ts +9 -0
- package/dist/templates/QuotationPdf/index.d.ts.map +1 -0
- package/dist/templates/QuotationPdf/index.js +193 -0
- package/dist/templates/QuotationPdf/translations.d.ts +59 -0
- package/dist/templates/QuotationPdf/translations.d.ts.map +1 -0
- package/dist/templates/QuotationPdf/translations.js +93 -0
- package/dist/templates/QuotationPdf/utils.d.ts +6 -0
- package/dist/templates/QuotationPdf/utils.d.ts.map +1 -0
- package/dist/templates/QuotationPdf/utils.js +70 -0
- package/dist/templates/SubscriptionAgreement/LabelValue.js +1 -1
- package/dist/templates/index.d.ts +1 -0
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +1 -0
- package/package.json +2 -2
- package/src/__mocks__/quotation.ts +62 -0
- package/src/debug.ts +12 -3
- package/src/templates/QuotationPdf/CustomerSubscriptionSection.tsx +65 -0
- package/src/templates/QuotationPdf/GFV.tsx +29 -0
- package/src/templates/QuotationPdf/Header.tsx +31 -0
- package/src/templates/QuotationPdf/Pricing.tsx +214 -0
- package/src/templates/QuotationPdf/QuotationPdfPage.tsx +25 -0
- package/src/templates/QuotationPdf/SectionBoxNew.tsx +20 -0
- package/src/templates/QuotationPdf/TermsSection.tsx +28 -0
- package/src/templates/QuotationPdf/index.tsx +46 -0
- package/src/templates/QuotationPdf/translations.ts +82 -0
- package/src/templates/QuotationPdf/utils.ts +44 -0
- package/src/templates/SubscriptionAgreement/LabelValue.tsx +1 -1
- package/src/templates/index.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
> @driveflux/pdf@1.0.
|
|
2
|
+
> @driveflux/pdf@1.0.3 build /Users/flux/Projects/flux-develop/shared/pdf
|
|
3
3
|
> fab
|
|
4
4
|
|
|
5
|
-
Successfully compiled:
|
|
6
|
-
Successfully compiled:
|
|
5
|
+
Successfully compiled: 35 files with swc (302.7ms)
|
|
6
|
+
Successfully compiled: 35 files with swc (299.05ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @driveflux/frontend-pdf
|
|
2
2
|
|
|
3
|
+
## 1.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updates
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @driveflux/db@1.0.38
|
|
10
|
+
|
|
11
|
+
## 1.0.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updates
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @driveflux/db@1.0.37
|
|
18
|
+
|
|
3
19
|
## 1.0.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotation.d.ts","sourceRoot":"","sources":["../../src/__mocks__/quotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC,eAAO,MAAM,SAAS,EAAE,SA2DvB,CAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export var quotation = {
|
|
2
|
+
id: 'QUO_XZJLVSM8',
|
|
3
|
+
vehicleId: 'VBEXLQR',
|
|
4
|
+
plan: 'plan36',
|
|
5
|
+
mileagePackage: 'lite',
|
|
6
|
+
cycleFluxCoefficient: 'flux25',
|
|
7
|
+
customerName: 'Bubu Ahmad',
|
|
8
|
+
vehicleName: 'Volkswagen Polo 1.6 Sedan 2011',
|
|
9
|
+
createdById: 'U2R88JRVL',
|
|
10
|
+
createdAt: new Date('2024-05-27T02:26:36.070Z'),
|
|
11
|
+
updatedAt: new Date('2024-05-27T02:26:36.070Z'),
|
|
12
|
+
metadata: {},
|
|
13
|
+
customer: {
|
|
14
|
+
type: 'user',
|
|
15
|
+
name: 'Bubu Ahmad',
|
|
16
|
+
email: 'bubu@gmail.com',
|
|
17
|
+
address: {
|
|
18
|
+
street1: '15-2 Jalan Solaris',
|
|
19
|
+
city: 'Kuala Lumpur',
|
|
20
|
+
state: 'Johor',
|
|
21
|
+
postalCode: '12323',
|
|
22
|
+
country: 'MY'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
fees: {
|
|
26
|
+
subscriptionFee: 800,
|
|
27
|
+
reservationFee: 0,
|
|
28
|
+
startFee: 498,
|
|
29
|
+
deposit: 1600,
|
|
30
|
+
depositMonths: 2,
|
|
31
|
+
extraCharges: [
|
|
32
|
+
{
|
|
33
|
+
type: 'upfront',
|
|
34
|
+
description: 'Spare Tyre',
|
|
35
|
+
amount: 2500.2
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'upfront',
|
|
39
|
+
description: 'Spare Tyre No 2',
|
|
40
|
+
amount: 3000.2
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'monthly',
|
|
44
|
+
description: 'Commitment ',
|
|
45
|
+
amount: 2
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
amountBeforeTax: 8400.4,
|
|
49
|
+
taxAmount: 672.03,
|
|
50
|
+
amountAfterTax: 9072.43,
|
|
51
|
+
gfv: 0,
|
|
52
|
+
cycle: null,
|
|
53
|
+
couponCode: null,
|
|
54
|
+
discountAmount: null,
|
|
55
|
+
appliedDiscountId: null,
|
|
56
|
+
couponType: ''
|
|
57
|
+
},
|
|
58
|
+
quotationPdf: null
|
|
59
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "quotation", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return quotation;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var quotation = {
|
|
12
|
+
id: 'QUO_XZJLVSM8',
|
|
13
|
+
vehicleId: 'VBEXLQR',
|
|
14
|
+
plan: 'plan36',
|
|
15
|
+
mileagePackage: 'lite',
|
|
16
|
+
cycleFluxCoefficient: 'flux25',
|
|
17
|
+
customerName: 'Bubu Ahmad',
|
|
18
|
+
vehicleName: 'Volkswagen Polo 1.6 Sedan 2011',
|
|
19
|
+
createdById: 'U2R88JRVL',
|
|
20
|
+
createdAt: new Date('2024-05-27T02:26:36.070Z'),
|
|
21
|
+
updatedAt: new Date('2024-05-27T02:26:36.070Z'),
|
|
22
|
+
metadata: {},
|
|
23
|
+
customer: {
|
|
24
|
+
type: 'user',
|
|
25
|
+
name: 'Bubu Ahmad',
|
|
26
|
+
email: 'bubu@gmail.com',
|
|
27
|
+
address: {
|
|
28
|
+
street1: '15-2 Jalan Solaris',
|
|
29
|
+
city: 'Kuala Lumpur',
|
|
30
|
+
state: 'Johor',
|
|
31
|
+
postalCode: '12323',
|
|
32
|
+
country: 'MY'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
fees: {
|
|
36
|
+
subscriptionFee: 800,
|
|
37
|
+
reservationFee: 0,
|
|
38
|
+
startFee: 498,
|
|
39
|
+
deposit: 1600,
|
|
40
|
+
depositMonths: 2,
|
|
41
|
+
extraCharges: [
|
|
42
|
+
{
|
|
43
|
+
type: 'upfront',
|
|
44
|
+
description: 'Spare Tyre',
|
|
45
|
+
amount: 2500.2
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: 'upfront',
|
|
49
|
+
description: 'Spare Tyre No 2',
|
|
50
|
+
amount: 3000.2
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'monthly',
|
|
54
|
+
description: 'Commitment ',
|
|
55
|
+
amount: 2
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
amountBeforeTax: 8400.4,
|
|
59
|
+
taxAmount: 672.03,
|
|
60
|
+
amountAfterTax: 9072.43,
|
|
61
|
+
gfv: 0,
|
|
62
|
+
cycle: null,
|
|
63
|
+
couponCode: null,
|
|
64
|
+
discountAmount: null,
|
|
65
|
+
appliedDiscountId: null,
|
|
66
|
+
couponType: ''
|
|
67
|
+
},
|
|
68
|
+
quotationPdf: null
|
|
69
|
+
};
|
package/dist/cjs/debug.js
CHANGED
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
5
|
var _env = require("@driveflux/env");
|
|
6
|
+
var _quotation = require("./__mocks__/quotation.js");
|
|
6
7
|
var _subscription = require("./__mocks__/subscription.js");
|
|
7
8
|
var _index = require("./templates/SubscriptionAgreement/index.js");
|
|
9
|
+
var _index1 = require("./templates/index.js");
|
|
8
10
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
9
11
|
try {
|
|
10
12
|
var info = gen[key](arg);
|
|
@@ -158,9 +160,39 @@ var debugSubscriptionAgreement = function() {
|
|
|
158
160
|
return _ref.apply(this, arguments);
|
|
159
161
|
};
|
|
160
162
|
}();
|
|
163
|
+
var debugQuotation = function() {
|
|
164
|
+
var _ref = _async_to_generator(function() {
|
|
165
|
+
return _ts_generator(this, function(_state) {
|
|
166
|
+
switch(_state.label){
|
|
167
|
+
case 0:
|
|
168
|
+
if (!_quotation.quotation) {
|
|
169
|
+
console.error('no such quotation');
|
|
170
|
+
return [
|
|
171
|
+
2
|
|
172
|
+
];
|
|
173
|
+
}
|
|
174
|
+
return [
|
|
175
|
+
4,
|
|
176
|
+
(0, _index1.generateQuotationPdf)({
|
|
177
|
+
quotation: _quotation.quotation
|
|
178
|
+
}, "".concat(process.cwd(), "/output/quotation.pdf"))
|
|
179
|
+
];
|
|
180
|
+
case 1:
|
|
181
|
+
_state.sent();
|
|
182
|
+
return [
|
|
183
|
+
2
|
|
184
|
+
];
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
return function debugQuotation() {
|
|
189
|
+
return _ref.apply(this, arguments);
|
|
190
|
+
};
|
|
191
|
+
}();
|
|
161
192
|
//! put all the debugging functions here
|
|
162
193
|
var debugCases = [
|
|
163
|
-
debugSubscriptionAgreement()
|
|
194
|
+
debugSubscriptionAgreement(),
|
|
195
|
+
debugQuotation()
|
|
164
196
|
];
|
|
165
197
|
var debug = function() {
|
|
166
198
|
var _ref = _async_to_generator(function() {
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
var _renderer = require("@react-pdf/renderer");
|
|
13
|
+
var _colors = require("../../theme/colors.js");
|
|
14
|
+
var _SectionBoxNew = /*#__PURE__*/ _interop_require_default(require("./SectionBoxNew.js"));
|
|
15
|
+
var _utils = require("./utils.js");
|
|
16
|
+
function _interop_require_default(obj) {
|
|
17
|
+
return obj && obj.__esModule ? obj : {
|
|
18
|
+
default: obj
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
var CustomerSubscriptionSection = function(param) {
|
|
22
|
+
var quotation = param.quotation, t = param.t;
|
|
23
|
+
var displayContent = function(label, value) {
|
|
24
|
+
var labelColor = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _colors.colors.black, valueColor = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : _colors.colors.primary3;
|
|
25
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
26
|
+
style: {
|
|
27
|
+
gap: 4
|
|
28
|
+
},
|
|
29
|
+
children: [
|
|
30
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
31
|
+
style: {
|
|
32
|
+
color: labelColor,
|
|
33
|
+
letterSpacing: 1
|
|
34
|
+
},
|
|
35
|
+
children: label
|
|
36
|
+
}),
|
|
37
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
38
|
+
style: {
|
|
39
|
+
color: valueColor,
|
|
40
|
+
letterSpacing: 1
|
|
41
|
+
},
|
|
42
|
+
children: value
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
|
|
48
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_SectionBoxNew.default, {
|
|
49
|
+
topContent: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
50
|
+
children: [
|
|
51
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
52
|
+
style: {
|
|
53
|
+
textTransform: 'uppercase',
|
|
54
|
+
fontSize: 12,
|
|
55
|
+
fontWeight: 'bold'
|
|
56
|
+
},
|
|
57
|
+
children: t.customer.title
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
60
|
+
style: {
|
|
61
|
+
flexDirection: 'row',
|
|
62
|
+
justifyContent: 'space-between'
|
|
63
|
+
},
|
|
64
|
+
children: [
|
|
65
|
+
displayContent(t.customer.name, quotation.customerName),
|
|
66
|
+
quotation.customer.email && displayContent(t.customer.email, quotation.customer.email)
|
|
67
|
+
]
|
|
68
|
+
}),
|
|
69
|
+
quotation.customer.address && displayContent(t.customer.address, (0, _utils.formatAddress)(quotation.customer.address))
|
|
70
|
+
]
|
|
71
|
+
}),
|
|
72
|
+
bottomContent: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
75
|
+
style: {
|
|
76
|
+
textTransform: 'uppercase',
|
|
77
|
+
fontSize: 12,
|
|
78
|
+
fontWeight: 'bold'
|
|
79
|
+
},
|
|
80
|
+
children: t.subscription.title
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
83
|
+
style: {
|
|
84
|
+
flexDirection: 'row',
|
|
85
|
+
justifyContent: 'space-between',
|
|
86
|
+
gap: 4
|
|
87
|
+
},
|
|
88
|
+
children: [
|
|
89
|
+
displayContent(t.subscription.vehicleName, quotation.vehicleName),
|
|
90
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
91
|
+
style: {
|
|
92
|
+
justifyContent: 'space-between',
|
|
93
|
+
flexDirection: 'row',
|
|
94
|
+
gap: 16
|
|
95
|
+
},
|
|
96
|
+
children: [
|
|
97
|
+
displayContent(t.subscription.plan, (0, _utils.getSimplifiedPlanTranslation)(quotation.plan)),
|
|
98
|
+
displayContent(t.subscription.mileagePackage, (0, _utils.getMileagePackageTranslation)(quotation.mileagePackage))
|
|
99
|
+
]
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
}),
|
|
103
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
104
|
+
style: {
|
|
105
|
+
rowGap: 8
|
|
106
|
+
},
|
|
107
|
+
children: [
|
|
108
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
109
|
+
style: {
|
|
110
|
+
color: _colors.colors.primary3,
|
|
111
|
+
fontWeight: 'bold',
|
|
112
|
+
letterSpacing: 1
|
|
113
|
+
},
|
|
114
|
+
children: t.subIncludes.title
|
|
115
|
+
}),
|
|
116
|
+
t.subIncludes.content.map(function(line, i) {
|
|
117
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
118
|
+
style: {
|
|
119
|
+
flexDirection: 'row',
|
|
120
|
+
alignItems: 'flex-start',
|
|
121
|
+
rowGap: 8
|
|
122
|
+
},
|
|
123
|
+
children: [
|
|
124
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
125
|
+
style: {
|
|
126
|
+
marginRight: 4
|
|
127
|
+
},
|
|
128
|
+
children: "•"
|
|
129
|
+
}),
|
|
130
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
131
|
+
style: {
|
|
132
|
+
color: _colors.colors.primary3,
|
|
133
|
+
letterSpacing: 1
|
|
134
|
+
},
|
|
135
|
+
children: line
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
}, i);
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
var _default = CustomerSubscriptionSection;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
var _formatmoney = require("@driveflux/format-money");
|
|
13
|
+
var _renderer = require("@react-pdf/renderer");
|
|
14
|
+
var _colors = require("../../theme/colors.js");
|
|
15
|
+
var GFV = function(param) {
|
|
16
|
+
var quotation = param.quotation, t = param.t;
|
|
17
|
+
if (!quotation.fees.gfv) return;
|
|
18
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
19
|
+
style: {
|
|
20
|
+
border: "1px solid ".concat(_colors.colors.primary2),
|
|
21
|
+
padding: 16,
|
|
22
|
+
rowGap: 16
|
|
23
|
+
},
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
26
|
+
style: {
|
|
27
|
+
color: _colors.colors.primary3,
|
|
28
|
+
fontWeight: 'bold',
|
|
29
|
+
letterSpacing: 1,
|
|
30
|
+
textTransform: 'uppercase'
|
|
31
|
+
},
|
|
32
|
+
children: t === null || t === void 0 ? void 0 : t.fees.gfv.title
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.Text, {
|
|
35
|
+
style: {
|
|
36
|
+
color: _colors.colors.primary3,
|
|
37
|
+
letterSpacing: 1
|
|
38
|
+
},
|
|
39
|
+
children: [
|
|
40
|
+
"You have the option to purchase this vehicle with GFV amount of",
|
|
41
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.Text, {
|
|
42
|
+
style: {
|
|
43
|
+
fontWeight: 'bold'
|
|
44
|
+
},
|
|
45
|
+
children: [
|
|
46
|
+
" ",
|
|
47
|
+
(0, _formatmoney.formatMoney)(quotation.fees.gfv),
|
|
48
|
+
" "
|
|
49
|
+
]
|
|
50
|
+
}),
|
|
51
|
+
"at the end of your subscription."
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
var _default = GFV;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
var _renderer = require("@react-pdf/renderer");
|
|
13
|
+
var _FluxLogo = /*#__PURE__*/ _interop_require_default(require("../../components/FluxLogo.js"));
|
|
14
|
+
var _colors = require("../../theme/colors.js");
|
|
15
|
+
function _interop_require_default(obj) {
|
|
16
|
+
return obj && obj.__esModule ? obj : {
|
|
17
|
+
default: obj
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
var Header = function(param) {
|
|
21
|
+
var tTitle = param.tTitle, quotationId = param.quotationId, quotationDate = param.quotationDate;
|
|
22
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
23
|
+
style: {
|
|
24
|
+
gap: 24
|
|
25
|
+
},
|
|
26
|
+
children: [
|
|
27
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Link, {
|
|
28
|
+
src: "https://driveflux.com",
|
|
29
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FluxLogo.default, {})
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
32
|
+
style: {
|
|
33
|
+
gap: 4
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
37
|
+
style: {
|
|
38
|
+
fontWeight: 'bold',
|
|
39
|
+
textTransform: 'uppercase',
|
|
40
|
+
fontSize: 18
|
|
41
|
+
},
|
|
42
|
+
children: tTitle
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
45
|
+
style: {
|
|
46
|
+
justifyContent: 'space-between',
|
|
47
|
+
flexDirection: 'row'
|
|
48
|
+
},
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
51
|
+
style: {
|
|
52
|
+
color: _colors.colors.primary3,
|
|
53
|
+
fontSize: 10
|
|
54
|
+
},
|
|
55
|
+
children: quotationId
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
58
|
+
style: {
|
|
59
|
+
gap: 8,
|
|
60
|
+
flexDirection: 'row'
|
|
61
|
+
},
|
|
62
|
+
children: [
|
|
63
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
64
|
+
style: {
|
|
65
|
+
fontSize: 10,
|
|
66
|
+
color: _colors.colors.black
|
|
67
|
+
},
|
|
68
|
+
children: "Date"
|
|
69
|
+
}),
|
|
70
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
71
|
+
style: {
|
|
72
|
+
color: _colors.colors.primary3,
|
|
73
|
+
fontSize: 10
|
|
74
|
+
},
|
|
75
|
+
children: quotationDate
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
var _default = Header;
|