@driveflux/pdf 1.6.7 → 1.6.8
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__/subscription.js +380 -122
- package/dist/components/FluxLogo.js +62 -3
- package/dist/components/StandardPage.js +97 -8
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +145 -27
- package/dist/templates/QuotationPdf/GFV.js +49 -12
- package/dist/templates/QuotationPdf/Header.js +63 -5
- package/dist/templates/QuotationPdf/Pricing.js +574 -204
- package/dist/templates/QuotationPdf/QuotationPdfPage.js +23 -3
- package/dist/templates/QuotationPdf/SectionBoxNew.js +34 -4
- package/dist/templates/QuotationPdf/TermsSection.js +42 -5
- package/dist/templates/QuotationPdf/VehiclePhotos.js +54 -24
- package/dist/templates/QuotationPdf/index.js +198 -11
- package/dist/templates/SubscriptionAgreement/Confirmation.js +66 -11
- package/dist/templates/SubscriptionAgreement/CoverPage.js +77 -10
- package/dist/templates/SubscriptionAgreement/CoverPageSection.js +16 -5
- package/dist/templates/SubscriptionAgreement/Details.js +69 -43
- package/dist/templates/SubscriptionAgreement/Footer.js +48 -6
- package/dist/templates/SubscriptionAgreement/Header.js +35 -5
- package/dist/templates/SubscriptionAgreement/LabelValue.js +25 -3
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +26 -3
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js +52 -3
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +97 -9
- package/dist/templates/SubscriptionAgreement/index.js +249 -15
- package/dist/utils.js +166 -16
- package/package.json +2 -2
|
@@ -3,8 +3,28 @@ import { View } from '@react-pdf/renderer';
|
|
|
3
3
|
import { format } from 'date-fns';
|
|
4
4
|
import StandardPage from '../../components/StandardPage.js';
|
|
5
5
|
import Header from './Header.js';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var QuotationPdfPage = function(param) {
|
|
7
|
+
var quotation = param.quotation, children = param.children;
|
|
8
|
+
return /*#__PURE__*/ _jsxs(StandardPage, {
|
|
9
|
+
style: {
|
|
10
|
+
padding: 40,
|
|
11
|
+
fontSize: 10,
|
|
12
|
+
gap: 16
|
|
13
|
+
},
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ _jsx(Header, {
|
|
16
|
+
tTitle: 'Quotation',
|
|
17
|
+
quotationId: quotation.id,
|
|
18
|
+
quotationDate: format(quotation.createdAt, 'dd-MM-yyyy')
|
|
19
|
+
}),
|
|
20
|
+
/*#__PURE__*/ _jsx(View, {
|
|
21
|
+
style: {
|
|
22
|
+
flex: 1,
|
|
23
|
+
rowGap: 24
|
|
24
|
+
},
|
|
25
|
+
children: children
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
});
|
|
8
29
|
};
|
|
9
30
|
export default QuotationPdfPage;
|
|
10
|
-
//# sourceMappingURL=QuotationPdfPage.js.map
|
|
@@ -1,8 +1,38 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { View } from '@react-pdf/renderer';
|
|
3
3
|
import { colors } from '../../theme/colors.js';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var SectionBoxNew = function(param) {
|
|
5
|
+
var topContent = param.topContent, bottomContent = param.bottomContent, children = param.children;
|
|
6
|
+
return /*#__PURE__*/ _jsxs(View, {
|
|
7
|
+
style: {
|
|
8
|
+
border: "1px solid ".concat(colors.primary2)
|
|
9
|
+
},
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(View, {
|
|
12
|
+
style: {
|
|
13
|
+
padding: 16,
|
|
14
|
+
rowGap: 16
|
|
15
|
+
},
|
|
16
|
+
children: topContent
|
|
17
|
+
}),
|
|
18
|
+
bottomContent && /*#__PURE__*/ _jsxs(_Fragment, {
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsx(View, {
|
|
21
|
+
style: {
|
|
22
|
+
borderBottom: "1px solid ".concat(colors.primary2)
|
|
23
|
+
}
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ _jsx(View, {
|
|
26
|
+
style: {
|
|
27
|
+
padding: 16,
|
|
28
|
+
rowGap: 16
|
|
29
|
+
},
|
|
30
|
+
children: bottomContent
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
}),
|
|
34
|
+
children
|
|
35
|
+
]
|
|
36
|
+
});
|
|
6
37
|
};
|
|
7
38
|
export default SectionBoxNew;
|
|
8
|
-
//# sourceMappingURL=SectionBoxNew.js.map
|
|
@@ -1,13 +1,50 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Text, View } from '@react-pdf/renderer';
|
|
3
3
|
import { colors } from '../../theme/colors.js';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var TermsSection = function(param) {
|
|
5
|
+
var t = param.t;
|
|
6
|
+
return /*#__PURE__*/ _jsxs(View, {
|
|
7
|
+
style: {
|
|
8
|
+
gap: 16
|
|
9
|
+
},
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
12
|
+
style: {
|
|
6
13
|
fontWeight: 'bold',
|
|
7
14
|
color: colors.black,
|
|
8
15
|
letterSpacing: 1,
|
|
9
|
-
textTransform: 'uppercase'
|
|
10
|
-
},
|
|
16
|
+
textTransform: 'uppercase'
|
|
17
|
+
},
|
|
18
|
+
children: t === null || t === void 0 ? void 0 : t.title
|
|
19
|
+
}),
|
|
20
|
+
/*#__PURE__*/ _jsx(View, {
|
|
21
|
+
children: t.content.map(function(line, i) {
|
|
22
|
+
return /*#__PURE__*/ _jsxs(View, {
|
|
23
|
+
style: {
|
|
24
|
+
flexDirection: 'row',
|
|
25
|
+
alignItems: 'flex-start'
|
|
26
|
+
},
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
29
|
+
style: {
|
|
30
|
+
marginRight: 4,
|
|
31
|
+
fontSize: 8
|
|
32
|
+
},
|
|
33
|
+
children: "•"
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
36
|
+
style: {
|
|
37
|
+
color: colors.primary3,
|
|
38
|
+
letterSpacing: 1,
|
|
39
|
+
fontSize: 8
|
|
40
|
+
},
|
|
41
|
+
children: line
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
}, line);
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
});
|
|
11
49
|
};
|
|
12
50
|
export default TermsSection;
|
|
13
|
-
//# sourceMappingURL=TermsSection.js.map
|
|
@@ -2,35 +2,65 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { Image, Text, View } from '@react-pdf/renderer';
|
|
3
3
|
import { colors } from '../../theme/colors.js';
|
|
4
4
|
import { getInspectionTypeTranslation } from './utils.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
var VehiclePhotos = function(param) {
|
|
6
|
+
var quotation = param.quotation, t = param.t;
|
|
7
|
+
var images = quotation.images;
|
|
8
|
+
return /*#__PURE__*/ _jsxs(View, {
|
|
9
|
+
style: {
|
|
10
|
+
border: "1px solid ".concat(colors.primary2),
|
|
11
|
+
padding: 16
|
|
12
|
+
},
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
15
|
+
style: {
|
|
8
16
|
textTransform: 'uppercase',
|
|
9
17
|
fontSize: 12,
|
|
10
18
|
fontWeight: 'bold',
|
|
11
|
-
marginBottom: 16
|
|
12
|
-
},
|
|
19
|
+
marginBottom: 16
|
|
20
|
+
},
|
|
21
|
+
children: t === null || t === void 0 ? void 0 : t.title
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx(View, {
|
|
24
|
+
style: {
|
|
13
25
|
display: 'flex',
|
|
14
26
|
flexDirection: 'row',
|
|
15
27
|
flexWrap: 'wrap',
|
|
16
|
-
gap: 15
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
gap: 15
|
|
29
|
+
},
|
|
30
|
+
children: images.map(function(image) {
|
|
31
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
32
|
+
children: /*#__PURE__*/ _jsxs(View, {
|
|
33
|
+
style: {
|
|
34
|
+
overflow: 'hidden',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
gap: 4
|
|
37
|
+
},
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ _jsx(View, {
|
|
40
|
+
children: /*#__PURE__*/ _jsx(Image, {
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
source: image.default,
|
|
43
|
+
style: {
|
|
44
|
+
objectFit: 'cover',
|
|
45
|
+
height: 90,
|
|
46
|
+
width: 150
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
}),
|
|
50
|
+
image.inspectionType && /*#__PURE__*/ _jsx(Text, {
|
|
51
|
+
style: {
|
|
52
|
+
color: colors.black,
|
|
53
|
+
fontSize: 10,
|
|
54
|
+
textAlign: 'center'
|
|
55
|
+
},
|
|
56
|
+
children: getInspectionTypeTranslation(image.inspectionType)
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
}, image.default)
|
|
60
|
+
});
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
});
|
|
34
65
|
};
|
|
35
66
|
export default VehiclePhotos;
|
|
36
|
-
//# sourceMappingURL=VehiclePhotos.js.map
|
|
@@ -1,3 +1,127 @@
|
|
|
1
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2
|
+
try {
|
|
3
|
+
var info = gen[key](arg);
|
|
4
|
+
var value = info.value;
|
|
5
|
+
} catch (error) {
|
|
6
|
+
reject(error);
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (info.done) {
|
|
10
|
+
resolve(value);
|
|
11
|
+
} else {
|
|
12
|
+
Promise.resolve(value).then(_next, _throw);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function _async_to_generator(fn) {
|
|
16
|
+
return function() {
|
|
17
|
+
var self = this, args = arguments;
|
|
18
|
+
return new Promise(function(resolve, reject) {
|
|
19
|
+
var gen = fn.apply(self, args);
|
|
20
|
+
function _next(value) {
|
|
21
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
22
|
+
}
|
|
23
|
+
function _throw(err) {
|
|
24
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
25
|
+
}
|
|
26
|
+
_next(undefined);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function _ts_generator(thisArg, body) {
|
|
31
|
+
var f, y, t, g, _ = {
|
|
32
|
+
label: 0,
|
|
33
|
+
sent: function() {
|
|
34
|
+
if (t[0] & 1) throw t[1];
|
|
35
|
+
return t[1];
|
|
36
|
+
},
|
|
37
|
+
trys: [],
|
|
38
|
+
ops: []
|
|
39
|
+
};
|
|
40
|
+
return g = {
|
|
41
|
+
next: verb(0),
|
|
42
|
+
"throw": verb(1),
|
|
43
|
+
"return": verb(2)
|
|
44
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
45
|
+
return this;
|
|
46
|
+
}), g;
|
|
47
|
+
function verb(n) {
|
|
48
|
+
return function(v) {
|
|
49
|
+
return step([
|
|
50
|
+
n,
|
|
51
|
+
v
|
|
52
|
+
]);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function step(op) {
|
|
56
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
57
|
+
while(_)try {
|
|
58
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
59
|
+
if (y = 0, t) op = [
|
|
60
|
+
op[0] & 2,
|
|
61
|
+
t.value
|
|
62
|
+
];
|
|
63
|
+
switch(op[0]){
|
|
64
|
+
case 0:
|
|
65
|
+
case 1:
|
|
66
|
+
t = op;
|
|
67
|
+
break;
|
|
68
|
+
case 4:
|
|
69
|
+
_.label++;
|
|
70
|
+
return {
|
|
71
|
+
value: op[1],
|
|
72
|
+
done: false
|
|
73
|
+
};
|
|
74
|
+
case 5:
|
|
75
|
+
_.label++;
|
|
76
|
+
y = op[1];
|
|
77
|
+
op = [
|
|
78
|
+
0
|
|
79
|
+
];
|
|
80
|
+
continue;
|
|
81
|
+
case 7:
|
|
82
|
+
op = _.ops.pop();
|
|
83
|
+
_.trys.pop();
|
|
84
|
+
continue;
|
|
85
|
+
default:
|
|
86
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
87
|
+
_ = 0;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
91
|
+
_.label = op[1];
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
95
|
+
_.label = t[1];
|
|
96
|
+
t = op;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
if (t && _.label < t[2]) {
|
|
100
|
+
_.label = t[2];
|
|
101
|
+
_.ops.push(op);
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
if (t[2]) _.ops.pop();
|
|
105
|
+
_.trys.pop();
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
op = body.call(thisArg, _);
|
|
109
|
+
} catch (e) {
|
|
110
|
+
op = [
|
|
111
|
+
6,
|
|
112
|
+
e
|
|
113
|
+
];
|
|
114
|
+
y = 0;
|
|
115
|
+
} finally{
|
|
116
|
+
f = t = 0;
|
|
117
|
+
}
|
|
118
|
+
if (op[0] & 5) throw op[1];
|
|
119
|
+
return {
|
|
120
|
+
value: op[0] ? op[1] : void 0,
|
|
121
|
+
done: true
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
1
125
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
126
|
import { Document } from '@react-pdf/renderer';
|
|
3
127
|
import { useMemo } from 'react';
|
|
@@ -10,18 +134,81 @@ import QuotationPdfPage from './QuotationPdfPage.js';
|
|
|
10
134
|
import TermsSection from './TermsSection.js';
|
|
11
135
|
import VehiclePhotos from './VehiclePhotos.js';
|
|
12
136
|
import { useTranslations } from './translations.js';
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
137
|
+
export var generateQuotationPdf = /*#__PURE__*/ function() {
|
|
138
|
+
var _ref = _async_to_generator(function(param, fileName) {
|
|
139
|
+
var _param_locale, locale, quotation;
|
|
140
|
+
return _ts_generator(this, function(_state) {
|
|
141
|
+
switch(_state.label){
|
|
142
|
+
case 0:
|
|
143
|
+
_param_locale = param.locale, locale = _param_locale === void 0 ? 'en' : _param_locale, quotation = param.quotation;
|
|
144
|
+
return [
|
|
145
|
+
4,
|
|
146
|
+
toPdf(/*#__PURE__*/ _jsx(QuotationPDF, {
|
|
147
|
+
locale: locale,
|
|
148
|
+
quotation: quotation
|
|
149
|
+
}), fileName)
|
|
150
|
+
];
|
|
151
|
+
case 1:
|
|
152
|
+
return [
|
|
153
|
+
2,
|
|
154
|
+
_state.sent()
|
|
155
|
+
];
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
return function generateQuotationPdf(_, fileName) {
|
|
160
|
+
return _ref.apply(this, arguments);
|
|
161
|
+
};
|
|
162
|
+
}();
|
|
163
|
+
var QuotationPDF = function(param) {
|
|
164
|
+
var _param_locale = param.locale, locale = _param_locale === void 0 ? 'en' : _param_locale, quotation = param.quotation;
|
|
165
|
+
var th = useTranslations(locale);
|
|
166
|
+
var pageProps = useMemo(function() {
|
|
19
167
|
return {
|
|
20
168
|
t: th,
|
|
21
|
-
quotation: quotation
|
|
169
|
+
quotation: quotation
|
|
22
170
|
};
|
|
23
|
-
}, [
|
|
24
|
-
|
|
25
|
-
|
|
171
|
+
}, [
|
|
172
|
+
th,
|
|
173
|
+
quotation
|
|
174
|
+
]);
|
|
175
|
+
var t = pageProps.t;
|
|
176
|
+
return /*#__PURE__*/ _jsxs(Document, {
|
|
177
|
+
language: locale,
|
|
178
|
+
children: [
|
|
179
|
+
/*#__PURE__*/ _jsxs(QuotationPdfPage, {
|
|
180
|
+
quotation: quotation,
|
|
181
|
+
children: [
|
|
182
|
+
/*#__PURE__*/ _jsx(CustomerSubscriptionSection, {
|
|
183
|
+
quotation: quotation,
|
|
184
|
+
t: t
|
|
185
|
+
}),
|
|
186
|
+
/*#__PURE__*/ _jsx(Pricing, {
|
|
187
|
+
quotation: quotation,
|
|
188
|
+
t: t.pricing
|
|
189
|
+
}),
|
|
190
|
+
quotation.fees.gfv && /*#__PURE__*/ _jsx(GFV, {
|
|
191
|
+
quotation: quotation,
|
|
192
|
+
t: t.pricing
|
|
193
|
+
})
|
|
194
|
+
]
|
|
195
|
+
}),
|
|
196
|
+
/*#__PURE__*/ _jsxs(StandardPage, {
|
|
197
|
+
style: {
|
|
198
|
+
padding: 40,
|
|
199
|
+
fontSize: 10,
|
|
200
|
+
gap: 16
|
|
201
|
+
},
|
|
202
|
+
children: [
|
|
203
|
+
/*#__PURE__*/ _jsx(VehiclePhotos, {
|
|
204
|
+
quotation: quotation,
|
|
205
|
+
t: t.vehiclePhotos
|
|
206
|
+
}),
|
|
207
|
+
/*#__PURE__*/ _jsx(TermsSection, {
|
|
208
|
+
t: t.terms
|
|
209
|
+
})
|
|
210
|
+
]
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
});
|
|
26
214
|
};
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -4,22 +4,77 @@ import { Image, Text, View } from '@react-pdf/renderer';
|
|
|
4
4
|
import { format } from 'date-fns';
|
|
5
5
|
import { colors } from '../../theme/index.js';
|
|
6
6
|
import LabelValue from './LabelValue.js';
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
var Confirmation = function(param) {
|
|
8
|
+
var tConfirmation = param.tConfirmation, subscription = param.subscription;
|
|
9
|
+
var _subscription_signature, _subscription_user_identification;
|
|
10
|
+
if (!((_subscription_signature = subscription.signature) === null || _subscription_signature === void 0 ? void 0 : _subscription_signature.signature)) {
|
|
9
11
|
throw new Error('Missing signature');
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
return
|
|
13
|
+
var border = "1px solid ".concat(colors.primary2);
|
|
14
|
+
return /*#__PURE__*/ _jsxs(View, {
|
|
15
|
+
style: {
|
|
16
|
+
borderLeft: border,
|
|
17
|
+
borderRight: border,
|
|
18
|
+
borderBottom: border
|
|
19
|
+
},
|
|
20
|
+
children: [
|
|
21
|
+
/*#__PURE__*/ _jsx(View, {
|
|
22
|
+
style: {
|
|
13
23
|
backgroundColor: colors.primary1,
|
|
14
24
|
borderTop: border,
|
|
15
|
-
padding: 8
|
|
16
|
-
},
|
|
25
|
+
padding: 8
|
|
26
|
+
},
|
|
27
|
+
children: /*#__PURE__*/ _jsx(Text, {
|
|
28
|
+
style: {
|
|
17
29
|
fontWeight: 'bold',
|
|
18
30
|
textTransform: 'uppercase',
|
|
19
|
-
letterSpacing: 1
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
31
|
+
letterSpacing: 1
|
|
32
|
+
},
|
|
33
|
+
children: tConfirmation.title
|
|
34
|
+
})
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ _jsxs(View, {
|
|
37
|
+
style: {
|
|
38
|
+
padding: 8,
|
|
39
|
+
paddingBottom: 16,
|
|
40
|
+
rowGap: 8,
|
|
41
|
+
borderTop: border
|
|
42
|
+
},
|
|
43
|
+
children: [
|
|
44
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
45
|
+
children: tConfirmation.agreementText(subscription.businessId ? 'business' : 'member')
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ _jsx(View, {
|
|
48
|
+
style: {
|
|
49
|
+
height: 160,
|
|
50
|
+
alignItems: 'flex-start'
|
|
51
|
+
},
|
|
52
|
+
children: /*#__PURE__*/ _jsx(Image, {
|
|
53
|
+
src: subscription.signature.signature
|
|
54
|
+
})
|
|
55
|
+
}),
|
|
56
|
+
/*#__PURE__*/ _jsxs(View, {
|
|
57
|
+
style: {
|
|
58
|
+
rowGap: 8
|
|
59
|
+
},
|
|
60
|
+
children: [
|
|
61
|
+
/*#__PURE__*/ _jsx(LabelValue, {
|
|
62
|
+
label: tConfirmation.name,
|
|
63
|
+
value: userName(subscription.user)
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ _jsx(LabelValue, {
|
|
66
|
+
label: tConfirmation.idOrPassportNo,
|
|
67
|
+
value: (_subscription_user_identification = subscription.user.identification) === null || _subscription_user_identification === void 0 ? void 0 : _subscription_user_identification.number
|
|
68
|
+
}),
|
|
69
|
+
/*#__PURE__*/ _jsx(LabelValue, {
|
|
70
|
+
label: tConfirmation.date,
|
|
71
|
+
value: subscription.signature.signedAt ? format(subscription.signature.signedAt, 'dd-MM-yyyy hh:mm a') : undefined
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
});
|
|
23
79
|
};
|
|
24
80
|
export default Confirmation;
|
|
25
|
-
//# sourceMappingURL=Confirmation.js.map
|
|
@@ -5,24 +5,91 @@ import { format } from 'date-fns';
|
|
|
5
5
|
import { colors } from '../../theme/colors.js';
|
|
6
6
|
import CoverPageSection from './CoverPageSection.js';
|
|
7
7
|
import LabelValue from './LabelValue.js';
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
var CoverPage = function(param) {
|
|
9
|
+
var tTitle = param.tTitle, tCover = param.tCover, signedAt = param.signedAt, user = param.user;
|
|
10
|
+
var _user_identification;
|
|
11
|
+
return /*#__PURE__*/ _jsxs(View, {
|
|
12
|
+
style: {
|
|
13
|
+
flex: 1,
|
|
14
|
+
paddingVertical: 80,
|
|
15
|
+
justifyContent: 'space-between'
|
|
16
|
+
},
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
19
|
+
style: {
|
|
10
20
|
fontWeight: 'bold',
|
|
11
21
|
fontSize: 40,
|
|
12
22
|
textTransform: 'uppercase',
|
|
13
|
-
flex: 1
|
|
14
|
-
},
|
|
23
|
+
flex: 1
|
|
24
|
+
},
|
|
25
|
+
children: tTitle
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ _jsxs(View, {
|
|
28
|
+
style: {
|
|
15
29
|
padding: 16,
|
|
16
30
|
rowGap: 32,
|
|
17
|
-
border:
|
|
18
|
-
fontSize: 10
|
|
19
|
-
},
|
|
31
|
+
border: "1px solid ".concat(colors.primary2),
|
|
32
|
+
fontSize: 10
|
|
33
|
+
},
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ _jsx(CoverPageSection, {
|
|
36
|
+
title: tCover.effectiveDate,
|
|
37
|
+
children: /*#__PURE__*/ _jsxs(View, {
|
|
38
|
+
style: {
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
columnGap: 4
|
|
41
|
+
},
|
|
42
|
+
children: [
|
|
43
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
44
|
+
style: {
|
|
45
|
+
textDecoration: 'underline'
|
|
46
|
+
},
|
|
47
|
+
children: format(signedAt, 'do')
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
50
|
+
children: tCover.of
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
53
|
+
style: {
|
|
54
|
+
textDecoration: 'underline'
|
|
55
|
+
},
|
|
56
|
+
children: format(signedAt, 'MMM')
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
59
|
+
children: format(signedAt, 'yyyy')
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
})
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ _jsxs(CoverPageSection, {
|
|
65
|
+
title: tCover.agreementBetween,
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ _jsx(LabelValue, {
|
|
68
|
+
label: tCover.name,
|
|
69
|
+
value: userName(user)
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ _jsx(LabelValue, {
|
|
72
|
+
label: tCover.idOrPassportNo,
|
|
73
|
+
value: (_user_identification = user.identification) === null || _user_identification === void 0 ? void 0 : _user_identification.number
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}),
|
|
77
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
78
|
+
style: {
|
|
20
79
|
fontSize: 8,
|
|
21
80
|
fontWeight: 'bold',
|
|
22
81
|
color: colors.primary3,
|
|
23
82
|
textTransform: 'uppercase',
|
|
24
|
-
letterSpacing: 1
|
|
25
|
-
},
|
|
83
|
+
letterSpacing: 1
|
|
84
|
+
},
|
|
85
|
+
children: tCover.and
|
|
86
|
+
}),
|
|
87
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
88
|
+
children: "FLUX Sdn Bhd (1264766-H)"
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
});
|
|
26
94
|
};
|
|
27
95
|
export default CoverPage;
|
|
28
|
-
//# sourceMappingURL=CoverPage.js.map
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Text, View } from '@react-pdf/renderer';
|
|
3
3
|
import { colors } from '../../theme/colors.js';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var CoverPageSection = function(param) {
|
|
5
|
+
var title = param.title, children = param.children;
|
|
6
|
+
return /*#__PURE__*/ _jsxs(View, {
|
|
7
|
+
style: {
|
|
8
|
+
rowGap: 16
|
|
9
|
+
},
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
12
|
+
style: {
|
|
6
13
|
fontSize: 8,
|
|
7
14
|
fontWeight: 'bold',
|
|
8
15
|
color: colors.primary3,
|
|
9
16
|
textTransform: 'uppercase',
|
|
10
|
-
letterSpacing: 1
|
|
11
|
-
},
|
|
17
|
+
letterSpacing: 1
|
|
18
|
+
},
|
|
19
|
+
children: "".concat(title, ":")
|
|
20
|
+
}),
|
|
21
|
+
children
|
|
22
|
+
]
|
|
23
|
+
});
|
|
12
24
|
};
|
|
13
25
|
export default CoverPageSection;
|
|
14
|
-
//# sourceMappingURL=CoverPageSection.js.map
|