@things-factory/tax-invoice 6.2.84
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/CHANGELOG.md +8 -0
- package/assets/images/hatiolab-logo.png +0 -0
- package/client/bootstrap.ts +0 -0
- package/client/index.ts +0 -0
- package/client/pages/main.ts +25 -0
- package/client/pages/tax-audit-result/tax-audit-result-importer.ts +97 -0
- package/client/pages/tax-audit-result/tax-audit-result-list-page.ts +355 -0
- package/client/pages/tax-invoice/tax-invoice-detail-popup.ts +424 -0
- package/client/pages/tax-invoice/tax-invoice-list-page.ts +517 -0
- package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +428 -0
- package/client/pages/tax-invoice-company/tax-invoice-company-importer.ts +175 -0
- package/client/pages/tax-invoice-company/tax-invoice-company-list-page.ts +496 -0
- package/client/route.ts +23 -0
- package/client/tsconfig.json +11 -0
- package/dist-client/bootstrap.d.ts +0 -0
- package/dist-client/bootstrap.js +2 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/index.d.ts +0 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/main.d.ts +1 -0
- package/dist-client/pages/main.js +27 -0
- package/dist-client/pages/main.js.map +1 -0
- package/dist-client/pages/tax-audit-result/tax-audit-result-importer.d.ts +22 -0
- package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js +100 -0
- package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js.map +1 -0
- package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.d.ts +62 -0
- package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js +331 -0
- package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js.map +1 -0
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.d.ts +14 -0
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js +430 -0
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js.map +1 -0
- package/dist-client/pages/tax-invoice/tax-invoice-list-page.d.ts +70 -0
- package/dist-client/pages/tax-invoice/tax-invoice-list-page.js +500 -0
- package/dist-client/pages/tax-invoice/tax-invoice-list-page.js.map +1 -0
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.d.ts +36 -0
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +419 -0
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js.map +1 -0
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.d.ts +31 -0
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js +182 -0
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +1 -0
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.d.ts +57 -0
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js +477 -0
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +20 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-server/index.js +6 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/routes.js +25 -0
- package/dist-server/routes.js.map +1 -0
- package/dist-server/service/index.js +37 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/tax-audit-result/event-subscriber.js +21 -0
- package/dist-server/service/tax-audit-result/event-subscriber.js.map +1 -0
- package/dist-server/service/tax-audit-result/index.js +12 -0
- package/dist-server/service/tax-audit-result/index.js.map +1 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-history.js +123 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-history.js.map +1 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js +168 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js.map +1 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-query.js +97 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-query.js.map +1 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-type.js +86 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-type.js.map +1 -0
- package/dist-server/service/tax-audit-result/tax-audit-result.js +110 -0
- package/dist-server/service/tax-audit-result/tax-audit-result.js.map +1 -0
- package/dist-server/service/tax-invoice/index.js +9 -0
- package/dist-server/service/tax-invoice/index.js.map +1 -0
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js +127 -0
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +1 -0
- package/dist-server/service/tax-invoice/tax-invoice-query.js +90 -0
- package/dist-server/service/tax-invoice/tax-invoice-query.js.map +1 -0
- package/dist-server/service/tax-invoice/tax-invoice-type.js +553 -0
- package/dist-server/service/tax-invoice/tax-invoice-type.js.map +1 -0
- package/dist-server/service/tax-invoice/tax-invoice.js +465 -0
- package/dist-server/service/tax-invoice/tax-invoice.js.map +1 -0
- package/dist-server/service/tax-invoice-api/index.js +9 -0
- package/dist-server/service/tax-invoice-api/index.js.map +1 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js +64 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js.map +1 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js +79 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js.map +1 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +103 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +1 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api.js +163 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +1 -0
- package/dist-server/service/tax-invoice-company/index.js +9 -0
- package/dist-server/service/tax-invoice-company/index.js.map +1 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js +80 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js.map +1 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js +89 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js.map +1 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js +100 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js.map +1 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company.js +166 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company.js.map +1 -0
- package/dist-server/service/tax-invoice-item/index.js +9 -0
- package/dist-server/service/tax-invoice-item/index.js.map +1 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js +127 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js.map +1 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js +87 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js.map +1 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js +121 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js.map +1 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js +115 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/helps/tax-invoice/tax-audit-result.md +160 -0
- package/helps/tax-invoice/tax-invoice-api.md +160 -0
- package/helps/tax-invoice/tax-invoice-send.md +160 -0
- package/helps/tax-invoice/tax-invoice.md +160 -0
- package/package.json +37 -0
- package/server/index.ts +2 -0
- package/server/routes.ts +28 -0
- package/server/service/index.ts +36 -0
- package/server/service/tax-audit-result/event-subscriber.ts +17 -0
- package/server/service/tax-audit-result/index.ts +9 -0
- package/server/service/tax-audit-result/tax-audit-result-history.ts +110 -0
- package/server/service/tax-audit-result/tax-audit-result-mutation.ts +198 -0
- package/server/service/tax-audit-result/tax-audit-result-query.ts +62 -0
- package/server/service/tax-audit-result/tax-audit-result-type.ts +61 -0
- package/server/service/tax-audit-result/tax-audit-result.ts +95 -0
- package/server/service/tax-invoice/index.ts +6 -0
- package/server/service/tax-invoice/tax-invoice-mutation.ts +122 -0
- package/server/service/tax-invoice/tax-invoice-query.ts +54 -0
- package/server/service/tax-invoice/tax-invoice-type.ts +411 -0
- package/server/service/tax-invoice/tax-invoice.ts +389 -0
- package/server/service/tax-invoice-api/index.ts +6 -0
- package/server/service/tax-invoice-api/tax-invoice-api-mutation.ts +67 -0
- package/server/service/tax-invoice-api/tax-invoice-api-query.ts +48 -0
- package/server/service/tax-invoice-api/tax-invoice-api-type.ts +71 -0
- package/server/service/tax-invoice-api/tax-invoice-api.ts +137 -0
- package/server/service/tax-invoice-company/index.ts +6 -0
- package/server/service/tax-invoice-company/tax-invoice-company-mutation.ts +84 -0
- package/server/service/tax-invoice-company/tax-invoice-company-query.ts +53 -0
- package/server/service/tax-invoice-company/tax-invoice-company-type.ts +69 -0
- package/server/service/tax-invoice-company/tax-invoice-company.ts +142 -0
- package/server/service/tax-invoice-item/index.ts +6 -0
- package/server/service/tax-invoice-item/tax-invoice-item-mutation.ts +128 -0
- package/server/service/tax-invoice-item/tax-invoice-item-query.ts +57 -0
- package/server/service/tax-invoice-item/tax-invoice-item-type.ts +86 -0
- package/server/service/tax-invoice-item/tax-invoice-item.ts +85 -0
- package/server/tsconfig.json +10 -0
- package/things-factory.config.js +23 -0
- package/translations/en.json +1 -0
- package/translations/ja.json +1 -0
- package/translations/ko.json +71 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax-invoice-company-importer.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-company/tax-invoice-company-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,OAA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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'\nimport { COMPANY_TYPE_LABEL } from './tax-invoice-company-list-page'\n\nexport class TaxInvoiceCompanyImporter 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 }) taxInvoiceCompanies: 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: 'select',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n renderer: value => COMPANY_TYPE_LABEL[value]\n },\n width: 100\n },\n {\n type: 'string',\n name: 'businessRegistrationNumber',\n header: i18next.t('field.business registration number'),\n width: 150\n },\n {\n type: 'string',\n name: 'branchIdentification',\n header: i18next.t('field.branch identification'),\n width: 150\n },\n {\n type: 'string',\n name: 'businessName',\n header: i18next.t('field.business name'),\n width: 150\n },\n {\n type: 'string',\n name: 'representativeName',\n header: i18next.t('field.representative name'),\n width: 150\n },\n {\n type: 'string',\n name: 'address',\n header: i18next.t('field.address'),\n width: 200\n },\n {\n type: 'string',\n name: 'businessType',\n header: i18next.t('field.business type'),\n width: 100\n },\n {\n type: 'string',\n name: 'industryType',\n header: i18next.t('field.industry type'),\n width: 100\n },\n {\n type: 'string',\n name: 'department',\n header: i18next.t('field.department'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactName',\n header: i18next.t('field.contact name'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactPhone',\n header: i18next.t('field.contact phone'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactEmail',\n header: i18next.t('field.contact email'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactCellPhone',\n header: i18next.t('field.contact cell phone'),\n width: 150\n },\n {\n type: 'attributes',\n name: 'attributes',\n header: i18next.t('field.attributes'),\n width: 150\n }\n ]\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.taxInvoiceCompanies\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 importTaxInvoiceCompanies($taxInvoiceCompanies: [TaxInvoiceCompanyPatch!]!) {\n importTaxInvoiceCompanies(taxInvoiceCompanies: $taxInvoiceCompanies)\n }\n `,\n variables: { taxInvoiceCompanies: this.taxInvoiceCompanies }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import '@operato/data-grist';
|
|
2
|
+
import { PageView } from '@operato/shell';
|
|
3
|
+
import { FetchOption } from '@operato/data-grist';
|
|
4
|
+
import { TaxInvoiceCompanyImporter } from './tax-invoice-company-importer';
|
|
5
|
+
export declare enum CompanyType {
|
|
6
|
+
SUPPLIER = 10,
|
|
7
|
+
BUYER = 20
|
|
8
|
+
}
|
|
9
|
+
export declare const COMPANY_TYPE_LABEL: {
|
|
10
|
+
10: string;
|
|
11
|
+
20: string;
|
|
12
|
+
};
|
|
13
|
+
declare const TaxInvoiceCompanyListPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
|
|
14
|
+
export declare class TaxInvoiceCompanyListPage extends TaxInvoiceCompanyListPage_base {
|
|
15
|
+
static styles: import("lit").CSSResult[];
|
|
16
|
+
static get scopedElements(): {
|
|
17
|
+
'tax-invoice-company-importer': typeof TaxInvoiceCompanyImporter;
|
|
18
|
+
};
|
|
19
|
+
gristConfig: any;
|
|
20
|
+
mode: 'CARD' | 'GRID' | 'LIST';
|
|
21
|
+
private grist;
|
|
22
|
+
get context(): {
|
|
23
|
+
title: string;
|
|
24
|
+
help: string;
|
|
25
|
+
actions: {
|
|
26
|
+
icon: string;
|
|
27
|
+
emphasis: {
|
|
28
|
+
raised: boolean;
|
|
29
|
+
outlined: boolean;
|
|
30
|
+
dense: boolean;
|
|
31
|
+
danger: boolean;
|
|
32
|
+
};
|
|
33
|
+
title: string;
|
|
34
|
+
action: () => Promise<void>;
|
|
35
|
+
}[];
|
|
36
|
+
exportable: {
|
|
37
|
+
name: string;
|
|
38
|
+
data: () => Promise<{}[]>;
|
|
39
|
+
};
|
|
40
|
+
importable: {
|
|
41
|
+
handler: (records: any) => Promise<void>;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
45
|
+
pageInitialized(lifecycle: any): Promise<void>;
|
|
46
|
+
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
47
|
+
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|
|
48
|
+
total: any;
|
|
49
|
+
records: any;
|
|
50
|
+
}>;
|
|
51
|
+
_deleteTaxInvoiceCompany(): Promise<void>;
|
|
52
|
+
_updateTaxInvoiceCompany(): Promise<void>;
|
|
53
|
+
getAttributeSetForDomain(): Promise<any>;
|
|
54
|
+
exportHandler(): Promise<{}[]>;
|
|
55
|
+
importHandler(records: any): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@operato/data-grist';
|
|
3
|
+
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } 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 { OxPrompt } from '@operato/popup';
|
|
13
|
+
import { isMobileDevice } from '@operato/utils';
|
|
14
|
+
import gql from 'graphql-tag';
|
|
15
|
+
import { TaxInvoiceCompanyImporter } from './tax-invoice-company-importer';
|
|
16
|
+
export var CompanyType;
|
|
17
|
+
(function (CompanyType) {
|
|
18
|
+
CompanyType[CompanyType["SUPPLIER"] = 10] = "SUPPLIER";
|
|
19
|
+
CompanyType[CompanyType["BUYER"] = 20] = "BUYER"; // 거래처
|
|
20
|
+
})(CompanyType || (CompanyType = {}));
|
|
21
|
+
export const COMPANY_TYPE_LABEL = {
|
|
22
|
+
[CompanyType.SUPPLIER]: '공급자',
|
|
23
|
+
[CompanyType.BUYER]: '거래처'
|
|
24
|
+
};
|
|
25
|
+
let TaxInvoiceCompanyListPage = class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsMixin(PageView)) {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
|
29
|
+
}
|
|
30
|
+
static get scopedElements() {
|
|
31
|
+
return {
|
|
32
|
+
'tax-invoice-company-importer': TaxInvoiceCompanyImporter
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
get context() {
|
|
36
|
+
return {
|
|
37
|
+
title: i18next.t('title.tax invoice company list'),
|
|
38
|
+
help: 'tax-invoice-company/tax-invoice-company',
|
|
39
|
+
actions: [
|
|
40
|
+
Object.assign({ title: i18next.t('button.save'), action: this._updateTaxInvoiceCompany.bind(this) }, CommonButtonStyles.save),
|
|
41
|
+
Object.assign({ title: i18next.t('button.delete'), action: this._deleteTaxInvoiceCompany.bind(this) }, CommonButtonStyles.delete)
|
|
42
|
+
],
|
|
43
|
+
exportable: {
|
|
44
|
+
name: i18next.t('title.tax invoice company list'),
|
|
45
|
+
data: this.exportHandler.bind(this)
|
|
46
|
+
},
|
|
47
|
+
importable: {
|
|
48
|
+
handler: this.importHandler.bind(this)
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
|
|
54
|
+
return html `
|
|
55
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
56
|
+
<div slot="headroom">
|
|
57
|
+
<div id="filters">
|
|
58
|
+
<ox-filters-form autofocus></ox-filters-form>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</ox-grist>
|
|
62
|
+
`;
|
|
63
|
+
}
|
|
64
|
+
async pageInitialized(lifecycle) {
|
|
65
|
+
this.gristConfig = {
|
|
66
|
+
list: {
|
|
67
|
+
fields: ['name', 'description'],
|
|
68
|
+
details: ['name', 'updatedAt']
|
|
69
|
+
},
|
|
70
|
+
columns: [
|
|
71
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
72
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
73
|
+
{
|
|
74
|
+
type: 'string',
|
|
75
|
+
name: 'name',
|
|
76
|
+
header: i18next.t('field.name'),
|
|
77
|
+
record: {
|
|
78
|
+
editable: true,
|
|
79
|
+
classifier: () => ({ emphasized: ['#D1E8FF', '#000'] })
|
|
80
|
+
},
|
|
81
|
+
filter: 'search',
|
|
82
|
+
sortable: true,
|
|
83
|
+
width: 150
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'string',
|
|
87
|
+
name: 'description',
|
|
88
|
+
header: i18next.t('field.description'),
|
|
89
|
+
record: {
|
|
90
|
+
editable: true
|
|
91
|
+
},
|
|
92
|
+
filter: 'search',
|
|
93
|
+
width: 200
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: 'select',
|
|
97
|
+
name: 'type',
|
|
98
|
+
header: i18next.t('field.type'),
|
|
99
|
+
record: {
|
|
100
|
+
editable: true,
|
|
101
|
+
classifier: () => ({ emphasized: ['#D1E8FF', '#000'] }),
|
|
102
|
+
options: [
|
|
103
|
+
{},
|
|
104
|
+
{
|
|
105
|
+
display: i18next.t('text.company supplier'),
|
|
106
|
+
value: CompanyType.SUPPLIER
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
display: i18next.t('text.company buyer'),
|
|
110
|
+
value: CompanyType.BUYER
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
width: 100
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: 'string',
|
|
118
|
+
name: 'businessRegistrationNumber',
|
|
119
|
+
header: i18next.t('field.business registration number'),
|
|
120
|
+
record: {
|
|
121
|
+
editable: true
|
|
122
|
+
},
|
|
123
|
+
width: 150
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: 'string',
|
|
127
|
+
name: 'branchIdentification',
|
|
128
|
+
header: i18next.t('field.branch identification'),
|
|
129
|
+
record: {
|
|
130
|
+
editable: true
|
|
131
|
+
},
|
|
132
|
+
width: 150
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: 'string',
|
|
136
|
+
name: 'businessName',
|
|
137
|
+
header: i18next.t('field.business name'),
|
|
138
|
+
record: {
|
|
139
|
+
editable: true
|
|
140
|
+
},
|
|
141
|
+
width: 150
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
type: 'string',
|
|
145
|
+
name: 'representativeName',
|
|
146
|
+
header: i18next.t('field.representative name'),
|
|
147
|
+
record: {
|
|
148
|
+
editable: true
|
|
149
|
+
},
|
|
150
|
+
width: 150
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
type: 'string',
|
|
154
|
+
name: 'address',
|
|
155
|
+
header: i18next.t('field.address'),
|
|
156
|
+
record: {
|
|
157
|
+
editable: true
|
|
158
|
+
},
|
|
159
|
+
width: 200
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
type: 'string',
|
|
163
|
+
name: 'businessType',
|
|
164
|
+
header: i18next.t('field.business type'),
|
|
165
|
+
record: {
|
|
166
|
+
editable: true
|
|
167
|
+
},
|
|
168
|
+
width: 100
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: 'string',
|
|
172
|
+
name: 'industryType',
|
|
173
|
+
header: i18next.t('field.industry type'),
|
|
174
|
+
record: {
|
|
175
|
+
editable: true
|
|
176
|
+
},
|
|
177
|
+
width: 100
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
type: 'string',
|
|
181
|
+
name: 'department',
|
|
182
|
+
header: i18next.t('field.department'),
|
|
183
|
+
record: {
|
|
184
|
+
editable: true
|
|
185
|
+
},
|
|
186
|
+
width: 150
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
type: 'string',
|
|
190
|
+
name: 'contactName',
|
|
191
|
+
header: i18next.t('field.contact name'),
|
|
192
|
+
record: {
|
|
193
|
+
editable: true
|
|
194
|
+
},
|
|
195
|
+
width: 150
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
type: 'string',
|
|
199
|
+
name: 'contactPhone',
|
|
200
|
+
header: i18next.t('field.contact phone'),
|
|
201
|
+
record: {
|
|
202
|
+
editable: true
|
|
203
|
+
},
|
|
204
|
+
width: 150
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
type: 'string',
|
|
208
|
+
name: 'contactEmail',
|
|
209
|
+
header: i18next.t('field.contact email'),
|
|
210
|
+
record: {
|
|
211
|
+
editable: true
|
|
212
|
+
},
|
|
213
|
+
width: 150
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
type: 'string',
|
|
217
|
+
name: 'contactCellPhone',
|
|
218
|
+
header: i18next.t('field.contact cell phone'),
|
|
219
|
+
record: {
|
|
220
|
+
editable: true
|
|
221
|
+
},
|
|
222
|
+
width: 150
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
type: 'attributes',
|
|
226
|
+
name: 'attributes',
|
|
227
|
+
header: i18next.t('field.attributes'),
|
|
228
|
+
record: {
|
|
229
|
+
editable: true,
|
|
230
|
+
options: async () => {
|
|
231
|
+
return {
|
|
232
|
+
objectified: true,
|
|
233
|
+
attributeSet: await this.getAttributeSetForDomain()
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
width: 150
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
type: 'resource-object',
|
|
241
|
+
name: 'updater',
|
|
242
|
+
header: i18next.t('field.updater'),
|
|
243
|
+
record: {
|
|
244
|
+
editable: false
|
|
245
|
+
},
|
|
246
|
+
width: 120
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
type: 'datetime',
|
|
250
|
+
name: 'updatedAt',
|
|
251
|
+
header: i18next.t('field.updated_at'),
|
|
252
|
+
record: {
|
|
253
|
+
editable: false
|
|
254
|
+
},
|
|
255
|
+
width: 180
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
rows: {
|
|
259
|
+
selectable: {
|
|
260
|
+
multiple: true
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
sorters: [
|
|
264
|
+
{
|
|
265
|
+
name: 'name'
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
async pageUpdated(changes, lifecycle) {
|
|
271
|
+
if (this.active) {
|
|
272
|
+
this.grist.fetch();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }) {
|
|
276
|
+
const response = await client.query({
|
|
277
|
+
query: gql `
|
|
278
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
279
|
+
responses: taxInvoiceCompanies(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
280
|
+
items {
|
|
281
|
+
id
|
|
282
|
+
name
|
|
283
|
+
description
|
|
284
|
+
type
|
|
285
|
+
businessRegistrationNumber
|
|
286
|
+
branchIdentification
|
|
287
|
+
businessName
|
|
288
|
+
representativeName
|
|
289
|
+
address
|
|
290
|
+
businessType
|
|
291
|
+
industryType
|
|
292
|
+
department
|
|
293
|
+
contactName
|
|
294
|
+
contactPhone
|
|
295
|
+
contactEmail
|
|
296
|
+
contactCellPhone
|
|
297
|
+
attributes
|
|
298
|
+
updater {
|
|
299
|
+
id
|
|
300
|
+
name
|
|
301
|
+
}
|
|
302
|
+
updatedAt
|
|
303
|
+
}
|
|
304
|
+
total
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
`,
|
|
308
|
+
variables: {
|
|
309
|
+
filters,
|
|
310
|
+
pagination: { page, limit },
|
|
311
|
+
sortings
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
return {
|
|
315
|
+
total: response.data.responses.total || 0,
|
|
316
|
+
records: response.data.responses.items || []
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
async _deleteTaxInvoiceCompany() {
|
|
320
|
+
if (await OxPrompt.open({
|
|
321
|
+
title: i18next.t('text.are_you_sure'),
|
|
322
|
+
text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
|
|
323
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
324
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
325
|
+
})) {
|
|
326
|
+
const ids = this.grist.selected.map(record => record.id);
|
|
327
|
+
if (ids && ids.length > 0) {
|
|
328
|
+
const response = await client.mutate({
|
|
329
|
+
mutation: gql `
|
|
330
|
+
mutation ($ids: [String!]!) {
|
|
331
|
+
deleteTaxInvoiceCompanies(ids: $ids)
|
|
332
|
+
}
|
|
333
|
+
`,
|
|
334
|
+
variables: {
|
|
335
|
+
ids
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
if (!response.errors) {
|
|
339
|
+
this.grist.fetch();
|
|
340
|
+
notify({
|
|
341
|
+
message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
async _updateTaxInvoiceCompany() {
|
|
348
|
+
let patches = this.grist.dirtyRecords;
|
|
349
|
+
if (patches && patches.length) {
|
|
350
|
+
patches = patches.map(patch => {
|
|
351
|
+
let patchField = patch.id ? { id: patch.id } : {};
|
|
352
|
+
const dirtyFields = patch.__dirtyfields__;
|
|
353
|
+
for (let key in dirtyFields) {
|
|
354
|
+
patchField[key] = key === 'type' ? Number(dirtyFields[key].after) : dirtyFields[key].after;
|
|
355
|
+
}
|
|
356
|
+
patchField.cuFlag = patch.__dirty__;
|
|
357
|
+
return patchField;
|
|
358
|
+
});
|
|
359
|
+
const response = await client.mutate({
|
|
360
|
+
mutation: gql `
|
|
361
|
+
mutation ($patches: [TaxInvoiceCompanyPatch!]!) {
|
|
362
|
+
updateMultipleTaxInvoiceCompany(patches: $patches) {
|
|
363
|
+
name
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
`,
|
|
367
|
+
variables: {
|
|
368
|
+
patches
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
if (!response.errors) {
|
|
372
|
+
this.grist.fetch();
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
async getAttributeSetForDomain() {
|
|
377
|
+
var _a;
|
|
378
|
+
const response = await client.query({
|
|
379
|
+
query: gql `
|
|
380
|
+
query {
|
|
381
|
+
attributeSet: attributeSetByEntity(entity: "Domain") {
|
|
382
|
+
entity
|
|
383
|
+
description
|
|
384
|
+
items {
|
|
385
|
+
name
|
|
386
|
+
description
|
|
387
|
+
tag
|
|
388
|
+
type
|
|
389
|
+
active
|
|
390
|
+
hidden
|
|
391
|
+
options
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
`
|
|
396
|
+
});
|
|
397
|
+
return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.attributeSet) || {};
|
|
398
|
+
}
|
|
399
|
+
async exportHandler() {
|
|
400
|
+
const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records;
|
|
401
|
+
const targetFieldSet = new Set([
|
|
402
|
+
'id',
|
|
403
|
+
'name',
|
|
404
|
+
'description',
|
|
405
|
+
'type',
|
|
406
|
+
'businessRegistrationNumber',
|
|
407
|
+
'branchIdentification',
|
|
408
|
+
'businessName',
|
|
409
|
+
'representativeName',
|
|
410
|
+
'address',
|
|
411
|
+
'businessType',
|
|
412
|
+
'industryType',
|
|
413
|
+
'department',
|
|
414
|
+
'contactName',
|
|
415
|
+
'contactPhone',
|
|
416
|
+
'contactEmail',
|
|
417
|
+
'contactCellPhone',
|
|
418
|
+
'attributes'
|
|
419
|
+
]);
|
|
420
|
+
return exportTargets.map(taxInvoice => {
|
|
421
|
+
let tempObj = {};
|
|
422
|
+
for (const field of targetFieldSet) {
|
|
423
|
+
tempObj[field] = taxInvoice[field];
|
|
424
|
+
}
|
|
425
|
+
return tempObj;
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
async importHandler(records) {
|
|
429
|
+
const popup = openPopup(html `
|
|
430
|
+
<tax-invoice-company-importer
|
|
431
|
+
.taxInvoiceCompanies=${records}
|
|
432
|
+
@imported=${() => {
|
|
433
|
+
history.back();
|
|
434
|
+
this.grist.fetch();
|
|
435
|
+
}}
|
|
436
|
+
></tax-invoice-company-importer>
|
|
437
|
+
`, {
|
|
438
|
+
backdrop: true,
|
|
439
|
+
size: 'large',
|
|
440
|
+
title: i18next.t('title.import tax invoice company')
|
|
441
|
+
});
|
|
442
|
+
popup.onclosed = () => {
|
|
443
|
+
this.grist.fetch();
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
TaxInvoiceCompanyListPage.styles = [
|
|
448
|
+
ScrollbarStyles,
|
|
449
|
+
CommonGristStyles,
|
|
450
|
+
css `
|
|
451
|
+
:host {
|
|
452
|
+
display: flex;
|
|
453
|
+
|
|
454
|
+
width: 100%;
|
|
455
|
+
|
|
456
|
+
--grid-record-emphasized-background-color: red;
|
|
457
|
+
--grid-record-emphasized-color: yellow;
|
|
458
|
+
}
|
|
459
|
+
`
|
|
460
|
+
];
|
|
461
|
+
__decorate([
|
|
462
|
+
property({ type: Object }),
|
|
463
|
+
__metadata("design:type", Object)
|
|
464
|
+
], TaxInvoiceCompanyListPage.prototype, "gristConfig", void 0);
|
|
465
|
+
__decorate([
|
|
466
|
+
property({ type: String }),
|
|
467
|
+
__metadata("design:type", String)
|
|
468
|
+
], TaxInvoiceCompanyListPage.prototype, "mode", void 0);
|
|
469
|
+
__decorate([
|
|
470
|
+
query('ox-grist'),
|
|
471
|
+
__metadata("design:type", DataGrist)
|
|
472
|
+
], TaxInvoiceCompanyListPage.prototype, "grist", void 0);
|
|
473
|
+
TaxInvoiceCompanyListPage = __decorate([
|
|
474
|
+
customElement('tax-invoice-company-list-page')
|
|
475
|
+
], TaxInvoiceCompanyListPage);
|
|
476
|
+
export { TaxInvoiceCompanyListPage };
|
|
477
|
+
//# sourceMappingURL=tax-invoice-company-list-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax-invoice-company-list-page.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-company/tax-invoice-company-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE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Ae;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;KASF;CACF,CAAA;AAQD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8DAAiB;AAC5C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAoE;AAE/F;IAAC,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;wDAAA;AAzBjC,yBAAyB;IADrC,aAAa,CAAC,+BAA+B,CAAC;GAClC,yBAAyB,CAqdrC;SArdY,yBAAyB","sourcesContent":["import '@operato/data-grist'\n\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\nimport gql from 'graphql-tag'\nimport { TaxInvoiceCompanyImporter } from './tax-invoice-company-importer'\n\nexport enum CompanyType {\n SUPPLIER = 10, // 공급자\n BUYER = 20 // 거래처\n}\nexport const COMPANY_TYPE_LABEL = {\n [CompanyType.SUPPLIER]: '공급자',\n [CompanyType.BUYER]: '거래처'\n}\n\n@customElement('tax-invoice-company-list-page')\nexport class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsMixin(PageView)) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n `\n ]\n\n static get scopedElements() {\n return {\n 'tax-invoice-company-importer': TaxInvoiceCompanyImporter\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.tax invoice company list'),\n help: 'tax-invoice-company/tax-invoice-company',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this._updateTaxInvoiceCompany.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deleteTaxInvoiceCompany.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('title.tax invoice company 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 .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\">\n <div id=\"filters\">\n <ox-filters-form autofocus></ox-filters-form>\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: ['name', '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 classifier: () => ({ emphasized: ['#D1E8FF', '#000'] })\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: 'select',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n editable: true,\n classifier: () => ({ emphasized: ['#D1E8FF', '#000'] }),\n options: [\n {},\n {\n display: i18next.t('text.company supplier'),\n value: CompanyType.SUPPLIER\n },\n {\n display: i18next.t('text.company buyer'),\n value: CompanyType.BUYER\n }\n ]\n },\n width: 100\n },\n {\n type: 'string',\n name: 'businessRegistrationNumber',\n header: i18next.t('field.business registration number'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'branchIdentification',\n header: i18next.t('field.branch identification'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'businessName',\n header: i18next.t('field.business name'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'representativeName',\n header: i18next.t('field.representative name'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'address',\n header: i18next.t('field.address'),\n record: {\n editable: true\n },\n width: 200\n },\n {\n type: 'string',\n name: 'businessType',\n header: i18next.t('field.business type'),\n record: {\n editable: true\n },\n width: 100\n },\n {\n type: 'string',\n name: 'industryType',\n header: i18next.t('field.industry type'),\n record: {\n editable: true\n },\n width: 100\n },\n {\n type: 'string',\n name: 'department',\n header: i18next.t('field.department'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactName',\n header: i18next.t('field.contact name'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactPhone',\n header: i18next.t('field.contact phone'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactEmail',\n header: i18next.t('field.contact email'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactCellPhone',\n header: i18next.t('field.contact cell phone'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'attributes',\n name: 'attributes',\n header: i18next.t('field.attributes'),\n record: {\n editable: true,\n options: async () => {\n return {\n objectified: true,\n attributeSet: await this.getAttributeSetForDomain()\n }\n }\n },\n width: 150\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\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 width: 180\n }\n ],\n rows: {\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 this.grist.fetch()\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: taxInvoiceCompanies(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n type\n businessRegistrationNumber\n branchIdentification\n businessName\n representativeName\n address\n businessType\n industryType\n department\n contactName\n contactPhone\n contactEmail\n contactCellPhone\n attributes\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 _deleteTaxInvoiceCompany() {\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 deleteTaxInvoiceCompanies(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 _updateTaxInvoiceCompany() {\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] = key === 'type' ? Number(dirtyFields[key].after) : 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: [TaxInvoiceCompanyPatch!]!) {\n updateMultipleTaxInvoiceCompany(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 getAttributeSetForDomain() {\n const response = await client.query({\n query: gql`\n query {\n attributeSet: attributeSetByEntity(entity: \"Domain\") {\n entity\n description\n items {\n name\n description\n tag\n type\n active\n hidden\n options\n }\n }\n }\n `\n })\n\n return response.data?.attributeSet || {}\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 'type',\n 'businessRegistrationNumber',\n 'branchIdentification',\n 'businessName',\n 'representativeName',\n 'address',\n 'businessType',\n 'industryType',\n 'department',\n 'contactName',\n 'contactPhone',\n 'contactEmail',\n 'contactCellPhone',\n 'attributes'\n ])\n\n return exportTargets.map(taxInvoice => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = taxInvoice[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) {\n const popup = openPopup(\n html`\n <tax-invoice-company-importer\n .taxInvoiceCompanies=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></tax-invoice-company-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import tax invoice company')\n }\n )\n\n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function route(page: string): "tax-invoice-main" | "tax-invoice-list" | "tax-invoice-company-list" | "tax-invoice-api" | "tax-audit-result-list" | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default function route(page) {
|
|
2
|
+
switch (page) {
|
|
3
|
+
case 'tax-invoice-main':
|
|
4
|
+
import('./pages/main');
|
|
5
|
+
return page;
|
|
6
|
+
case 'tax-invoice-list':
|
|
7
|
+
import('./pages/tax-invoice/tax-invoice-list-page');
|
|
8
|
+
return page;
|
|
9
|
+
case 'tax-invoice-company-list':
|
|
10
|
+
import('./pages/tax-invoice-company/tax-invoice-company-list-page');
|
|
11
|
+
return page;
|
|
12
|
+
case 'tax-invoice-api':
|
|
13
|
+
import('./pages/tax-invoice-api/tax-invoice-api-page');
|
|
14
|
+
return page;
|
|
15
|
+
case 'tax-audit-result-list':
|
|
16
|
+
import('./pages/tax-audit-result/tax-audit-result-list-page');
|
|
17
|
+
return page;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAY;IACxC,QAAQ,IAAI,EAAE;QACZ,KAAK,kBAAkB;YACrB,MAAM,CAAC,cAAc,CAAC,CAAA;YACtB,OAAO,IAAI,CAAA;QAEb,KAAK,kBAAkB;YACrB,MAAM,CAAC,2CAA2C,CAAC,CAAA;YACnD,OAAO,IAAI,CAAA;QAEb,KAAK,0BAA0B;YAC7B,MAAM,CAAC,2DAA2D,CAAC,CAAA;YACnE,OAAO,IAAI,CAAA;QAEb,KAAK,iBAAiB;YACpB,MAAM,CAAC,8CAA8C,CAAC,CAAA;YACtD,OAAO,IAAI,CAAA;QAEb,KAAK,uBAAuB;YAC1B,MAAM,CAAC,qDAAqD,CAAC,CAAA;YAC7D,OAAO,IAAI,CAAA;KACd;AACH,CAAC","sourcesContent":["export default function route(page: string) {\n switch (page) {\n case 'tax-invoice-main':\n import('./pages/main')\n return page\n\n case 'tax-invoice-list':\n import('./pages/tax-invoice/tax-invoice-list-page')\n return page\n\n case 'tax-invoice-company-list':\n import('./pages/tax-invoice-company/tax-invoice-company-list-page')\n return page\n\n case 'tax-invoice-api':\n import('./pages/tax-invoice-api/tax-invoice-api-page')\n return page\n\n case 'tax-audit-result-list':\n import('./pages/tax-audit-result/tax-audit-result-list-page')\n return page\n }\n}\n"]}
|