@driveflux/pdf 4.0.77 → 5.0.0-feature-e-invoicing.0
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/.env +0 -0
- package/.env.development +4 -0
- package/.turbo/turbo-build.log +14 -0
- package/CHANGELOG.md +15 -0
- package/build.ts +45 -0
- package/bun-env.d.ts +34 -0
- package/bunfig.toml +8 -0
- package/catalog-version-stamp.json +8 -0
- package/dist/main.js +4 -0
- package/dist/main.js.map +11 -0
- package/dist/src/config.d.ts +20 -0
- package/dist/src/create-logger.d.ts +1 -0
- package/dist/src/errors.d.ts +43 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/preview/api.d.ts +264 -0
- package/dist/src/preview/client/app.d.ts +2 -0
- package/dist/src/preview/client/invoice/invoice-display.d.ts +5 -0
- package/dist/src/preview/client/invoice/invoice-setup.d.ts +8 -0
- package/dist/src/preview/client/preview-targets.d.ts +12 -0
- package/dist/src/preview/client/preview.d.ts +6 -0
- package/dist/src/preview/client/sidebar.d.ts +7 -0
- package/dist/src/preview/client/treaty.d.ts +200 -0
- package/dist/src/preview/client/use-target.d.ts +1 -0
- package/dist/src/preview/fonts/register-fonts.d.ts +1 -0
- package/dist/src/preview/frontend.d.ts +1 -0
- package/dist/src/preview/server.d.ts +1 -0
- package/dist/src/repository.d.ts +171 -0
- package/dist/src/templates/invoice/colors.d.ts +6 -0
- package/dist/src/templates/invoice/company-details.d.ts +10 -0
- package/dist/src/templates/invoice/flux-invoice.d.ts +6 -0
- package/dist/src/templates/invoice/footer.d.ts +2 -0
- package/dist/src/templates/invoice/host-invoice.d.ts +9 -0
- package/dist/src/templates/invoice/invoice-details.d.ts +13 -0
- package/dist/src/templates/invoice/invoice-notes.d.ts +1 -0
- package/dist/src/templates/invoice/invoice-summary.d.ts +7 -0
- package/dist/src/templates/invoice/letter-head.d.ts +10 -0
- package/dist/src/templates/invoice/li.d.ts +10 -0
- package/dist/src/templates/invoice/platform-and-host-details.d.ts +11 -0
- package/dist/src/templates/invoice/spacer.d.ts +3 -0
- package/dist/src/templates/invoice/split-container-items.d.ts +10 -0
- package/dist/src/templates/invoice/split-container.d.ts +7 -0
- package/dist/src/templates/invoice/standard-page.d.ts +7 -0
- package/dist/src/templates/invoice/types.d.ts +3 -0
- package/dist/src/templates/invoice/ul.d.ts +8 -0
- package/dist/src/templates/invoice/utils.d.ts +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +34 -40
- package/src/config.ts +42 -0
- package/src/create-logger.ts +4 -0
- package/src/errors.ts +35 -0
- package/src/main.ts +7 -0
- package/src/preview/api.ts +33 -0
- package/src/preview/client/app.tsx +30 -0
- package/src/preview/client/invoice/invoice-display.tsx +27 -0
- package/src/preview/client/invoice/invoice-setup.tsx +95 -0
- package/src/preview/client/preview-targets.ts +30 -0
- package/src/preview/client/preview.tsx +37 -0
- package/src/preview/client/sidebar.tsx +39 -0
- package/src/preview/client/treaty.ts +8 -0
- package/src/preview/client/use-target.ts +11 -0
- package/src/preview/fonts/GOTHAM-BLACK.TTF +0 -0
- package/src/preview/fonts/GOTHAM-BLACKITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-BOLD.TTF +0 -0
- package/src/preview/fonts/GOTHAM-BOLDITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-LIGHT.TTF +0 -0
- package/src/preview/fonts/GOTHAM-LIGHTITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-MEDIUM.TTF +0 -0
- package/src/preview/fonts/GOTHAM-MEDIUMITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-THIN.TTF +0 -0
- package/src/preview/fonts/GOTHAM-THINITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-ULTRA.TTF +0 -0
- package/src/preview/fonts/GOTHAM-ULTRAITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-XLIGHT.TTF +0 -0
- package/src/preview/fonts/GOTHAM-XLIGHTITALIC.TTF +0 -0
- package/src/preview/fonts/Gotham Book Italic.otf +0 -0
- package/src/preview/fonts/Gotham-BoldItalic.otf +0 -0
- package/src/preview/fonts/Gotham-Book.otf +0 -0
- package/src/preview/fonts/Gotham-BookItalic.otf +0 -0
- package/src/preview/fonts/Gotham-ExtraLight.otf +0 -0
- package/src/preview/fonts/Gotham-ExtraLightItalic.otf +0 -0
- package/src/preview/fonts/Gotham-Light.otf +0 -0
- package/src/preview/fonts/Gotham-LightItalic.otf +0 -0
- package/src/preview/fonts/Gotham-Medium.otf +0 -0
- package/src/preview/fonts/Gotham-MediumItalic.otf +0 -0
- package/src/preview/fonts/Gotham-Thin.otf +0 -0
- package/src/preview/fonts/Gotham-ThinItalic.otf +0 -0
- package/src/preview/fonts/Gotham-Ultra.otf +0 -0
- package/src/preview/fonts/Gotham-UltraItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Black.otf +0 -0
- package/src/preview/fonts/GothamNarrow-BlackItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Book.otf +0 -0
- package/src/preview/fonts/GothamNarrow-BookItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Light.otf +0 -0
- package/src/preview/fonts/GothamNarrow-LightItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Medium.otf +0 -0
- package/src/preview/fonts/GothamNarrow-MediumItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Thin.otf +0 -0
- package/src/preview/fonts/GothamNarrow-ThinItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Ultra.otf +0 -0
- package/src/preview/fonts/GothamNarrow-UltraItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-XLight.otf +0 -0
- package/src/preview/fonts/GothamNarrow-XLightItalic.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-bold-italic.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-bold.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-book-italic.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-book.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-light-italic.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-light.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-medium-italic.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-medium.otf +0 -0
- package/src/preview/fonts/gotham-rounded-bold-italic.otf +0 -0
- package/src/preview/fonts/gotham-rounded-bold.otf +0 -0
- package/src/preview/fonts/gotham-rounded-book-italic.otf +0 -0
- package/src/preview/fonts/gotham-rounded-book.otf +0 -0
- package/src/preview/fonts/gotham-rounded-light-italic.otf +0 -0
- package/src/preview/fonts/gotham-rounded-light.otf +0 -0
- package/src/preview/fonts/gotham-rounded-medium-italic.otf +0 -0
- package/src/preview/fonts/gotham-rounded-medium.otf +0 -0
- package/src/preview/fonts/register-fonts.ts +395 -0
- package/src/preview/frontend.tsx +23 -0
- package/src/preview/global.css +39 -0
- package/src/preview/preview.html +12 -0
- package/src/preview/server.ts +28 -0
- package/src/repository.ts +39 -0
- package/src/templates/invoice/E Invoice Format.pdf +0 -0
- package/src/templates/invoice/colors.ts +6 -0
- package/src/templates/invoice/company-details.tsx +124 -0
- package/src/templates/invoice/flux-invoice.tsx +134 -0
- package/src/templates/invoice/footer.tsx +46 -0
- package/src/templates/invoice/host-invoice.tsx +134 -0
- package/src/templates/invoice/images/logo.png +0 -0
- package/src/templates/invoice/images/logo.svg +41 -0
- package/src/templates/invoice/invoice-details.tsx +231 -0
- package/src/templates/invoice/invoice-notes.tsx +74 -0
- package/src/templates/invoice/invoice-summary.tsx +135 -0
- package/src/templates/invoice/letter-head.tsx +132 -0
- package/src/templates/invoice/li.tsx +48 -0
- package/src/templates/invoice/platform-and-host-details.tsx +56 -0
- package/src/templates/invoice/spacer.tsx +5 -0
- package/src/templates/invoice/split-container-items.tsx +80 -0
- package/src/templates/invoice/split-container.tsx +35 -0
- package/src/templates/invoice/standard-page.tsx +45 -0
- package/src/templates/invoice/types.ts +6 -0
- package/src/templates/invoice/ul.tsx +19 -0
- package/src/templates/invoice/utils.ts +5 -0
- package/tsconfig.json +21 -0
- package/dist/components/FluxLogo.d.ts +0 -3
- package/dist/components/FluxLogo.d.ts.map +0 -1
- package/dist/components/FluxLogo.js +0 -66
- package/dist/components/FluxLogo.js.map +0 -1
- package/dist/components/StandardPage.d.ts +0 -7
- package/dist/components/StandardPage.d.ts.map +0 -1
- package/dist/components/StandardPage.js +0 -132
- package/dist/components/StandardPage.js.map +0 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts +0 -10
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +0 -165
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js.map +0 -1
- package/dist/templates/QuotationPdf/GFV.d.ts +0 -10
- package/dist/templates/QuotationPdf/GFV.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/GFV.js +0 -61
- package/dist/templates/QuotationPdf/GFV.js.map +0 -1
- package/dist/templates/QuotationPdf/Header.d.ts +0 -9
- package/dist/templates/QuotationPdf/Header.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/Header.js +0 -71
- package/dist/templates/QuotationPdf/Header.js.map +0 -1
- package/dist/templates/QuotationPdf/Pricing.d.ts +0 -10
- package/dist/templates/QuotationPdf/Pricing.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/Pricing.js +0 -723
- package/dist/templates/QuotationPdf/Pricing.js.map +0 -1
- package/dist/templates/QuotationPdf/QuotationPdfPage.d.ts +0 -8
- package/dist/templates/QuotationPdf/QuotationPdfPage.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/QuotationPdfPage.js +0 -30
- package/dist/templates/QuotationPdf/QuotationPdfPage.js.map +0 -1
- package/dist/templates/QuotationPdf/SectionBoxNew.d.ts +0 -9
- package/dist/templates/QuotationPdf/SectionBoxNew.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/SectionBoxNew.js +0 -38
- package/dist/templates/QuotationPdf/SectionBoxNew.js.map +0 -1
- package/dist/templates/QuotationPdf/TermsSection.d.ts +0 -8
- package/dist/templates/QuotationPdf/TermsSection.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/TermsSection.js +0 -50
- package/dist/templates/QuotationPdf/TermsSection.js.map +0 -1
- package/dist/templates/QuotationPdf/VehiclePhotos.d.ts +0 -10
- package/dist/templates/QuotationPdf/VehiclePhotos.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/VehiclePhotos.js +0 -66
- package/dist/templates/QuotationPdf/VehiclePhotos.js.map +0 -1
- package/dist/templates/QuotationPdf/index.d.ts +0 -12
- package/dist/templates/QuotationPdf/index.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/index.js +0 -214
- package/dist/templates/QuotationPdf/index.js.map +0 -1
- package/dist/templates/QuotationPdf/translations.d.ts +0 -68
- package/dist/templates/QuotationPdf/translations.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/translations.js +0 -101
- package/dist/templates/QuotationPdf/translations.js.map +0 -1
- package/dist/templates/QuotationPdf/utils.d.ts +0 -14
- package/dist/templates/QuotationPdf/utils.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/utils.js +0 -152
- package/dist/templates/QuotationPdf/utils.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/Confirmation.d.ts +0 -12
- package/dist/templates/SubscriptionAgreement/Confirmation.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/Confirmation.js +0 -80
- package/dist/templates/SubscriptionAgreement/Confirmation.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/CoverPage.d.ts +0 -14
- package/dist/templates/SubscriptionAgreement/CoverPage.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/CoverPage.js +0 -111
- package/dist/templates/SubscriptionAgreement/CoverPage.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/CoverPageSection.d.ts +0 -7
- package/dist/templates/SubscriptionAgreement/CoverPageSection.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/CoverPageSection.js +0 -25
- package/dist/templates/SubscriptionAgreement/CoverPageSection.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/Details.d.ts +0 -10
- package/dist/templates/SubscriptionAgreement/Details.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/Details.js +0 -223
- package/dist/templates/SubscriptionAgreement/Details.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/Footer.d.ts +0 -10
- package/dist/templates/SubscriptionAgreement/Footer.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/Footer.js +0 -58
- package/dist/templates/SubscriptionAgreement/Footer.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/Header.d.ts +0 -10
- package/dist/templates/SubscriptionAgreement/Header.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/Header.js +0 -46
- package/dist/templates/SubscriptionAgreement/Header.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/LabelValue.d.ts +0 -8
- package/dist/templates/SubscriptionAgreement/LabelValue.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/LabelValue.js +0 -29
- package/dist/templates/SubscriptionAgreement/LabelValue.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.d.ts +0 -10
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +0 -33
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts +0 -8
- package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js +0 -101
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.d.ts +0 -12
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +0 -103
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/index.d.ts +0 -13
- package/dist/templates/SubscriptionAgreement/index.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/index.js +0 -271
- package/dist/templates/SubscriptionAgreement/index.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/translations.d.ts +0 -78
- package/dist/templates/SubscriptionAgreement/translations.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/translations.js +0 -662
- package/dist/templates/SubscriptionAgreement/translations.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/types.d.ts +0 -7
- package/dist/templates/SubscriptionAgreement/types.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/types.js +0 -1
- package/dist/templates/SubscriptionAgreement/types.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/utils.d.ts +0 -6
- package/dist/templates/SubscriptionAgreement/utils.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/utils.js +0 -37
- package/dist/templates/SubscriptionAgreement/utils.js.map +0 -1
- package/dist/templates/index.d.ts +0 -3
- package/dist/templates/index.d.ts.map +0 -1
- package/dist/templates/index.js +0 -2
- package/dist/templates/index.js.map +0 -1
- package/dist/theme/colors.d.ts +0 -148
- package/dist/theme/colors.d.ts.map +0 -1
- package/dist/theme/colors.js +0 -137
- package/dist/theme/colors.js.map +0 -1
- package/dist/theme/index.d.ts +0 -2
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/index.js +0 -1
- package/dist/theme/index.js.map +0 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts +0 -10
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -175
- package/dist/utils.js.map +0 -1
- package/dist/watch.d.ts +0 -2
- package/dist/watch.d.ts.map +0 -1
- package/dist/watch.js +0 -11
- package/dist/watch.js.map +0 -1
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import { Font } from '@react-pdf/renderer'
|
|
2
|
+
import gothamBlack from './GOTHAM-BLACK.TTF'
|
|
3
|
+
import gothamBlackItalic from './GOTHAM-BLACKITALIC.TTF'
|
|
4
|
+
import gothamBold from './GOTHAM-BOLD.TTF'
|
|
5
|
+
import gothamXLight from './GOTHAM-XLIGHT.TTF'
|
|
6
|
+
import gothamXLightItalic from './GOTHAM-XLIGHTITALIC.TTF'
|
|
7
|
+
import gothamBoldItalic from './Gotham-BoldItalic.otf'
|
|
8
|
+
import gothamBook from './Gotham-Book.otf'
|
|
9
|
+
import gothamBookItalic from './Gotham-BookItalic.otf'
|
|
10
|
+
import gothamExtraLight from './Gotham-ExtraLight.otf'
|
|
11
|
+
import gothamExtraLightItalic from './Gotham-ExtraLightItalic.otf'
|
|
12
|
+
import gothamLight from './Gotham-Light.otf'
|
|
13
|
+
import gothamLightItalic from './Gotham-LightItalic.otf'
|
|
14
|
+
import gothamMedium from './Gotham-Medium.otf'
|
|
15
|
+
import gothamMediumItalic from './Gotham-MediumItalic.otf'
|
|
16
|
+
// Standard Gotham fonts
|
|
17
|
+
import gothamThin from './Gotham-Thin.otf'
|
|
18
|
+
import gothamThinItalic from './Gotham-ThinItalic.otf'
|
|
19
|
+
import gothamUltra from './Gotham-Ultra.otf'
|
|
20
|
+
import gothamUltraItalic from './Gotham-UltraItalic.otf'
|
|
21
|
+
import gothamNarrowBlack from './GothamNarrow-Black.otf'
|
|
22
|
+
import gothamNarrowBlackItalic from './GothamNarrow-BlackItalic.otf'
|
|
23
|
+
import gothamNarrowBook from './GothamNarrow-Book.otf'
|
|
24
|
+
import gothamNarrowBookItalic from './GothamNarrow-BookItalic.otf'
|
|
25
|
+
import gothamNarrowLight from './GothamNarrow-Light.otf'
|
|
26
|
+
import gothamNarrowLightItalic from './GothamNarrow-LightItalic.otf'
|
|
27
|
+
import gothamNarrowMedium from './GothamNarrow-Medium.otf'
|
|
28
|
+
import gothamNarrowMediumItalic from './GothamNarrow-MediumItalic.otf'
|
|
29
|
+
// Gotham Narrow fonts
|
|
30
|
+
import gothamNarrowThin from './GothamNarrow-Thin.otf'
|
|
31
|
+
import gothamNarrowThinItalic from './GothamNarrow-ThinItalic.otf'
|
|
32
|
+
import gothamNarrowUltra from './GothamNarrow-Ultra.otf'
|
|
33
|
+
import gothamNarrowUltraItalic from './GothamNarrow-UltraItalic.otf'
|
|
34
|
+
import gothamNarrowXLight from './GothamNarrow-XLight.otf'
|
|
35
|
+
import gothamNarrowXLightItalic from './GothamNarrow-XLightItalic.otf'
|
|
36
|
+
import gothamExtraNarrowBold from './gotham-extra-narrow-bold.otf'
|
|
37
|
+
import gothamExtraNarrowBoldItalic from './gotham-extra-narrow-bold-italic.otf'
|
|
38
|
+
// Gotham Extra Narrow fonts
|
|
39
|
+
import gothamExtraNarrowBook from './gotham-extra-narrow-book.otf'
|
|
40
|
+
import gothamExtraNarrowBookItalic from './gotham-extra-narrow-book-italic.otf'
|
|
41
|
+
import gothamExtraNarrowLight from './gotham-extra-narrow-light.otf'
|
|
42
|
+
import gothamExtraNarrowLightItalic from './gotham-extra-narrow-light-italic.otf'
|
|
43
|
+
import gothamExtraNarrowMedium from './gotham-extra-narrow-medium.otf'
|
|
44
|
+
import gothamExtraNarrowMediumItalic from './gotham-extra-narrow-medium-italic.otf'
|
|
45
|
+
import gothamRoundedBold from './gotham-rounded-bold.otf'
|
|
46
|
+
import gothamRoundedBoldItalic from './gotham-rounded-bold-italic.otf'
|
|
47
|
+
// Gotham Rounded fonts
|
|
48
|
+
import gothamRoundedBook from './gotham-rounded-book.otf'
|
|
49
|
+
import gothamRoundedBookItalic from './gotham-rounded-book-italic.otf'
|
|
50
|
+
import gothamRoundedLight from './gotham-rounded-light.otf'
|
|
51
|
+
import gothamRoundedLightItalic from './gotham-rounded-light-italic.otf'
|
|
52
|
+
import gothamRoundedMedium from './gotham-rounded-medium.otf'
|
|
53
|
+
import gothamRoundedMediumItalic from './gotham-rounded-medium-italic.otf'
|
|
54
|
+
|
|
55
|
+
export const registerFonts = () => {
|
|
56
|
+
// Standard Gotham fonts
|
|
57
|
+
// Gotham-Thin
|
|
58
|
+
Font.register({
|
|
59
|
+
family: 'Gotham-Thin',
|
|
60
|
+
src: gothamThin,
|
|
61
|
+
fontStyle: 'normal',
|
|
62
|
+
fontWeight: 100,
|
|
63
|
+
})
|
|
64
|
+
Font.register({
|
|
65
|
+
family: 'Gotham-Thin',
|
|
66
|
+
src: gothamThinItalic,
|
|
67
|
+
fontStyle: 'italic',
|
|
68
|
+
fontWeight: 100,
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
// Gotham-XLight
|
|
72
|
+
Font.register({
|
|
73
|
+
family: 'Gotham-XLight',
|
|
74
|
+
src: gothamXLight,
|
|
75
|
+
fontStyle: 'normal',
|
|
76
|
+
fontWeight: 200,
|
|
77
|
+
})
|
|
78
|
+
Font.register({
|
|
79
|
+
family: 'Gotham-XLight',
|
|
80
|
+
src: gothamXLightItalic,
|
|
81
|
+
fontStyle: 'italic',
|
|
82
|
+
fontWeight: 200,
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
// Gotham-ExtraLight
|
|
86
|
+
Font.register({
|
|
87
|
+
family: 'Gotham-ExtraLight',
|
|
88
|
+
src: gothamExtraLight,
|
|
89
|
+
fontStyle: 'normal',
|
|
90
|
+
fontWeight: 200,
|
|
91
|
+
})
|
|
92
|
+
Font.register({
|
|
93
|
+
family: 'Gotham-ExtraLight',
|
|
94
|
+
src: gothamExtraLightItalic,
|
|
95
|
+
fontStyle: 'italic',
|
|
96
|
+
fontWeight: 200,
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
// Gotham-Light
|
|
100
|
+
Font.register({
|
|
101
|
+
family: 'Gotham-Light',
|
|
102
|
+
src: gothamLight,
|
|
103
|
+
fontStyle: 'normal',
|
|
104
|
+
fontWeight: 300,
|
|
105
|
+
})
|
|
106
|
+
Font.register({
|
|
107
|
+
family: 'Gotham-Light',
|
|
108
|
+
src: gothamLightItalic,
|
|
109
|
+
fontStyle: 'italic',
|
|
110
|
+
fontWeight: 300,
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
// Gotham-Book
|
|
114
|
+
Font.register({
|
|
115
|
+
family: 'Gotham-Book',
|
|
116
|
+
src: gothamBook,
|
|
117
|
+
fontStyle: 'normal',
|
|
118
|
+
fontWeight: 400,
|
|
119
|
+
})
|
|
120
|
+
Font.register({
|
|
121
|
+
family: 'Gotham-Book',
|
|
122
|
+
src: gothamBookItalic,
|
|
123
|
+
fontStyle: 'italic',
|
|
124
|
+
fontWeight: 400,
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
// Gotham-Medium
|
|
128
|
+
Font.register({
|
|
129
|
+
family: 'Gotham-Medium',
|
|
130
|
+
src: gothamMedium,
|
|
131
|
+
fontStyle: 'normal',
|
|
132
|
+
fontWeight: 500,
|
|
133
|
+
})
|
|
134
|
+
Font.register({
|
|
135
|
+
family: 'Gotham-Medium',
|
|
136
|
+
src: gothamMediumItalic,
|
|
137
|
+
fontStyle: 'italic',
|
|
138
|
+
fontWeight: 500,
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
// Gotham-Bold
|
|
142
|
+
Font.register({
|
|
143
|
+
family: 'Gotham-Bold',
|
|
144
|
+
src: gothamBold,
|
|
145
|
+
fontStyle: 'normal',
|
|
146
|
+
fontWeight: 700,
|
|
147
|
+
})
|
|
148
|
+
Font.register({
|
|
149
|
+
family: 'Gotham-Bold',
|
|
150
|
+
src: gothamBoldItalic,
|
|
151
|
+
fontStyle: 'italic',
|
|
152
|
+
fontWeight: 700,
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
// Gotham-Black
|
|
156
|
+
Font.register({
|
|
157
|
+
family: 'Gotham-Black',
|
|
158
|
+
src: gothamBlack,
|
|
159
|
+
fontStyle: 'normal',
|
|
160
|
+
fontWeight: 800,
|
|
161
|
+
})
|
|
162
|
+
Font.register({
|
|
163
|
+
family: 'Gotham-Black',
|
|
164
|
+
src: gothamBlackItalic,
|
|
165
|
+
fontStyle: 'italic',
|
|
166
|
+
fontWeight: 800,
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
// Gotham-Ultra
|
|
170
|
+
Font.register({
|
|
171
|
+
family: 'Gotham-Ultra',
|
|
172
|
+
src: gothamUltra,
|
|
173
|
+
fontStyle: 'normal',
|
|
174
|
+
fontWeight: 900,
|
|
175
|
+
})
|
|
176
|
+
Font.register({
|
|
177
|
+
family: 'Gotham-Ultra',
|
|
178
|
+
src: gothamUltraItalic,
|
|
179
|
+
fontStyle: 'italic',
|
|
180
|
+
fontWeight: 900,
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
// Gotham Narrow fonts
|
|
184
|
+
// GothamNarrow-Thin
|
|
185
|
+
Font.register({
|
|
186
|
+
family: 'GothamNarrow-Thin',
|
|
187
|
+
src: gothamNarrowThin,
|
|
188
|
+
fontStyle: 'normal',
|
|
189
|
+
fontWeight: 100,
|
|
190
|
+
})
|
|
191
|
+
Font.register({
|
|
192
|
+
family: 'GothamNarrow-Thin',
|
|
193
|
+
src: gothamNarrowThinItalic,
|
|
194
|
+
fontStyle: 'italic',
|
|
195
|
+
fontWeight: 100,
|
|
196
|
+
})
|
|
197
|
+
|
|
198
|
+
// GothamNarrow-XLight
|
|
199
|
+
Font.register({
|
|
200
|
+
family: 'GothamNarrow-XLight',
|
|
201
|
+
src: gothamNarrowXLight,
|
|
202
|
+
fontStyle: 'normal',
|
|
203
|
+
fontWeight: 200,
|
|
204
|
+
})
|
|
205
|
+
Font.register({
|
|
206
|
+
family: 'GothamNarrow-XLight',
|
|
207
|
+
src: gothamNarrowXLightItalic,
|
|
208
|
+
fontStyle: 'italic',
|
|
209
|
+
fontWeight: 200,
|
|
210
|
+
})
|
|
211
|
+
|
|
212
|
+
// GothamNarrow-Light
|
|
213
|
+
Font.register({
|
|
214
|
+
family: 'GothamNarrow-Light',
|
|
215
|
+
src: gothamNarrowLight,
|
|
216
|
+
fontStyle: 'normal',
|
|
217
|
+
fontWeight: 300,
|
|
218
|
+
})
|
|
219
|
+
Font.register({
|
|
220
|
+
family: 'GothamNarrow-Light',
|
|
221
|
+
src: gothamNarrowLightItalic,
|
|
222
|
+
fontStyle: 'italic',
|
|
223
|
+
fontWeight: 300,
|
|
224
|
+
})
|
|
225
|
+
|
|
226
|
+
// GothamNarrow-Book
|
|
227
|
+
Font.register({
|
|
228
|
+
family: 'GothamNarrow-Book',
|
|
229
|
+
src: gothamNarrowBook,
|
|
230
|
+
fontStyle: 'normal',
|
|
231
|
+
fontWeight: 400,
|
|
232
|
+
})
|
|
233
|
+
Font.register({
|
|
234
|
+
family: 'GothamNarrow-Book',
|
|
235
|
+
src: gothamNarrowBookItalic,
|
|
236
|
+
fontStyle: 'italic',
|
|
237
|
+
fontWeight: 400,
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
// GothamNarrow-Medium
|
|
241
|
+
Font.register({
|
|
242
|
+
family: 'GothamNarrow-Medium',
|
|
243
|
+
src: gothamNarrowMedium,
|
|
244
|
+
fontStyle: 'normal',
|
|
245
|
+
fontWeight: 500,
|
|
246
|
+
})
|
|
247
|
+
Font.register({
|
|
248
|
+
family: 'GothamNarrow-Medium',
|
|
249
|
+
src: gothamNarrowMediumItalic,
|
|
250
|
+
fontStyle: 'italic',
|
|
251
|
+
fontWeight: 500,
|
|
252
|
+
})
|
|
253
|
+
|
|
254
|
+
// GothamNarrow-Black
|
|
255
|
+
Font.register({
|
|
256
|
+
family: 'GothamNarrow-Black',
|
|
257
|
+
src: gothamNarrowBlack,
|
|
258
|
+
fontStyle: 'normal',
|
|
259
|
+
fontWeight: 800,
|
|
260
|
+
})
|
|
261
|
+
Font.register({
|
|
262
|
+
family: 'GothamNarrow-Black',
|
|
263
|
+
src: gothamNarrowBlackItalic,
|
|
264
|
+
fontStyle: 'italic',
|
|
265
|
+
fontWeight: 800,
|
|
266
|
+
})
|
|
267
|
+
|
|
268
|
+
// GothamNarrow-Ultra
|
|
269
|
+
Font.register({
|
|
270
|
+
family: 'GothamNarrow-Ultra',
|
|
271
|
+
src: gothamNarrowUltra,
|
|
272
|
+
fontStyle: 'normal',
|
|
273
|
+
fontWeight: 900,
|
|
274
|
+
})
|
|
275
|
+
Font.register({
|
|
276
|
+
family: 'GothamNarrow-Ultra',
|
|
277
|
+
src: gothamNarrowUltraItalic,
|
|
278
|
+
fontStyle: 'italic',
|
|
279
|
+
fontWeight: 900,
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
// Gotham Rounded fonts
|
|
283
|
+
// GothamRounded-Book
|
|
284
|
+
Font.register({
|
|
285
|
+
family: 'GothamRounded-Book',
|
|
286
|
+
src: gothamRoundedBook,
|
|
287
|
+
fontStyle: 'normal',
|
|
288
|
+
fontWeight: 400,
|
|
289
|
+
})
|
|
290
|
+
Font.register({
|
|
291
|
+
family: 'GothamRounded-Book',
|
|
292
|
+
src: gothamRoundedBookItalic,
|
|
293
|
+
fontStyle: 'italic',
|
|
294
|
+
fontWeight: 400,
|
|
295
|
+
})
|
|
296
|
+
|
|
297
|
+
// GothamRounded-Light
|
|
298
|
+
Font.register({
|
|
299
|
+
family: 'GothamRounded-Light',
|
|
300
|
+
src: gothamRoundedLight,
|
|
301
|
+
fontStyle: 'normal',
|
|
302
|
+
fontWeight: 300,
|
|
303
|
+
})
|
|
304
|
+
Font.register({
|
|
305
|
+
family: 'GothamRounded-Light',
|
|
306
|
+
src: gothamRoundedLightItalic,
|
|
307
|
+
fontStyle: 'italic',
|
|
308
|
+
fontWeight: 300,
|
|
309
|
+
})
|
|
310
|
+
|
|
311
|
+
// GothamRounded-Medium
|
|
312
|
+
Font.register({
|
|
313
|
+
family: 'GothamRounded-Medium',
|
|
314
|
+
src: gothamRoundedMedium,
|
|
315
|
+
fontStyle: 'normal',
|
|
316
|
+
fontWeight: 500,
|
|
317
|
+
})
|
|
318
|
+
Font.register({
|
|
319
|
+
family: 'GothamRounded-Medium',
|
|
320
|
+
src: gothamRoundedMediumItalic,
|
|
321
|
+
fontStyle: 'italic',
|
|
322
|
+
fontWeight: 500,
|
|
323
|
+
})
|
|
324
|
+
|
|
325
|
+
// GothamRounded-Bold
|
|
326
|
+
Font.register({
|
|
327
|
+
family: 'GothamRounded-Bold',
|
|
328
|
+
src: gothamRoundedBold,
|
|
329
|
+
fontStyle: 'normal',
|
|
330
|
+
fontWeight: 700,
|
|
331
|
+
})
|
|
332
|
+
Font.register({
|
|
333
|
+
family: 'GothamRounded-Bold',
|
|
334
|
+
src: gothamRoundedBoldItalic,
|
|
335
|
+
fontStyle: 'italic',
|
|
336
|
+
fontWeight: 700,
|
|
337
|
+
})
|
|
338
|
+
|
|
339
|
+
// Gotham Extra Narrow fonts
|
|
340
|
+
// GothamExtraNarrow-Book
|
|
341
|
+
Font.register({
|
|
342
|
+
family: 'GothamExtraNarrow-Book',
|
|
343
|
+
src: gothamExtraNarrowBook,
|
|
344
|
+
fontStyle: 'normal',
|
|
345
|
+
fontWeight: 400,
|
|
346
|
+
})
|
|
347
|
+
Font.register({
|
|
348
|
+
family: 'GothamExtraNarrow-Book',
|
|
349
|
+
src: gothamExtraNarrowBookItalic,
|
|
350
|
+
fontStyle: 'italic',
|
|
351
|
+
fontWeight: 400,
|
|
352
|
+
})
|
|
353
|
+
|
|
354
|
+
// GothamExtraNarrow-Light
|
|
355
|
+
Font.register({
|
|
356
|
+
family: 'GothamExtraNarrow-Light',
|
|
357
|
+
src: gothamExtraNarrowLight,
|
|
358
|
+
fontStyle: 'normal',
|
|
359
|
+
fontWeight: 300,
|
|
360
|
+
})
|
|
361
|
+
Font.register({
|
|
362
|
+
family: 'GothamExtraNarrow-Light',
|
|
363
|
+
src: gothamExtraNarrowLightItalic,
|
|
364
|
+
fontStyle: 'italic',
|
|
365
|
+
fontWeight: 300,
|
|
366
|
+
})
|
|
367
|
+
|
|
368
|
+
// GothamExtraNarrow-Medium
|
|
369
|
+
Font.register({
|
|
370
|
+
family: 'GothamExtraNarrow-Medium',
|
|
371
|
+
src: gothamExtraNarrowMedium,
|
|
372
|
+
fontStyle: 'normal',
|
|
373
|
+
fontWeight: 500,
|
|
374
|
+
})
|
|
375
|
+
Font.register({
|
|
376
|
+
family: 'GothamExtraNarrow-Medium',
|
|
377
|
+
src: gothamExtraNarrowMediumItalic,
|
|
378
|
+
fontStyle: 'italic',
|
|
379
|
+
fontWeight: 500,
|
|
380
|
+
})
|
|
381
|
+
|
|
382
|
+
// GothamExtraNarrow-Bold
|
|
383
|
+
Font.register({
|
|
384
|
+
family: 'GothamExtraNarrow-Bold',
|
|
385
|
+
src: gothamExtraNarrowBold,
|
|
386
|
+
fontStyle: 'normal',
|
|
387
|
+
fontWeight: 700,
|
|
388
|
+
})
|
|
389
|
+
Font.register({
|
|
390
|
+
family: 'GothamExtraNarrow-Bold',
|
|
391
|
+
src: gothamExtraNarrowBoldItalic,
|
|
392
|
+
fontStyle: 'italic',
|
|
393
|
+
fontWeight: 700,
|
|
394
|
+
})
|
|
395
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NuqsAdapter } from 'nuqs/adapters/react'
|
|
2
|
+
import { StrictMode } from 'react'
|
|
3
|
+
import { createRoot } from 'react-dom/client'
|
|
4
|
+
import { App } from './client/app'
|
|
5
|
+
|
|
6
|
+
const elem = document.getElementById('root')!
|
|
7
|
+
const app = (
|
|
8
|
+
<StrictMode>
|
|
9
|
+
<NuqsAdapter>
|
|
10
|
+
<App />
|
|
11
|
+
</NuqsAdapter>
|
|
12
|
+
</StrictMode>
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
if (import.meta.hot) {
|
|
16
|
+
// With hot module reloading, `import.meta.hot.data` is persisted.
|
|
17
|
+
// biome-ignore lint/suspicious/noAssignInExpressions: generated by bun
|
|
18
|
+
const root = (import.meta.hot.data.root ??= createRoot(elem))
|
|
19
|
+
root.render(app)
|
|
20
|
+
} else {
|
|
21
|
+
// The hot module reloading API is not available in production.
|
|
22
|
+
createRoot(elem).render(app)
|
|
23
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "../../node_modules/@driveflux/beam/dist/base-styles.css";
|
|
3
|
+
@source "../../node_modules/@driveflux/beam/dist";
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
|
|
7
|
+
h1,
|
|
8
|
+
h2,
|
|
9
|
+
h3,
|
|
10
|
+
h4 {
|
|
11
|
+
font-family: "Gotham-Bold", sans-serif;
|
|
12
|
+
text-transform: uppercase;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
letter-spacing: 1px;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
li {
|
|
21
|
+
margin-left: 16px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@layer utilities {
|
|
26
|
+
|
|
27
|
+
/* Hide scrollbar for Chrome, Safari and Opera */
|
|
28
|
+
.no-scrollbar::-webkit-scrollbar {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Hide scrollbar for IE, Edge and Firefox */
|
|
33
|
+
.no-scrollbar {
|
|
34
|
+
-ms-overflow-style: none;
|
|
35
|
+
/* IE and Edge */
|
|
36
|
+
scrollbar-width: none;
|
|
37
|
+
/* Firefox */
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Preview PDF</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body class="text-base">
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="./frontend.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { serve } from 'bun'
|
|
2
|
+
import { api } from './api'
|
|
3
|
+
import preview from './preview.html'
|
|
4
|
+
|
|
5
|
+
const extractPort = (url: string | undefined) => {
|
|
6
|
+
if (!url) return 3000
|
|
7
|
+
const urlObj = new URL(url)
|
|
8
|
+
return urlObj.port
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const server = serve({
|
|
12
|
+
routes: {
|
|
13
|
+
// Serve preview.html for all unmatched routes.
|
|
14
|
+
'/': preview,
|
|
15
|
+
'/api/*': api.handle,
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
development: process.env.NODE_ENV !== 'production' && {
|
|
19
|
+
// Enable browser hot reloading in development
|
|
20
|
+
hmr: true,
|
|
21
|
+
|
|
22
|
+
// Echo console logs from the browser to the server
|
|
23
|
+
console: true,
|
|
24
|
+
},
|
|
25
|
+
port: extractPort(process.env.FLUX_PUBLIC_APP_URL),
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
console.log(`🚀 Server running at ${server.url}`)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { prisma } from '@driveflux/db'
|
|
2
|
+
import { PDFErrors } from './errors'
|
|
3
|
+
|
|
4
|
+
class PDFRepository {
|
|
5
|
+
async getInvoiceForPDF(invoiceId: string) {
|
|
6
|
+
const invoice = await prisma.invoice.findUnique({
|
|
7
|
+
where: {
|
|
8
|
+
id: invoiceId,
|
|
9
|
+
},
|
|
10
|
+
select: {
|
|
11
|
+
id: true,
|
|
12
|
+
eInvoice: true,
|
|
13
|
+
total: true,
|
|
14
|
+
lines: true,
|
|
15
|
+
subscriptionDetails: true,
|
|
16
|
+
payerName: true,
|
|
17
|
+
billingAddress: true,
|
|
18
|
+
payerPhoneNumber: true,
|
|
19
|
+
payerEmail: true,
|
|
20
|
+
paidAt: true,
|
|
21
|
+
createdAt: true,
|
|
22
|
+
date: true,
|
|
23
|
+
paid: true,
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
if (!invoice) {
|
|
28
|
+
throw new PDFErrors.InvoiceNotFound(`Invoice ${invoiceId} not found`)
|
|
29
|
+
}
|
|
30
|
+
if (!invoice.eInvoice) {
|
|
31
|
+
throw new PDFErrors.InvoiceNotEInvoice(invoiceId)
|
|
32
|
+
}
|
|
33
|
+
return invoice as Omit<typeof invoice, 'eInvoice'> & {
|
|
34
|
+
eInvoice: NonNullable<typeof invoice.eInvoice>
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const repository = new PDFRepository()
|
|
Binary file
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { StyleSheet, Text, View } from '@react-pdf/renderer'
|
|
2
|
+
import { colors } from './colors'
|
|
3
|
+
|
|
4
|
+
type CompanyDetailsProps = {
|
|
5
|
+
title: string
|
|
6
|
+
companyName: string
|
|
7
|
+
address: string
|
|
8
|
+
sstNumber: string
|
|
9
|
+
tinNumber: string
|
|
10
|
+
invoiceNumber: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const styles = StyleSheet.create({
|
|
14
|
+
title: {
|
|
15
|
+
fontFamily: 'Gotham-Medium',
|
|
16
|
+
fontSize: 8,
|
|
17
|
+
fontWeight: 500,
|
|
18
|
+
color: colors.primaryBlack,
|
|
19
|
+
marginBottom: 2,
|
|
20
|
+
},
|
|
21
|
+
companyName: {
|
|
22
|
+
fontFamily: 'Gotham-Medium',
|
|
23
|
+
fontSize: 6,
|
|
24
|
+
fontWeight: 500,
|
|
25
|
+
color: colors.darkGrey,
|
|
26
|
+
},
|
|
27
|
+
address: {
|
|
28
|
+
fontFamily: 'Gotham-Book',
|
|
29
|
+
fontSize: 6,
|
|
30
|
+
fontWeight: 400,
|
|
31
|
+
color: colors.darkGrey,
|
|
32
|
+
},
|
|
33
|
+
detailsContainer: {
|
|
34
|
+
display: 'flex',
|
|
35
|
+
flexDirection: 'column',
|
|
36
|
+
alignSelf: 'stretch',
|
|
37
|
+
},
|
|
38
|
+
item: {
|
|
39
|
+
display: 'flex',
|
|
40
|
+
flexDirection: 'row',
|
|
41
|
+
alignSelf: 'stretch',
|
|
42
|
+
minHeight: 0,
|
|
43
|
+
},
|
|
44
|
+
titleContainer: {
|
|
45
|
+
width: 60,
|
|
46
|
+
flexShrink: 0,
|
|
47
|
+
flexGrow: 0,
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexDirection: 'row',
|
|
50
|
+
justifyContent: 'flex-start',
|
|
51
|
+
},
|
|
52
|
+
detailsTitle: {
|
|
53
|
+
fontFamily: 'Gotham-Book',
|
|
54
|
+
fontSize: 6,
|
|
55
|
+
fontWeight: 400,
|
|
56
|
+
color: colors.darkGrey,
|
|
57
|
+
textAlign: 'right',
|
|
58
|
+
},
|
|
59
|
+
colon: {
|
|
60
|
+
fontFamily: 'Gotham-Book',
|
|
61
|
+
fontSize: 6,
|
|
62
|
+
fontWeight: 400,
|
|
63
|
+
color: colors.darkGrey,
|
|
64
|
+
width: 6,
|
|
65
|
+
marginLeft: 2,
|
|
66
|
+
flexShrink: 0,
|
|
67
|
+
flexGrow: 0,
|
|
68
|
+
},
|
|
69
|
+
details: {
|
|
70
|
+
fontFamily: 'Gotham-Medium',
|
|
71
|
+
fontSize: 6,
|
|
72
|
+
fontWeight: 500,
|
|
73
|
+
color: colors.primaryBlack,
|
|
74
|
+
flex: 1,
|
|
75
|
+
marginLeft: 0,
|
|
76
|
+
},
|
|
77
|
+
container: {
|
|
78
|
+
display: 'flex',
|
|
79
|
+
flexDirection: 'column',
|
|
80
|
+
gap: 2,
|
|
81
|
+
alignSelf: 'stretch',
|
|
82
|
+
},
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
export const CompanyDetails = ({
|
|
86
|
+
title,
|
|
87
|
+
companyName,
|
|
88
|
+
address,
|
|
89
|
+
sstNumber,
|
|
90
|
+
tinNumber,
|
|
91
|
+
invoiceNumber,
|
|
92
|
+
}: CompanyDetailsProps) => {
|
|
93
|
+
return (
|
|
94
|
+
<View style={styles.container}>
|
|
95
|
+
<Text style={styles.title}>{title}</Text>
|
|
96
|
+
<Text style={styles.companyName}>{companyName}</Text>
|
|
97
|
+
<Text style={styles.address}>{address}</Text>
|
|
98
|
+
|
|
99
|
+
<View style={styles.detailsContainer}>
|
|
100
|
+
<View style={styles.item}>
|
|
101
|
+
<View style={styles.titleContainer}>
|
|
102
|
+
<Text style={styles.detailsTitle}>SST No</Text>
|
|
103
|
+
</View>
|
|
104
|
+
<Text style={styles.colon}>:</Text>
|
|
105
|
+
<Text style={styles.details}>{sstNumber}</Text>
|
|
106
|
+
</View>
|
|
107
|
+
<View style={styles.item}>
|
|
108
|
+
<View style={styles.titleContainer}>
|
|
109
|
+
<Text style={styles.detailsTitle}>TIN No</Text>
|
|
110
|
+
</View>
|
|
111
|
+
<Text style={styles.colon}>:</Text>
|
|
112
|
+
<Text style={styles.details}>{tinNumber}</Text>
|
|
113
|
+
</View>
|
|
114
|
+
<View style={styles.item}>
|
|
115
|
+
<View style={styles.titleContainer}>
|
|
116
|
+
<Text style={styles.detailsTitle}>Invoice No</Text>
|
|
117
|
+
</View>
|
|
118
|
+
<Text style={styles.colon}>:</Text>
|
|
119
|
+
<Text style={styles.details}>{invoiceNumber}</Text>
|
|
120
|
+
</View>
|
|
121
|
+
</View>
|
|
122
|
+
</View>
|
|
123
|
+
)
|
|
124
|
+
}
|