@things-factory/accounting 10.1.134 → 10.1.135
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/route.d.ts +1 -1
- package/dist-client/route.js +0 -12
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/index.d.ts +0 -1
- package/dist-server/index.js +0 -1
- package/dist-server/index.js.map +1 -1
- package/dist-server/service/account/account-history.d.ts +13 -6
- package/dist-server/service/account/account-history.js +44 -17
- package/dist-server/service/account/account-history.js.map +1 -1
- package/dist-server/service/account/account-mutation.js +2 -2
- package/dist-server/service/account/account-mutation.js.map +1 -1
- package/dist-server/service/account/account-type.d.ts +16 -0
- package/dist-server/service/account/account-type.js +71 -13
- package/dist-server/service/account/account-type.js.map +1 -1
- package/dist-server/service/account/account.d.ts +9 -3
- package/dist-server/service/account/account.js +34 -8
- package/dist-server/service/account/account.js.map +1 -1
- package/dist-server/service/accounting-category/accounting-category-mutation.js +2 -2
- package/dist-server/service/accounting-category/accounting-category-mutation.js.map +1 -1
- package/dist-server/service/accounting-document/accounting-document-mutation.js +12 -3
- package/dist-server/service/accounting-document/accounting-document-mutation.js.map +1 -1
- package/dist-server/service/accounting-document/accounting-document-query.js +2 -0
- package/dist-server/service/accounting-document/accounting-document-query.js.map +1 -1
- package/dist-server/service/bank-account/bank-account-history.d.ts +11 -14
- package/dist-server/service/bank-account/bank-account-history.js +46 -59
- package/dist-server/service/bank-account/bank-account-history.js.map +1 -1
- package/dist-server/service/bank-account/bank-account-mutation.d.ts +1 -2
- package/dist-server/service/bank-account/bank-account-mutation.js +25 -69
- package/dist-server/service/bank-account/bank-account-mutation.js.map +1 -1
- package/dist-server/service/bank-account/bank-account-query.js +2 -0
- package/dist-server/service/bank-account/bank-account-query.js.map +1 -1
- package/dist-server/service/bank-account/bank-account-service.d.ts +5 -0
- package/dist-server/service/bank-account/bank-account-service.js +21 -0
- package/dist-server/service/bank-account/bank-account-service.js.map +1 -0
- package/dist-server/service/bank-account/bank-account-type.d.ts +13 -19
- package/dist-server/service/bank-account/bank-account-type.js +45 -69
- package/dist-server/service/bank-account/bank-account-type.js.map +1 -1
- package/dist-server/service/bank-account/bank-account.d.ts +14 -17
- package/dist-server/service/bank-account/bank-account.js +45 -57
- package/dist-server/service/bank-account/bank-account.js.map +1 -1
- package/dist-server/service/bank-statement/bank-statement-query.d.ts +14 -0
- package/dist-server/service/bank-statement/bank-statement-query.js +92 -0
- package/dist-server/service/bank-statement/bank-statement-query.js.map +1 -0
- package/dist-server/service/bank-statement/bank-statement.d.ts +26 -0
- package/dist-server/service/bank-statement/bank-statement.js +109 -0
- package/dist-server/service/bank-statement/bank-statement.js.map +1 -0
- package/dist-server/service/bank-statement/index.d.ts +5 -0
- package/dist-server/service/bank-statement/index.js +9 -0
- package/dist-server/service/bank-statement/index.js.map +1 -0
- package/dist-server/service/cash-flow-type.d.ts +5 -0
- package/dist-server/service/cash-flow-type.js +15 -0
- package/dist-server/service/cash-flow-type.js.map +1 -0
- package/dist-server/service/financial-institution/financial-institution-mutation.js +10 -1
- package/dist-server/service/financial-institution/financial-institution-mutation.js.map +1 -1
- package/dist-server/service/financial-institution/financial-institution-query.js +14 -6
- package/dist-server/service/financial-institution/financial-institution-query.js.map +1 -1
- package/dist-server/service/financial-institution/index.d.ts +1 -1
- package/dist-server/service/financial-statement/financial-statement-history.d.ts +11 -9
- package/dist-server/service/financial-statement/financial-statement-history.js +47 -36
- package/dist-server/service/financial-statement/financial-statement-history.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement-line.d.ts +24 -0
- package/dist-server/service/financial-statement/financial-statement-line.js +108 -0
- package/dist-server/service/financial-statement/financial-statement-line.js.map +1 -0
- package/dist-server/service/financial-statement/financial-statement-mutation.d.ts +1 -8
- package/dist-server/service/financial-statement/financial-statement-mutation.js +10 -135
- package/dist-server/service/financial-statement/financial-statement-mutation.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement-query.d.ts +8 -7
- package/dist-server/service/financial-statement/financial-statement-query.js +40 -30
- package/dist-server/service/financial-statement/financial-statement-query.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement-service.d.ts +33 -0
- package/dist-server/service/financial-statement/financial-statement-service.js +44 -0
- package/dist-server/service/financial-statement/financial-statement-service.js.map +1 -0
- package/dist-server/service/financial-statement/financial-statement.d.ts +19 -11
- package/dist-server/service/financial-statement/financial-statement.js +73 -65
- package/dist-server/service/financial-statement/financial-statement.js.map +1 -1
- package/dist-server/service/financial-statement/index.d.ts +3 -2
- package/dist-server/service/financial-statement/index.js +2 -2
- package/dist-server/service/financial-statement/index.js.map +1 -1
- package/dist-server/service/index.d.ts +15 -3
- package/dist-server/service/index.js +30 -13
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/payment/index.d.ts +1 -0
- package/dist-server/service/payment/index.js +1 -0
- package/dist-server/service/payment/index.js.map +1 -1
- package/dist-server/service/payment/payment-history.d.ts +9 -16
- package/dist-server/service/payment/payment-history.js +36 -70
- package/dist-server/service/payment/payment-history.js.map +1 -1
- package/dist-server/service/payment/payment-mutation.d.ts +0 -1
- package/dist-server/service/payment/payment-mutation.js +14 -79
- package/dist-server/service/payment/payment-mutation.js.map +1 -1
- package/dist-server/service/payment/payment-query.d.ts +3 -0
- package/dist-server/service/payment/payment-query.js +30 -1
- package/dist-server/service/payment/payment-query.js.map +1 -1
- package/dist-server/service/payment/payment-service.d.ts +16 -0
- package/dist-server/service/payment/payment-service.js +140 -0
- package/dist-server/service/payment/payment-service.js.map +1 -0
- package/dist-server/service/payment/payment-targets.d.ts +31 -0
- package/dist-server/service/payment/payment-targets.js +19 -0
- package/dist-server/service/payment/payment-targets.js.map +1 -0
- package/dist-server/service/payment/payment-type.d.ts +13 -17
- package/dist-server/service/payment/payment-type.js +35 -51
- package/dist-server/service/payment/payment-type.js.map +1 -1
- package/dist-server/service/payment/payment.d.ts +23 -22
- package/dist-server/service/payment/payment.js +66 -94
- package/dist-server/service/payment/payment.js.map +1 -1
- package/dist-server/service/payment/transfer-target.d.ts +1 -0
- package/dist-server/service/payment/transfer-target.js +43 -0
- package/dist-server/service/payment/transfer-target.js.map +1 -0
- package/dist-server/service/recurring-cash-item/index.d.ts +6 -0
- package/dist-server/service/recurring-cash-item/index.js +10 -0
- package/dist-server/service/recurring-cash-item/index.js.map +1 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-mutation.d.ts +7 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-mutation.js +63 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-mutation.js.map +1 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-query.d.ts +15 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-query.js +101 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-query.js.map +1 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-service.d.ts +23 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-service.js +91 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-service.js.map +1 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-type.d.ts +23 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-type.js +85 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item-type.js.map +1 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item.d.ts +35 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item.js +142 -0
- package/dist-server/service/recurring-cash-item/recurring-cash-item.js.map +1 -0
- package/dist-server/service/recurring-cash-item/recurring-schedule.d.ts +36 -0
- package/dist-server/service/recurring-cash-item/recurring-schedule.js +41 -0
- package/dist-server/service/recurring-cash-item/recurring-schedule.js.map +1 -0
- package/dist-server/service/transaction/transaction-history.d.ts +42 -15
- package/dist-server/service/transaction/transaction-history.js +160 -54
- package/dist-server/service/transaction/transaction-history.js.map +1 -1
- package/dist-server/service/transaction/transaction-mutation.d.ts +0 -1
- package/dist-server/service/transaction/transaction-mutation.js +13 -78
- package/dist-server/service/transaction/transaction-mutation.js.map +1 -1
- package/dist-server/service/transaction/transaction-period.d.ts +16 -0
- package/dist-server/service/transaction/transaction-period.js +49 -0
- package/dist-server/service/transaction/transaction-period.js.map +1 -0
- package/dist-server/service/transaction/transaction-query.d.ts +12 -0
- package/dist-server/service/transaction/transaction-query.js +84 -2
- package/dist-server/service/transaction/transaction-query.js.map +1 -1
- package/dist-server/service/transaction/transaction-service.d.ts +30 -0
- package/dist-server/service/transaction/transaction-service.js +130 -0
- package/dist-server/service/transaction/transaction-service.js.map +1 -0
- package/dist-server/service/transaction/transaction-type.d.ts +39 -7
- package/dist-server/service/transaction/transaction-type.js +145 -23
- package/dist-server/service/transaction/transaction-type.js.map +1 -1
- package/dist-server/service/transaction/transaction.d.ts +58 -31
- package/dist-server/service/transaction/transaction.js +216 -102
- package/dist-server/service/transaction/transaction.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/things-factory.config.js +0 -4
- package/translations/en.json +34 -2
- package/translations/ja.json +0 -1
- package/translations/ko.json +34 -2
- package/translations/ms.json +0 -1
- package/translations/zh.json +0 -1
- package/dist-client/pages/account/account-importer.d.ts +0 -22
- package/dist-client/pages/account/account-importer.js +0 -99
- package/dist-client/pages/account/account-importer.js.map +0 -1
- package/dist-client/pages/account/account-list-page.d.ts +0 -57
- package/dist-client/pages/account/account-list-page.js +0 -306
- package/dist-client/pages/account/account-list-page.js.map +0 -1
- package/dist-client/pages/bank-account/bank-account-importer.d.ts +0 -23
- package/dist-client/pages/bank-account/bank-account-importer.js +0 -92
- package/dist-client/pages/bank-account/bank-account-importer.js.map +0 -1
- package/dist-client/pages/bank-account/bank-account-list-page.d.ts +0 -60
- package/dist-client/pages/bank-account/bank-account-list-page.js +0 -317
- package/dist-client/pages/bank-account/bank-account-list-page.js.map +0 -1
- package/dist-client/pages/financial-statement/financial-statement-importer.d.ts +0 -22
- package/dist-client/pages/financial-statement/financial-statement-importer.js +0 -99
- package/dist-client/pages/financial-statement/financial-statement-importer.js.map +0 -1
- package/dist-client/pages/financial-statement/financial-statement-list-page.d.ts +0 -57
- package/dist-client/pages/financial-statement/financial-statement-list-page.js +0 -280
- package/dist-client/pages/financial-statement/financial-statement-list-page.js.map +0 -1
- package/dist-client/pages/income-statement/income-statement-importer.d.ts +0 -22
- package/dist-client/pages/income-statement/income-statement-importer.js +0 -99
- package/dist-client/pages/income-statement/income-statement-importer.js.map +0 -1
- package/dist-client/pages/income-statement/income-statement-list-page.d.ts +0 -57
- package/dist-client/pages/income-statement/income-statement-list-page.js +0 -280
- package/dist-client/pages/income-statement/income-statement-list-page.js.map +0 -1
- package/dist-client/pages/payment/payment-importer.d.ts +0 -23
- package/dist-client/pages/payment/payment-importer.js +0 -92
- package/dist-client/pages/payment/payment-importer.js.map +0 -1
- package/dist-client/pages/payment/payment-list-page.d.ts +0 -60
- package/dist-client/pages/payment/payment-list-page.js +0 -317
- package/dist-client/pages/payment/payment-list-page.js.map +0 -1
- package/dist-client/pages/transaction/transaction-importer.d.ts +0 -22
- package/dist-client/pages/transaction/transaction-importer.js +0 -99
- package/dist-client/pages/transaction/transaction-importer.js.map +0 -1
- package/dist-client/pages/transaction/transaction-list-page.d.ts +0 -57
- package/dist-client/pages/transaction/transaction-list-page.js +0 -280
- package/dist-client/pages/transaction/transaction-list-page.js.map +0 -1
- package/dist-server/controllers/index.d.ts +0 -1
- package/dist-server/controllers/index.js +0 -5
- package/dist-server/controllers/index.js.map +0 -1
- package/dist-server/controllers/summary-statements.d.ts +0 -4
- package/dist-server/controllers/summary-statements.js +0 -149
- package/dist-server/controllers/summary-statements.js.map +0 -1
- package/dist-server/migrations/1725201567284-seed-country-codes.d.ts +0 -5
- package/dist-server/migrations/1725201567284-seed-country-codes.js +0 -255
- package/dist-server/migrations/1725201567284-seed-country-codes.js.map +0 -1
- package/dist-server/service/financial-statement/financial-statement-line-item.d.ts +0 -19
- package/dist-server/service/financial-statement/financial-statement-line-item.js +0 -95
- package/dist-server/service/financial-statement/financial-statement-line-item.js.map +0 -1
- package/dist-server/service/financial-statement/financial-statement-type.d.ts +0 -20
- package/dist-server/service/financial-statement/financial-statement-type.js +0 -77
- package/dist-server/service/financial-statement/financial-statement-type.js.map +0 -1
- package/dist-server/service/income-statement/event-subscriber.d.ts +0 -7
- package/dist-server/service/income-statement/event-subscriber.js +0 -21
- package/dist-server/service/income-statement/event-subscriber.js.map +0 -1
- package/dist-server/service/income-statement/income-statement-history.d.ts +0 -28
- package/dist-server/service/income-statement/income-statement-history.js +0 -146
- package/dist-server/service/income-statement/income-statement-history.js.map +0 -1
- package/dist-server/service/income-statement/income-statement-line-item.d.ts +0 -19
- package/dist-server/service/income-statement/income-statement-line-item.js +0 -97
- package/dist-server/service/income-statement/income-statement-line-item.js.map +0 -1
- package/dist-server/service/income-statement/income-statement-mutation.d.ts +0 -10
- package/dist-server/service/income-statement/income-statement-mutation.js +0 -159
- package/dist-server/service/income-statement/income-statement-mutation.js.map +0 -1
- package/dist-server/service/income-statement/income-statement-query.d.ts +0 -11
- package/dist-server/service/income-statement/income-statement-query.js +0 -81
- package/dist-server/service/income-statement/income-statement-query.js.map +0 -1
- package/dist-server/service/income-statement/income-statement-type.d.ts +0 -20
- package/dist-server/service/income-statement/income-statement-type.js +0 -77
- package/dist-server/service/income-statement/income-statement-type.js.map +0 -1
- package/dist-server/service/income-statement/income-statement.d.ts +0 -28
- package/dist-server/service/income-statement/income-statement.js +0 -137
- package/dist-server/service/income-statement/income-statement.js.map +0 -1
- package/dist-server/service/income-statement/index.d.ts +0 -8
- package/dist-server/service/income-statement/index.js +0 -13
- package/dist-server/service/income-statement/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/accounting",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.135",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -32,9 +32,11 @@
|
|
|
32
32
|
"@material/web": "^2.0.0",
|
|
33
33
|
"@operato/graphql": "^10.0.0",
|
|
34
34
|
"@operato/shell": "^10.0.0",
|
|
35
|
+
"@things-factory/attachment-base": "^10.1.123",
|
|
35
36
|
"@things-factory/auth-base": "^10.1.123",
|
|
37
|
+
"@things-factory/biz-base": "^10.1.135",
|
|
36
38
|
"@things-factory/shell": "^10.1.123",
|
|
37
|
-
"@things-factory/worklist": "^10.1.
|
|
39
|
+
"@things-factory/worklist": "^10.1.135"
|
|
38
40
|
},
|
|
39
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "c693c5bc5a21fef4d5994ba352ff3427d030407e"
|
|
40
42
|
}
|
package/things-factory.config.js
CHANGED
|
@@ -5,11 +5,7 @@ export default {
|
|
|
5
5
|
route,
|
|
6
6
|
routes: [
|
|
7
7
|
{ tagname: 'accounting-main', page: 'accounting-main' },
|
|
8
|
-
{ tagname: 'account-list-page', page: 'account-list' },
|
|
9
|
-
{ tagname: 'transaction-list-page', page: 'transaction-list' },
|
|
10
8
|
{ tagname: 'accounting-category-list-page', page: 'accounting-category-list' },
|
|
11
|
-
{ tagname: 'financial-statement-list-page', page: 'financial-statement-list' },
|
|
12
|
-
{ tagname: 'income-statement-list-page', page: 'income-statement-list' },
|
|
13
9
|
{ tagname: 'fiscal-year-list-page', page: 'fiscal-year-list' },
|
|
14
10
|
{ tagname: 'fiscal-month-list-page', page: 'fiscal-month-list' }
|
|
15
11
|
],
|
package/translations/en.json
CHANGED
|
@@ -2,8 +2,40 @@
|
|
|
2
2
|
"title.accounting": "accounting",
|
|
3
3
|
"title.account list": "account list",
|
|
4
4
|
"title.fiscal closing status": "fiscal closing status",
|
|
5
|
-
"title.income statement list": "income statement list",
|
|
6
5
|
"title.financial statement list": "financial statement list",
|
|
7
6
|
"title.transaction list": "transaction list",
|
|
8
|
-
"title.income forecast": "income forecast"
|
|
7
|
+
"title.income forecast": "income forecast",
|
|
8
|
+
"error.transaction-type-required": "Say whether the money came in or went out.",
|
|
9
|
+
"error.transaction-date-required": "'{value}' is not a day - write it as YYYY-MM-DD.",
|
|
10
|
+
"error.forecast-year-required": "Give the year the forecast is planned in.",
|
|
11
|
+
"error.month-out-of-range": "The month must be 1 to 12.",
|
|
12
|
+
"error.forecast-description-required": "Say what is planned.",
|
|
13
|
+
"error.probability-out-of-range": "The probability must be 0 to 100.",
|
|
14
|
+
"error.transaction-not-found": "The transaction was not found. Reload it.",
|
|
15
|
+
"error.transaction-has-payments": "Unlink what the transaction paid before deleting it.",
|
|
16
|
+
"error.bank-line-twice": "This bank line is already in the books.",
|
|
17
|
+
"error.bank-account-not-found": "The account was not found. Reload it.",
|
|
18
|
+
"error.bank-account-has-transactions": "Transactions were written on the account. Make it inactive instead.",
|
|
19
|
+
"error.payment-over-transaction": "{paid} would be put on a transaction of {amount}.",
|
|
20
|
+
"error.payment-transaction-required": "Choose the transaction.",
|
|
21
|
+
"error.payment-transaction-not-found": "The transaction was not found. Reload it.",
|
|
22
|
+
"error.payment-target-unknown": "'{targetType}' cannot be linked to a transaction.",
|
|
23
|
+
"error.payment-target-required": "Choose what the transaction paid.",
|
|
24
|
+
"error.payment-amount-not-positive": "The amount must be more than zero.",
|
|
25
|
+
"error.payment-not-found": "The link was not found. Reload it.",
|
|
26
|
+
"error.payment-twice": "The transaction is already linked to this. Change that link instead.",
|
|
27
|
+
"error.transfer-target-not-found": "The other line of the transfer was not found.",
|
|
28
|
+
"error.transfer-target-not-deposit": "A withdrawal is linked to a deposit - the other line is not one.",
|
|
29
|
+
"error.transfer-from-not-withdrawal": "Link a transfer from its withdrawal.",
|
|
30
|
+
"error.transfer-over-deposit": "{taken} would move into a deposit of {amount}.",
|
|
31
|
+
"error.recurring-name-required": "Say what the recurring item is.",
|
|
32
|
+
"error.recurring-start-required": "Give the first month as YYYY-MM.",
|
|
33
|
+
"error.recurring-end-not-a-month": "Give the last month as YYYY-MM.",
|
|
34
|
+
"error.recurring-end-before-start": "The last month is before the first.",
|
|
35
|
+
"error.recurring-amount-required": "Give the amount of every month.",
|
|
36
|
+
"error.recurring-not-found": "The recurring item was not found. Reload it.",
|
|
37
|
+
"error.day-of-month-out-of-range": "The day must be 1 to 31.",
|
|
38
|
+
"error.statement-year-required": "Give the fiscal year of the statement.",
|
|
39
|
+
"error.statement-kind-unknown": "'{kind}' is not a kind of financial statement.",
|
|
40
|
+
"error.statement-line-code-twice": "A line code appears twice."
|
|
9
41
|
}
|
package/translations/ja.json
CHANGED
package/translations/ko.json
CHANGED
|
@@ -2,8 +2,40 @@
|
|
|
2
2
|
"title.accounting": "회계",
|
|
3
3
|
"title.account list": "계정 목록",
|
|
4
4
|
"title.fiscal closing status": "회계 결산 조회",
|
|
5
|
-
"title.income statement list": "손익계산서 목록",
|
|
6
5
|
"title.financial statement list": "재무제표 목록",
|
|
7
6
|
"title.transaction list": "거래 내역",
|
|
8
|
-
"title.income forecast": "수익 예측"
|
|
7
|
+
"title.income forecast": "수익 예측",
|
|
8
|
+
"error.transaction-type-required": "입금인지 출금인지 정하세요.",
|
|
9
|
+
"error.transaction-date-required": "'{value}'은(는) 날짜가 아닙니다. YYYY-MM-DD 로 넣으세요.",
|
|
10
|
+
"error.forecast-year-required": "예상의 연도를 넣으세요.",
|
|
11
|
+
"error.month-out-of-range": "월은 1부터 12까지입니다.",
|
|
12
|
+
"error.forecast-description-required": "무엇의 예상인지 적으세요.",
|
|
13
|
+
"error.probability-out-of-range": "확률은 0부터 100까지입니다.",
|
|
14
|
+
"error.transaction-not-found": "거래를 찾을 수 없습니다. 다시 불러오세요.",
|
|
15
|
+
"error.transaction-has-payments": "이 거래에 연결된 것을 먼저 풀고 지우세요.",
|
|
16
|
+
"error.bank-line-twice": "이 은행 거래는 이미 장부에 있습니다.",
|
|
17
|
+
"error.bank-account-not-found": "계좌를 찾을 수 없습니다. 다시 불러오세요.",
|
|
18
|
+
"error.bank-account-has-transactions": "거래가 있는 계좌입니다. 지우지 말고 사용 안 함으로 바꾸세요.",
|
|
19
|
+
"error.payment-over-transaction": "{amount} 거래에 {paid}을(를) 연결할 수 없습니다.",
|
|
20
|
+
"error.payment-transaction-required": "거래를 고르세요.",
|
|
21
|
+
"error.payment-transaction-not-found": "거래를 찾을 수 없습니다. 다시 불러오세요.",
|
|
22
|
+
"error.payment-target-unknown": "'{targetType}'은(는) 거래에 연결할 수 없습니다.",
|
|
23
|
+
"error.payment-target-required": "거래에 연결할 대상을 고르세요.",
|
|
24
|
+
"error.payment-amount-not-positive": "금액은 0보다 커야 합니다.",
|
|
25
|
+
"error.payment-not-found": "연결을 찾을 수 없습니다. 다시 불러오세요.",
|
|
26
|
+
"error.payment-twice": "이미 연결되어 있습니다. 그 연결을 고치세요.",
|
|
27
|
+
"error.transfer-target-not-found": "이체의 상대 거래를 찾을 수 없습니다.",
|
|
28
|
+
"error.transfer-target-not-deposit": "출금은 입금에 연결합니다. 상대 거래가 입금이 아닙니다.",
|
|
29
|
+
"error.transfer-from-not-withdrawal": "이체는 출금 쪽에서 연결하세요.",
|
|
30
|
+
"error.transfer-over-deposit": "{amount} 입금에 {taken}이(가) 들어올 수 없습니다.",
|
|
31
|
+
"error.recurring-name-required": "정기 항목의 이름을 넣으세요.",
|
|
32
|
+
"error.recurring-start-required": "시작 월을 YYYY-MM 으로 넣으세요.",
|
|
33
|
+
"error.recurring-end-not-a-month": "끝 월을 YYYY-MM 으로 넣으세요.",
|
|
34
|
+
"error.recurring-end-before-start": "끝 월이 시작 월보다 앞입니다.",
|
|
35
|
+
"error.recurring-amount-required": "매월 금액을 넣으세요.",
|
|
36
|
+
"error.recurring-not-found": "정기 항목을 찾을 수 없습니다. 다시 불러오세요.",
|
|
37
|
+
"error.day-of-month-out-of-range": "날짜는 1부터 31까지입니다.",
|
|
38
|
+
"error.statement-year-required": "재무제표의 회계연도를 넣으세요.",
|
|
39
|
+
"error.statement-kind-unknown": "'{kind}'은(는) 재무제표 종류가 아닙니다.",
|
|
40
|
+
"error.statement-line-code-twice": "줄 코드가 두 번 나옵니다."
|
|
9
41
|
}
|
package/translations/ms.json
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
"title.accounting": "perakaunan",
|
|
3
3
|
"title.account list": "senarai akaun",
|
|
4
4
|
"title.fiscal closing status": "status penutupan fiskal",
|
|
5
|
-
"title.income statement list": "senarai penyata pendapatan",
|
|
6
5
|
"title.financial statement list": "senarai penyata kewangan",
|
|
7
6
|
"title.transaction list": "senarai transaksi",
|
|
8
7
|
"title.income forecast": "ramalan pendapatan"
|
package/translations/zh.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import '@operato/data-grist';
|
|
2
|
-
import { LitElement } from 'lit';
|
|
3
|
-
export declare class AccountImporter extends LitElement {
|
|
4
|
-
static styles: import("lit").CSSResult[];
|
|
5
|
-
accounts: any[];
|
|
6
|
-
columns: {
|
|
7
|
-
list: {
|
|
8
|
-
fields: string[];
|
|
9
|
-
};
|
|
10
|
-
pagination: {
|
|
11
|
-
infinite: boolean;
|
|
12
|
-
};
|
|
13
|
-
columns: {
|
|
14
|
-
type: string;
|
|
15
|
-
name: string;
|
|
16
|
-
header: string;
|
|
17
|
-
width: number;
|
|
18
|
-
}[];
|
|
19
|
-
};
|
|
20
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
21
|
-
save(): Promise<void>;
|
|
22
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import '@operato/data-grist';
|
|
3
|
-
import gql from 'graphql-tag';
|
|
4
|
-
import { css, html, LitElement } from 'lit';
|
|
5
|
-
import { property } from 'lit/decorators.js';
|
|
6
|
-
import { client } from '@operato/graphql';
|
|
7
|
-
import { i18next } from '@operato/i18n';
|
|
8
|
-
import { isMobileDevice } from '@operato/utils';
|
|
9
|
-
export class AccountImporter extends LitElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.accounts = [];
|
|
13
|
-
this.columns = {
|
|
14
|
-
list: { fields: ['name', 'description'] },
|
|
15
|
-
pagination: { infinite: true },
|
|
16
|
-
columns: [
|
|
17
|
-
{
|
|
18
|
-
type: 'string',
|
|
19
|
-
name: 'name',
|
|
20
|
-
header: i18next.t('field.name'),
|
|
21
|
-
width: 150
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
type: 'string',
|
|
25
|
-
name: 'description',
|
|
26
|
-
header: i18next.t('field.description'),
|
|
27
|
-
width: 200
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
type: 'checkbox',
|
|
31
|
-
name: 'active',
|
|
32
|
-
header: i18next.t('field.active'),
|
|
33
|
-
width: 60
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
static { this.styles = [
|
|
39
|
-
css `
|
|
40
|
-
:host {
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
|
|
44
|
-
background-color: #fff;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
ox-grist {
|
|
48
|
-
flex: 1;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.button-container {
|
|
52
|
-
display: flex;
|
|
53
|
-
margin-left: auto;
|
|
54
|
-
padding: var(--padding-default);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
mwc-button {
|
|
58
|
-
margin-left: var(--margin-default);
|
|
59
|
-
}
|
|
60
|
-
`
|
|
61
|
-
]; }
|
|
62
|
-
render() {
|
|
63
|
-
return html `
|
|
64
|
-
<ox-grist
|
|
65
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
66
|
-
.config=${this.columns}
|
|
67
|
-
.data=${{
|
|
68
|
-
records: this.accounts
|
|
69
|
-
}}
|
|
70
|
-
></ox-grist>
|
|
71
|
-
|
|
72
|
-
<div class="button-container">
|
|
73
|
-
<mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
|
|
74
|
-
</div>
|
|
75
|
-
`;
|
|
76
|
-
}
|
|
77
|
-
async save() {
|
|
78
|
-
const response = await client.mutate({
|
|
79
|
-
mutation: gql `
|
|
80
|
-
mutation importAccounts($accounts: [AccountPatch!]!) {
|
|
81
|
-
importAccounts(accounts: $accounts)
|
|
82
|
-
}
|
|
83
|
-
`,
|
|
84
|
-
variables: { accounts: this.accounts }
|
|
85
|
-
});
|
|
86
|
-
if (response.errors?.length)
|
|
87
|
-
return;
|
|
88
|
-
this.dispatchEvent(new CustomEvent('imported'));
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
__decorate([
|
|
92
|
-
property({ type: Array }),
|
|
93
|
-
__metadata("design:type", Array)
|
|
94
|
-
], AccountImporter.prototype, "accounts", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
property({ type: Object }),
|
|
97
|
-
__metadata("design:type", Object)
|
|
98
|
-
], AccountImporter.prototype, "columns", void 0);
|
|
99
|
-
//# sourceMappingURL=account-importer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-importer.js","sourceRoot":"","sources":["../../../client/pages/account/account-importer.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,OAAO,eAAgB,SAAQ,UAAU;IAA/C;;QA0B6B,aAAQ,GAAU,EAAE,CAAA;QACnB,YAAO,GAAG;YACpC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE;YACzC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9B,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;oBAC/B,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;oBACtC,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC;oBACjC,KAAK,EAAE,EAAE;iBACV;aACF;SACF,CAAA;IAmCH,CAAC;aApFQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;KAqBF;KACF,AAvBY,CAuBZ;IA6BD,MAAM;QACJ,OAAO,IAAI,CAAA;;gBAEC,cAAc,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;kBAChC,IAAI,CAAC,OAAO;gBAEpB;YACE,OAAO,EAAE,IAAI,CAAC,QAAQ;SAE1B;;;;qCAI6B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;;KAEjF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;OAIZ;YACD,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;SACvC,CAAC,CAAA;QAEF,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM;YAAE,OAAM;QAEnC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IACjD,CAAC;;AA1D0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;iDAAqB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAuB1B","sourcesContent":["import '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\n\nexport class AccountImporter extends LitElement {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n padding: var(--padding-default);\n }\n\n mwc-button {\n margin-left: var(--margin-default);\n }\n `\n ]\n\n @property({ type: Array }) accounts: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${\n { \n records: this.accounts \n }\n }\n ></ox-grist>\n\n <div class=\"button-container\">\n <mwc-button raised @click=\"${this.save.bind(this)}\">${i18next.t('button.save')}</mwc-button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importAccounts($accounts: [AccountPatch!]!) {\n importAccounts(accounts: $accounts)\n }\n `,\n variables: { accounts: this.accounts }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n\n"]}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import '@operato/data-grist';
|
|
2
|
-
import { PageView } from '@operato/shell';
|
|
3
|
-
import { FetchOption } from '@operato/data-grist';
|
|
4
|
-
import { AccountImporter } from './account-importer';
|
|
5
|
-
declare const AccountListPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
|
|
6
|
-
export declare class AccountListPage extends AccountListPage_base {
|
|
7
|
-
static styles: import("lit").CSSResult[];
|
|
8
|
-
static get scopedElements(): {
|
|
9
|
-
'account-importer': typeof AccountImporter;
|
|
10
|
-
};
|
|
11
|
-
gristConfig: any;
|
|
12
|
-
mode: 'CARD' | 'GRID' | 'LIST';
|
|
13
|
-
private grist;
|
|
14
|
-
private sortersControl;
|
|
15
|
-
get context(): {
|
|
16
|
-
title: string;
|
|
17
|
-
search: {
|
|
18
|
-
handler: (search: string) => void;
|
|
19
|
-
value: string;
|
|
20
|
-
autofocus: boolean;
|
|
21
|
-
};
|
|
22
|
-
filter: {
|
|
23
|
-
handler: () => void;
|
|
24
|
-
};
|
|
25
|
-
help: string;
|
|
26
|
-
actions: {
|
|
27
|
-
icon: string;
|
|
28
|
-
emphasis: {
|
|
29
|
-
raised: boolean;
|
|
30
|
-
outlined: boolean;
|
|
31
|
-
dense: boolean;
|
|
32
|
-
danger: boolean;
|
|
33
|
-
};
|
|
34
|
-
title: string;
|
|
35
|
-
action: () => Promise<void>;
|
|
36
|
-
}[];
|
|
37
|
-
exportable: {
|
|
38
|
-
name: string;
|
|
39
|
-
data: () => Promise<{}[]>;
|
|
40
|
-
};
|
|
41
|
-
importable: {
|
|
42
|
-
handler: (records: any) => Promise<void>;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
46
|
-
pageInitialized(lifecycle: any): Promise<void>;
|
|
47
|
-
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
48
|
-
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|
|
49
|
-
total: any;
|
|
50
|
-
records: any;
|
|
51
|
-
}>;
|
|
52
|
-
_deleteAccount(): Promise<void>;
|
|
53
|
-
_updateAccount(): Promise<void>;
|
|
54
|
-
exportHandler(): Promise<{}[]>;
|
|
55
|
-
importHandler(records: any): Promise<void>;
|
|
56
|
-
}
|
|
57
|
-
export {};
|
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import '@operato/data-grist';
|
|
3
|
-
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles';
|
|
4
|
-
import { PageView } from '@operato/shell';
|
|
5
|
-
import { css, html } from 'lit';
|
|
6
|
-
import { customElement, property, query } from 'lit/decorators.js';
|
|
7
|
-
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
8
|
-
import { DataGrist } from '@operato/data-grist';
|
|
9
|
-
import { client } from '@operato/graphql';
|
|
10
|
-
import { i18next, localize } from '@operato/i18n';
|
|
11
|
-
import { notify, openPopup } from '@operato/layout';
|
|
12
|
-
import { OxPopup } from '@operato/popup';
|
|
13
|
-
import { isMobileDevice } from '@operato/utils';
|
|
14
|
-
import gql from 'graphql-tag';
|
|
15
|
-
import { AccountImporter } from './account-importer';
|
|
16
|
-
let AccountListPage = class AccountListPage extends localize(i18next)(ScopedElementsMixin(PageView)) {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
|
20
|
-
}
|
|
21
|
-
static { this.styles = [
|
|
22
|
-
/* The work surface frame for a list screen (ADR-0060 decision 8). */
|
|
23
|
-
WorkSurfacePageStyles,
|
|
24
|
-
ScrollbarStyles,
|
|
25
|
-
CommonGristStyles,
|
|
26
|
-
css `
|
|
27
|
-
:host {
|
|
28
|
-
--grid-record-emphasized-background-color: #8b0000;
|
|
29
|
-
--grid-record-emphasized-color: #ff6b6b;
|
|
30
|
-
}
|
|
31
|
-
`
|
|
32
|
-
]; }
|
|
33
|
-
static get scopedElements() {
|
|
34
|
-
return { 'account-importer': AccountImporter
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
get context() {
|
|
38
|
-
return { title: i18next.t('title.account list'),
|
|
39
|
-
search: { handler: (search) => {
|
|
40
|
-
this.grist.searchText = search;
|
|
41
|
-
},
|
|
42
|
-
value: this.grist?.searchText || '',
|
|
43
|
-
autofocus: true },
|
|
44
|
-
filter: { handler: () => {
|
|
45
|
-
this.grist.toggleHeadroom();
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
help: 'accounting/account',
|
|
49
|
-
actions: [
|
|
50
|
-
{ title: i18next.t('button.save'),
|
|
51
|
-
action: this._updateAccount.bind(this),
|
|
52
|
-
...CommonButtonStyles.save
|
|
53
|
-
},
|
|
54
|
-
{ title: i18next.t('button.delete'),
|
|
55
|
-
action: this._deleteAccount.bind(this),
|
|
56
|
-
...CommonButtonStyles.delete
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
exportable: { name: i18next.t('title.account list'),
|
|
60
|
-
data: this.exportHandler.bind(this)
|
|
61
|
-
},
|
|
62
|
-
importable: { handler: this.importHandler.bind(this)
|
|
63
|
-
} };
|
|
64
|
-
}
|
|
65
|
-
render() {
|
|
66
|
-
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
|
|
67
|
-
return html `
|
|
68
|
-
<ox-grist class="page-fill" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
69
|
-
<div slot="headroom">
|
|
70
|
-
<div id="filters">
|
|
71
|
-
<ox-filters-form without-search autofocus></ox-filters-form>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<div id="sorters">
|
|
75
|
-
Sort
|
|
76
|
-
<mwc-icon
|
|
77
|
-
@click=${e => {
|
|
78
|
-
const target = e.currentTarget;
|
|
79
|
-
this.sortersControl.open({ right: 0,
|
|
80
|
-
top: target.offsetTop + target.offsetHeight
|
|
81
|
-
});
|
|
82
|
-
}}
|
|
83
|
-
>expand_more</mwc-icon
|
|
84
|
-
>
|
|
85
|
-
<ox-popup id="sorter-control">
|
|
86
|
-
<ox-sorters-control> </ox-sorters-control>
|
|
87
|
-
</ox-popup>
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<div id="modes">
|
|
91
|
-
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
|
92
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
|
93
|
-
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
</ox-grist>
|
|
97
|
-
`;
|
|
98
|
-
}
|
|
99
|
-
async pageInitialized(lifecycle) {
|
|
100
|
-
this.gristConfig = { list: { fields: ['name', 'description'],
|
|
101
|
-
details: ['active', 'updatedAt']
|
|
102
|
-
},
|
|
103
|
-
columns: [
|
|
104
|
-
{ type: 'gutter', gutterName: 'sequence' },
|
|
105
|
-
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
106
|
-
{ type: 'string',
|
|
107
|
-
name: 'code',
|
|
108
|
-
header: i18next.t('field.code'),
|
|
109
|
-
record: { editable: true,
|
|
110
|
-
mandatory: true
|
|
111
|
-
},
|
|
112
|
-
filter: 'search',
|
|
113
|
-
sortable: true,
|
|
114
|
-
width: 150
|
|
115
|
-
},
|
|
116
|
-
{ type: 'string',
|
|
117
|
-
name: 'name',
|
|
118
|
-
header: i18next.t('field.name'),
|
|
119
|
-
record: { editable: true,
|
|
120
|
-
mandatory: true
|
|
121
|
-
},
|
|
122
|
-
filter: 'search',
|
|
123
|
-
sortable: true,
|
|
124
|
-
width: 150
|
|
125
|
-
},
|
|
126
|
-
{ type: 'accounting-category-object',
|
|
127
|
-
name: 'category',
|
|
128
|
-
header: i18next.t('field.category'),
|
|
129
|
-
record: { editable: true,
|
|
130
|
-
mandatory: true
|
|
131
|
-
},
|
|
132
|
-
sortable: false,
|
|
133
|
-
filter: true,
|
|
134
|
-
width: 150
|
|
135
|
-
},
|
|
136
|
-
{ type: 'string',
|
|
137
|
-
name: 'description',
|
|
138
|
-
header: i18next.t('field.description'),
|
|
139
|
-
record: { editable: true
|
|
140
|
-
},
|
|
141
|
-
filter: 'search',
|
|
142
|
-
width: 200
|
|
143
|
-
},
|
|
144
|
-
{ type: 'checkbox',
|
|
145
|
-
name: 'active',
|
|
146
|
-
label: true,
|
|
147
|
-
header: i18next.t('field.active'),
|
|
148
|
-
record: { editable: true
|
|
149
|
-
},
|
|
150
|
-
filter: true,
|
|
151
|
-
sortable: true,
|
|
152
|
-
width: 60
|
|
153
|
-
},
|
|
154
|
-
{ type: 'resource-object',
|
|
155
|
-
name: 'updater',
|
|
156
|
-
header: i18next.t('field.updater'),
|
|
157
|
-
record: { editable: false
|
|
158
|
-
},
|
|
159
|
-
sortable: true,
|
|
160
|
-
width: 120
|
|
161
|
-
},
|
|
162
|
-
{ type: 'datetime',
|
|
163
|
-
name: 'updatedAt',
|
|
164
|
-
header: i18next.t('field.updated_at'),
|
|
165
|
-
record: { editable: false
|
|
166
|
-
},
|
|
167
|
-
sortable: true,
|
|
168
|
-
width: 180
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
rows: { selectable: { multiple: true
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
sorters: [
|
|
175
|
-
{ name: 'code'
|
|
176
|
-
}
|
|
177
|
-
]
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
async pageUpdated(changes, lifecycle) {
|
|
181
|
-
if (this.active) { // do something here when this page just became as active
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }) {
|
|
185
|
-
const response = await client.query({ query: gql `
|
|
186
|
-
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) { responses: accounts(filters: $filters, pagination: $pagination, sortings: $sortings) { items { id
|
|
187
|
-
code
|
|
188
|
-
name
|
|
189
|
-
description
|
|
190
|
-
active
|
|
191
|
-
category { code
|
|
192
|
-
name
|
|
193
|
-
description
|
|
194
|
-
}
|
|
195
|
-
updater { id
|
|
196
|
-
name
|
|
197
|
-
}
|
|
198
|
-
updatedAt
|
|
199
|
-
}
|
|
200
|
-
total
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
`,
|
|
204
|
-
variables: { filters,
|
|
205
|
-
pagination: { page, limit },
|
|
206
|
-
sortings
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
return { total: response.data.responses.total || 0,
|
|
210
|
-
records: response.data.responses.items || []
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
async _deleteAccount() {
|
|
214
|
-
if (confirm(i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }))) {
|
|
215
|
-
const ids = this.grist.selected.map(record => record.id);
|
|
216
|
-
if (ids && ids.length > 0) {
|
|
217
|
-
const response = await client.mutate({ mutation: gql `
|
|
218
|
-
mutation ($ids: [String!]!) { deleteAccounts(ids: $ids)
|
|
219
|
-
}
|
|
220
|
-
`,
|
|
221
|
-
variables: { ids
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
if (!response.errors) {
|
|
225
|
-
this.grist.fetch();
|
|
226
|
-
notify({ message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
async _updateAccount() {
|
|
233
|
-
let patches = this.grist.dirtyRecords;
|
|
234
|
-
if (patches && patches.length) {
|
|
235
|
-
patches = patches.map(patch => {
|
|
236
|
-
let patchField = patch.id ? { id: patch.id } : {};
|
|
237
|
-
const dirtyFields = patch.__dirtyfields__;
|
|
238
|
-
for (let key in dirtyFields) {
|
|
239
|
-
patchField[key] = dirtyFields[key].after;
|
|
240
|
-
}
|
|
241
|
-
patchField.cuFlag = patch.__dirty__;
|
|
242
|
-
return patchField;
|
|
243
|
-
});
|
|
244
|
-
const response = await client.mutate({ mutation: gql `
|
|
245
|
-
mutation ($patches: [AccountPatch!]!) { updateMultipleAccount(patches: $patches) { name
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
`,
|
|
249
|
-
variables: { patches
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
if (!response.errors) {
|
|
253
|
-
this.grist.fetch();
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
async exportHandler() {
|
|
258
|
-
const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records;
|
|
259
|
-
const targetFieldSet = new Set(['id', 'name', 'description', 'active']);
|
|
260
|
-
return exportTargets.map(account => {
|
|
261
|
-
let tempObj = {};
|
|
262
|
-
for (const field of targetFieldSet) {
|
|
263
|
-
tempObj[field] = account[field];
|
|
264
|
-
}
|
|
265
|
-
return tempObj;
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
async importHandler(records) {
|
|
269
|
-
const popup = openPopup(html `
|
|
270
|
-
<account-importer
|
|
271
|
-
.accounts=${records}
|
|
272
|
-
@imported=${() => {
|
|
273
|
-
history.back();
|
|
274
|
-
this.grist.fetch();
|
|
275
|
-
}}
|
|
276
|
-
></account-importer>
|
|
277
|
-
`, { backdrop: true,
|
|
278
|
-
size: 'large',
|
|
279
|
-
title: i18next.t('title.import account')
|
|
280
|
-
});
|
|
281
|
-
popup.onclosed = () => {
|
|
282
|
-
this.grist.fetch();
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
__decorate([
|
|
287
|
-
property({ type: Object }),
|
|
288
|
-
__metadata("design:type", Object)
|
|
289
|
-
], AccountListPage.prototype, "gristConfig", void 0);
|
|
290
|
-
__decorate([
|
|
291
|
-
property({ type: String }),
|
|
292
|
-
__metadata("design:type", String)
|
|
293
|
-
], AccountListPage.prototype, "mode", void 0);
|
|
294
|
-
__decorate([
|
|
295
|
-
query('ox-grist'),
|
|
296
|
-
__metadata("design:type", DataGrist)
|
|
297
|
-
], AccountListPage.prototype, "grist", void 0);
|
|
298
|
-
__decorate([
|
|
299
|
-
query('#sorter-control'),
|
|
300
|
-
__metadata("design:type", OxPopup)
|
|
301
|
-
], AccountListPage.prototype, "sortersControl", void 0);
|
|
302
|
-
AccountListPage = __decorate([
|
|
303
|
-
customElement('account-list-page')
|
|
304
|
-
], AccountListPage);
|
|
305
|
-
export { AccountListPage };
|
|
306
|
-
//# sourceMappingURL=account-list-page.js.map
|