-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: CXINT-1851: PDF Invoices feature library (#17807)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
4246b61
commit b519cbc
Showing
126 changed files
with
5,157 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "../../.eslintrc.json", | ||
"ignorePatterns": ["schematics/**/*.d.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# PDF Invoices | ||
|
||
This feature allows users to view invoices for their orders and download PDF invoices using `Invoices` APIs. | ||
When the user selects an invoice, the backend returns a byte array, which is converted to PDF and downloaded. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@import '@spartacus/styles/scss/core'; | ||
@import './styles/index'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", | ||
"lib": { | ||
"entryFile": "./public_api.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 SAP Spartacus team <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export * from './translations/translations'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 SAP Spartacus team <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { pdfInvoices } from './pdf-invoices'; | ||
|
||
export const en = { | ||
pdfInvoices, | ||
}; |
39 changes: 39 additions & 0 deletions
39
feature-libs/pdf-invoices/assets/translations/en/pdf-invoices.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 SAP Spartacus team <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export const pdfInvoices = { | ||
pdfInvoices: { | ||
featureNotEnabled: | ||
'Unable to obtain invoices, ensure that SAP Invoice and API for Invoices are enabled.', | ||
invoicesLoadingError: | ||
'Something went wrong. Unable to display invoices for the order', | ||
invoicesTable: { | ||
header: 'Invoices', | ||
label: 'Invoices Table', | ||
invoiceId: 'Invoice #', | ||
createdAt: 'Date', | ||
netAmount: 'Net Amount', | ||
totalAmount: 'Total Amount', | ||
attachment: 'Download Invoice', | ||
download: 'Download', | ||
attachmentDescription: 'Download PDF for invoice {{id}}.', | ||
noneFound: 'No Invoices Found', | ||
}, | ||
downloadPDFError: 'Something went wrong. Unable to obtain the invoice PDF.', | ||
sortBy: 'Sort by', | ||
sortInvoices: 'Sort invoices', | ||
sorts: { | ||
byCreatedAtAsc: 'Date Ascending', | ||
byCreatedAtDesc: 'Date Descending', | ||
byInvoiceIdAsc: 'Invoice Number Ascending', | ||
byInvoiceIdDesc: 'Invoice Number Descending', | ||
byNetAmountAsc: 'Net Amount Ascending', | ||
byNetAmountDesc: 'Net Amount Descending', | ||
byTotalAmountAsc: 'Total Amount Ascending', | ||
byTotalAmountDesc: 'Total Amount Descending', | ||
}, | ||
}, | ||
}; |
16 changes: 16 additions & 0 deletions
16
feature-libs/pdf-invoices/assets/translations/translations.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 SAP Spartacus team <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; | ||
import { en } from './en/index'; | ||
|
||
export const pdfInvoicesTranslations: TranslationResources = { | ||
en, | ||
}; | ||
|
||
export const pdfInvoicesTranslationChunksConfig: TranslationChunksConfig = { | ||
pdfInvoices: ['pdfInvoices'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 SAP Spartacus team <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export * from './pdf-invoices-components.module'; |
Oops, something went wrong.