@things-factory/accounting 9.0.0-beta.27 → 9.0.0-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/activities/activity-book-edit.d.ts +14 -0
- package/dist-client/activities/activity-book-edit.js +85 -0
- package/dist-client/activities/activity-book-edit.js.map +1 -0
- package/dist-client/activities/activity-book-view.d.ts +14 -0
- package/dist-client/activities/activity-book-view.js +85 -0
- package/dist-client/activities/activity-book-view.js.map +1 -0
- package/dist-client/activities/activity-expense-edit.d.ts +14 -0
- package/dist-client/activities/activity-expense-edit.js +85 -0
- package/dist-client/activities/activity-expense-edit.js.map +1 -0
- package/dist-client/activities/activity-expense-view.d.ts +14 -0
- package/dist-client/activities/activity-expense-view.js +85 -0
- package/dist-client/activities/activity-expense-view.js.map +1 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +8 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/components/accounting-category-selector.d.ts +16 -0
- package/dist-client/components/accounting-category-selector.js +134 -0
- package/dist-client/components/accounting-category-selector.js.map +1 -0
- package/dist-client/components/accounting-category-view.d.ts +14 -0
- package/dist-client/components/accounting-category-view.js +81 -0
- package/dist-client/components/accounting-category-view.js.map +1 -0
- package/dist-client/grist-editors/grist-editor-accounting-category-object.d.ts +11 -0
- package/dist-client/grist-editors/grist-editor-accounting-category-object.js +71 -0
- package/dist-client/grist-editors/grist-editor-accounting-category-object.js.map +1 -0
- package/dist-client/grist-editors/grist-renderer-accounting-category-object.d.ts +2 -0
- package/dist-client/grist-editors/grist-renderer-accounting-category-object.js +9 -0
- package/dist-client/grist-editors/grist-renderer-accounting-category-object.js.map +1 -0
- package/dist-client/index.d.ts +0 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/account/account-importer.d.ts +22 -0
- package/dist-client/pages/account/account-importer.js +100 -0
- package/dist-client/pages/account/account-importer.js.map +1 -0
- package/dist-client/pages/account/account-list-page.d.ts +63 -0
- package/dist-client/pages/account/account-list-page.js +350 -0
- package/dist-client/pages/account/account-list-page.js.map +1 -0
- package/dist-client/pages/accounting-category/accounting-category-importer.d.ts +22 -0
- package/dist-client/pages/accounting-category/accounting-category-importer.js +100 -0
- package/dist-client/pages/accounting-category/accounting-category-importer.js.map +1 -0
- package/dist-client/pages/accounting-category/accounting-category-list-page.d.ts +63 -0
- package/dist-client/pages/accounting-category/accounting-category-list-page.js +354 -0
- package/dist-client/pages/accounting-category/accounting-category-list-page.js.map +1 -0
- package/dist-client/pages/accounting-category/accounting-category-tree-page.d.ts +46 -0
- package/dist-client/pages/accounting-category/accounting-category-tree-page.js +329 -0
- package/dist-client/pages/accounting-category/accounting-category-tree-page.js.map +1 -0
- package/dist-client/pages/accounting-document/accounting-document-importer.d.ts +23 -0
- package/dist-client/pages/accounting-document/accounting-document-importer.js +93 -0
- package/dist-client/pages/accounting-document/accounting-document-importer.js.map +1 -0
- package/dist-client/pages/accounting-document/accounting-document-list-page.d.ts +66 -0
- package/dist-client/pages/accounting-document/accounting-document-list-page.js +370 -0
- package/dist-client/pages/accounting-document/accounting-document-list-page.js.map +1 -0
- package/dist-client/pages/bank/bank-importer.d.ts +23 -0
- package/dist-client/pages/bank/bank-importer.js +93 -0
- package/dist-client/pages/bank/bank-importer.js.map +1 -0
- package/dist-client/pages/bank/bank-list-page.d.ts +66 -0
- package/dist-client/pages/bank/bank-list-page.js +370 -0
- package/dist-client/pages/bank/bank-list-page.js.map +1 -0
- package/dist-client/pages/bank-account/bank-account-importer.d.ts +23 -0
- package/dist-client/pages/bank-account/bank-account-importer.js +93 -0
- package/dist-client/pages/bank-account/bank-account-importer.js.map +1 -0
- package/dist-client/pages/bank-account/bank-account-list-page.d.ts +66 -0
- package/dist-client/pages/bank-account/bank-account-list-page.js +370 -0
- package/dist-client/pages/bank-account/bank-account-list-page.js.map +1 -0
- package/dist-client/pages/financial-institution/financial-institution-importer.d.ts +23 -0
- package/dist-client/pages/financial-institution/financial-institution-importer.js +93 -0
- package/dist-client/pages/financial-institution/financial-institution-importer.js.map +1 -0
- package/dist-client/pages/financial-institution/financial-institution-list-page.d.ts +66 -0
- package/dist-client/pages/financial-institution/financial-institution-list-page.js +370 -0
- package/dist-client/pages/financial-institution/financial-institution-list-page.js.map +1 -0
- package/dist-client/pages/financial-statement/financial-statement-importer.d.ts +22 -0
- package/dist-client/pages/financial-statement/financial-statement-importer.js +100 -0
- package/dist-client/pages/financial-statement/financial-statement-importer.js.map +1 -0
- package/dist-client/pages/financial-statement/financial-statement-list-page.d.ts +63 -0
- package/dist-client/pages/financial-statement/financial-statement-list-page.js +324 -0
- package/dist-client/pages/financial-statement/financial-statement-list-page.js.map +1 -0
- package/dist-client/pages/fiscal-month/fiscal-month-importer.d.ts +23 -0
- package/dist-client/pages/fiscal-month/fiscal-month-importer.js +93 -0
- package/dist-client/pages/fiscal-month/fiscal-month-importer.js.map +1 -0
- package/dist-client/pages/fiscal-month/fiscal-month-list-page.d.ts +66 -0
- package/dist-client/pages/fiscal-month/fiscal-month-list-page.js +370 -0
- package/dist-client/pages/fiscal-month/fiscal-month-list-page.js.map +1 -0
- package/dist-client/pages/fiscal-quarter/fiscal-quarter-importer.d.ts +23 -0
- package/dist-client/pages/fiscal-quarter/fiscal-quarter-importer.js +93 -0
- package/dist-client/pages/fiscal-quarter/fiscal-quarter-importer.js.map +1 -0
- package/dist-client/pages/fiscal-quarter/fiscal-quarter-list-page.d.ts +66 -0
- package/dist-client/pages/fiscal-quarter/fiscal-quarter-list-page.js +370 -0
- package/dist-client/pages/fiscal-quarter/fiscal-quarter-list-page.js.map +1 -0
- package/dist-client/pages/fiscal-year/fiscal-year-importer.d.ts +23 -0
- package/dist-client/pages/fiscal-year/fiscal-year-importer.js +93 -0
- package/dist-client/pages/fiscal-year/fiscal-year-importer.js.map +1 -0
- package/dist-client/pages/fiscal-year/fiscal-year-list-page.d.ts +66 -0
- package/dist-client/pages/fiscal-year/fiscal-year-list-page.js +370 -0
- package/dist-client/pages/fiscal-year/fiscal-year-list-page.js.map +1 -0
- package/dist-client/pages/income-statement/income-statement-importer.d.ts +22 -0
- package/dist-client/pages/income-statement/income-statement-importer.js +100 -0
- package/dist-client/pages/income-statement/income-statement-importer.js.map +1 -0
- package/dist-client/pages/income-statement/income-statement-list-page.d.ts +63 -0
- package/dist-client/pages/income-statement/income-statement-list-page.js +324 -0
- package/dist-client/pages/income-statement/income-statement-list-page.js.map +1 -0
- package/dist-client/pages/payment/payment-importer.d.ts +23 -0
- package/dist-client/pages/payment/payment-importer.js +93 -0
- package/dist-client/pages/payment/payment-importer.js.map +1 -0
- package/dist-client/pages/payment/payment-list-page.d.ts +66 -0
- package/dist-client/pages/payment/payment-list-page.js +370 -0
- package/dist-client/pages/payment/payment-list-page.js.map +1 -0
- package/dist-client/pages/transaction/transaction-importer.d.ts +22 -0
- package/dist-client/pages/transaction/transaction-importer.js +100 -0
- package/dist-client/pages/transaction/transaction-importer.js.map +1 -0
- package/dist-client/pages/transaction/transaction-list-page.d.ts +63 -0
- package/dist-client/pages/transaction/transaction-list-page.js +324 -0
- package/dist-client/pages/transaction/transaction-list-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +29 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/types/accounting-category.d.ts +16 -0
- package/dist-client/types/accounting-category.js +3 -0
- package/dist-client/types/accounting-category.js.map +1 -0
- package/dist-client/types/index.d.ts +1 -0
- package/dist-client/types/index.js +2 -0
- package/dist-client/types/index.js.map +1 -0
- package/dist-server/activities/activity-book.d.ts +58 -0
- package/dist-server/activities/activity-book.js +163 -0
- package/dist-server/activities/activity-book.js.map +1 -0
- package/dist-server/activities/activity-expense.d.ts +58 -0
- package/dist-server/activities/activity-expense.js +150 -0
- package/dist-server/activities/activity-expense.js.map +1 -0
- package/dist-server/activities/index.d.ts +1 -0
- package/dist-server/activities/index.js +19 -0
- package/dist-server/activities/index.js.map +1 -0
- package/dist-server/controllers/index.d.ts +1 -0
- package/dist-server/controllers/index.js +5 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/controllers/summary-statements.d.ts +4 -0
- package/dist-server/controllers/summary-statements.js +149 -0
- package/dist-server/controllers/summary-statements.js.map +1 -0
- package/dist-server/index.d.ts +5 -0
- package/dist-server/index.js +9 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/middlewares/index.d.ts +1 -0
- package/dist-server/middlewares/index.js +7 -0
- package/dist-server/middlewares/index.js.map +1 -0
- package/dist-server/migrations/1725200507196-seed-fiscal-entities.d.ts +5 -0
- package/dist-server/migrations/1725200507196-seed-fiscal-entities.js +95 -0
- package/dist-server/migrations/1725200507196-seed-fiscal-entities.js.map +1 -0
- package/dist-server/migrations/1725201467183-seed-accounts.d.ts +5 -0
- package/dist-server/migrations/1725201467183-seed-accounts.js +318 -0
- package/dist-server/migrations/1725201467183-seed-accounts.js.map +1 -0
- package/dist-server/migrations/1725201567284-seed-country-codes.d.ts +5 -0
- package/dist-server/migrations/1725201567284-seed-country-codes.js +248 -0
- package/dist-server/migrations/1725201567284-seed-country-codes.js.map +1 -0
- package/dist-server/migrations/1725201667385-seed-financial-institutions.d.ts +5 -0
- package/dist-server/migrations/1725201667385-seed-financial-institutions.js +348 -0
- package/dist-server/migrations/1725201667385-seed-financial-institutions.js.map +1 -0
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/migrations/index.js +12 -0
- package/dist-server/migrations/index.js.map +1 -0
- package/dist-server/routes.d.ts +0 -0
- package/dist-server/routes.js +24 -0
- package/dist-server/routes.js.map +1 -0
- package/dist-server/service/account/account-history.d.ts +26 -0
- package/dist-server/service/account/account-history.js +128 -0
- package/dist-server/service/account/account-history.js.map +1 -0
- package/dist-server/service/account/account-mutation.d.ts +10 -0
- package/dist-server/service/account/account-mutation.js +134 -0
- package/dist-server/service/account/account-mutation.js.map +1 -0
- package/dist-server/service/account/account-query.d.ts +11 -0
- package/dist-server/service/account/account-query.js +81 -0
- package/dist-server/service/account/account-query.js.map +1 -0
- package/dist-server/service/account/account-type.d.ts +17 -0
- package/dist-server/service/account/account-type.js +65 -0
- package/dist-server/service/account/account-type.js.map +1 -0
- package/dist-server/service/account/account.d.ts +22 -0
- package/dist-server/service/account/account.js +113 -0
- package/dist-server/service/account/account.js.map +1 -0
- package/dist-server/service/account/event-subscriber.d.ts +7 -0
- package/dist-server/service/account/event-subscriber.js +21 -0
- package/dist-server/service/account/event-subscriber.js.map +1 -0
- package/dist-server/service/account/index.d.ts +7 -0
- package/dist-server/service/account/index.js +12 -0
- package/dist-server/service/account/index.js.map +1 -0
- package/dist-server/service/accounting-category/accounting-category-history.d.ts +26 -0
- package/dist-server/service/accounting-category/accounting-category-history.js +141 -0
- package/dist-server/service/accounting-category/accounting-category-history.js.map +1 -0
- package/dist-server/service/accounting-category/accounting-category-mutation.d.ts +10 -0
- package/dist-server/service/accounting-category/accounting-category-mutation.js +136 -0
- package/dist-server/service/accounting-category/accounting-category-mutation.js.map +1 -0
- package/dist-server/service/accounting-category/accounting-category-query.d.ts +12 -0
- package/dist-server/service/accounting-category/accounting-category-query.js +102 -0
- package/dist-server/service/accounting-category/accounting-category-query.js.map +1 -0
- package/dist-server/service/accounting-category/accounting-category-type.d.ts +19 -0
- package/dist-server/service/accounting-category/accounting-category-type.js +73 -0
- package/dist-server/service/accounting-category/accounting-category-type.js.map +1 -0
- package/dist-server/service/accounting-category/accounting-category.d.ts +21 -0
- package/dist-server/service/accounting-category/accounting-category.js +105 -0
- package/dist-server/service/accounting-category/accounting-category.js.map +1 -0
- package/dist-server/service/accounting-category/event-subscriber.d.ts +7 -0
- package/dist-server/service/accounting-category/event-subscriber.js +21 -0
- package/dist-server/service/accounting-category/event-subscriber.js.map +1 -0
- package/dist-server/service/accounting-category/index.d.ts +7 -0
- package/dist-server/service/accounting-category/index.js +12 -0
- package/dist-server/service/accounting-category/index.js.map +1 -0
- package/dist-server/service/accounting-document/accounting-document-history.d.ts +26 -0
- package/dist-server/service/accounting-document/accounting-document-history.js +134 -0
- package/dist-server/service/accounting-document/accounting-document-history.js.map +1 -0
- package/dist-server/service/accounting-document/accounting-document-mutation.d.ts +10 -0
- package/dist-server/service/accounting-document/accounting-document-mutation.js +128 -0
- package/dist-server/service/accounting-document/accounting-document-mutation.js.map +1 -0
- package/dist-server/service/accounting-document/accounting-document-query.d.ts +11 -0
- package/dist-server/service/accounting-document/accounting-document-query.js +79 -0
- package/dist-server/service/accounting-document/accounting-document-query.js.map +1 -0
- package/dist-server/service/accounting-document/accounting-document-type.d.ts +20 -0
- package/dist-server/service/accounting-document/accounting-document-type.js +74 -0
- package/dist-server/service/accounting-document/accounting-document-type.js.map +1 -0
- package/dist-server/service/accounting-document/accounting-document.d.ts +21 -0
- package/dist-server/service/accounting-document/accounting-document.js +104 -0
- package/dist-server/service/accounting-document/accounting-document.js.map +1 -0
- package/dist-server/service/accounting-document/event-subscriber.d.ts +7 -0
- package/dist-server/service/accounting-document/event-subscriber.js +21 -0
- package/dist-server/service/accounting-document/event-subscriber.js.map +1 -0
- package/dist-server/service/accounting-document/index.d.ts +7 -0
- package/dist-server/service/accounting-document/index.js +12 -0
- package/dist-server/service/accounting-document/index.js.map +1 -0
- package/dist-server/service/bank-account/bank-account-history.d.ts +34 -0
- package/dist-server/service/bank-account/bank-account-history.js +172 -0
- package/dist-server/service/bank-account/bank-account-history.js.map +1 -0
- package/dist-server/service/bank-account/bank-account-mutation.d.ts +10 -0
- package/dist-server/service/bank-account/bank-account-mutation.js +128 -0
- package/dist-server/service/bank-account/bank-account-mutation.js.map +1 -0
- package/dist-server/service/bank-account/bank-account-query.d.ts +11 -0
- package/dist-server/service/bank-account/bank-account-query.js +79 -0
- package/dist-server/service/bank-account/bank-account-query.js.map +1 -0
- package/dist-server/service/bank-account/bank-account-type.d.ts +39 -0
- package/dist-server/service/bank-account/bank-account-type.js +153 -0
- package/dist-server/service/bank-account/bank-account-type.js.map +1 -0
- package/dist-server/service/bank-account/bank-account.d.ts +38 -0
- package/dist-server/service/bank-account/bank-account.js +164 -0
- package/dist-server/service/bank-account/bank-account.js.map +1 -0
- package/dist-server/service/bank-account/event-subscriber.d.ts +7 -0
- package/dist-server/service/bank-account/event-subscriber.js +21 -0
- package/dist-server/service/bank-account/event-subscriber.js.map +1 -0
- package/dist-server/service/bank-account/index.d.ts +7 -0
- package/dist-server/service/bank-account/index.js +12 -0
- package/dist-server/service/bank-account/index.js.map +1 -0
- package/dist-server/service/common-type.d.ts +5 -0
- package/dist-server/service/common-type.js +15 -0
- package/dist-server/service/common-type.js.map +1 -0
- package/dist-server/service/financial-institution/financial-institution-mutation.d.ts +10 -0
- package/dist-server/service/financial-institution/financial-institution-mutation.js +169 -0
- package/dist-server/service/financial-institution/financial-institution-mutation.js.map +1 -0
- package/dist-server/service/financial-institution/financial-institution-query.d.ts +12 -0
- package/dist-server/service/financial-institution/financial-institution-query.js +97 -0
- package/dist-server/service/financial-institution/financial-institution-query.js.map +1 -0
- package/dist-server/service/financial-institution/financial-institution-type.d.ts +32 -0
- package/dist-server/service/financial-institution/financial-institution-type.js +126 -0
- package/dist-server/service/financial-institution/financial-institution-type.js.map +1 -0
- package/dist-server/service/financial-institution/financial-institution.d.ts +34 -0
- package/dist-server/service/financial-institution/financial-institution.js +137 -0
- package/dist-server/service/financial-institution/financial-institution.js.map +1 -0
- package/dist-server/service/financial-institution/index.d.ts +6 -0
- package/dist-server/service/financial-institution/index.js +10 -0
- package/dist-server/service/financial-institution/index.js.map +1 -0
- package/dist-server/service/financial-statement/event-subscriber.d.ts +7 -0
- package/dist-server/service/financial-statement/event-subscriber.js +21 -0
- package/dist-server/service/financial-statement/event-subscriber.js.map +1 -0
- package/dist-server/service/financial-statement/financial-statement-history.d.ts +27 -0
- package/dist-server/service/financial-statement/financial-statement-history.js +141 -0
- package/dist-server/service/financial-statement/financial-statement-history.js.map +1 -0
- package/dist-server/service/financial-statement/financial-statement-line-item.d.ts +19 -0
- package/dist-server/service/financial-statement/financial-statement-line-item.js +94 -0
- package/dist-server/service/financial-statement/financial-statement-line-item.js.map +1 -0
- package/dist-server/service/financial-statement/financial-statement-mutation.d.ts +10 -0
- package/dist-server/service/financial-statement/financial-statement-mutation.js +136 -0
- package/dist-server/service/financial-statement/financial-statement-mutation.js.map +1 -0
- package/dist-server/service/financial-statement/financial-statement-query.d.ts +11 -0
- package/dist-server/service/financial-statement/financial-statement-query.js +81 -0
- package/dist-server/service/financial-statement/financial-statement-query.js.map +1 -0
- package/dist-server/service/financial-statement/financial-statement-type.d.ts +20 -0
- package/dist-server/service/financial-statement/financial-statement-type.js +77 -0
- package/dist-server/service/financial-statement/financial-statement-type.js.map +1 -0
- package/dist-server/service/financial-statement/financial-statement.d.ts +27 -0
- package/dist-server/service/financial-statement/financial-statement.js +132 -0
- package/dist-server/service/financial-statement/financial-statement.js.map +1 -0
- package/dist-server/service/financial-statement/index.d.ts +8 -0
- package/dist-server/service/financial-statement/index.js +13 -0
- package/dist-server/service/financial-statement/index.js.map +1 -0
- package/dist-server/service/fiscal-month/fiscal-month-mutation.d.ts +10 -0
- package/dist-server/service/fiscal-month/fiscal-month-mutation.js +134 -0
- package/dist-server/service/fiscal-month/fiscal-month-mutation.js.map +1 -0
- package/dist-server/service/fiscal-month/fiscal-month-query.d.ts +11 -0
- package/dist-server/service/fiscal-month/fiscal-month-query.js +83 -0
- package/dist-server/service/fiscal-month/fiscal-month-query.js.map +1 -0
- package/dist-server/service/fiscal-month/fiscal-month-type.d.ts +26 -0
- package/dist-server/service/fiscal-month/fiscal-month-type.js +98 -0
- package/dist-server/service/fiscal-month/fiscal-month-type.js.map +1 -0
- package/dist-server/service/fiscal-month/fiscal-month.d.ts +22 -0
- package/dist-server/service/fiscal-month/fiscal-month.js +99 -0
- package/dist-server/service/fiscal-month/fiscal-month.js.map +1 -0
- package/dist-server/service/fiscal-month/index.d.ts +6 -0
- package/dist-server/service/fiscal-month/index.js +10 -0
- package/dist-server/service/fiscal-month/index.js.map +1 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-mutation.d.ts +10 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-mutation.js +134 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-mutation.js.map +1 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-query.d.ts +11 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-query.js +85 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-query.js.map +1 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-type.d.ts +24 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-type.js +90 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-type.js.map +1 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter.d.ts +21 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter.js +94 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter.js.map +1 -0
- package/dist-server/service/fiscal-quarter/index.d.ts +6 -0
- package/dist-server/service/fiscal-quarter/index.js +10 -0
- package/dist-server/service/fiscal-quarter/index.js.map +1 -0
- package/dist-server/service/fiscal-year/fiscal-year-mutation.d.ts +10 -0
- package/dist-server/service/fiscal-year/fiscal-year-mutation.js +134 -0
- package/dist-server/service/fiscal-year/fiscal-year-mutation.js.map +1 -0
- package/dist-server/service/fiscal-year/fiscal-year-query.d.ts +11 -0
- package/dist-server/service/fiscal-year/fiscal-year-query.js +81 -0
- package/dist-server/service/fiscal-year/fiscal-year-query.js.map +1 -0
- package/dist-server/service/fiscal-year/fiscal-year-type.d.ts +22 -0
- package/dist-server/service/fiscal-year/fiscal-year-type.js +82 -0
- package/dist-server/service/fiscal-year/fiscal-year-type.js.map +1 -0
- package/dist-server/service/fiscal-year/fiscal-year.d.ts +20 -0
- package/dist-server/service/fiscal-year/fiscal-year.js +89 -0
- package/dist-server/service/fiscal-year/fiscal-year.js.map +1 -0
- package/dist-server/service/fiscal-year/index.d.ts +6 -0
- package/dist-server/service/fiscal-year/index.js +10 -0
- package/dist-server/service/fiscal-year/index.js.map +1 -0
- package/dist-server/service/income-statement/event-subscriber.d.ts +7 -0
- package/dist-server/service/income-statement/event-subscriber.js +21 -0
- package/dist-server/service/income-statement/event-subscriber.js.map +1 -0
- package/dist-server/service/income-statement/income-statement-history.d.ts +28 -0
- package/dist-server/service/income-statement/income-statement-history.js +146 -0
- package/dist-server/service/income-statement/income-statement-history.js.map +1 -0
- package/dist-server/service/income-statement/income-statement-line-item.d.ts +19 -0
- package/dist-server/service/income-statement/income-statement-line-item.js +96 -0
- package/dist-server/service/income-statement/income-statement-line-item.js.map +1 -0
- package/dist-server/service/income-statement/income-statement-mutation.d.ts +10 -0
- package/dist-server/service/income-statement/income-statement-mutation.js +136 -0
- package/dist-server/service/income-statement/income-statement-mutation.js.map +1 -0
- package/dist-server/service/income-statement/income-statement-query.d.ts +11 -0
- package/dist-server/service/income-statement/income-statement-query.js +81 -0
- package/dist-server/service/income-statement/income-statement-query.js.map +1 -0
- package/dist-server/service/income-statement/income-statement-type.d.ts +20 -0
- package/dist-server/service/income-statement/income-statement-type.js +77 -0
- package/dist-server/service/income-statement/income-statement-type.js.map +1 -0
- package/dist-server/service/income-statement/income-statement.d.ts +28 -0
- package/dist-server/service/income-statement/income-statement.js +137 -0
- package/dist-server/service/income-statement/income-statement.js.map +1 -0
- package/dist-server/service/income-statement/index.d.ts +8 -0
- package/dist-server/service/income-statement/index.js +13 -0
- package/dist-server/service/income-statement/index.js.map +1 -0
- package/dist-server/service/index.d.ts +16 -0
- package/dist-server/service/index.js +74 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/payment/event-subscriber.d.ts +7 -0
- package/dist-server/service/payment/event-subscriber.js +21 -0
- package/dist-server/service/payment/event-subscriber.js.map +1 -0
- package/dist-server/service/payment/index.d.ts +7 -0
- package/dist-server/service/payment/index.js +12 -0
- package/dist-server/service/payment/index.js.map +1 -0
- package/dist-server/service/payment/payment-history.d.ts +37 -0
- package/dist-server/service/payment/payment-history.js +179 -0
- package/dist-server/service/payment/payment-history.js.map +1 -0
- package/dist-server/service/payment/payment-mutation.d.ts +10 -0
- package/dist-server/service/payment/payment-mutation.js +134 -0
- package/dist-server/service/payment/payment-mutation.js.map +1 -0
- package/dist-server/service/payment/payment-query.d.ts +11 -0
- package/dist-server/service/payment/payment-query.js +81 -0
- package/dist-server/service/payment/payment-query.js.map +1 -0
- package/dist-server/service/payment/payment-type.d.ts +30 -0
- package/dist-server/service/payment/payment-type.js +114 -0
- package/dist-server/service/payment/payment-type.js.map +1 -0
- package/dist-server/service/payment/payment.d.ts +42 -0
- package/dist-server/service/payment/payment.js +181 -0
- package/dist-server/service/payment/payment.js.map +1 -0
- package/dist-server/service/transaction/event-subscriber.d.ts +7 -0
- package/dist-server/service/transaction/event-subscriber.js +21 -0
- package/dist-server/service/transaction/event-subscriber.js.map +1 -0
- package/dist-server/service/transaction/index.d.ts +8 -0
- package/dist-server/service/transaction/index.js +12 -0
- package/dist-server/service/transaction/index.js.map +1 -0
- package/dist-server/service/transaction/transaction-history.d.ts +36 -0
- package/dist-server/service/transaction/transaction-history.js +184 -0
- package/dist-server/service/transaction/transaction-history.js.map +1 -0
- package/dist-server/service/transaction/transaction-mutation.d.ts +10 -0
- package/dist-server/service/transaction/transaction-mutation.js +134 -0
- package/dist-server/service/transaction/transaction-mutation.js.map +1 -0
- package/dist-server/service/transaction/transaction-query.d.ts +11 -0
- package/dist-server/service/transaction/transaction-query.js +81 -0
- package/dist-server/service/transaction/transaction-query.js.map +1 -0
- package/dist-server/service/transaction/transaction-type.d.ts +19 -0
- package/dist-server/service/transaction/transaction-type.js +73 -0
- package/dist-server/service/transaction/transaction-type.js.map +1 -0
- package/dist-server/service/transaction/transaction.d.ts +57 -0
- package/dist-server/service/transaction/transaction.js +241 -0
- package/dist-server/service/transaction/transaction.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FinancialStatement = exports.FinancialStatementStatus = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const type_graphql_1 = require("type-graphql");
|
|
7
|
+
const shell_1 = require("@things-factory/shell");
|
|
8
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
|
+
const financial_statement_line_item_1 = require("./financial-statement-line-item");
|
|
10
|
+
var FinancialStatementStatus;
|
|
11
|
+
(function (FinancialStatementStatus) {
|
|
12
|
+
FinancialStatementStatus["STATUS_A"] = "STATUS_A";
|
|
13
|
+
FinancialStatementStatus["STATUS_B"] = "STATUS_B";
|
|
14
|
+
})(FinancialStatementStatus || (exports.FinancialStatementStatus = FinancialStatementStatus = {}));
|
|
15
|
+
(0, type_graphql_1.registerEnumType)(FinancialStatementStatus, {
|
|
16
|
+
name: 'FinancialStatementStatus',
|
|
17
|
+
description: 'State enumeration of a financial statement' // 재무제표 상태 열거형
|
|
18
|
+
});
|
|
19
|
+
// 재무제표 (Financial Statement)
|
|
20
|
+
let FinancialStatement = class FinancialStatement {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.version = 1; // 낙관적 잠금을 위한 버전 관리 필드
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.FinancialStatement = FinancialStatement;
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
28
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier for the financial statement' }),
|
|
29
|
+
tslib_1.__metadata("design:type", String)
|
|
30
|
+
], FinancialStatement.prototype, "id", void 0);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, typeorm_1.VersionColumn)(),
|
|
33
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Version number for optimistic locking' }),
|
|
34
|
+
tslib_1.__metadata("design:type", Number)
|
|
35
|
+
], FinancialStatement.prototype, "version", void 0);
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
38
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The domain to which this financial statement belongs' }),
|
|
39
|
+
tslib_1.__metadata("design:type", shell_1.Domain // 이 재무제표가 속한 도메인
|
|
40
|
+
)
|
|
41
|
+
], FinancialStatement.prototype, "domain", void 0);
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, typeorm_1.RelationId)((financialStatement) => financialStatement.domain),
|
|
44
|
+
tslib_1.__metadata("design:type", String)
|
|
45
|
+
], FinancialStatement.prototype, "domainId", void 0);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
48
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Fiscal year of the financial statement' }),
|
|
49
|
+
tslib_1.__metadata("design:type", Number)
|
|
50
|
+
], FinancialStatement.prototype, "year", void 0);
|
|
51
|
+
tslib_1.__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
53
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Fiscal quarter of the financial statement' }),
|
|
54
|
+
tslib_1.__metadata("design:type", Number)
|
|
55
|
+
], FinancialStatement.prototype, "quarter", void 0);
|
|
56
|
+
tslib_1.__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
58
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Fiscal month of the financial statement' }),
|
|
59
|
+
tslib_1.__metadata("design:type", Number)
|
|
60
|
+
], FinancialStatement.prototype, "month", void 0);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
63
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Total assets recorded in the financial statement' }),
|
|
64
|
+
tslib_1.__metadata("design:type", Number)
|
|
65
|
+
], FinancialStatement.prototype, "asset", void 0);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
68
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Total liabilities recorded in the financial statement' }),
|
|
69
|
+
tslib_1.__metadata("design:type", Number)
|
|
70
|
+
], FinancialStatement.prototype, "liability", void 0);
|
|
71
|
+
tslib_1.__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
73
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Total equity recorded in the financial statement' }),
|
|
74
|
+
tslib_1.__metadata("design:type", Number)
|
|
75
|
+
], FinancialStatement.prototype, "equity", void 0);
|
|
76
|
+
tslib_1.__decorate([
|
|
77
|
+
(0, typeorm_1.OneToMany)(type => financial_statement_line_item_1.FinancialStatementLineItem, lineItem => lineItem.statement),
|
|
78
|
+
(0, type_graphql_1.Field)(type => [financial_statement_line_item_1.FinancialStatementLineItem], { nullable: true }),
|
|
79
|
+
tslib_1.__metadata("design:type", Array)
|
|
80
|
+
], FinancialStatement.prototype, "lineItems", void 0);
|
|
81
|
+
tslib_1.__decorate([
|
|
82
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
83
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when the financial statement was created' }),
|
|
84
|
+
tslib_1.__metadata("design:type", Date // 재무제표가 생성된 날짜 및 시간
|
|
85
|
+
)
|
|
86
|
+
], FinancialStatement.prototype, "createdAt", void 0);
|
|
87
|
+
tslib_1.__decorate([
|
|
88
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
89
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when the financial statement was last updated' }),
|
|
90
|
+
tslib_1.__metadata("design:type", Date // 재무제표가 마지막으로 업데이트된 날짜 및 시간
|
|
91
|
+
)
|
|
92
|
+
], FinancialStatement.prototype, "updatedAt", void 0);
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
95
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when the financial statement was deleted' }),
|
|
96
|
+
tslib_1.__metadata("design:type", Date // 재무제표가 삭제된 날짜 및 시간
|
|
97
|
+
)
|
|
98
|
+
], FinancialStatement.prototype, "deletedAt", void 0);
|
|
99
|
+
tslib_1.__decorate([
|
|
100
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
101
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who created the financial statement' }),
|
|
102
|
+
tslib_1.__metadata("design:type", auth_base_1.User // 재무제표를 생성한 사용자
|
|
103
|
+
)
|
|
104
|
+
], FinancialStatement.prototype, "creator", void 0);
|
|
105
|
+
tslib_1.__decorate([
|
|
106
|
+
(0, typeorm_1.RelationId)((financialStatement) => financialStatement.creator),
|
|
107
|
+
tslib_1.__metadata("design:type", String)
|
|
108
|
+
], FinancialStatement.prototype, "creatorId", void 0);
|
|
109
|
+
tslib_1.__decorate([
|
|
110
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
111
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who last updated the financial statement' }),
|
|
112
|
+
tslib_1.__metadata("design:type", auth_base_1.User // 재무제표를 마지막으로 업데이트한 사용자
|
|
113
|
+
)
|
|
114
|
+
], FinancialStatement.prototype, "updater", void 0);
|
|
115
|
+
tslib_1.__decorate([
|
|
116
|
+
(0, typeorm_1.RelationId)((financialStatement) => financialStatement.updater),
|
|
117
|
+
tslib_1.__metadata("design:type", String)
|
|
118
|
+
], FinancialStatement.prototype, "updaterId", void 0);
|
|
119
|
+
exports.FinancialStatement = FinancialStatement = tslib_1.__decorate([
|
|
120
|
+
(0, typeorm_1.Entity)(),
|
|
121
|
+
(0, typeorm_1.Index)('ix_financial_statement_0', (financialStatement) => [
|
|
122
|
+
financialStatement.domain,
|
|
123
|
+
financialStatement.year,
|
|
124
|
+
financialStatement.quarter,
|
|
125
|
+
financialStatement.month
|
|
126
|
+
], {
|
|
127
|
+
unique: true,
|
|
128
|
+
where: '"deleted_at" IS NULL' // 삭제되지 않은 경우에만 유니크
|
|
129
|
+
}),
|
|
130
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for FinancialStatement, representing the financial position of an entity' }) // 엔티티 설명 추가
|
|
131
|
+
], FinancialStatement);
|
|
132
|
+
//# sourceMappingURL=financial-statement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financial-statement.js","sourceRoot":"","sources":["../../../server/service/financial-statement/financial-statement.ts"],"names":[],"mappings":";;;;AAAA,qCAYgB;AAChB,+CAAsE;AAEtE,iDAA8C;AAC9C,yDAAgD;AAEhD,mFAA4E;AAE5E,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,iDAAqB,CAAA;IACrB,iDAAqB,CAAA;AACvB,CAAC,EAHW,wBAAwB,wCAAxB,wBAAwB,QAGnC;AAED,IAAA,+BAAgB,EAAC,wBAAwB,EAAE;IACzC,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,4CAA4C,CAAC,cAAc;CACzE,CAAC,CAAA;AAEF,6BAA6B;AAgBtB,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAAxB;QAOL,YAAO,GAAY,CAAC,CAAA,CAAC,sBAAsB;IA8D7C,CAAC;CAAA,CAAA;AArEY,gDAAkB;AAGpB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,+CAA+C,EAAE,CAAC;;8CACjE;AAInB;IAFC,IAAA,uBAAa,GAAE;IACf,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;;mDAC5D;AAIpB;I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AQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;sCAChG,gBAAI,CAAC,wBAAwB;;mDAAzB;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,kBAAsC,EAAE,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC;;qDACjE;6BApEP,kBAAkB;IAf9B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,0BAA0B,EAC1B,CAAC,kBAAsC,EAAE,EAAE,CAAC;QAC1C,kBAAkB,CAAC,MAAM;QACzB,kBAAkB,CAAC,IAAI;QACvB,kBAAkB,CAAC,OAAO;QAC1B,kBAAkB,CAAC,KAAK;KACzB,EACD;QACE,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB,CAAC,mBAAmB;KAClD,CACF;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,iFAAiF,EAAE,CAAC,CAAC,YAAY;GAC/G,kBAAkB,CAqE9B","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nimport { FinancialStatementLineItem } from './financial-statement-line-item'\n\nexport enum FinancialStatementStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(FinancialStatementStatus, {\n name: 'FinancialStatementStatus',\n description: 'State enumeration of a financial statement' // 재무제표 상태 열거형\n})\n\n// 재무제표 (Financial Statement)\n@Entity()\n@Index(\n 'ix_financial_statement_0',\n (financialStatement: FinancialStatement) => [\n financialStatement.domain,\n financialStatement.year,\n financialStatement.quarter,\n financialStatement.month\n ],\n {\n unique: true,\n where: '\"deleted_at\" IS NULL' // 삭제되지 않은 경우에만 유니크\n }\n)\n@ObjectType({ description: 'Entity for FinancialStatement, representing the financial position of an entity' }) // 엔티티 설명 추가\nexport class FinancialStatement {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the financial statement' })\n readonly id: string // 고유 식별자 (UUID)\n\n @VersionColumn()\n @Field({ nullable: true, description: 'Version number for optimistic locking' })\n version?: number = 1 // 낙관적 잠금을 위한 버전 관리 필드\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true, description: 'The domain to which this financial statement belongs' })\n domain?: Domain // 이 재무제표가 속한 도메인\n\n @RelationId((financialStatement: FinancialStatement) => financialStatement.domain)\n domainId?: string // 도메인의 ID\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal year of the financial statement' })\n year?: number // 회계 연도\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal quarter of the financial statement' })\n quarter?: number // 회계 분기\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal month of the financial statement' })\n month?: number // 회계 월\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Total assets recorded in the financial statement' })\n asset?: number // 재무제표에 기록된 총자산\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Total liabilities recorded in the financial statement' })\n liability?: number // 재무제표에 기록된 총부채\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Total equity recorded in the financial statement' })\n equity?: number // 재무제표에 기록된 총자본\n\n @OneToMany(type => FinancialStatementLineItem, lineItem => lineItem.statement)\n @Field(type => [FinancialStatementLineItem], { nullable: true })\n lineItems?: FinancialStatementLineItem[] // 계정별 브레이크다운\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'The date and time when the financial statement was created' })\n createdAt?: Date // 재무제표가 생성된 날짜 및 시간\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'The date and time when the financial statement was last updated' })\n updatedAt?: Date // 재무제표가 마지막으로 업데이트된 날짜 및 시간\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'The date and time when the financial statement was deleted' })\n deletedAt?: Date // 재무제표가 삭제된 날짜 및 시간\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who created the financial statement' })\n creator?: User // 재무제표를 생성한 사용자\n\n @RelationId((financialStatement: FinancialStatement) => financialStatement.creator)\n creatorId?: string // 재무제표를 생성한 사용자의 ID\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who last updated the financial statement' })\n updater?: User // 재무제표를 마지막으로 업데이트한 사용자\n\n @RelationId((financialStatement: FinancialStatement) => financialStatement.updater)\n updaterId?: string // 재무제표를 업데이트한 사용자의 ID\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FinancialStatement } from './financial-statement';
|
|
2
|
+
import { FinancialStatementLineItem } from './financial-statement-line-item';
|
|
3
|
+
import { FinancialStatementQuery } from './financial-statement-query';
|
|
4
|
+
import { FinancialStatementMutation } from './financial-statement-mutation';
|
|
5
|
+
import { FinancialStatementHistoryEntitySubscriber } from './event-subscriber';
|
|
6
|
+
export declare const entities: (typeof FinancialStatementLineItem | typeof FinancialStatement)[];
|
|
7
|
+
export declare const resolvers: (typeof FinancialStatementQuery | typeof FinancialStatementMutation)[];
|
|
8
|
+
export declare const subscribers: (typeof FinancialStatementHistoryEntitySubscriber)[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.subscribers = exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const financial_statement_1 = require("./financial-statement");
|
|
5
|
+
const financial_statement_line_item_1 = require("./financial-statement-line-item");
|
|
6
|
+
const financial_statement_history_1 = require("./financial-statement-history");
|
|
7
|
+
const financial_statement_query_1 = require("./financial-statement-query");
|
|
8
|
+
const financial_statement_mutation_1 = require("./financial-statement-mutation");
|
|
9
|
+
const event_subscriber_1 = require("./event-subscriber");
|
|
10
|
+
exports.entities = [financial_statement_1.FinancialStatement, financial_statement_line_item_1.FinancialStatementLineItem, financial_statement_history_1.FinancialStatementHistory];
|
|
11
|
+
exports.resolvers = [financial_statement_query_1.FinancialStatementQuery, financial_statement_mutation_1.FinancialStatementMutation];
|
|
12
|
+
exports.subscribers = [event_subscriber_1.FinancialStatementHistoryEntitySubscriber];
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/financial-statement/index.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAC1D,mFAA4E;AAC5E,+EAAyE;AACzE,2EAAqE;AACrE,iFAA2E;AAC3E,yDAA8E;AAEjE,QAAA,QAAQ,GAAG,CAAC,wCAAkB,EAAE,0DAA0B,EAAE,uDAAyB,CAAC,CAAA;AACtF,QAAA,SAAS,GAAG,CAAC,mDAAuB,EAAE,yDAA0B,CAAC,CAAA;AACjE,QAAA,WAAW,GAAG,CAAC,4DAAyC,CAAC,CAAA","sourcesContent":["import { FinancialStatement } from './financial-statement'\nimport { FinancialStatementLineItem } from './financial-statement-line-item'\nimport { FinancialStatementHistory } from './financial-statement-history'\nimport { FinancialStatementQuery } from './financial-statement-query'\nimport { FinancialStatementMutation } from './financial-statement-mutation'\nimport { FinancialStatementHistoryEntitySubscriber } from './event-subscriber'\n\nexport const entities = [FinancialStatement, FinancialStatementLineItem, FinancialStatementHistory]\nexport const resolvers = [FinancialStatementQuery, FinancialStatementMutation]\nexport const subscribers = [FinancialStatementHistoryEntitySubscriber]\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FiscalMonth } from './fiscal-month';
|
|
2
|
+
import { NewFiscalMonth, FiscalMonthPatch } from './fiscal-month-type';
|
|
3
|
+
export declare class FiscalMonthMutation {
|
|
4
|
+
createFiscalMonth(fiscalMonth: NewFiscalMonth, context: ResolverContext): Promise<FiscalMonth>;
|
|
5
|
+
updateFiscalMonth(id: string, patch: FiscalMonthPatch, context: ResolverContext): Promise<FiscalMonth>;
|
|
6
|
+
updateMultipleFiscalMonth(patches: FiscalMonthPatch[], context: ResolverContext): Promise<FiscalMonth[]>;
|
|
7
|
+
deleteFiscalMonth(id: string, context: ResolverContext): Promise<boolean>;
|
|
8
|
+
deleteFiscalMonths(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
9
|
+
importFiscalMonths(fiscalMonths: FiscalMonthPatch[], context: ResolverContext): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FiscalMonthMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const typeorm_1 = require("typeorm");
|
|
7
|
+
const shell_1 = require("@things-factory/shell");
|
|
8
|
+
const fiscal_month_1 = require("./fiscal-month");
|
|
9
|
+
const fiscal_month_type_1 = require("./fiscal-month-type");
|
|
10
|
+
let FiscalMonthMutation = class FiscalMonthMutation {
|
|
11
|
+
async createFiscalMonth(fiscalMonth, context) {
|
|
12
|
+
const { domain, user, tx } = context.state;
|
|
13
|
+
const result = await (0, shell_1.getRepository)(fiscal_month_1.FiscalMonth, tx).save(Object.assign(Object.assign({}, fiscalMonth), { domain, creator: user, updater: user }));
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
async updateFiscalMonth(id, patch, context) {
|
|
17
|
+
const { domain, user, tx } = context.state;
|
|
18
|
+
const repository = (0, shell_1.getRepository)(fiscal_month_1.FiscalMonth, tx);
|
|
19
|
+
const fiscalMonth = await repository.findOne({
|
|
20
|
+
where: { domain: { id: domain.id }, id }
|
|
21
|
+
});
|
|
22
|
+
const result = await repository.save(Object.assign(Object.assign(Object.assign({}, fiscalMonth), patch), { updater: user }));
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
async updateMultipleFiscalMonth(patches, context) {
|
|
26
|
+
const { domain, user, tx } = context.state;
|
|
27
|
+
let results = [];
|
|
28
|
+
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
29
|
+
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
30
|
+
const fiscalMonthRepo = (0, shell_1.getRepository)(fiscal_month_1.FiscalMonth, tx);
|
|
31
|
+
if (_createRecords.length > 0) {
|
|
32
|
+
for (let i = 0; i < _createRecords.length; i++) {
|
|
33
|
+
const newRecord = _createRecords[i];
|
|
34
|
+
const result = await fiscalMonthRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
|
|
35
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (_updateRecords.length > 0) {
|
|
39
|
+
for (let i = 0; i < _updateRecords.length; i++) {
|
|
40
|
+
const updateRecord = _updateRecords[i];
|
|
41
|
+
const fiscalMonth = await fiscalMonthRepo.findOneBy({ id: updateRecord.id });
|
|
42
|
+
const result = await fiscalMonthRepo.save(Object.assign(Object.assign(Object.assign({}, fiscalMonth), updateRecord), { updater: user }));
|
|
43
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return results;
|
|
47
|
+
}
|
|
48
|
+
async deleteFiscalMonth(id, context) {
|
|
49
|
+
const { domain, tx } = context.state;
|
|
50
|
+
await (0, shell_1.getRepository)(fiscal_month_1.FiscalMonth, tx).delete({ domain: { id: domain.id }, id });
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
async deleteFiscalMonths(ids, context) {
|
|
54
|
+
const { domain, tx } = context.state;
|
|
55
|
+
await (0, shell_1.getRepository)(fiscal_month_1.FiscalMonth, tx).delete({
|
|
56
|
+
domain: { id: domain.id },
|
|
57
|
+
id: (0, typeorm_1.In)(ids)
|
|
58
|
+
});
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
async importFiscalMonths(fiscalMonths, context) {
|
|
62
|
+
const { domain, tx } = context.state;
|
|
63
|
+
await Promise.all(fiscalMonths.map(async (fiscalMonth) => {
|
|
64
|
+
const createdFiscalMonth = await (0, shell_1.getRepository)(fiscal_month_1.FiscalMonth, tx).save(Object.assign({ domain }, fiscalMonth));
|
|
65
|
+
}));
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports.FiscalMonthMutation = FiscalMonthMutation;
|
|
70
|
+
tslib_1.__decorate([
|
|
71
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
72
|
+
(0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
|
|
73
|
+
(0, type_graphql_1.Mutation)(returns => fiscal_month_1.FiscalMonth, { description: 'To create new FiscalMonth' }),
|
|
74
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('fiscalMonth')),
|
|
75
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
76
|
+
tslib_1.__metadata("design:type", Function),
|
|
77
|
+
tslib_1.__metadata("design:paramtypes", [fiscal_month_type_1.NewFiscalMonth, Object]),
|
|
78
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
79
|
+
], FiscalMonthMutation.prototype, "createFiscalMonth", null);
|
|
80
|
+
tslib_1.__decorate([
|
|
81
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
82
|
+
(0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
|
|
83
|
+
(0, type_graphql_1.Mutation)(returns => fiscal_month_1.FiscalMonth, { description: 'To modify FiscalMonth information' }),
|
|
84
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
85
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
86
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
87
|
+
tslib_1.__metadata("design:type", Function),
|
|
88
|
+
tslib_1.__metadata("design:paramtypes", [String, fiscal_month_type_1.FiscalMonthPatch, Object]),
|
|
89
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
90
|
+
], FiscalMonthMutation.prototype, "updateFiscalMonth", null);
|
|
91
|
+
tslib_1.__decorate([
|
|
92
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
93
|
+
(0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
|
|
94
|
+
(0, type_graphql_1.Mutation)(returns => [fiscal_month_1.FiscalMonth], { description: "To modify multiple FiscalMonths' information" }),
|
|
95
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [fiscal_month_type_1.FiscalMonthPatch])),
|
|
96
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
97
|
+
tslib_1.__metadata("design:type", Function),
|
|
98
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
99
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
100
|
+
], FiscalMonthMutation.prototype, "updateMultipleFiscalMonth", null);
|
|
101
|
+
tslib_1.__decorate([
|
|
102
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
103
|
+
(0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
|
|
104
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete FiscalMonth' }),
|
|
105
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
106
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
107
|
+
tslib_1.__metadata("design:type", Function),
|
|
108
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
109
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
110
|
+
], FiscalMonthMutation.prototype, "deleteFiscalMonth", null);
|
|
111
|
+
tslib_1.__decorate([
|
|
112
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
113
|
+
(0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
|
|
114
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple FiscalMonths' }),
|
|
115
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
116
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
117
|
+
tslib_1.__metadata("design:type", Function),
|
|
118
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
119
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
120
|
+
], FiscalMonthMutation.prototype, "deleteFiscalMonths", null);
|
|
121
|
+
tslib_1.__decorate([
|
|
122
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
123
|
+
(0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
|
|
124
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To import multiple FiscalMonths' }),
|
|
125
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('fiscalMonths', type => [fiscal_month_type_1.FiscalMonthPatch])),
|
|
126
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
127
|
+
tslib_1.__metadata("design:type", Function),
|
|
128
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
129
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
130
|
+
], FiscalMonthMutation.prototype, "importFiscalMonths", null);
|
|
131
|
+
exports.FiscalMonthMutation = FiscalMonthMutation = tslib_1.__decorate([
|
|
132
|
+
(0, type_graphql_1.Resolver)(fiscal_month_1.FiscalMonth)
|
|
133
|
+
], FiscalMonthMutation);
|
|
134
|
+
//# sourceMappingURL=fiscal-month-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiscal-month-mutation.js","sourceRoot":"","sources":["../../../server/service/fiscal-month/fiscal-month-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AAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DAMpD;AAKK;IAHL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,wBAAS,EAAC,2DAA2D,CAAC;IACtE,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IAE9E,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAUP;AAKK;IAHL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,wBAAS,EAAC,2DAA2D,CAAC;IACtE,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IAE9E,mBAAA,IAAA,kBAAG,EAAC,cAAc,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,oCAAgB,CAAC,CAAC,CAAA;IAC/C,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAWP;8BAvIU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,0BAAW,CAAC;GACT,mBAAmB,CAwI/B","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { getRepository } from '@things-factory/shell'\n\nimport { FiscalMonth } from './fiscal-month'\nimport { NewFiscalMonth, FiscalMonthPatch } from './fiscal-month-type'\n\n@Resolver(FiscalMonth)\nexport class FiscalMonthMutation {\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => FiscalMonth, { description: 'To create new FiscalMonth' })\n async createFiscalMonth(\n @Arg('fiscalMonth') fiscalMonth: NewFiscalMonth,\n @Ctx() context: ResolverContext\n ): Promise<FiscalMonth> {\n const { domain, user, tx } = context.state\n\n const result = await getRepository(FiscalMonth, tx).save({\n ...fiscalMonth,\n domain,\n creator: user,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => FiscalMonth, { description: 'To modify FiscalMonth information' })\n async updateFiscalMonth(\n @Arg('id') id: string,\n @Arg('patch') patch: FiscalMonthPatch,\n @Ctx() context: ResolverContext\n ): Promise<FiscalMonth> {\n const { domain, user, tx } = context.state\n\n const repository = getRepository(FiscalMonth, tx)\n const fiscalMonth = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n const result = await repository.save({\n ...fiscalMonth,\n ...patch,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => [FiscalMonth], { description: \"To modify multiple FiscalMonths' information\" })\n async updateMultipleFiscalMonth(\n @Arg('patches', type => [FiscalMonthPatch]) patches: FiscalMonthPatch[],\n @Ctx() context: ResolverContext\n ): Promise<FiscalMonth[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const fiscalMonthRepo = getRepository(FiscalMonth, tx)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await fiscalMonthRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const fiscalMonth = await fiscalMonthRepo.findOneBy({ id: updateRecord.id })\n\n const result = await fiscalMonthRepo.save({\n ...fiscalMonth,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => Boolean, { description: 'To delete FiscalMonth' })\n async deleteFiscalMonth(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(FiscalMonth, tx).delete({ domain: { id: domain.id }, id })\n\n return true\n }\n\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => Boolean, { description: 'To delete multiple FiscalMonths' })\n async deleteFiscalMonths(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(FiscalMonth, tx).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => Boolean, { description: 'To import multiple FiscalMonths' })\n async importFiscalMonths(\n @Arg('fiscalMonths', type => [FiscalMonthPatch]) fiscalMonths: FiscalMonthPatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n fiscalMonths.map(async (fiscalMonth: FiscalMonthPatch) => {\n const createdFiscalMonth: FiscalMonth = await getRepository(FiscalMonth, tx).save({ domain, ...fiscalMonth })\n })\n )\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Domain, ListParam } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { FiscalMonth } from './fiscal-month';
|
|
4
|
+
import { FiscalMonthList } from './fiscal-month-type';
|
|
5
|
+
export declare class FiscalMonthQuery {
|
|
6
|
+
fiscalMonth(year: number, quarter: number, month: number, context: ResolverContext): Promise<FiscalMonth | undefined>;
|
|
7
|
+
fiscalMonths(params: ListParam, context: ResolverContext): Promise<FiscalMonthList>;
|
|
8
|
+
domain(fiscalMonth: FiscalMonth): Promise<Domain>;
|
|
9
|
+
updater(fiscalMonth: FiscalMonth): Promise<User>;
|
|
10
|
+
creator(fiscalMonth: FiscalMonth): Promise<User>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FiscalMonthQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
7
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
|
+
const fiscal_month_1 = require("./fiscal-month");
|
|
9
|
+
const fiscal_month_type_1 = require("./fiscal-month-type");
|
|
10
|
+
let FiscalMonthQuery = class FiscalMonthQuery {
|
|
11
|
+
async fiscalMonth(year, quarter, month, context) {
|
|
12
|
+
const { domain } = context.state;
|
|
13
|
+
return await (0, shell_1.getRepository)(fiscal_month_1.FiscalMonth).findOne({
|
|
14
|
+
where: { domain: { id: domain.id }, year, quarter, month }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
async fiscalMonths(params, context) {
|
|
18
|
+
const { domain } = context.state;
|
|
19
|
+
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
20
|
+
domain,
|
|
21
|
+
params,
|
|
22
|
+
repository: await (0, shell_1.getRepository)(fiscal_month_1.FiscalMonth),
|
|
23
|
+
searchables: []
|
|
24
|
+
});
|
|
25
|
+
const [items, total] = await queryBuilder.getManyAndCount();
|
|
26
|
+
return { items, total };
|
|
27
|
+
}
|
|
28
|
+
async domain(fiscalMonth) {
|
|
29
|
+
return fiscalMonth.domainId && (await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: fiscalMonth.domainId }));
|
|
30
|
+
}
|
|
31
|
+
async updater(fiscalMonth) {
|
|
32
|
+
return fiscalMonth.updaterId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: fiscalMonth.updaterId }));
|
|
33
|
+
}
|
|
34
|
+
async creator(fiscalMonth) {
|
|
35
|
+
return fiscalMonth.creatorId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: fiscalMonth.creatorId }));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.FiscalMonthQuery = FiscalMonthQuery;
|
|
39
|
+
tslib_1.__decorate([
|
|
40
|
+
(0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "query")'),
|
|
41
|
+
(0, type_graphql_1.Query)(returns => fiscal_month_1.FiscalMonth, { nullable: true, description: 'To fetch a FiscalMonth by year, quarter, and month' }),
|
|
42
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('year')),
|
|
43
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('quarter')),
|
|
44
|
+
tslib_1.__param(2, (0, type_graphql_1.Arg)('month')),
|
|
45
|
+
tslib_1.__param(3, (0, type_graphql_1.Ctx)()),
|
|
46
|
+
tslib_1.__metadata("design:type", Function),
|
|
47
|
+
tslib_1.__metadata("design:paramtypes", [Number, Number, Number, Object]),
|
|
48
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
49
|
+
], FiscalMonthQuery.prototype, "fiscalMonth", null);
|
|
50
|
+
tslib_1.__decorate([
|
|
51
|
+
(0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "query")'),
|
|
52
|
+
(0, type_graphql_1.Query)(returns => fiscal_month_type_1.FiscalMonthList, { description: 'To fetch multiple FiscalMonths' }),
|
|
53
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
|
|
54
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
55
|
+
tslib_1.__metadata("design:type", Function),
|
|
56
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
|
|
57
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
58
|
+
], FiscalMonthQuery.prototype, "fiscalMonths", null);
|
|
59
|
+
tslib_1.__decorate([
|
|
60
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
61
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
62
|
+
tslib_1.__metadata("design:type", Function),
|
|
63
|
+
tslib_1.__metadata("design:paramtypes", [fiscal_month_1.FiscalMonth]),
|
|
64
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
65
|
+
], FiscalMonthQuery.prototype, "domain", null);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
68
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
69
|
+
tslib_1.__metadata("design:type", Function),
|
|
70
|
+
tslib_1.__metadata("design:paramtypes", [fiscal_month_1.FiscalMonth]),
|
|
71
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
72
|
+
], FiscalMonthQuery.prototype, "updater", null);
|
|
73
|
+
tslib_1.__decorate([
|
|
74
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
75
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
76
|
+
tslib_1.__metadata("design:type", Function),
|
|
77
|
+
tslib_1.__metadata("design:paramtypes", [fiscal_month_1.FiscalMonth]),
|
|
78
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
79
|
+
], FiscalMonthQuery.prototype, "creator", null);
|
|
80
|
+
exports.FiscalMonthQuery = FiscalMonthQuery = tslib_1.__decorate([
|
|
81
|
+
(0, type_graphql_1.Resolver)(fiscal_month_1.FiscalMonth)
|
|
82
|
+
], FiscalMonthQuery);
|
|
83
|
+
//# sourceMappingURL=fiscal-month-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiscal-month-query.js","sourceRoot":"","sources":["../../../server/service/fiscal-month/fiscal-month-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDA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AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,0BAAW;;+CAE7C;2BAjDU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,0BAAW,CAAC;GACT,gBAAgB,CAkD5B","sourcesContent":["import { Directive, Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { FiscalMonth } from './fiscal-month'\nimport { FiscalMonthList } from './fiscal-month-type'\n\n@Resolver(FiscalMonth)\nexport class FiscalMonthQuery {\n @Directive('@privilege(category: \"accounting\", privilege: \"query\")')\n @Query(returns => FiscalMonth!, { nullable: true, description: 'To fetch a FiscalMonth by year, quarter, and month' })\n async fiscalMonth(\n @Arg('year') year: number,\n @Arg('quarter') quarter: number,\n @Arg('month') month: number,\n @Ctx() context: ResolverContext\n ): Promise<FiscalMonth | undefined> {\n const { domain } = context.state\n\n return await getRepository(FiscalMonth).findOne({\n where: { domain: { id: domain.id }, year, quarter, month }\n })\n }\n\n @Directive('@privilege(category: \"accounting\", privilege: \"query\")')\n @Query(returns => FiscalMonthList, { description: 'To fetch multiple FiscalMonths' })\n async fiscalMonths(\n @Args(type => ListParam) params: ListParam,\n @Ctx() context: ResolverContext\n ): Promise<FiscalMonthList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(FiscalMonth),\n searchables: []\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() fiscalMonth: FiscalMonth): Promise<Domain> {\n return fiscalMonth.domainId && (await getRepository(Domain).findOneBy({ id: fiscalMonth.domainId }))\n }\n\n @FieldResolver(type => User)\n async updater(@Root() fiscalMonth: FiscalMonth): Promise<User> {\n return fiscalMonth.updaterId && (await getRepository(User).findOneBy({ id: fiscalMonth.updaterId }))\n }\n\n @FieldResolver(type => User)\n async creator(@Root() fiscalMonth: FiscalMonth): Promise<User> {\n return fiscalMonth.creatorId && (await getRepository(User).findOneBy({ id: fiscalMonth.creatorId }))\n }\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FiscalStatus } from '../common-type';
|
|
2
|
+
import { FiscalMonth } from './fiscal-month';
|
|
3
|
+
export declare class NewFiscalMonth {
|
|
4
|
+
year: number;
|
|
5
|
+
quarter: number;
|
|
6
|
+
month: number;
|
|
7
|
+
startDate: string;
|
|
8
|
+
endDate: string;
|
|
9
|
+
status?: FiscalStatus;
|
|
10
|
+
notes?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class FiscalMonthPatch {
|
|
13
|
+
id?: string;
|
|
14
|
+
year?: number;
|
|
15
|
+
quarter?: number;
|
|
16
|
+
month?: number;
|
|
17
|
+
startDate: string;
|
|
18
|
+
endDate: string;
|
|
19
|
+
status?: FiscalStatus;
|
|
20
|
+
notes?: string;
|
|
21
|
+
cuFlag?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class FiscalMonthList {
|
|
24
|
+
items: FiscalMonth[];
|
|
25
|
+
total: number;
|
|
26
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FiscalMonthList = exports.FiscalMonthPatch = exports.NewFiscalMonth = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const common_type_1 = require("../common-type");
|
|
7
|
+
const fiscal_month_1 = require("./fiscal-month");
|
|
8
|
+
let NewFiscalMonth = class NewFiscalMonth {
|
|
9
|
+
};
|
|
10
|
+
exports.NewFiscalMonth = NewFiscalMonth;
|
|
11
|
+
tslib_1.__decorate([
|
|
12
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
13
|
+
tslib_1.__metadata("design:type", Number)
|
|
14
|
+
], NewFiscalMonth.prototype, "year", void 0);
|
|
15
|
+
tslib_1.__decorate([
|
|
16
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
17
|
+
tslib_1.__metadata("design:type", Number)
|
|
18
|
+
], NewFiscalMonth.prototype, "quarter", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
21
|
+
tslib_1.__metadata("design:type", Number)
|
|
22
|
+
], NewFiscalMonth.prototype, "month", void 0);
|
|
23
|
+
tslib_1.__decorate([
|
|
24
|
+
(0, type_graphql_1.Field)(type => String, { description: 'The start date of the fiscal month in YYYY-MM-DD format' }),
|
|
25
|
+
tslib_1.__metadata("design:type", String)
|
|
26
|
+
], NewFiscalMonth.prototype, "startDate", void 0);
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, type_graphql_1.Field)(type => String, { description: 'The end date of the fiscal month in YYYY-MM-DD format' }),
|
|
29
|
+
tslib_1.__metadata("design:type", String)
|
|
30
|
+
], NewFiscalMonth.prototype, "endDate", void 0);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, type_graphql_1.Field)(type => common_type_1.FiscalStatus, { nullable: true }),
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
34
|
+
], NewFiscalMonth.prototype, "status", void 0);
|
|
35
|
+
tslib_1.__decorate([
|
|
36
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
38
|
+
], NewFiscalMonth.prototype, "notes", void 0);
|
|
39
|
+
exports.NewFiscalMonth = NewFiscalMonth = tslib_1.__decorate([
|
|
40
|
+
(0, type_graphql_1.InputType)()
|
|
41
|
+
], NewFiscalMonth);
|
|
42
|
+
let FiscalMonthPatch = class FiscalMonthPatch {
|
|
43
|
+
};
|
|
44
|
+
exports.FiscalMonthPatch = FiscalMonthPatch;
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
47
|
+
tslib_1.__metadata("design:type", String)
|
|
48
|
+
], FiscalMonthPatch.prototype, "id", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
51
|
+
tslib_1.__metadata("design:type", Number)
|
|
52
|
+
], FiscalMonthPatch.prototype, "year", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
55
|
+
tslib_1.__metadata("design:type", Number)
|
|
56
|
+
], FiscalMonthPatch.prototype, "quarter", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
59
|
+
tslib_1.__metadata("design:type", Number)
|
|
60
|
+
], FiscalMonthPatch.prototype, "month", void 0);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, type_graphql_1.Field)(type => String, { description: 'The start date of the fiscal month in YYYY-MM-DD format' }),
|
|
63
|
+
tslib_1.__metadata("design:type", String)
|
|
64
|
+
], FiscalMonthPatch.prototype, "startDate", void 0);
|
|
65
|
+
tslib_1.__decorate([
|
|
66
|
+
(0, type_graphql_1.Field)(type => String, { description: 'The end date of the fiscal month in YYYY-MM-DD format' }),
|
|
67
|
+
tslib_1.__metadata("design:type", String)
|
|
68
|
+
], FiscalMonthPatch.prototype, "endDate", void 0);
|
|
69
|
+
tslib_1.__decorate([
|
|
70
|
+
(0, type_graphql_1.Field)(type => common_type_1.FiscalStatus, { nullable: true }),
|
|
71
|
+
tslib_1.__metadata("design:type", String)
|
|
72
|
+
], FiscalMonthPatch.prototype, "status", void 0);
|
|
73
|
+
tslib_1.__decorate([
|
|
74
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
75
|
+
tslib_1.__metadata("design:type", String)
|
|
76
|
+
], FiscalMonthPatch.prototype, "notes", void 0);
|
|
77
|
+
tslib_1.__decorate([
|
|
78
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
79
|
+
tslib_1.__metadata("design:type", String)
|
|
80
|
+
], FiscalMonthPatch.prototype, "cuFlag", void 0);
|
|
81
|
+
exports.FiscalMonthPatch = FiscalMonthPatch = tslib_1.__decorate([
|
|
82
|
+
(0, type_graphql_1.InputType)()
|
|
83
|
+
], FiscalMonthPatch);
|
|
84
|
+
let FiscalMonthList = class FiscalMonthList {
|
|
85
|
+
};
|
|
86
|
+
exports.FiscalMonthList = FiscalMonthList;
|
|
87
|
+
tslib_1.__decorate([
|
|
88
|
+
(0, type_graphql_1.Field)(type => [fiscal_month_1.FiscalMonth]),
|
|
89
|
+
tslib_1.__metadata("design:type", Array)
|
|
90
|
+
], FiscalMonthList.prototype, "items", void 0);
|
|
91
|
+
tslib_1.__decorate([
|
|
92
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
93
|
+
tslib_1.__metadata("design:type", Number)
|
|
94
|
+
], FiscalMonthList.prototype, "total", void 0);
|
|
95
|
+
exports.FiscalMonthList = FiscalMonthList = tslib_1.__decorate([
|
|
96
|
+
(0, type_graphql_1.ObjectType)()
|
|
97
|
+
], FiscalMonthList);
|
|
98
|
+
//# sourceMappingURL=fiscal-month-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiscal-month-type.js","sourceRoot":"","sources":["../../../server/service/fiscal-month/fiscal-month-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,gDAA6C;AAC7C,iDAA4C;AAGrC,IAAM,cAAc,GAApB,MAAM,cAAc;CAqB1B,CAAA;AArBY,wCAAc;AAEzB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;4CACP;AAGZ;IADC,IAAA,oBAAK,EAAC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;;mDACjF;AAGjB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,uDAAuD,EAAE,CAAC;;iDACjF;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,0BAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAC3B;AAGrB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACZ;AAGd;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACX;2BA1BJ,gBAAgB;IAD5B,IAAA,wBAAS,GAAE;GACC,gBAAgB,CA2B5B;AAGM,IAAM,eAAe,GAArB,MAAM,eAAe;CAM3B,CAAA;AANY,0CAAe;AAE1B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,0BAAW,CAAC,CAAC;;8CACT;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;8CACN;0BALF,eAAe;IAD3B,IAAA,yBAAU,GAAE;GACA,eAAe,CAM3B","sourcesContent":["import { InputType, Field, Int, ID, ObjectType } from 'type-graphql'\nimport { FiscalStatus } from '../common-type'\nimport { FiscalMonth } from './fiscal-month'\n\n@InputType()\nexport class NewFiscalMonth {\n @Field(type => Int)\n year: number // 회계연도 (예: 2023)\n\n @Field(type => Int)\n quarter: number // 1, 2, 3, 4 분기\n\n @Field(type => Int)\n month: number // 1 ~ 12월\n\n @Field(type => String, { description: 'The start date of the fiscal month in YYYY-MM-DD format' })\n startDate: string // 월의 시작일\n\n @Field(type => String, { description: 'The end date of the fiscal month in YYYY-MM-DD format' })\n endDate: string // 월의 종료일\n\n @Field(type => FiscalStatus, { nullable: true })\n status?: FiscalStatus // 월의 상태 (OPEN, CLOSED, FINALIZED)\n\n @Field({ nullable: true })\n notes?: string // 월에 대한 설명이나 주석\n}\n\n@InputType()\nexport class FiscalMonthPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field(type => Int, { nullable: true })\n year?: number // 회계연도 (예: 2023)\n\n @Field(type => Int, { nullable: true })\n quarter?: number // 1, 2, 3, 4 분기\n\n @Field(type => Int, { nullable: true })\n month?: number // 1 ~ 12월\n\n @Field(type => String, { description: 'The start date of the fiscal month in YYYY-MM-DD format' })\n startDate: string // 월의 시작일\n\n @Field(type => String, { description: 'The end date of the fiscal month in YYYY-MM-DD format' })\n endDate: string // 월의 종료일\n\n @Field(type => FiscalStatus, { nullable: true })\n status?: FiscalStatus // 월의 상태 (OPEN, CLOSED, FINALIZED)\n\n @Field({ nullable: true })\n notes?: string // 월에 대한 설명이나 주석\n\n @Field({ nullable: true })\n cuFlag?: string // Create/Update Flag\n}\n\n@ObjectType()\nexport class FiscalMonthList {\n @Field(type => [FiscalMonth])\n items: FiscalMonth[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Domain } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { FiscalStatus } from '../common-type';
|
|
4
|
+
export declare class FiscalMonth {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
domain?: Domain;
|
|
7
|
+
domainId?: string;
|
|
8
|
+
year: number;
|
|
9
|
+
quarter: number;
|
|
10
|
+
month: number;
|
|
11
|
+
startDate: string;
|
|
12
|
+
endDate: string;
|
|
13
|
+
status: FiscalStatus;
|
|
14
|
+
notes?: string;
|
|
15
|
+
createdAt?: Date;
|
|
16
|
+
updatedAt?: Date;
|
|
17
|
+
deletedAt?: Date;
|
|
18
|
+
creator?: User;
|
|
19
|
+
creatorId?: string;
|
|
20
|
+
updater?: User;
|
|
21
|
+
updaterId?: string;
|
|
22
|
+
}
|