@driveflux/pdf 1.6.67 → 1.6.69

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.
@@ -1,22 +1,23 @@
1
- export var mockTermsOfUse = {
1
+ export const mockTermsOfUse = {
2
2
  items: [
3
3
  {
4
4
  content: 'Terms of Use',
5
5
  items: [
6
6
  {
7
- content: 'These Terms of Use define and govern the relationship, rules and regulations of the interactions by FLUX and its Members.',
8
- items: []
9
- }
10
- ]
7
+ content: 'These Terms of ***Use*** are NOT no yes defined and govern the relationship, rules and regulations of the interactions by FLUX and its Members.',
8
+ items: [],
9
+ },
10
+ ],
11
11
  },
12
12
  {
13
13
  content: 'Introduction',
14
14
  items: [
15
15
  {
16
16
  content: 'FLUX is an online business functioning as a technology provider that facilitates vehicle subscriptions.',
17
- items: []
18
- }
19
- ]
20
- }
21
- ]
17
+ items: [],
18
+ },
19
+ ],
20
+ },
21
+ ],
22
22
  };
23
+ //# sourceMappingURL=tou.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tou.js","sourceRoot":"","sources":["../../src/__mocks__/tou.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,KAAK,EAAE;QACN;YACC,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE;gBACN;oBACC,OAAO,EACN,2HAA2H;oBAC5H,KAAK,EAAE,EAAE;iBACT;aACD;SACD;QACD;YACC,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE;gBACN;oBACC,OAAO,EACN,yGAAyG;oBAC1G,KAAK,EAAE,EAAE;iBACT;aACD;SACD;KACD;CACD,CAAA"}
1
+ {"version":3,"file":"tou.js","sourceRoot":"","sources":["../../src/__mocks__/tou.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,KAAK,EAAE;QACN;YACC,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE;gBACN;oBACC,OAAO,EACN,iJAAiJ;oBAClJ,KAAK,EAAE,EAAE;iBACT;aACD;SACD;QACD;YACC,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE;gBACN;oBACC,OAAO,EACN,yGAAyG;oBAC1G,KAAK,EAAE,EAAE;iBACT;aACD;SACD;KACD;CACD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"StandardPage.d.ts","sourceRoot":"","sources":["../../src/components/StandardPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE9C,KAAK,KAAK,GAAG,SAAS,GAAG,EAAE,CAAA;AAoB3B,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAaxD,CAAA;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"StandardPage.d.ts","sourceRoot":"","sources":["../../src/components/StandardPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE9C,KAAK,KAAK,GAAG,SAAS,GAAG,EAAE,CAAA;AA8B3B,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAaxD,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,113 +1,34 @@
1
- function _define_property(obj, key, value) {
2
- if (key in obj) {
3
- Object.defineProperty(obj, key, {
4
- value: value,
5
- enumerable: true,
6
- configurable: true,
7
- writable: true
8
- });
9
- } else {
10
- obj[key] = value;
11
- }
12
- return obj;
13
- }
14
- function _object_spread(target) {
15
- for(var i = 1; i < arguments.length; i++){
16
- var source = arguments[i] != null ? arguments[i] : {};
17
- var ownKeys = Object.keys(source);
18
- if (typeof Object.getOwnPropertySymbols === "function") {
19
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
- }));
22
- }
23
- ownKeys.forEach(function(key) {
24
- _define_property(target, key, source[key]);
25
- });
26
- }
27
- return target;
28
- }
29
- function ownKeys(object, enumerableOnly) {
30
- var keys = Object.keys(object);
31
- if (Object.getOwnPropertySymbols) {
32
- var symbols = Object.getOwnPropertySymbols(object);
33
- if (enumerableOnly) {
34
- symbols = symbols.filter(function(sym) {
35
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
36
- });
37
- }
38
- keys.push.apply(keys, symbols);
39
- }
40
- return keys;
41
- }
42
- function _object_spread_props(target, source) {
43
- source = source != null ? source : {};
44
- if (Object.getOwnPropertyDescriptors) {
45
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46
- } else {
47
- ownKeys(Object(source)).forEach(function(key) {
48
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
49
- });
50
- }
51
- return target;
52
- }
53
- function _object_without_properties(source, excluded) {
54
- if (source == null) return {};
55
- var target = _object_without_properties_loose(source, excluded);
56
- var key, i;
57
- if (Object.getOwnPropertySymbols) {
58
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
59
- for(i = 0; i < sourceSymbolKeys.length; i++){
60
- key = sourceSymbolKeys[i];
61
- if (excluded.indexOf(key) >= 0) continue;
62
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
63
- target[key] = source[key];
64
- }
65
- }
66
- return target;
67
- }
68
- function _object_without_properties_loose(source, excluded) {
69
- if (source == null) return {};
70
- var target = {};
71
- var sourceKeys = Object.keys(source);
72
- var key, i;
73
- for(i = 0; i < sourceKeys.length; i++){
74
- key = sourceKeys[i];
75
- if (excluded.indexOf(key) >= 0) continue;
76
- target[key] = source[key];
77
- }
78
- return target;
79
- }
80
1
  import { jsx as _jsx } from "react/jsx-runtime";
81
2
  import { Font, Page } from '@react-pdf/renderer';
82
3
  Font.register({
83
4
  family: 'Figtree',
84
5
  fonts: [
85
6
  {
86
- src: 'https://fonts.gstatic.com/s/figtree/v5/_Xmz-HUzqDCFdgfMsYiV_F7wfS-Bs_chQF5ewkEU4HTy.ttf',
87
- fontWeight: 'normal'
7
+ src: 'https://fonts.gstatic.com/s/figtree/v8/_Xmz-HUzqDCFdgfMsYiV_F7wfS-Bs_d_QF5e.ttf',
8
+ fontWeight: 'normal',
88
9
  },
89
10
  {
90
- src: 'https://fonts.gstatic.com/s/figtree/v5/_Xmz-HUzqDCFdgfMsYiV_F7wfS-Bs_eYR15ewkEU4HTy.ttf',
91
- fontWeight: 'bold'
92
- }
93
- ]
11
+ src: 'https://fonts.gstatic.com/s/figtree/v8/_Xmz-HUzqDCFdgfMsYiV_F7wfS-Bs_eYR15e.ttf',
12
+ fontWeight: 'bold',
13
+ },
14
+ {
15
+ src: 'https://fonts.gstatic.com/s/figtree/v8/_Xm9-HUzqDCFdgfMm4GnA4aZFrUvtOK3A7YdyEU.ttf',
16
+ fontWeight: 'normal',
17
+ fontStyle: 'italic',
18
+ },
19
+ {
20
+ src: 'https://fonts.gstatic.com/s/figtree/v8/_Xm9-HUzqDCFdgfMm4GnA4aZFrUvtOK3A1EayEU.ttf',
21
+ fontWeight: 'bold',
22
+ fontStyle: 'italic',
23
+ },
24
+ ],
94
25
  });
95
26
  Font.register({
96
27
  family: 'Allura',
97
- src: 'https://fonts.gstatic.com/s/allura/v21/9oRPNYsQpS4zjuAPjAIXPtrrGA.ttf'
28
+ src: 'https://fonts.gstatic.com/s/allura/v21/9oRPNYsQpS4zjuAPjAIXPtrrGA.ttf',
98
29
  });
99
- var StandardDocument = function(_param) {
100
- var children = _param.children, style = _param.style, props = _object_without_properties(_param, [
101
- "children",
102
- "style"
103
- ]);
104
- return /*#__PURE__*/ _jsx(Page, _object_spread_props(_object_spread({
105
- style: _object_spread({
106
- fontFamily: 'Figtree',
107
- fontStyle: 'normal'
108
- }, style)
109
- }, props), {
110
- children: children
111
- }));
30
+ const StandardDocument = ({ children, style, ...props }) => {
31
+ return (_jsx(Page, { style: { fontFamily: 'Figtree', fontStyle: 'normal', ...style }, ...props, children: children }));
112
32
  };
113
33
  export default StandardDocument;
34
+ //# sourceMappingURL=StandardPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StandardPage.js","sourceRoot":"","sources":["../../src/components/StandardPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,qBAAqB,CAAA;AAMhE,IAAI,CAAC,QAAQ,CAAC;IACb,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE;QACN;YACC,GAAG,EAAE,yFAAyF;YAC9F,UAAU,EAAE,QAAQ;SACpB;QACD;YACC,GAAG,EAAE,yFAAyF;YAC9F,UAAU,EAAE,MAAM;SAClB;KACD;CACD,CAAC,CAAA;AACF,IAAI,CAAC,QAAQ,CAAC;IACb,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,uEAAuE;CAC5E,CAAC,CAAA;AAEF,MAAM,gBAAgB,GAAuC,CAAC,EAC7D,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACR,EAAE,EAAE;IACJ,OAAO,CACN,KAAC,IAAI,IACJ,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,KAC3D,KAAK,YAER,QAAQ,GACH,CACP,CAAA;AACF,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"StandardPage.js","sourceRoot":"","sources":["../../src/components/StandardPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,qBAAqB,CAAA;AAMhE,IAAI,CAAC,QAAQ,CAAC;IACb,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE;QACN;YACC,GAAG,EAAE,iFAAiF;YACtF,UAAU,EAAE,QAAQ;SACpB;QACD;YACC,GAAG,EAAE,iFAAiF;YACtF,UAAU,EAAE,MAAM;SAClB;QACD;YACC,GAAG,EAAE,oFAAoF;YACzF,UAAU,EAAE,QAAQ;YACpB,SAAS,EAAE,QAAQ;SACnB;QACD;YACC,GAAG,EAAE,oFAAoF;YACzF,UAAU,EAAE,MAAM;YAClB,SAAS,EAAE,QAAQ;SACnB;KACD;CACD,CAAC,CAAA;AACF,IAAI,CAAC,QAAQ,CAAC;IACb,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,uEAAuE;CAC5E,CAAC,CAAA;AAEF,MAAM,gBAAgB,GAAuC,CAAC,EAC7D,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACR,EAAE,EAAE;IACJ,OAAO,CACN,KAAC,IAAI,IACJ,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,KAC3D,KAAK,YAER,QAAQ,GACH,CACP,CAAA;AACF,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -5,24 +5,107 @@ 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, payerType, business, }) => {
9
- return (_jsxs(View, { style: { flex: 1, paddingVertical: 80, justifyContent: 'space-between' }, children: [_jsx(Text, { style: {
8
+ var CoverPage = function(param) {
9
+ var tTitle = param.tTitle, tCover = param.tCover, signedAt = param.signedAt, user = param.user, payerType = param.payerType, business = param.business;
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
- }, children: tTitle }), _jsxs(View, { style: {
23
+ flex: 1
24
+ },
25
+ children: tTitle
26
+ }),
27
+ /*#__PURE__*/ _jsxs(View, {
28
+ style: {
15
29
  padding: 16,
16
30
  rowGap: 32,
17
- border: `1px solid ${colors.primary2}`,
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: [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: {
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
+ payerType === 'business' && /*#__PURE__*/ _jsxs(_Fragment, {
68
+ children: [
69
+ /*#__PURE__*/ _jsx(LabelValue, {
70
+ label: tCover.companyName,
71
+ value: business === null || business === void 0 ? void 0 : business.name
72
+ }),
73
+ /*#__PURE__*/ _jsx(LabelValue, {
74
+ label: tCover.companyNo,
75
+ value: business === null || business === void 0 ? void 0 : business.registrationNumber
76
+ })
77
+ ]
78
+ }),
79
+ payerType === 'user' && /*#__PURE__*/ _jsxs(_Fragment, {
80
+ children: [
81
+ /*#__PURE__*/ _jsx(LabelValue, {
82
+ label: tCover.name,
83
+ value: userName(user)
84
+ }),
85
+ /*#__PURE__*/ _jsx(LabelValue, {
86
+ label: tCover.idOrPassportNo,
87
+ value: (_user_identification = user.identification) === null || _user_identification === void 0 ? void 0 : _user_identification.number
88
+ })
89
+ ]
90
+ })
91
+ ]
92
+ }),
93
+ /*#__PURE__*/ _jsx(Text, {
94
+ style: {
20
95
  fontSize: 8,
21
96
  fontWeight: 'bold',
22
97
  color: colors.primary3,
23
98
  textTransform: 'uppercase',
24
- letterSpacing: 1,
25
- }, children: tCover.and }), _jsx(Text, { children: "FLUX Sdn Bhd (1264766-H)" })] })] }));
99
+ letterSpacing: 1
100
+ },
101
+ children: tCover.and
102
+ }),
103
+ /*#__PURE__*/ _jsx(Text, {
104
+ children: "FLUX Sdn Bhd (1264766-H)"
105
+ })
106
+ ]
107
+ })
108
+ ]
109
+ });
26
110
  };
27
111
  export default CoverPage;
28
- //# sourceMappingURL=CoverPage.js.map
@@ -1,105 +1,184 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _object_spread(target) {
15
+ for(var i = 1; i < arguments.length; i++){
16
+ var source = arguments[i] != null ? arguments[i] : {};
17
+ var ownKeys = Object.keys(source);
18
+ if (typeof Object.getOwnPropertySymbols === "function") {
19
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
+ }));
22
+ }
23
+ ownKeys.forEach(function(key) {
24
+ _define_property(target, key, source[key]);
25
+ });
26
+ }
27
+ return target;
28
+ }
29
+ function ownKeys(object, enumerableOnly) {
30
+ var keys = Object.keys(object);
31
+ if (Object.getOwnPropertySymbols) {
32
+ var symbols = Object.getOwnPropertySymbols(object);
33
+ if (enumerableOnly) {
34
+ symbols = symbols.filter(function(sym) {
35
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
36
+ });
37
+ }
38
+ keys.push.apply(keys, symbols);
39
+ }
40
+ return keys;
41
+ }
42
+ function _object_spread_props(target, source) {
43
+ source = source != null ? source : {};
44
+ if (Object.getOwnPropertyDescriptors) {
45
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46
+ } else {
47
+ ownKeys(Object(source)).forEach(function(key) {
48
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
49
+ });
50
+ }
51
+ return target;
52
+ }
1
53
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
54
  import { userName } from '@driveflux/db/models/user';
3
55
  import { format } from '@driveflux/time';
4
56
  import { Text, View } from '@react-pdf/renderer';
5
57
  import { colors } from '../../theme/index.js';
6
58
  import LabelValue from './LabelValue.js';
7
- const Details = ({ tDetails, subscription }) => {
8
- let details = {};
59
+ var Details = function(param) {
60
+ var tDetails = param.tDetails, subscription = param.subscription;
61
+ var _subscription_vehicle, _subscription_vehicle1, _subscription_vehicle2, _subscription_vehicle3, _subscription_vehicle4, _subscription_schedule, _subscription_schedule1;
62
+ var details = {};
9
63
  if (subscription.payerType === 'business') {
64
+ var _subscription_business;
10
65
  details.business = [
11
66
  {
12
67
  key: tDetails.business.name,
13
- value: subscription?.businessName,
68
+ value: subscription === null || subscription === void 0 ? void 0 : subscription.businessName
14
69
  },
15
70
  {
16
71
  key: tDetails.business.companyNo,
17
- value: subscription?.business?.registrationNumber,
18
- },
72
+ value: subscription === null || subscription === void 0 ? void 0 : (_subscription_business = subscription.business) === null || _subscription_business === void 0 ? void 0 : _subscription_business.registrationNumber
73
+ }
19
74
  ];
20
- }
21
- else {
75
+ } else {
76
+ var _subscription_user_identification;
22
77
  details.member = [
23
78
  {
24
79
  key: tDetails.member.name,
25
- value: userName(subscription.user),
80
+ value: userName(subscription.user)
26
81
  },
27
82
  {
28
83
  key: tDetails.member.idOrPassportNo,
29
- value: subscription.user.identification?.number,
30
- },
84
+ value: (_subscription_user_identification = subscription.user.identification) === null || _subscription_user_identification === void 0 ? void 0 : _subscription_user_identification.number
85
+ }
31
86
  ];
32
87
  }
33
- details = {
34
- ...details,
88
+ details = _object_spread_props(_object_spread({}, details), {
35
89
  vehicle: [
36
90
  {
37
91
  key: tDetails.vehicle.make,
38
- value: subscription.vehicle?.make,
92
+ value: (_subscription_vehicle = subscription.vehicle) === null || _subscription_vehicle === void 0 ? void 0 : _subscription_vehicle.make
39
93
  },
40
94
  {
41
95
  key: tDetails.vehicle.model,
42
- value: `${subscription.vehicle?.vehicleModel} ${subscription.vehicle?.variant}`,
96
+ value: "".concat((_subscription_vehicle1 = subscription.vehicle) === null || _subscription_vehicle1 === void 0 ? void 0 : _subscription_vehicle1.vehicleModel, " ").concat((_subscription_vehicle2 = subscription.vehicle) === null || _subscription_vehicle2 === void 0 ? void 0 : _subscription_vehicle2.variant)
43
97
  },
44
98
  {
45
99
  key: tDetails.vehicle.year,
46
- value: subscription.vehicle?.year,
100
+ value: (_subscription_vehicle3 = subscription.vehicle) === null || _subscription_vehicle3 === void 0 ? void 0 : _subscription_vehicle3.year
47
101
  },
48
102
  {
49
103
  key: tDetails.vehicle.plateNo,
50
- value: subscription.vehicle?.registrationNumber,
51
- },
104
+ value: (_subscription_vehicle4 = subscription.vehicle) === null || _subscription_vehicle4 === void 0 ? void 0 : _subscription_vehicle4.registrationNumber
105
+ }
52
106
  ],
53
107
  subscription: [
54
108
  {
55
109
  key: tDetails.subscription.subscriptionPlan,
56
- value: getPlanTranslation(subscription.plan),
110
+ value: getPlanTranslation(subscription.plan)
57
111
  },
58
112
  {
59
113
  key: tDetails.subscription.mileagePackage,
60
- value: getFullMileagePackageTranslation(subscription.mileagePackage),
114
+ value: getFullMileagePackageTranslation(subscription.mileagePackage)
61
115
  },
62
116
  {
63
117
  key: tDetails.subscription.startDate,
64
- value: subscription.startedAt
65
- ? format(subscription.startedAt, 'dd-MM-yyyy')
66
- : undefined,
118
+ value: subscription.startedAt ? format(subscription.startedAt, 'dd-MM-yyyy') : undefined
67
119
  },
68
120
  {
69
121
  key: tDetails.subscription.endDate,
70
- value: subscription.endedAt
71
- ? format(subscription.endedAt, 'dd-MM-yyyy')
72
- : subscription.schedule?.endAt
73
- ? format(subscription.schedule?.endAt, 'dd-MM-yyyy')
74
- : undefined,
75
- },
76
- ],
77
- };
78
- const border = `1px solid ${colors.primary2}`;
79
- return (_jsxs(View, { style: { borderLeft: border, borderRight: border }, children: [_jsx(View, { style: {
122
+ value: subscription.endedAt ? format(subscription.endedAt, 'dd-MM-yyyy') : ((_subscription_schedule = subscription.schedule) === null || _subscription_schedule === void 0 ? void 0 : _subscription_schedule.endAt) ? format((_subscription_schedule1 = subscription.schedule) === null || _subscription_schedule1 === void 0 ? void 0 : _subscription_schedule1.endAt, 'dd-MM-yyyy') : undefined
123
+ }
124
+ ]
125
+ });
126
+ var border = "1px solid ".concat(colors.primary2);
127
+ return /*#__PURE__*/ _jsxs(View, {
128
+ style: {
129
+ borderLeft: border,
130
+ borderRight: border
131
+ },
132
+ children: [
133
+ /*#__PURE__*/ _jsx(View, {
134
+ style: {
80
135
  backgroundColor: colors.primary1,
81
136
  borderTop: border,
82
- padding: 8,
83
- }, children: _jsx(Text, { style: {
137
+ padding: 8
138
+ },
139
+ children: /*#__PURE__*/ _jsx(Text, {
140
+ style: {
84
141
  fontWeight: 'bold',
85
142
  textTransform: 'uppercase',
86
- letterSpacing: 1,
87
- }, children: tDetails.agreement }) }), Object.keys(details).map((key, i) => (_jsxs(View, { style: {
88
- padding: 8,
89
- paddingBottom: 16,
90
- rowGap: 8,
91
- borderTop: border,
92
- }, children: [_jsx(Text, { style: {
93
- textTransform: 'uppercase',
94
- color: colors.primary2,
95
- fontSize: 8,
96
- letterSpacing: 1,
97
- }, children: `${key} details` }), details[key].map((line) => (_jsx(LabelValue, { label: line.key, value: line.value }, line.key)))] }, key)))] }));
143
+ letterSpacing: 1
144
+ },
145
+ children: tDetails.agreement
146
+ })
147
+ }),
148
+ Object.keys(details).map(function(key, i) {
149
+ return /*#__PURE__*/ _jsxs(View, {
150
+ style: {
151
+ padding: 8,
152
+ paddingBottom: 16,
153
+ rowGap: 8,
154
+ borderTop: border
155
+ },
156
+ children: [
157
+ /*#__PURE__*/ _jsx(Text, {
158
+ style: {
159
+ textTransform: 'uppercase',
160
+ color: colors.primary2,
161
+ fontSize: 8,
162
+ letterSpacing: 1
163
+ },
164
+ children: "".concat(key, " details")
165
+ }),
166
+ details[key].map(function(line) {
167
+ return /*#__PURE__*/ _jsx(LabelValue, {
168
+ label: line.key,
169
+ value: line.value
170
+ }, line.key);
171
+ })
172
+ ]
173
+ }, key);
174
+ })
175
+ ]
176
+ });
98
177
  };
99
178
  export default Details;
100
179
  // TODO: replace this with dump's once the package is ready
101
- const getPlanTranslation = (plan, vehicleType) => {
102
- switch (plan) {
180
+ var getPlanTranslation = function(plan, vehicleType) {
181
+ switch(plan){
103
182
  case 'plan60':
104
183
  return vehicleType === 'motorcycle' ? '60 Months' : '60 Months (Basic)';
105
184
  case 'plan36':
@@ -116,8 +195,8 @@ const getPlanTranslation = (plan, vehicleType) => {
116
195
  return 'Unknown Plan';
117
196
  }
118
197
  };
119
- const getFullMileagePackageTranslation = (plan) => {
120
- switch (plan) {
198
+ var getFullMileagePackageTranslation = function(plan) {
199
+ switch(plan){
121
200
  case 'lite':
122
201
  return 'Lite - 1,250KM';
123
202
  case 'standard':
@@ -130,4 +209,3 @@ const getFullMileagePackageTranslation = (plan) => {
130
209
  return 'Unknown Mileage Package';
131
210
  }
132
211
  };
133
- //# sourceMappingURL=Details.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TermsOfUse.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/TermsOfUse.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,kBAAkB,EAClB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE/B,KAAK,KAAK,GAAG;IACZ,UAAU,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAED,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,KAAK,CA0CzB,CAAA;AAED,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"TermsOfUse.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/TermsOfUse.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,kBAAkB,EAClB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,KAAK,KAAK,GAAG;IACZ,UAAU,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAED,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,KAAK,CAoCzB,CAAA;AAED,eAAe,UAAU,CAAA"}