@driveflux/pdf 1.1.8 → 1.1.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/dist/__mocks__/quotation.d.ts.map +1 -1
- package/dist/__mocks__/quotation.js +2 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +10 -2
- package/dist/templates/QuotationPdf/translations.d.ts +1 -0
- package/dist/templates/QuotationPdf/translations.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/translations.js +4 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotation.d.ts","sourceRoot":"","sources":["../../src/__mocks__/quotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"quotation.d.ts","sourceRoot":"","sources":["../../src/__mocks__/quotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,SAAS,EAAE,SA4DvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomerSubscriptionSection.d.ts","sourceRoot":"","sources":["../../../src/templates/QuotationPdf/CustomerSubscriptionSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAOhE,KAAK,KAAK,GAAG;IACZ,SAAS,EAAE,SAAS,CAAA;IACpB,CAAC,EAAE,uBAAuB,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,2BAA2B,EAAE,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"CustomerSubscriptionSection.d.ts","sourceRoot":"","sources":["../../../src/templates/QuotationPdf/CustomerSubscriptionSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAOhE,KAAK,KAAK,GAAG;IACZ,SAAS,EAAE,SAAS,CAAA;IACpB,CAAC,EAAE,uBAAuB,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,2BAA2B,EAAE,EAAE,CAAC,KAAK,CA4H1C,CAAA;AAED,eAAe,2BAA2B,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { Text, View } from '@react-pdf/renderer';
|
|
3
3
|
import { colors } from '../../theme/colors.js';
|
|
4
4
|
import SectionBoxNew from './SectionBoxNew.js';
|
|
5
|
-
import { formatAddress,
|
|
5
|
+
import { formatAddress, getFullMileagePackageTranslation, getSimplifiedPlanTranslation } from './utils.js';
|
|
6
6
|
var CustomerSubscriptionSection = function(param) {
|
|
7
7
|
var quotation = param.quotation, t = param.t;
|
|
8
8
|
var displayContent = function(label, value) {
|
|
@@ -80,7 +80,7 @@ var CustomerSubscriptionSection = function(param) {
|
|
|
80
80
|
},
|
|
81
81
|
children: [
|
|
82
82
|
displayContent(t.subscription.plan, getSimplifiedPlanTranslation(quotation.plan)),
|
|
83
|
-
displayContent(t.subscription.mileagePackage,
|
|
83
|
+
displayContent(t.subscription.mileagePackage, getFullMileagePackageTranslation(quotation.mileagePackage))
|
|
84
84
|
]
|
|
85
85
|
})
|
|
86
86
|
]
|
|
@@ -121,6 +121,14 @@ var CustomerSubscriptionSection = function(param) {
|
|
|
121
121
|
})
|
|
122
122
|
]
|
|
123
123
|
}, i);
|
|
124
|
+
}),
|
|
125
|
+
quotation.mileagePackage !== 'unlimited' && /*#__PURE__*/ _jsx(Text, {
|
|
126
|
+
style: {
|
|
127
|
+
fontSize: '9px',
|
|
128
|
+
color: colors.primary3,
|
|
129
|
+
letterSpacing: 1
|
|
130
|
+
},
|
|
131
|
+
children: t.subIncludes.excessMileage(quotation.fees.excessMileageFee || 0)
|
|
124
132
|
})
|
|
125
133
|
]
|
|
126
134
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/templates/QuotationPdf/translations.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/templates/QuotationPdf/translations.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;uCA6Bc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CtC,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,aAAa,CAAA;AAE1D,eAAO,MAAM,eAAe,WAAY,IAAI,KAAG,uBAK9C,CAAA"}
|
|
@@ -26,7 +26,10 @@ var enTranslation = {
|
|
|
26
26
|
'Theft recovery services',
|
|
27
27
|
'Independently rated vehicle inspection',
|
|
28
28
|
'Option to purchase the vehicle at the end of the subscription'
|
|
29
|
-
]
|
|
29
|
+
],
|
|
30
|
+
excessMileage: function(excessMileage) {
|
|
31
|
+
return "*If usage exceeds chosen mileage package, excess mileage fees for this vehicle is RM".concat(excessMileage, " per KM.");
|
|
32
|
+
}
|
|
30
33
|
},
|
|
31
34
|
pricing: {
|
|
32
35
|
title: 'Pricing',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driveflux/pdf",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@driveflux/db": "1.3.
|
|
15
|
+
"@driveflux/db": "1.3.10",
|
|
16
16
|
"@driveflux/env": "1.1.1",
|
|
17
17
|
"@driveflux/format-money": "5.1.2",
|
|
18
18
|
"@driveflux/time": "4.1.1",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@driveflux/fab": "2.1.2",
|
|
27
27
|
"@driveflux/tsconfig": "1.1.2",
|
|
28
28
|
"@swc/cli": "^0.4.0",
|
|
29
|
-
"@swc/core": "1.7.
|
|
29
|
+
"@swc/core": "1.7.2",
|
|
30
30
|
"@types/node": "^20.14.12",
|
|
31
31
|
"@types/react": "^18.3.3",
|
|
32
32
|
"del-cli": "^5.1.0",
|