@things-factory/accounting 8.0.0-beta.8 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/client/activities/activity-book-edit.ts +88 -0
- package/client/activities/activity-book-view.ts +88 -0
- package/client/activities/activity-expense-edit.ts +88 -0
- package/client/activities/activity-expense-view.ts +88 -0
- package/client/bootstrap.ts +10 -0
- package/client/components/accounting-category-selector.ts +136 -0
- package/client/components/accounting-category-view.ts +75 -0
- package/client/grist-editors/grist-editor-accounting-category-object.ts +83 -0
- package/client/grist-editors/grist-renderer-accounting-category-object.ts +13 -0
- package/client/index.ts +0 -0
- package/client/pages/account/account-importer.ts +97 -0
- package/client/pages/account/account-list-page.ts +364 -0
- package/client/pages/accounting-category/accounting-category-importer.ts +97 -0
- package/client/pages/accounting-category/accounting-category-list-page.ts +368 -0
- package/client/pages/accounting-category/accounting-category-tree-page.ts +338 -0
- package/client/pages/accounting-document/accounting-document-importer.ts +90 -0
- package/client/pages/accounting-document/accounting-document-list-page.ts +398 -0
- package/client/pages/financial-statement/financial-statement-importer.ts +97 -0
- package/client/pages/financial-statement/financial-statement-list-page.ts +338 -0
- package/client/pages/fiscal-month/fiscal-month-importer.ts +90 -0
- package/client/pages/fiscal-month/fiscal-month-list-page.ts +398 -0
- package/client/pages/fiscal-quarter/fiscal-quarter-importer.ts +90 -0
- package/client/pages/fiscal-quarter/fiscal-quarter-list-page.ts +398 -0
- package/client/pages/fiscal-year/fiscal-year-importer.ts +90 -0
- package/client/pages/fiscal-year/fiscal-year-list-page.ts +398 -0
- package/client/pages/income-statement/income-statement-importer.ts +97 -0
- package/client/pages/income-statement/income-statement-list-page.ts +338 -0
- package/client/pages/payment/payment-importer.ts +90 -0
- package/client/pages/payment/payment-list-page.ts +398 -0
- package/client/pages/transaction/transaction-importer.ts +97 -0
- package/client/pages/transaction/transaction-list-page.ts +338 -0
- package/client/route.ts +35 -0
- package/client/tsconfig.json +13 -0
- package/client/types/accounting-category.ts +23 -0
- package/client/types/index.ts +1 -0
- package/dist-client/pages/accounting-category/accounting-category-tree-page.js +1 -1
- package/dist-client/pages/accounting-category/accounting-category-tree-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/index.d.ts +2 -3
- package/dist-server/service/index.js +0 -5
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/payment/index.d.ts +2 -1
- package/dist-server/service/payment/payment-history.d.ts +1 -8
- package/dist-server/service/payment/payment-history.js +10 -41
- package/dist-server/service/payment/payment-history.js.map +1 -1
- package/dist-server/service/payment/payment-type.d.ts +1 -7
- package/dist-server/service/payment/payment-type.js +0 -24
- package/dist-server/service/payment/payment-type.js.map +1 -1
- package/dist-server/service/payment/payment.d.ts +0 -12
- package/dist-server/service/payment/payment.js +1 -36
- package/dist-server/service/payment/payment.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/server/activities/activity-book.ts +172 -0
- package/server/activities/activity-expense.ts +149 -0
- package/server/activities/index.ts +18 -0
- package/server/controllers/index.ts +1 -0
- package/server/controllers/summary-statements.ts +166 -0
- package/server/index.ts +6 -0
- package/server/middlewares/index.ts +3 -0
- package/server/migrations/1725200507196-seed-fiscal-entities.ts +106 -0
- package/server/migrations/1725201467183-seed-accounts.ts +339 -0
- package/server/migrations/index.ts +9 -0
- package/server/routes.ts +26 -0
- package/server/service/account/account-history.ts +117 -0
- package/server/service/account/account-mutation.ts +140 -0
- package/server/service/account/account-query.ts +51 -0
- package/server/service/account/account-type.ts +44 -0
- package/server/service/account/account.ts +97 -0
- package/server/service/account/event-subscriber.ts +17 -0
- package/server/service/account/index.ts +9 -0
- package/server/service/accounting-category/accounting-category-history.ts +129 -0
- package/server/service/accounting-category/accounting-category-mutation.ts +148 -0
- package/server/service/accounting-category/accounting-category-query.ts +74 -0
- package/server/service/accounting-category/accounting-category-type.ts +48 -0
- package/server/service/accounting-category/accounting-category.ts +100 -0
- package/server/service/accounting-category/event-subscriber.ts +20 -0
- package/server/service/accounting-category/index.ts +9 -0
- package/server/service/accounting-document/accounting-document-history.ts +123 -0
- package/server/service/accounting-document/accounting-document-mutation.ts +137 -0
- package/server/service/accounting-document/accounting-document-query.ts +48 -0
- package/server/service/accounting-document/accounting-document-type.ts +52 -0
- package/server/service/accounting-document/accounting-document.ts +93 -0
- package/server/service/accounting-document/event-subscriber.ts +17 -0
- package/server/service/accounting-document/index.ts +9 -0
- package/server/service/common-type.ts +12 -0
- package/server/service/financial-statement/event-subscriber.ts +17 -0
- package/server/service/financial-statement/financial-statement-history.ts +129 -0
- package/server/service/financial-statement/financial-statement-line-item.ts +82 -0
- package/server/service/financial-statement/financial-statement-mutation.ts +148 -0
- package/server/service/financial-statement/financial-statement-query.ts +53 -0
- package/server/service/financial-statement/financial-statement-type.ts +51 -0
- package/server/service/financial-statement/financial-statement.ts +116 -0
- package/server/service/financial-statement/index.ts +10 -0
- package/server/service/fiscal-month/fiscal-month-mutation.ts +145 -0
- package/server/service/fiscal-month/fiscal-month-query.ts +58 -0
- package/server/service/fiscal-month/fiscal-month-type.ts +66 -0
- package/server/service/fiscal-month/fiscal-month.ts +84 -0
- package/server/service/fiscal-month/index.ts +7 -0
- package/server/service/fiscal-quarter/fiscal-quarter-mutation.ts +148 -0
- package/server/service/fiscal-quarter/fiscal-quarter-query.ts +60 -0
- package/server/service/fiscal-quarter/fiscal-quarter-type.ts +60 -0
- package/server/service/fiscal-quarter/fiscal-quarter.ts +80 -0
- package/server/service/fiscal-quarter/index.ts +7 -0
- package/server/service/fiscal-year/fiscal-year-mutation.ts +145 -0
- package/server/service/fiscal-year/fiscal-year-query.ts +53 -0
- package/server/service/fiscal-year/fiscal-year-type.ts +54 -0
- package/server/service/fiscal-year/fiscal-year.ts +76 -0
- package/server/service/fiscal-year/index.ts +7 -0
- package/server/service/income-statement/event-subscriber.ts +17 -0
- package/server/service/income-statement/income-statement-history.ts +133 -0
- package/server/service/income-statement/income-statement-line-item.ts +84 -0
- package/server/service/income-statement/income-statement-mutation.ts +147 -0
- package/server/service/income-statement/income-statement-query.ts +50 -0
- package/server/service/income-statement/income-statement-type.ts +51 -0
- package/server/service/income-statement/income-statement.ts +120 -0
- package/server/service/income-statement/index.ts +10 -0
- package/server/service/index.ts +108 -0
- package/server/service/payment/event-subscriber.ts +17 -0
- package/server/service/payment/index.ts +9 -0
- package/server/service/payment/payment-history.ts +132 -0
- package/server/service/payment/payment-mutation.ts +139 -0
- package/server/service/payment/payment-query.ts +50 -0
- package/server/service/payment/payment-type.ts +64 -0
- package/server/service/payment/payment.ts +123 -0
- package/server/service/transaction/event-subscriber.ts +17 -0
- package/server/service/transaction/index.ts +9 -0
- package/server/service/transaction/transaction-history.ts +161 -0
- package/server/service/transaction/transaction-mutation.ts +146 -0
- package/server/service/transaction/transaction-query.ts +50 -0
- package/server/service/transaction/transaction-type.ts +48 -0
- package/server/service/transaction/transaction.ts +230 -0
- package/server/tsconfig.json +10 -0
- package/dist-client/pages/bank/bank-importer.d.ts +0 -23
- package/dist-client/pages/bank/bank-importer.js +0 -93
- package/dist-client/pages/bank/bank-importer.js.map +0 -1
- package/dist-client/pages/bank/bank-list-page.d.ts +0 -66
- package/dist-client/pages/bank/bank-list-page.js +0 -370
- package/dist-client/pages/bank/bank-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 -93
- 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 -66
- package/dist-client/pages/bank-account/bank-account-list-page.js +0 -370
- package/dist-client/pages/bank-account/bank-account-list-page.js.map +0 -1
- package/dist-client/pages/financial-institution/financial-institution-importer.d.ts +0 -23
- package/dist-client/pages/financial-institution/financial-institution-importer.js +0 -93
- package/dist-client/pages/financial-institution/financial-institution-importer.js.map +0 -1
- package/dist-client/pages/financial-institution/financial-institution-list-page.d.ts +0 -66
- package/dist-client/pages/financial-institution/financial-institution-list-page.js +0 -370
- package/dist-client/pages/financial-institution/financial-institution-list-page.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 -248
- package/dist-server/migrations/1725201567284-seed-country-codes.js.map +0 -1
- package/dist-server/migrations/1725201667385-seed-financial-institutions.d.ts +0 -5
- package/dist-server/migrations/1725201667385-seed-financial-institutions.js +0 -348
- package/dist-server/migrations/1725201667385-seed-financial-institutions.js.map +0 -1
- package/dist-server/service/bank-account/bank-account-history.d.ts +0 -34
- package/dist-server/service/bank-account/bank-account-history.js +0 -172
- package/dist-server/service/bank-account/bank-account-history.js.map +0 -1
- package/dist-server/service/bank-account/bank-account-mutation.d.ts +0 -10
- package/dist-server/service/bank-account/bank-account-mutation.js +0 -128
- package/dist-server/service/bank-account/bank-account-mutation.js.map +0 -1
- package/dist-server/service/bank-account/bank-account-query.d.ts +0 -11
- package/dist-server/service/bank-account/bank-account-query.js +0 -79
- package/dist-server/service/bank-account/bank-account-query.js.map +0 -1
- package/dist-server/service/bank-account/bank-account-type.d.ts +0 -39
- package/dist-server/service/bank-account/bank-account-type.js +0 -153
- package/dist-server/service/bank-account/bank-account-type.js.map +0 -1
- package/dist-server/service/bank-account/bank-account.d.ts +0 -38
- package/dist-server/service/bank-account/bank-account.js +0 -164
- package/dist-server/service/bank-account/bank-account.js.map +0 -1
- package/dist-server/service/bank-account/event-subscriber.d.ts +0 -7
- package/dist-server/service/bank-account/event-subscriber.js +0 -21
- package/dist-server/service/bank-account/event-subscriber.js.map +0 -1
- package/dist-server/service/bank-account/index.d.ts +0 -7
- package/dist-server/service/bank-account/index.js +0 -12
- package/dist-server/service/bank-account/index.js.map +0 -1
- package/dist-server/service/financial-institution/financial-institution-mutation.d.ts +0 -10
- package/dist-server/service/financial-institution/financial-institution-mutation.js +0 -169
- package/dist-server/service/financial-institution/financial-institution-mutation.js.map +0 -1
- package/dist-server/service/financial-institution/financial-institution-query.d.ts +0 -12
- package/dist-server/service/financial-institution/financial-institution-query.js +0 -97
- package/dist-server/service/financial-institution/financial-institution-query.js.map +0 -1
- package/dist-server/service/financial-institution/financial-institution-type.d.ts +0 -32
- package/dist-server/service/financial-institution/financial-institution-type.js +0 -126
- package/dist-server/service/financial-institution/financial-institution-type.js.map +0 -1
- package/dist-server/service/financial-institution/financial-institution.d.ts +0 -34
- package/dist-server/service/financial-institution/financial-institution.js +0 -137
- package/dist-server/service/financial-institution/financial-institution.js.map +0 -1
- package/dist-server/service/financial-institution/index.d.ts +0 -6
- package/dist-server/service/financial-institution/index.js +0 -10
- package/dist-server/service/financial-institution/index.js.map +0 -1
- package/helps/accounting/bank-account.md +0 -160
- package/helps/accounting/bank.md +0 -160
- package/helps/accounting/financial-institution.md +0 -160
@@ -1,370 +0,0 @@
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
2
|
-
import '@material/web/icon/icon.js';
|
3
|
-
import '@material/web/button/elevated-button.js';
|
4
|
-
import '@operato/data-grist/ox-grist.js';
|
5
|
-
import '@operato/data-grist/ox-filters-form.js';
|
6
|
-
import '@operato/data-grist/ox-record-creator.js';
|
7
|
-
import { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
|
8
|
-
import { PageView, store } from '@operato/shell';
|
9
|
-
import { css, html } from 'lit';
|
10
|
-
import { customElement, property, query } from 'lit/decorators.js';
|
11
|
-
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
12
|
-
import { DataGrist } from '@operato/data-grist';
|
13
|
-
import { client } from '@operato/graphql';
|
14
|
-
import { i18next, localize } from '@operato/i18n';
|
15
|
-
import { notify, openPopup } from '@operato/layout';
|
16
|
-
import { OxPrompt } from '@operato/popup';
|
17
|
-
import { isMobileDevice } from '@operato/utils';
|
18
|
-
import { connect } from 'pwa-helpers/connect-mixin';
|
19
|
-
import gql from 'graphql-tag';
|
20
|
-
import { FinancialInstitutionImporter } from './financial-institution-importer';
|
21
|
-
let FinancialInstitutionListPage = class FinancialInstitutionListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
|
22
|
-
constructor() {
|
23
|
-
super(...arguments);
|
24
|
-
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
25
|
-
}
|
26
|
-
static get scopedElements() {
|
27
|
-
return {
|
28
|
-
'financial-institution-importer': FinancialInstitutionImporter
|
29
|
-
};
|
30
|
-
}
|
31
|
-
get context() {
|
32
|
-
return {
|
33
|
-
title: i18next.t('title.financial-institution list'),
|
34
|
-
search: {
|
35
|
-
handler: (search) => {
|
36
|
-
this.grist.searchText = search;
|
37
|
-
},
|
38
|
-
value: this.grist.searchText
|
39
|
-
},
|
40
|
-
filter: {
|
41
|
-
handler: () => {
|
42
|
-
this.grist.toggleHeadroom();
|
43
|
-
}
|
44
|
-
},
|
45
|
-
help: 'accounting/financial-institution',
|
46
|
-
actions: [
|
47
|
-
Object.assign({ title: i18next.t('button.save'), action: this._updateFinancialInstitution.bind(this) }, CommonButtonStyles.save),
|
48
|
-
Object.assign({ title: i18next.t('button.delete'), action: this._deleteFinancialInstitution.bind(this) }, CommonButtonStyles.delete)
|
49
|
-
],
|
50
|
-
exportable: {
|
51
|
-
name: i18next.t('title.financial-institution list'),
|
52
|
-
data: this.exportHandler.bind(this)
|
53
|
-
},
|
54
|
-
importable: {
|
55
|
-
handler: this.importHandler.bind(this)
|
56
|
-
}
|
57
|
-
};
|
58
|
-
}
|
59
|
-
render() {
|
60
|
-
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
|
61
|
-
return html `
|
62
|
-
<ox-grist
|
63
|
-
.mode=${mode}
|
64
|
-
.config=${this.gristConfig}
|
65
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
66
|
-
>
|
67
|
-
<div slot="headroom" class="header">
|
68
|
-
<div class="filters">
|
69
|
-
<ox-filters-form autofocus without-search></ox-filters-form>
|
70
|
-
|
71
|
-
<div id="modes">
|
72
|
-
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
73
|
-
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
|
74
|
-
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
75
|
-
</div>
|
76
|
-
|
77
|
-
<ox-record-creator id="add" .callback=${this.creationCallback.bind(this)}>
|
78
|
-
<button>
|
79
|
-
<md-icon>add</md-icon>
|
80
|
-
</button>
|
81
|
-
</ox-record-creator>
|
82
|
-
|
83
|
-
</div>
|
84
|
-
</div>
|
85
|
-
</ox-grist>
|
86
|
-
`;
|
87
|
-
}
|
88
|
-
async pageInitialized(lifecycle) {
|
89
|
-
this.gristConfig = {
|
90
|
-
list: {
|
91
|
-
fields: ['name', 'description'],
|
92
|
-
details: ['active', 'updatedAt']
|
93
|
-
},
|
94
|
-
columns: [
|
95
|
-
{ type: 'gutter', gutterName: 'sequence' },
|
96
|
-
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
97
|
-
{
|
98
|
-
type: 'string',
|
99
|
-
name: 'name',
|
100
|
-
header: i18next.t('field.name'),
|
101
|
-
record: {
|
102
|
-
editable: true
|
103
|
-
},
|
104
|
-
filter: 'search',
|
105
|
-
sortable: true,
|
106
|
-
width: 150
|
107
|
-
},
|
108
|
-
{
|
109
|
-
type: 'string',
|
110
|
-
name: 'description',
|
111
|
-
header: i18next.t('field.description'),
|
112
|
-
record: {
|
113
|
-
editable: true
|
114
|
-
},
|
115
|
-
filter: 'search',
|
116
|
-
width: 200
|
117
|
-
},
|
118
|
-
{
|
119
|
-
type: 'checkbox',
|
120
|
-
name: 'active',
|
121
|
-
label: true,
|
122
|
-
header: i18next.t('field.active'),
|
123
|
-
record: {
|
124
|
-
editable: true
|
125
|
-
},
|
126
|
-
filter: true,
|
127
|
-
sortable: true,
|
128
|
-
width: 60
|
129
|
-
},
|
130
|
-
{
|
131
|
-
type: 'resource-object',
|
132
|
-
name: 'updater',
|
133
|
-
header: i18next.t('field.updater'),
|
134
|
-
record: {
|
135
|
-
editable: false
|
136
|
-
},
|
137
|
-
sortable: true,
|
138
|
-
width: 120
|
139
|
-
},
|
140
|
-
{
|
141
|
-
type: 'datetime',
|
142
|
-
name: 'updatedAt',
|
143
|
-
header: i18next.t('field.updated_at'),
|
144
|
-
record: {
|
145
|
-
editable: false
|
146
|
-
},
|
147
|
-
sortable: true,
|
148
|
-
width: 180
|
149
|
-
}
|
150
|
-
],
|
151
|
-
rows: {
|
152
|
-
appendable: false,
|
153
|
-
selectable: {
|
154
|
-
multiple: true
|
155
|
-
}
|
156
|
-
},
|
157
|
-
sorters: [
|
158
|
-
{
|
159
|
-
name: 'name'
|
160
|
-
}
|
161
|
-
]
|
162
|
-
};
|
163
|
-
}
|
164
|
-
async pageUpdated(changes, lifecycle) {
|
165
|
-
if (this.active) {
|
166
|
-
// do something here when this page just became as active
|
167
|
-
}
|
168
|
-
}
|
169
|
-
async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }) {
|
170
|
-
const response = await client.query({
|
171
|
-
query: gql `
|
172
|
-
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
173
|
-
responses: financialInstitutions(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
174
|
-
items {
|
175
|
-
id
|
176
|
-
name
|
177
|
-
description
|
178
|
-
active
|
179
|
-
updater {
|
180
|
-
id
|
181
|
-
name
|
182
|
-
}
|
183
|
-
updatedAt
|
184
|
-
}
|
185
|
-
total
|
186
|
-
}
|
187
|
-
}
|
188
|
-
`,
|
189
|
-
variables: {
|
190
|
-
filters,
|
191
|
-
pagination: { page, limit },
|
192
|
-
sortings
|
193
|
-
}
|
194
|
-
});
|
195
|
-
return {
|
196
|
-
total: response.data.responses.total || 0,
|
197
|
-
records: response.data.responses.items || []
|
198
|
-
};
|
199
|
-
}
|
200
|
-
async _deleteFinancialInstitution() {
|
201
|
-
if (await OxPrompt.open({
|
202
|
-
title: i18next.t('text.are_you_sure'),
|
203
|
-
text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
|
204
|
-
confirmButton: { text: i18next.t('button.confirm') },
|
205
|
-
cancelButton: { text: i18next.t('button.cancel') }
|
206
|
-
})) {
|
207
|
-
const ids = this.grist.selected.map(record => record.id);
|
208
|
-
if (ids && ids.length > 0) {
|
209
|
-
const response = await client.mutate({
|
210
|
-
mutation: gql `
|
211
|
-
mutation ($ids: [String!]!) {
|
212
|
-
deleteFinancialInstitutions(ids: $ids)
|
213
|
-
}
|
214
|
-
`,
|
215
|
-
variables: {
|
216
|
-
ids
|
217
|
-
}
|
218
|
-
});
|
219
|
-
if (!response.errors) {
|
220
|
-
this.grist.fetch();
|
221
|
-
notify({
|
222
|
-
message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
|
223
|
-
});
|
224
|
-
}
|
225
|
-
}
|
226
|
-
}
|
227
|
-
}
|
228
|
-
async _updateFinancialInstitution() {
|
229
|
-
let patches = this.grist.dirtyRecords;
|
230
|
-
if (patches && patches.length) {
|
231
|
-
patches = patches.map(patch => {
|
232
|
-
let patchField = patch.id ? { id: patch.id } : {};
|
233
|
-
const dirtyFields = patch.__dirtyfields__;
|
234
|
-
for (let key in dirtyFields) {
|
235
|
-
patchField[key] = dirtyFields[key].after;
|
236
|
-
}
|
237
|
-
patchField.cuFlag = patch.__dirty__;
|
238
|
-
return patchField;
|
239
|
-
});
|
240
|
-
const response = await client.mutate({
|
241
|
-
mutation: gql `
|
242
|
-
mutation ($patches: [FinancialInstitutionPatch!]!) {
|
243
|
-
updateMultipleFinancialInstitution(patches: $patches) {
|
244
|
-
name
|
245
|
-
}
|
246
|
-
}
|
247
|
-
`,
|
248
|
-
variables: {
|
249
|
-
patches
|
250
|
-
}
|
251
|
-
});
|
252
|
-
if (!response.errors) {
|
253
|
-
this.grist.fetch();
|
254
|
-
}
|
255
|
-
}
|
256
|
-
}
|
257
|
-
async creationCallback(financialInstitution) {
|
258
|
-
try {
|
259
|
-
const response = await client.query({
|
260
|
-
query: gql `
|
261
|
-
mutation ($financialInstitution: NewFinancialInstitution!) {
|
262
|
-
createFinancialInstitution(financialInstitution: $financialInstitution) {
|
263
|
-
id
|
264
|
-
}
|
265
|
-
}
|
266
|
-
`,
|
267
|
-
variables: {
|
268
|
-
financialInstitution
|
269
|
-
},
|
270
|
-
context: {
|
271
|
-
hasUpload: true
|
272
|
-
}
|
273
|
-
});
|
274
|
-
if (!response.errors) {
|
275
|
-
this.grist.fetch();
|
276
|
-
document.dispatchEvent(new CustomEvent('notify', {
|
277
|
-
detail: {
|
278
|
-
message: i18next.t('text.data_created_successfully')
|
279
|
-
}
|
280
|
-
}));
|
281
|
-
}
|
282
|
-
return true;
|
283
|
-
}
|
284
|
-
catch (ex) {
|
285
|
-
console.error(ex);
|
286
|
-
document.dispatchEvent(new CustomEvent('notify', {
|
287
|
-
detail: {
|
288
|
-
type: 'error',
|
289
|
-
message: i18next.t('text.error')
|
290
|
-
}
|
291
|
-
}));
|
292
|
-
return false;
|
293
|
-
}
|
294
|
-
}
|
295
|
-
async exportHandler() {
|
296
|
-
const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records;
|
297
|
-
const targetFieldSet = new Set([
|
298
|
-
'id',
|
299
|
-
'name',
|
300
|
-
'description',
|
301
|
-
'active'
|
302
|
-
]);
|
303
|
-
return exportTargets.map(financialInstitution => {
|
304
|
-
let tempObj = {};
|
305
|
-
for (const field of targetFieldSet) {
|
306
|
-
tempObj[field] = financialInstitution[field];
|
307
|
-
}
|
308
|
-
return tempObj;
|
309
|
-
});
|
310
|
-
}
|
311
|
-
async importHandler(records) {
|
312
|
-
const popup = openPopup(html `
|
313
|
-
<financial-institution-importer
|
314
|
-
.financialInstitutions=${records}
|
315
|
-
@imported=${() => {
|
316
|
-
history.back();
|
317
|
-
this.grist.fetch();
|
318
|
-
}}
|
319
|
-
></financial-institution-importer>
|
320
|
-
`, {
|
321
|
-
backdrop: true,
|
322
|
-
size: 'large',
|
323
|
-
title: i18next.t('title.import financial-institution')
|
324
|
-
});
|
325
|
-
popup.onclosed = () => {
|
326
|
-
this.grist.fetch();
|
327
|
-
};
|
328
|
-
}
|
329
|
-
};
|
330
|
-
FinancialInstitutionListPage.styles = [
|
331
|
-
ScrollbarStyles,
|
332
|
-
CommonGristStyles,
|
333
|
-
CommonHeaderStyles,
|
334
|
-
css `
|
335
|
-
:host {
|
336
|
-
display: flex;
|
337
|
-
|
338
|
-
width: 100%;
|
339
|
-
|
340
|
-
--grid-record-emphasized-background-color: #8B0000;
|
341
|
-
--grid-record-emphasized-color: #FF6B6B;
|
342
|
-
}
|
343
|
-
|
344
|
-
ox-grist {
|
345
|
-
overflow-y: auto;
|
346
|
-
flex: 1;
|
347
|
-
}
|
348
|
-
|
349
|
-
ox-filters-form {
|
350
|
-
flex: 1;
|
351
|
-
}
|
352
|
-
`
|
353
|
-
];
|
354
|
-
__decorate([
|
355
|
-
property({ type: Object }),
|
356
|
-
__metadata("design:type", Object)
|
357
|
-
], FinancialInstitutionListPage.prototype, "gristConfig", void 0);
|
358
|
-
__decorate([
|
359
|
-
property({ type: String }),
|
360
|
-
__metadata("design:type", String)
|
361
|
-
], FinancialInstitutionListPage.prototype, "mode", void 0);
|
362
|
-
__decorate([
|
363
|
-
query('ox-grist'),
|
364
|
-
__metadata("design:type", DataGrist)
|
365
|
-
], FinancialInstitutionListPage.prototype, "grist", void 0);
|
366
|
-
FinancialInstitutionListPage = __decorate([
|
367
|
-
customElement('financial-institution-list-page')
|
368
|
-
], FinancialInstitutionListPage);
|
369
|
-
export { FinancialInstitutionListPage };
|
370
|
-
//# sourceMappingURL=financial-institution-list-page.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"financial-institution-list-page.js","sourceRoot":"","sources":["../../../client/pages/financial-institution/financial-institution-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAChD,OAAO,iCAAiC,CAAA;AACxC,OAA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AC,KAAK,CAAC,CAAA;YAC9C,CAAC;YAED,OAAO,OAAO,CAAA;QAChB,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAAO;QACzB,MAAM,KAAK,GAAG,SAAS,CACrB,IAAI,CAAA;;mCAEyB,OAAO;sBACpB,GAAG,EAAE;YACf,OAAO,CAAC,IAAI,EAAE,CAAA;YACd,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QACpB,CAAC;;OAEJ,EACD;YACE,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,oCAAoC,CAAC;SACvD,CACF,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG,GAAG,EAAE;YACpB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QACpB,CAAC,CAAA;IACH,CAAC;;AAjXM,mCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;;;;;;;;KAkBF;CACF,AAvBY,CAuBZ;AAQ2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iEAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DAAoE;AAEpE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;2DAAA;AApCjC,4BAA4B;IADxC,aAAa,CAAC,iCAAiC,CAAC;GACpC,4BAA4B,CAoXxC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\nimport '@operato/data-grist/ox-grist.js'\nimport '@operato/data-grist/ox-filters-form.js'\nimport '@operato/data-grist/ox-record-creator.js'\n\nimport { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { ColumnConfig, DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPopup, OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\nimport gql from 'graphql-tag'\n\nimport { FinancialInstitutionImporter } from './financial-institution-importer'\n\n@customElement('financial-institution-list-page')\nexport class FinancialInstitutionListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {\n\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: #8B0000;\n --grid-record-emphasized-color: #FF6B6B;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n\n ox-filters-form {\n flex: 1;\n }\n `\n ]\n\n static get scopedElements() {\n return {\n 'financial-institution-importer': FinancialInstitutionImporter\n }\n }\n\n @property({ type: Object }) gristConfig: any\n @property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('title.financial-institution list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'accounting/financial-institution',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this._updateFinancialInstitution.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deleteFinancialInstitution.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('title.financial-institution list'),\n data: this.exportHandler.bind(this)\n },\n importable: {\n handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist\n .mode=${mode}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n >\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-filters-form autofocus without-search></ox-filters-form>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n\n <ox-record-creator id=\"add\" .callback=${this.creationCallback.bind(this)}>\n <button>\n <md-icon>add</md-icon>\n </button>\n </ox-record-creator>\n\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n list: {\n fields: ['name', 'description'],\n details: ['active', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n filter: true,\n sortable: true,\n width: 60\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n appendable: false,\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: financialInstitutions(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n active\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async _deleteFinancialInstitution() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteFinancialInstitutions(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n async _updateFinancialInstitution() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [FinancialInstitutionPatch!]!) {\n updateMultipleFinancialInstitution(patches: $patches) {\n name\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n }\n\n async creationCallback(financialInstitution) {\n try {\n const response = await client.query({\n query: gql`\n mutation ($financialInstitution: NewFinancialInstitution!) {\n createFinancialInstitution(financialInstitution: $financialInstitution) {\n id\n }\n }\n `,\n variables: {\n financialInstitution\n },\n context: {\n hasUpload: true\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n message: i18next.t('text.data_created_successfully')\n }\n })\n )\n }\n\n return true\n } catch (ex) {\n console.error(ex)\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n type: 'error',\n message: i18next.t('text.error')\n }\n })\n )\n return false\n }\n }\n\n async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set([\n 'id',\n 'name',\n 'description',\n 'active'\n ])\n\n return exportTargets.map(financialInstitution => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = financialInstitution[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) {\n const popup = openPopup(\n html`\n <financial-institution-importer\n .financialInstitutions=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></financial-institution-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import financial-institution')\n }\n )\n \n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n}\n\n"]}
|
@@ -1,248 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.SeedCountryCodes1725201567284 = void 0;
|
4
|
-
const code_base_1 = require("@things-factory/code-base");
|
5
|
-
const shell_1 = require("@things-factory/shell");
|
6
|
-
const codes = [
|
7
|
-
{
|
8
|
-
name: 'COUNTRY_CODES',
|
9
|
-
description: 'country code',
|
10
|
-
details: [
|
11
|
-
{ name: 'AF', description: '아프가니스탄' },
|
12
|
-
{ name: 'AL', description: '알바니아' },
|
13
|
-
{ name: 'DZ', description: '알제리' },
|
14
|
-
{ name: 'AS', description: '아메리칸사모아' },
|
15
|
-
{ name: 'AD', description: '안도라' },
|
16
|
-
{ name: 'AO', description: '앙골라' },
|
17
|
-
{ name: 'AI', description: '앵귈라' },
|
18
|
-
{ name: 'AQ', description: '남극' },
|
19
|
-
{ name: 'AG', description: '앤티가 바부다' },
|
20
|
-
{ name: 'AR', description: '아르헨티나' },
|
21
|
-
{ name: 'AM', description: '아르메니아' },
|
22
|
-
{ name: 'AW', description: '아루바' },
|
23
|
-
{ name: 'AU', description: '호주' },
|
24
|
-
{ name: 'AT', description: '오스트리아' },
|
25
|
-
{ name: 'AZ', description: '아제르바이잔' },
|
26
|
-
{ name: 'BS', description: '바하마' },
|
27
|
-
{ name: 'BH', description: '바레인' },
|
28
|
-
{ name: 'BD', description: '방글라데시' },
|
29
|
-
{ name: 'BB', description: '바베이도스' },
|
30
|
-
{ name: 'BY', description: '벨라루스' },
|
31
|
-
{ name: 'BE', description: '벨기에' },
|
32
|
-
{ name: 'BZ', description: '벨리즈' },
|
33
|
-
{ name: 'BJ', description: '베냉' },
|
34
|
-
{ name: 'BM', description: '버뮤다' },
|
35
|
-
{ name: 'BT', description: '부탄' },
|
36
|
-
{ name: 'BO', description: '볼리비아' },
|
37
|
-
{ name: 'BA', description: '보스니아 헤르체고비나' },
|
38
|
-
{ name: 'BW', description: '보츠와나' },
|
39
|
-
{ name: 'BV', description: '부베 섬' },
|
40
|
-
{ name: 'BR', description: '브라질' },
|
41
|
-
{ name: 'IO', description: '영국령 인도양 지역' },
|
42
|
-
{ name: 'BN', description: '브루나이' },
|
43
|
-
{ name: 'BG', description: '불가리아' },
|
44
|
-
{ name: 'BF', description: '부르키나파소' },
|
45
|
-
{ name: 'BI', description: '부룬디' },
|
46
|
-
{ name: 'KH', description: '캄보디아' },
|
47
|
-
{ name: 'CM', description: '카메룬' },
|
48
|
-
{ name: 'CA', description: '캐나다' },
|
49
|
-
{ name: 'CV', description: '카보베르데' },
|
50
|
-
{ name: 'KY', description: '케이맨 제도' },
|
51
|
-
{ name: 'CF', description: '중앙아프리카 공화국' },
|
52
|
-
{ name: 'TD', description: '차드' },
|
53
|
-
{ name: 'CL', description: '칠레' },
|
54
|
-
{ name: 'CN', description: '중국' },
|
55
|
-
{ name: 'CX', description: '크리스마스 섬' },
|
56
|
-
{ name: 'CC', description: '코코스 제도' },
|
57
|
-
{ name: 'CO', description: '콜롬비아' },
|
58
|
-
{ name: 'KM', description: '코모로' },
|
59
|
-
{ name: 'CG', description: '콩고' },
|
60
|
-
{ name: 'CD', description: '콩고 민주 공화국' },
|
61
|
-
{ name: 'CK', description: '쿡 제도' },
|
62
|
-
{ name: 'CR', description: '코스타리카' },
|
63
|
-
{ name: 'CI', description: '코트디부아르' },
|
64
|
-
{ name: 'HR', description: '크로아티아' },
|
65
|
-
{ name: 'CU', description: '쿠바' },
|
66
|
-
{ name: 'CY', description: '키프로스' },
|
67
|
-
{ name: 'CZ', description: '체코' },
|
68
|
-
{ name: 'DK', description: '덴마크' },
|
69
|
-
{ name: 'DJ', description: '지부티' },
|
70
|
-
{ name: 'DM', description: '도미니카' },
|
71
|
-
{ name: 'DO', description: '도미니카 공화국' },
|
72
|
-
{ name: 'EC', description: '에콰도르' },
|
73
|
-
{ name: 'EG', description: '이집트' },
|
74
|
-
{ name: 'SV', description: '엘살바도르' },
|
75
|
-
{ name: 'GQ', description: '적도 기니' },
|
76
|
-
{ name: 'ER', description: '에리트레아' },
|
77
|
-
{ name: 'EE', description: '에스토니아' },
|
78
|
-
{ name: 'ET', description: '에티오피아' },
|
79
|
-
{ name: 'FK', description: '포클랜드 제도' },
|
80
|
-
{ name: 'FO', description: '페로 제도' },
|
81
|
-
{ name: 'FJ', description: '피지' },
|
82
|
-
{ name: 'FI', description: '핀란드' },
|
83
|
-
{ name: 'FR', description: '프랑스' },
|
84
|
-
{ name: 'GF', description: '프랑스령 기아나' },
|
85
|
-
{ name: 'PF', description: '프랑스령 폴리네시아' },
|
86
|
-
{ name: 'TF', description: '프랑스령 남방 및 남극' },
|
87
|
-
{ name: 'GA', description: '가봉' },
|
88
|
-
{ name: 'GM', description: '감비아' },
|
89
|
-
{ name: 'GE', description: '조지아' },
|
90
|
-
{ name: 'DE', description: '독일' },
|
91
|
-
{ name: 'GH', description: '가나' },
|
92
|
-
{ name: 'GI', description: '지브롤터' },
|
93
|
-
{ name: 'GR', description: '그리스' },
|
94
|
-
{ name: 'GL', description: '그린란드' },
|
95
|
-
{ name: 'GD', description: '그레나다' },
|
96
|
-
{ name: 'GP', description: '과들루프' },
|
97
|
-
{ name: 'GU', description: '괌' },
|
98
|
-
{ name: 'GT', description: '과테말라' },
|
99
|
-
{ name: 'GN', description: '기니' },
|
100
|
-
{ name: 'GW', description: '기니비사우' },
|
101
|
-
{ name: 'GY', description: '가이아나' },
|
102
|
-
{ name: 'HT', description: '아이티' },
|
103
|
-
{ name: 'HM', description: '허드 맥도널드 제도' },
|
104
|
-
{ name: 'VA', description: '바티칸 시국' },
|
105
|
-
{ name: 'HN', description: '온두라스' },
|
106
|
-
{ name: 'HK', description: '홍콩' },
|
107
|
-
{ name: 'HU', description: '헝가리' },
|
108
|
-
{ name: 'IS', description: '아이슬란드' },
|
109
|
-
{ name: 'IN', description: '인도' },
|
110
|
-
{ name: 'ID', description: '인도네시아' },
|
111
|
-
{ name: 'IR', description: '이란' },
|
112
|
-
{ name: 'IQ', description: '이라크' },
|
113
|
-
{ name: 'IE', description: '아일랜드' },
|
114
|
-
{ name: 'IL', description: '이스라엘' },
|
115
|
-
{ name: 'IT', description: '이탈리아' },
|
116
|
-
{ name: 'JM', description: '자메이카' },
|
117
|
-
{ name: 'JP', description: '일본' },
|
118
|
-
{ name: 'JO', description: '요르단' },
|
119
|
-
{ name: 'KZ', description: '카자흐스탄' },
|
120
|
-
{ name: 'KE', description: '케냐' },
|
121
|
-
{ name: 'KI', description: '키리바시' },
|
122
|
-
{ name: 'KP', description: '북한' },
|
123
|
-
{ name: 'KR', description: '대한민국' },
|
124
|
-
{ name: 'KW', description: '쿠웨이트' },
|
125
|
-
{ name: 'KG', description: '키르기스스탄' },
|
126
|
-
{ name: 'LA', description: '라오스' },
|
127
|
-
{ name: 'LV', description: '라트비아' },
|
128
|
-
{ name: 'LB', description: '레바논' },
|
129
|
-
{ name: 'LS', description: '레소토' },
|
130
|
-
{ name: 'LR', description: '라이베리아' },
|
131
|
-
{ name: 'LY', description: '리비아' },
|
132
|
-
{ name: 'LI', description: '리히텐슈타인' },
|
133
|
-
{ name: 'LT', description: '리투아니아' },
|
134
|
-
{ name: 'LU', description: '룩셈부르크' },
|
135
|
-
{ name: 'MO', description: '마카오' },
|
136
|
-
{ name: 'MK', description: '북마케도니아' },
|
137
|
-
{ name: 'MG', description: '마다가스카르' },
|
138
|
-
{ name: 'MW', description: '말라위' },
|
139
|
-
{ name: 'MY', description: '말레이시아' },
|
140
|
-
{ name: 'MV', description: '몰디브' },
|
141
|
-
{ name: 'ML', description: '말리' },
|
142
|
-
{ name: 'MT', description: '몰타' },
|
143
|
-
{ name: 'MH', description: '마셜 제도' },
|
144
|
-
{ name: 'MQ', description: '마르티니크' },
|
145
|
-
{ name: 'MR', description: '모리타니' },
|
146
|
-
{ name: 'MU', description: '모리셔스' },
|
147
|
-
{ name: 'YT', description: '마요트' },
|
148
|
-
{ name: 'MX', description: '멕시코' },
|
149
|
-
{ name: 'FM', description: '미크로네시아 연방' },
|
150
|
-
{ name: 'MD', description: '몰도바' },
|
151
|
-
{ name: 'MC', description: '모나코' },
|
152
|
-
{ name: 'MN', description: '몽골' },
|
153
|
-
{ name: 'MS', description: '몬트세랫' },
|
154
|
-
{ name: 'MA', description: '모로코' },
|
155
|
-
{ name: 'MZ', description: '모잠비크' },
|
156
|
-
{ name: 'MM', description: '미얀마' },
|
157
|
-
{ name: 'NA', description: '나미비아' },
|
158
|
-
{ name: 'NR', description: '나우루' },
|
159
|
-
{ name: 'NP', description: '네팔' },
|
160
|
-
{ name: 'NL', description: '네덜란드' },
|
161
|
-
{ name: 'NC', description: '뉴칼레도니아' },
|
162
|
-
{ name: 'NZ', description: '뉴질랜드' },
|
163
|
-
{ name: 'NI', description: '니카라과' },
|
164
|
-
{ name: 'NE', description: '니제르' },
|
165
|
-
{ name: 'NG', description: '나이지리아' },
|
166
|
-
{ name: 'NU', description: '니우에' },
|
167
|
-
{ name: 'NF', description: '노퍽 섬' },
|
168
|
-
{ name: 'MP', description: '북마리아나 제도' },
|
169
|
-
{ name: 'NO', description: '노르웨이' },
|
170
|
-
{ name: 'OM', description: '오만' },
|
171
|
-
{ name: 'PK', description: '파키스탄' },
|
172
|
-
{ name: 'PW', description: '팔라우' },
|
173
|
-
{ name: 'PS', description: '팔레스타인' },
|
174
|
-
{ name: 'PA', description: '파나마' },
|
175
|
-
{ name: 'PG', description: '파푸아뉴기니' },
|
176
|
-
{ name: 'PY', description: '파라과이' },
|
177
|
-
{ name: 'PE', description: '페루' },
|
178
|
-
{ name: 'PH', description: '필리핀' },
|
179
|
-
{ name: 'PN', description: '핏케언 제도' },
|
180
|
-
{ name: 'PL', description: '폴란드' },
|
181
|
-
{ name: 'PT', description: '포르투갈' },
|
182
|
-
{ name: 'PR', description: '푸에르토리코' },
|
183
|
-
{ name: 'QA', description: '카타르' },
|
184
|
-
{ name: 'RE', description: '레위니옹' },
|
185
|
-
{ name: 'RO', description: '루마니아' },
|
186
|
-
{ name: 'RU', description: '러시아' },
|
187
|
-
{ name: 'RW', description: '르완다' },
|
188
|
-
{ name: 'SH', description: '세인트헬레나' },
|
189
|
-
{ name: 'KN', description: '세인트키츠 네비스' },
|
190
|
-
{ name: 'LC', description: '세인트루시아' },
|
191
|
-
{ name: 'PM', description: '생피에르 미클롱' },
|
192
|
-
{ name: 'VC', description: '세인트빈센트 그레나딘' },
|
193
|
-
{ name: 'WS', description: '사모아' },
|
194
|
-
{ name: 'SM', description: '산마리노' },
|
195
|
-
{ name: 'ST', description: '상투메 프린시페' },
|
196
|
-
{ name: 'SA', description: '사우디아라비아' },
|
197
|
-
{ name: 'SN', description: '세네갈' },
|
198
|
-
{ name: 'SC', description: '세이셸' },
|
199
|
-
{ name: 'SL', description: '시에라리온' },
|
200
|
-
{ name: 'SG', description: '싱가포르' },
|
201
|
-
{ name: 'SK', description: '슬로바키아' },
|
202
|
-
{ name: 'SI', description: '슬로베니아' },
|
203
|
-
{ name: 'SB', description: '솔로몬 제도' },
|
204
|
-
{ name: 'SO', description: '소말리아' },
|
205
|
-
{ name: 'ZA', description: '남아프리카 공화국' },
|
206
|
-
{ name: 'GS', description: '사우스조지아 사우스샌드위치 제도' },
|
207
|
-
{ name: 'ES', description: '스페인' },
|
208
|
-
{ name: 'LK', description: '스리랑카' },
|
209
|
-
{ name: 'SD', description: '수단' },
|
210
|
-
{ name: 'SR', description: '수리남' },
|
211
|
-
{ name: 'SJ', description: '스발바르 얀마옌' },
|
212
|
-
{ name: 'SZ', description: '에스와티니' },
|
213
|
-
{ name: 'SE', description: '스웨덴' },
|
214
|
-
{ name: 'CH', description: '스위스' },
|
215
|
-
{ name: 'SY', description: '시리아' },
|
216
|
-
{ name: 'TW', description: '대만' },
|
217
|
-
{ name: 'TJ', description: '타지키스탄' },
|
218
|
-
{ name: 'TZ', description: '탄자니아' },
|
219
|
-
{ name: 'TH', description: '태국' },
|
220
|
-
{ name: 'TL', description: '동티모르' },
|
221
|
-
{ name: 'TG', description: '토고' },
|
222
|
-
{ name: 'TK', description: '토켈라우' },
|
223
|
-
{ name: 'TO', description: '통가' }
|
224
|
-
]
|
225
|
-
}
|
226
|
-
];
|
227
|
-
class SeedCountryCodes1725201567284 {
|
228
|
-
async up(queryRunner) {
|
229
|
-
const codeRepo = (0, shell_1.getRepository)(code_base_1.CommonCode);
|
230
|
-
const codeDetailRepo = (0, shell_1.getRepository)(code_base_1.CommonCodeDetail);
|
231
|
-
const domain = await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({
|
232
|
-
subdomain: 'system'
|
233
|
-
});
|
234
|
-
return await Promise.all(codes.map(async (code) => {
|
235
|
-
const commonCode = await codeRepo.save(Object.assign(Object.assign({}, code), { domain }));
|
236
|
-
await codeDetailRepo.save(commonCode.details.map((detail, idx) => {
|
237
|
-
return Object.assign(Object.assign({}, detail), { commonCode,
|
238
|
-
domain, rank: (idx + 1) * 10 });
|
239
|
-
}));
|
240
|
-
}));
|
241
|
-
}
|
242
|
-
async down(queryRunner) {
|
243
|
-
const codeRepo = (0, shell_1.getRepository)(code_base_1.CommonCode);
|
244
|
-
const codeDetailRepo = (0, shell_1.getRepository)(code_base_1.CommonCodeDetail);
|
245
|
-
}
|
246
|
-
}
|
247
|
-
exports.SeedCountryCodes1725201567284 = SeedCountryCodes1725201567284;
|
248
|
-
//# sourceMappingURL=1725201567284-seed-country-codes.js.map
|