@driveflux/pdf 1.6.65 → 1.6.67

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.
Files changed (49) hide show
  1. package/dist/__mocks__/quotation.js +10 -11
  2. package/dist/__mocks__/subscription.js +381 -123
  3. package/dist/__mocks__/tou.js +9 -10
  4. package/dist/components/FluxLogo.js +62 -3
  5. package/dist/components/StandardPage.js +97 -8
  6. package/dist/debug.js +221 -29
  7. package/dist/index.js +0 -1
  8. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +145 -27
  9. package/dist/templates/QuotationPdf/GFV.js +49 -12
  10. package/dist/templates/QuotationPdf/Header.js +63 -5
  11. package/dist/templates/QuotationPdf/Pricing.js +573 -201
  12. package/dist/templates/QuotationPdf/QuotationPdfPage.js +23 -3
  13. package/dist/templates/QuotationPdf/SectionBoxNew.js +34 -4
  14. package/dist/templates/QuotationPdf/TermsSection.js +42 -5
  15. package/dist/templates/QuotationPdf/VehiclePhotos.js +54 -24
  16. package/dist/templates/QuotationPdf/index.js +198 -11
  17. package/dist/templates/QuotationPdf/translations.js +34 -22
  18. package/dist/templates/QuotationPdf/utils.js +59 -29
  19. package/dist/templates/SubscriptionAgreement/Confirmation.js +65 -10
  20. package/dist/templates/SubscriptionAgreement/CoverPage.d.ts +3 -1
  21. package/dist/templates/SubscriptionAgreement/CoverPage.d.ts.map +1 -1
  22. package/dist/templates/SubscriptionAgreement/CoverPage.js +3 -3
  23. package/dist/templates/SubscriptionAgreement/CoverPage.js.map +1 -1
  24. package/dist/templates/SubscriptionAgreement/CoverPageSection.js +16 -5
  25. package/dist/templates/SubscriptionAgreement/Details.d.ts.map +1 -1
  26. package/dist/templates/SubscriptionAgreement/Details.js +19 -3
  27. package/dist/templates/SubscriptionAgreement/Details.js.map +1 -1
  28. package/dist/templates/SubscriptionAgreement/Footer.js +48 -6
  29. package/dist/templates/SubscriptionAgreement/Header.js +35 -5
  30. package/dist/templates/SubscriptionAgreement/LabelValue.js +25 -3
  31. package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +26 -3
  32. package/dist/templates/SubscriptionAgreement/TermsOfUse.js +92 -10
  33. package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +97 -9
  34. package/dist/templates/SubscriptionAgreement/index.js +2 -1
  35. package/dist/templates/SubscriptionAgreement/index.js.map +1 -1
  36. package/dist/templates/SubscriptionAgreement/translations.d.ts +6 -0
  37. package/dist/templates/SubscriptionAgreement/translations.d.ts.map +1 -1
  38. package/dist/templates/SubscriptionAgreement/translations.js +6 -0
  39. package/dist/templates/SubscriptionAgreement/translations.js.map +1 -1
  40. package/dist/templates/SubscriptionAgreement/types.d.ts +2 -1
  41. package/dist/templates/SubscriptionAgreement/types.d.ts.map +1 -1
  42. package/dist/templates/SubscriptionAgreement/utils.js +3 -5
  43. package/dist/templates/index.js +0 -1
  44. package/dist/theme/colors.js +44 -63
  45. package/dist/theme/index.js +0 -1
  46. package/dist/types.js +1 -2
  47. package/dist/utils.js +166 -16
  48. package/dist/watch.js +3 -4
  49. package/package.json +2 -2
@@ -1,13 +1,44 @@
1
+ function _object_without_properties(source, excluded) {
2
+ if (source == null) return {};
3
+ var target = _object_without_properties_loose(source, excluded);
4
+ var key, i;
5
+ if (Object.getOwnPropertySymbols) {
6
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
7
+ for(i = 0; i < sourceSymbolKeys.length; i++){
8
+ key = sourceSymbolKeys[i];
9
+ if (excluded.indexOf(key) >= 0) continue;
10
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
11
+ target[key] = source[key];
12
+ }
13
+ }
14
+ return target;
15
+ }
16
+ function _object_without_properties_loose(source, excluded) {
17
+ if (source == null) return {};
18
+ var target = {};
19
+ var sourceKeys = Object.keys(source);
20
+ var key, i;
21
+ for(i = 0; i < sourceKeys.length; i++){
22
+ key = sourceKeys[i];
23
+ if (excluded.indexOf(key) >= 0) continue;
24
+ target[key] = source[key];
25
+ }
26
+ return target;
27
+ }
1
28
  import { formatMoney } from '@driveflux/format-money';
2
- export const formatAddress = (originalAddress) => {
3
- const { coordinates, metadata, ...address } = originalAddress;
4
- return Object.keys(address)
5
- .filter((key) => key !== 'name' && !!address[key])
6
- .map((a) => address[a])
7
- .join(', ');
29
+ export var formatAddress = function(originalAddress) {
30
+ var coordinates = originalAddress.coordinates, metadata = originalAddress.metadata, address = _object_without_properties(originalAddress, [
31
+ "coordinates",
32
+ "metadata"
33
+ ]);
34
+ return Object.keys(address).filter(function(key) {
35
+ return key !== 'name' && !!address[key];
36
+ }).map(function(a) {
37
+ return address[a];
38
+ }).join(', ');
8
39
  };
9
- export const getSimplifiedPlanTranslation = (plan) => {
10
- switch (plan) {
40
+ export var getSimplifiedPlanTranslation = function(plan) {
41
+ switch(plan){
11
42
  case 'plan60':
12
43
  return '60 Months';
13
44
  case 'plan36':
@@ -24,8 +55,8 @@ export const getSimplifiedPlanTranslation = (plan) => {
24
55
  return 'Unknown Plan';
25
56
  }
26
57
  };
27
- export const getMileagePackageTranslation = (mileagePackage) => {
28
- switch (mileagePackage) {
58
+ export var getMileagePackageTranslation = function(mileagePackage) {
59
+ switch(mileagePackage){
29
60
  case 'lite':
30
61
  return 'Lite';
31
62
  case 'standard':
@@ -38,8 +69,8 @@ export const getMileagePackageTranslation = (mileagePackage) => {
38
69
  return 'Unknown Mileage Package';
39
70
  }
40
71
  };
41
- export const getFullMileagePackageTranslation = (plan) => {
42
- switch (plan) {
72
+ export var getFullMileagePackageTranslation = function(plan) {
73
+ switch(plan){
43
74
  case 'lite':
44
75
  return 'Lite - 1,250KM';
45
76
  case 'standard':
@@ -52,25 +83,25 @@ export const getFullMileagePackageTranslation = (plan) => {
52
83
  return 'Unknown Mileage Package';
53
84
  }
54
85
  };
55
- export const getPromoNotes = (amount, discount) => {
56
- const { discountType, discountValue, maxRedemptions } = discount;
57
- switch (discountType) {
86
+ export var getPromoNotes = function(amount, discount) {
87
+ var discountType = discount.discountType, discountValue = discount.discountValue, maxRedemptions = discount.maxRedemptions;
88
+ switch(discountType){
58
89
  case 'percentage':
59
- return `Enjoy ${discountValue * 100}% off for ${maxRedemptions} month(s) for this vehicle.`;
60
- case 'fixed': {
61
- const money = formatMoney(discountValue);
62
- return amount <= 0
63
- ? `Enjoy free for ${maxRedemptions} month(s).`
64
- : `Enjoy ${money} off for the first ${maxRedemptions} month(s), then your subscription will switch to the regular price.`;
65
- }
66
- case 'forceAmount': {
67
- const money = formatMoney(Math.min(amount, discountValue));
68
- return `Enjoy only ${money} for ${maxRedemptions} month(s), then your subscription will switch to the regular price.`;
69
- }
90
+ return "Enjoy ".concat(discountValue * 100, "% off for ").concat(maxRedemptions, " month(s) for this vehicle.");
91
+ case 'fixed':
92
+ {
93
+ var money = formatMoney(discountValue);
94
+ return amount <= 0 ? "Enjoy free for ".concat(maxRedemptions, " month(s).") : "Enjoy ".concat(money, " off for the first ").concat(maxRedemptions, " month(s), then your subscription will switch to the regular price.");
95
+ }
96
+ case 'forceAmount':
97
+ {
98
+ var money1 = formatMoney(Math.min(amount, discountValue));
99
+ return "Enjoy only ".concat(money1, " for ").concat(maxRedemptions, " month(s), then your subscription will switch to the regular price.");
100
+ }
70
101
  }
71
102
  };
72
- export const getInspectionTypeTranslation = (inspectionType) => {
73
- switch (inspectionType) {
103
+ export var getInspectionTypeTranslation = function(inspectionType) {
104
+ switch(inspectionType){
74
105
  case 'exterior':
75
106
  return 'Exterior';
76
107
  case 'interior':
@@ -85,4 +116,3 @@ export const getInspectionTypeTranslation = (inspectionType) => {
85
116
  return inspectionType;
86
117
  }
87
118
  };
88
- //# sourceMappingURL=utils.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
- const Confirmation = ({ tConfirmation, subscription, signature, }) => {
7
+ var Confirmation = function(param) {
8
+ var tConfirmation = param.tConfirmation, subscription = param.subscription, signature = param.signature;
9
+ var _subscription_user_identification;
8
10
  if (!signature.signature) {
9
11
  throw new Error('Missing signature');
10
12
  }
11
- const border = `1px solid ${colors.primary2}`;
12
- return (_jsxs(View, { style: { borderLeft: border, borderRight: border, borderBottom: border }, children: [_jsx(View, { style: {
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
- }, children: _jsx(Text, { style: {
25
+ padding: 8
26
+ },
27
+ children: /*#__PURE__*/ _jsx(Text, {
28
+ style: {
17
29
  fontWeight: 'bold',
18
30
  textTransform: 'uppercase',
19
- letterSpacing: 1,
20
- }, children: tConfirmation.title }) }), _jsxs(View, { style: { padding: 8, paddingBottom: 16, rowGap: 8, borderTop: border }, children: [_jsx(Text, { children: tConfirmation.agreementText(subscription.businessId ? 'business' : 'member') }), _jsx(View, { style: { height: 160, alignItems: 'flex-start' }, children: _jsx(Image, { src: signature.signature || '' }) }), _jsxs(View, { style: { rowGap: 8 }, children: [_jsx(LabelValue, { label: tConfirmation.name, value: userName(subscription.user) }), _jsx(LabelValue, { label: tConfirmation.idOrPassportNo, value: subscription.user.identification?.number }), _jsx(LabelValue, { label: tConfirmation.date, value: signature.signedAt
21
- ? format(signature.signedAt, 'dd-MM-yyyy hh:mm a')
22
- : undefined })] })] })] }));
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: 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: signature.signedAt ? format(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
@@ -1,4 +1,4 @@
1
- import type { User } from '@driveflux/db';
1
+ import type { Business, PayerType, User } from '@driveflux/db';
2
2
  import type { FC } from 'react';
3
3
  import type { SubscriptionAgreementTranslation } from './translations.js';
4
4
  type Props = {
@@ -6,6 +6,8 @@ type Props = {
6
6
  tCover: SubscriptionAgreementTranslation['cover'];
7
7
  signedAt: Date;
8
8
  user: User;
9
+ payerType: PayerType;
10
+ business?: Business;
9
11
  };
10
12
  declare const CoverPage: FC<Props>;
11
13
  export default CoverPage;
@@ -1 +1 @@
1
- {"version":3,"file":"CoverPage.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/CoverPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAIzC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAI/B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAA;AAEzE,KAAK,KAAK,GAAG;IACZ,MAAM,EAAE,gCAAgC,CAAC,OAAO,CAAC,CAAA;IACjD,MAAM,EAAE,gCAAgC,CAAC,OAAO,CAAC,CAAA;IACjD,QAAQ,EAAE,IAAI,CAAA;IACd,IAAI,EAAE,IAAI,CAAA;CACV,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,KAAK,CAyDxB,CAAA;AAED,eAAe,SAAS,CAAA"}
1
+ {"version":3,"file":"CoverPage.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/CoverPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAI9D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAI/B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAA;AAEzE,KAAK,KAAK,GAAG;IACZ,MAAM,EAAE,gCAAgC,CAAC,OAAO,CAAC,CAAA;IACjD,MAAM,EAAE,gCAAgC,CAAC,OAAO,CAAC,CAAA;IACjD,QAAQ,EAAE,IAAI,CAAA;IACd,IAAI,EAAE,IAAI,CAAA;IACV,SAAS,EAAE,SAAS,CAAA;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,KAAK,CA6ExB,CAAA;AAED,eAAe,SAAS,CAAA"}
@@ -1,11 +1,11 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { userName } from '@driveflux/db/models/user';
3
3
  import { Text, View } from '@react-pdf/renderer';
4
4
  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
- const CoverPage = ({ tTitle, tCover, signedAt, user }) => {
8
+ const CoverPage = ({ tTitle, tCover, signedAt, user, payerType, business, }) => {
9
9
  return (_jsxs(View, { style: { flex: 1, paddingVertical: 80, justifyContent: 'space-between' }, children: [_jsx(Text, { style: {
10
10
  fontWeight: 'bold',
11
11
  fontSize: 40,
@@ -16,7 +16,7 @@ const CoverPage = ({ tTitle, tCover, signedAt, user }) => {
16
16
  rowGap: 32,
17
17
  border: `1px solid ${colors.primary2}`,
18
18
  fontSize: 10,
19
- }, children: [_jsx(CoverPageSection, { title: tCover.effectiveDate, children: _jsxs(View, { style: { flexDirection: 'row', columnGap: 4 }, children: [_jsx(Text, { style: { textDecoration: 'underline' }, children: format(signedAt, 'do') }), _jsx(Text, { children: tCover.of }), _jsx(Text, { style: { textDecoration: 'underline' }, children: format(signedAt, 'MMM') }), _jsx(Text, { children: format(signedAt, 'yyyy') })] }) }), _jsxs(CoverPageSection, { title: tCover.agreementBetween, children: [_jsx(LabelValue, { label: tCover.name, value: userName(user) }), _jsx(LabelValue, { label: tCover.idOrPassportNo, value: user.identification?.number })] }), _jsx(Text, { style: {
19
+ }, children: [_jsx(CoverPageSection, { title: tCover.effectiveDate, children: _jsxs(View, { style: { flexDirection: 'row', columnGap: 4 }, children: [_jsx(Text, { style: { textDecoration: 'underline' }, children: format(signedAt, 'do') }), _jsx(Text, { children: tCover.of }), _jsx(Text, { style: { textDecoration: 'underline' }, children: format(signedAt, 'MMM') }), _jsx(Text, { children: format(signedAt, 'yyyy') })] }) }), _jsxs(CoverPageSection, { title: tCover.agreementBetween, children: [payerType === 'business' && (_jsxs(_Fragment, { children: [_jsx(LabelValue, { label: tCover.companyName, value: business?.name }), _jsx(LabelValue, { label: tCover.companyNo, value: business?.registrationNumber })] })), payerType === 'user' && (_jsxs(_Fragment, { children: [_jsx(LabelValue, { label: tCover.name, value: userName(user) }), _jsx(LabelValue, { label: tCover.idOrPassportNo, value: user.identification?.number })] }))] }), _jsx(Text, { style: {
20
20
  fontSize: 8,
21
21
  fontWeight: 'bold',
22
22
  color: colors.primary3,
@@ -1 +1 @@
1
- {"version":3,"file":"CoverPage.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/CoverPage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAUxC,MAAM,SAAS,GAAc,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE;IACnE,OAAO,CACN,MAAC,IAAI,IACJ,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE,aAExE,KAAC,IAAI,IACJ,KAAK,EAAE;oBACN,UAAU,EAAE,MAAM;oBAClB,QAAQ,EAAE,EAAE;oBACZ,aAAa,EAAE,WAAW;oBAC1B,IAAI,EAAE,CAAC;iBACP,YAEA,MAAM,GACD,EACP,MAAC,IAAI,IACJ,KAAK,EAAE;oBACN,OAAO,EAAE,EAAE;oBACX,MAAM,EAAE,EAAE;oBACV,MAAM,EAAE,aAAa,MAAM,CAAC,QAAQ,EAAE;oBACtC,QAAQ,EAAE,EAAE;iBACZ,aAED,KAAC,gBAAgB,IAAC,KAAK,EAAE,MAAM,CAAC,aAAa,YAC5C,MAAC,IAAI,IAAC,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,aAClD,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,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EAAE,MAAM,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAI,EAChE,KAAC,UAAU,IACV,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,KAAK,EAAE,QAAQ,EAAE,kBAAkB,GAClC,IACA,CACH,EACA,SAAS,KAAK,MAAM,IAAI,CACxB,8BACC,KAAC,UAAU,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAI,EACzD,KAAC,UAAU,IACV,KAAK,EAAE,MAAM,CAAC,cAAc,EAC5B,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,GACjC,IACA,CACH,IACiB,EACnB,KAAC,IAAI,IACJ,KAAK,EAAE;4BACN,QAAQ,EAAE,CAAC;4BACX,UAAU,EAAE,MAAM;4BAClB,KAAK,EAAE,MAAM,CAAC,QAAQ;4BACtB,aAAa,EAAE,WAAW;4BAC1B,aAAa,EAAE,CAAC;yBAChB,YAEA,MAAM,CAAC,GAAG,GACL,EACP,KAAC,IAAI,2CAAgC,IAC/B,IACD,CACP,CAAA;AACF,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}
@@ -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
- const CoverPageSection = ({ title, children, }) => {
5
- return (_jsxs(View, { style: { rowGap: 16 }, children: [_jsx(Text, { style: {
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
- }, children: `${title}:` }), children] }));
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
@@ -1 +1 @@
1
- {"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/Details.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAE1D,KAAK,KAAK,GAAG;IACZ,QAAQ,EAAE,gCAAgC,CAAC,SAAS,CAAC,CAAA;IACrD,YAAY,EAAE,wBAAwB,CAAA;CACtC,CAAA;AAED,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,KAAK,CAsGtB,CAAA;AAED,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/Details.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAE1D,KAAK,KAAK,GAAG;IACZ,QAAQ,EAAE,gCAAgC,CAAC,SAAS,CAAC,CAAA;IACrD,YAAY,EAAE,wBAAwB,CAAA;CACtC,CAAA;AAED,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,KAAK,CAuHtB,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -5,8 +5,21 @@ import { Text, View } from '@react-pdf/renderer';
5
5
  import { colors } from '../../theme/index.js';
6
6
  import LabelValue from './LabelValue.js';
7
7
  const Details = ({ tDetails, subscription }) => {
8
- const details = {
9
- member: [
8
+ let details = {};
9
+ if (subscription.payerType === 'business') {
10
+ details.business = [
11
+ {
12
+ key: tDetails.business.name,
13
+ value: subscription?.businessName,
14
+ },
15
+ {
16
+ key: tDetails.business.companyNo,
17
+ value: subscription?.business?.registrationNumber,
18
+ },
19
+ ];
20
+ }
21
+ else {
22
+ details.member = [
10
23
  {
11
24
  key: tDetails.member.name,
12
25
  value: userName(subscription.user),
@@ -15,7 +28,10 @@ const Details = ({ tDetails, subscription }) => {
15
28
  key: tDetails.member.idOrPassportNo,
16
29
  value: subscription.user.identification?.number,
17
30
  },
18
- ],
31
+ ];
32
+ }
33
+ details = {
34
+ ...details,
19
35
  vehicle: [
20
36
  {
21
37
  key: tDetails.vehicle.make,
@@ -1 +1 @@
1
- {"version":3,"file":"Details.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/Details.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,UAAU,MAAM,iBAAiB,CAAA;AASxC,MAAM,OAAO,GAAc,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE;IACzD,MAAM,OAAO,GAAG;QACf,MAAM,EAAE;YACP;gBACC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI;gBACzB,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC;aAClC;YACD;gBACC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc;gBACnC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM;aAC/C;SACD;QACD,OAAO,EAAE;YACR;gBACC,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI;gBAC1B,KAAK,EAAE,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AgB,CAAA;QACxB,KAAK,UAAU;YACd,OAAO,oBAAoB,CAAA;QAC5B,KAAK,MAAM;YACV,OAAO,gBAAgB,CAAA;QACxB,KAAK,WAAW;YACf,OAAO,WAAW,CAAA;QACnB;YACC,OAAO,yBAAyB,CAAA;IAClC,CAAC;AACF,CAAC,CAAA"}
@@ -1,16 +1,58 @@
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
- const Footer = ({ tComputerGenerated, tPage, tOf }) => {
5
- return (_jsxs(View, { fixed: true, style: {
4
+ var Footer = function(param) {
5
+ var tComputerGenerated = param.tComputerGenerated, tPage = param.tPage, tOf = param.tOf;
6
+ return /*#__PURE__*/ _jsxs(View, {
7
+ fixed: true,
8
+ style: {
6
9
  justifyContent: 'space-between',
7
10
  flexDirection: 'row',
8
11
  paddingTop: 16,
9
12
  marginTop: 16,
10
- borderTop: `1px solid ${colors.links}`,
13
+ borderTop: "1px solid ".concat(colors.links),
11
14
  color: colors.primary2,
12
- fontSize: 8,
13
- }, children: [_jsx(Text, { children: tComputerGenerated }), _jsxs(View, { style: { flexDirection: 'row', columnGap: 4 }, children: [_jsx(Text, { children: tPage }), _jsx(Text, { style: { fontWeight: 'bold', color: colors.black }, render: ({ pageNumber }) => `${pageNumber}` }), _jsx(Text, { children: tOf }), _jsx(Text, { style: { fontWeight: 'bold', color: colors.black }, render: ({ totalPages }) => `${totalPages}` })] })] }));
15
+ fontSize: 8
16
+ },
17
+ children: [
18
+ /*#__PURE__*/ _jsx(Text, {
19
+ children: tComputerGenerated
20
+ }),
21
+ /*#__PURE__*/ _jsxs(View, {
22
+ style: {
23
+ flexDirection: 'row',
24
+ columnGap: 4
25
+ },
26
+ children: [
27
+ /*#__PURE__*/ _jsx(Text, {
28
+ children: tPage
29
+ }),
30
+ /*#__PURE__*/ _jsx(Text, {
31
+ style: {
32
+ fontWeight: 'bold',
33
+ color: colors.black
34
+ },
35
+ render: function(param) {
36
+ var pageNumber = param.pageNumber;
37
+ return "".concat(pageNumber);
38
+ }
39
+ }),
40
+ /*#__PURE__*/ _jsx(Text, {
41
+ children: tOf
42
+ }),
43
+ /*#__PURE__*/ _jsx(Text, {
44
+ style: {
45
+ fontWeight: 'bold',
46
+ color: colors.black
47
+ },
48
+ render: function(param) {
49
+ var totalPages = param.totalPages;
50
+ return "".concat(totalPages);
51
+ }
52
+ })
53
+ ]
54
+ })
55
+ ]
56
+ });
14
57
  };
15
58
  export default Footer;
16
- //# sourceMappingURL=Footer.js.map
@@ -2,15 +2,45 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Link, Text, View } from '@react-pdf/renderer';
3
3
  import FluxLogo from '../../components/FluxLogo.js';
4
4
  import { colors } from '../../theme/colors.js';
5
- const Header = ({ tTitle, userId, subscriptionId }) => {
6
- return (_jsxs(View, { fixed: true, style: {
5
+ var Header = function(param) {
6
+ var tTitle = param.tTitle, userId = param.userId, subscriptionId = param.subscriptionId;
7
+ return /*#__PURE__*/ _jsxs(View, {
8
+ fixed: true,
9
+ style: {
7
10
  flexDirection: 'row',
8
11
  justifyContent: 'space-between',
9
12
  alignItems: 'center',
10
13
  paddingBottom: 40,
11
14
  // to not get pushed by the content
12
- minHeight: 69,
13
- }, children: [_jsx(Link, { src: "https://driveflux.com", children: _jsx(FluxLogo, {}) }), _jsxs(View, { style: { rowGap: 4, fontSize: 8, alignItems: 'flex-end' }, children: [_jsx(Text, { style: { fontWeight: 'bold' }, children: tTitle }), _jsx(Text, { style: { color: colors.primary2 }, children: `FLUX-${userId}-${subscriptionId}` })] })] }));
15
+ minHeight: 69
16
+ },
17
+ children: [
18
+ /*#__PURE__*/ _jsx(Link, {
19
+ src: "https://driveflux.com",
20
+ children: /*#__PURE__*/ _jsx(FluxLogo, {})
21
+ }),
22
+ /*#__PURE__*/ _jsxs(View, {
23
+ style: {
24
+ rowGap: 4,
25
+ fontSize: 8,
26
+ alignItems: 'flex-end'
27
+ },
28
+ children: [
29
+ /*#__PURE__*/ _jsx(Text, {
30
+ style: {
31
+ fontWeight: 'bold'
32
+ },
33
+ children: tTitle
34
+ }),
35
+ /*#__PURE__*/ _jsx(Text, {
36
+ style: {
37
+ color: colors.primary2
38
+ },
39
+ children: "FLUX-".concat(userId, "-").concat(subscriptionId)
40
+ })
41
+ ]
42
+ })
43
+ ]
44
+ });
14
45
  };
15
46
  export default Header;
16
- //# sourceMappingURL=Header.js.map
@@ -1,7 +1,29 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text, View } from '@react-pdf/renderer';
3
- const LabelValue = ({ label, value }) => {
4
- return (_jsxs(View, { style: { flexDirection: 'row' }, children: [_jsx(Text, { style: { minWidth: 120, textTransform: 'capitalize' }, children: label }), _jsx(Text, { children: ':' }), _jsx(Text, { style: { paddingLeft: 16 }, children: value ? `${value}` : '-' })] }));
3
+ var LabelValue = function(param) {
4
+ var label = param.label, value = param.value;
5
+ return /*#__PURE__*/ _jsxs(View, {
6
+ style: {
7
+ flexDirection: 'row'
8
+ },
9
+ children: [
10
+ /*#__PURE__*/ _jsx(Text, {
11
+ style: {
12
+ minWidth: 120,
13
+ textTransform: 'capitalize'
14
+ },
15
+ children: label
16
+ }),
17
+ /*#__PURE__*/ _jsx(Text, {
18
+ children: ':'
19
+ }),
20
+ /*#__PURE__*/ _jsx(Text, {
21
+ style: {
22
+ paddingLeft: 16
23
+ },
24
+ children: value ? "".concat(value) : '-'
25
+ })
26
+ ]
27
+ });
5
28
  };
6
29
  export default LabelValue;
7
- //# sourceMappingURL=LabelValue.js.map
@@ -3,8 +3,31 @@ import { View } from '@react-pdf/renderer';
3
3
  import StandardPage from '../../components/StandardPage.js';
4
4
  import Footer from './Footer.js';
5
5
  import Header from './Header.js';
6
- const SubscriptionAgreementPage = ({ t, userId, subscriptionId, children, }) => {
7
- return (_jsxs(StandardPage, { style: { padding: 40, fontSize: 10 }, children: [_jsx(Header, { tTitle: t.title, userId: userId, subscriptionId: subscriptionId }), _jsx(View, { style: { flex: 1 }, children: children }), _jsx(Footer, { tComputerGenerated: t.computerGenerated, tPage: t.page, tOf: t.of })] }));
6
+ var SubscriptionAgreementPage = function(param) {
7
+ var t = param.t, userId = param.userId, subscriptionId = param.subscriptionId, children = param.children;
8
+ return /*#__PURE__*/ _jsxs(StandardPage, {
9
+ style: {
10
+ padding: 40,
11
+ fontSize: 10
12
+ },
13
+ children: [
14
+ /*#__PURE__*/ _jsx(Header, {
15
+ tTitle: t.title,
16
+ userId: userId,
17
+ subscriptionId: subscriptionId
18
+ }),
19
+ /*#__PURE__*/ _jsx(View, {
20
+ style: {
21
+ flex: 1
22
+ },
23
+ children: children
24
+ }),
25
+ /*#__PURE__*/ _jsx(Footer, {
26
+ tComputerGenerated: t.computerGenerated,
27
+ tPage: t.page,
28
+ tOf: t.of
29
+ })
30
+ ]
31
+ });
8
32
  };
9
33
  export default SubscriptionAgreementPage;
10
- //# sourceMappingURL=SubscriptionAgreementPage.js.map