@things-factory/tax-invoice 10.1.277 → 10.1.279

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.
Files changed (58) hide show
  1. package/package.json +25 -8
  2. package/CHANGELOG.md +0 -8
  3. package/dist-client/bootstrap.js.map +0 -1
  4. package/dist-client/entity360/tax-invoice-360.js.map +0 -1
  5. package/dist-client/index.js.map +0 -1
  6. package/dist-client/pages/main.js.map +0 -1
  7. package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js.map +0 -1
  8. package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js.map +0 -1
  9. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js.map +0 -1
  10. package/dist-client/pages/tax-invoice/tax-invoice-list-page.js.map +0 -1
  11. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js.map +0 -1
  12. package/dist-client/pages/tax-invoice-send/company-list-popup.js.map +0 -1
  13. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +0 -1
  14. package/dist-client/pages/tax-invoice-send/tax-invoice-send.js.map +0 -1
  15. package/dist-client/route.js.map +0 -1
  16. package/dist-client/tsconfig.tsbuildinfo +0 -1
  17. package/dist-server/index.js.map +0 -1
  18. package/dist-server/role-tasks.js.map +0 -1
  19. package/dist-server/routes.js.map +0 -1
  20. package/dist-server/service/hometax/hometax-resolver.js.map +0 -1
  21. package/dist-server/service/hometax/hometax-tax-invoice-import.js.map +0 -1
  22. package/dist-server/service/hometax/hometax-tax-invoice-list.js.map +0 -1
  23. package/dist-server/service/hometax/hometax-type.js.map +0 -1
  24. package/dist-server/service/hometax/index.js.map +0 -1
  25. package/dist-server/service/index.js.map +0 -1
  26. package/dist-server/service/tax-audit-result/event-subscriber.js.map +0 -1
  27. package/dist-server/service/tax-audit-result/index.js.map +0 -1
  28. package/dist-server/service/tax-audit-result/tax-audit-result-history.js.map +0 -1
  29. package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js.map +0 -1
  30. package/dist-server/service/tax-audit-result/tax-audit-result-query.js.map +0 -1
  31. package/dist-server/service/tax-audit-result/tax-audit-result-type.js.map +0 -1
  32. package/dist-server/service/tax-audit-result/tax-audit-result.js.map +0 -1
  33. package/dist-server/service/tax-invoice/index.js.map +0 -1
  34. package/dist-server/service/tax-invoice/tax-invoice-codes.js.map +0 -1
  35. package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +0 -1
  36. package/dist-server/service/tax-invoice/tax-invoice-query.js.map +0 -1
  37. package/dist-server/service/tax-invoice/tax-invoice-subject.js.map +0 -1
  38. package/dist-server/service/tax-invoice/tax-invoice-type.js.map +0 -1
  39. package/dist-server/service/tax-invoice/tax-invoice-util.js.map +0 -1
  40. package/dist-server/service/tax-invoice/tax-invoice.js.map +0 -1
  41. package/dist-server/service/tax-invoice-api/default-tax-invoice-api.js.map +0 -1
  42. package/dist-server/service/tax-invoice-api/index.js.map +0 -1
  43. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js.map +0 -1
  44. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js.map +0 -1
  45. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +0 -1
  46. package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +0 -1
  47. package/dist-server/service/tax-invoice-item/index.js.map +0 -1
  48. package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js.map +0 -1
  49. package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js.map +0 -1
  50. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js.map +0 -1
  51. package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +0 -1
  52. package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +0 -1
  53. package/dist-server/service/unipost-api/tax-invoice-send.js.map +0 -1
  54. package/dist-server/tsconfig.tsbuildinfo +0 -1
  55. package/dist-server/work-doors.js.map +0 -1
  56. package/tests/hometax-fixture.ts +0 -60
  57. package/tests/hometax-save-sqlite.test.ts +0 -125
  58. package/tests/hometax-tax-invoice-list.test.ts +0 -177
package/package.json CHANGED
@@ -1,8 +1,25 @@
1
1
  {
2
2
  "name": "@things-factory/tax-invoice",
3
- "version": "10.1.277",
3
+ "version": "10.1.279",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
+ "files": [
7
+ "assets",
8
+ "config",
9
+ "dist-client",
10
+ "dist-server",
11
+ "helps",
12
+ "things-factory.config.js",
13
+ "translations",
14
+ "!**/*.map",
15
+ "!**/*.test.*",
16
+ "!**/*.spec.*",
17
+ "!**/test/**",
18
+ "!**/tests/**",
19
+ "!**/__tests__/**",
20
+ "!**/*.tsbuildinfo",
21
+ "!**/.DS_Store"
22
+ ],
6
23
  "things-factory": true,
7
24
  "license": "MIT",
8
25
  "author": "heartyoh <heartyoh@hatiolab.com>",
@@ -33,14 +50,14 @@
33
50
  "@operato/input": "^10.29.79",
34
51
  "@operato/layout": "^10.29.69",
35
52
  "@operato/shell": "^10.29.69",
36
- "@things-factory/ai-assistant": "^10.1.277",
37
- "@things-factory/attachment-base": "^10.1.277",
38
- "@things-factory/auth-base": "^10.1.277",
39
- "@things-factory/env": "^10.1.149",
40
- "@things-factory/export-ui-excel": "^10.1.277",
41
- "@things-factory/shell": "^10.1.277",
53
+ "@things-factory/ai-assistant": "^10.1.279",
54
+ "@things-factory/attachment-base": "^10.1.279",
55
+ "@things-factory/auth-base": "^10.1.279",
56
+ "@things-factory/env": "^10.1.279",
57
+ "@things-factory/export-ui-excel": "^10.1.279",
58
+ "@things-factory/shell": "^10.1.279",
42
59
  "graphql-upload": "^15.0.2",
43
60
  "xlsx": "^0.18.5"
44
61
  },
45
- "gitHead": "85f409e7ea43686a4cda52924247d9e7a6b0bfa7"
62
+ "gitHead": "666c08055c408b408fde961ad10da080941b147c"
46
63
  }
package/CHANGELOG.md DELETED
@@ -1,8 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
- and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
-
8
- <!-- ## [Unreleased] -->
@@ -1 +0,0 @@
1
- {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B,sBAAsB,EAAE,CAAA;AAC1B,CAAC","sourcesContent":["import { registerTaxInvoiceKind } from './entity360/tax-invoice-360.js'\n\nexport default function bootstrap() {\n registerTaxInvoiceKind()\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tax-invoice-360.js","sourceRoot":"","sources":["../../client/entity360/tax-invoice-360.ts"],"names":[],"mappings":";AAAA,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,wBAAwB,EAAmD,MAAM,iBAAiB,CAAA;AAEnJ,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,4CAA4C,CAAA;AA+BtG,yDAAyD;AACzD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;AAEtJ,MAAM,MAAM,GAAG,C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AY,CAAC,CAAC,6BAA6B,CAAC,YAAY,CAAC,CAAC,sBAAsB,CAAC;oCACvG,CAAC,CAAC,4BAA4B,CAAC,wBAAwB,CAAC,CAAC,yBAAyB,CAAC,wBAAwB,CAAC,CAAC,qBAAqB,CAAC,wBAAwB,CAAC,CAAC,kBAAkB,CAAC;;yBAE3L,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAA;qCACV,IAAI,CAAC,UAAU,IAAI,EAAE,8BAA8B,IAAI,CAAC,QAAQ,IAAI,EAAE,YAAY,IAAI,CAAC,aAAa,IAAI,EAAE;oCAC3G,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,wBAAwB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,wBAAwB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,wBAAwB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;sBAC9K,CAAC;6BACM,CAAC,CAAC,CAAC,EAAE,EAAE;YAC5B,CAAC,CAAC,EAAE;4BACgB,CAAA;IAC1B,CAAC;;AAlE+B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;0DAA2B;AArE/C,yBAAyB;IADrC,aAAa,CAAC,8BAA8B,CAAC;GACjC,yBAAyB,CAwIrC","sourcesContent":["import gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { QueryController } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { entity360Answer, registerEntity360Kind, registerEntity360Section, type Entity360DoorAnswer, type Entity360Subject } from '@operato/layout'\n\nimport { CATEGORY, Category, INVOICE_TYPE, PURPOSE } from '../pages/tax-invoice/tax-invoice-list-page'\n\n/*\n * A tax invoice's 360 (ADR-0067). The framework draws the invoice itself — parties, amounts, items.\n * An application adds its own sections (what the invoice is bound to) with registerEntity360Section('tax-invoice', …).\n */\n\ntype Invoice = {\n id: string\n category: string\n approvalNo?: string\n originalApprovalNo?: string\n issueDate?: string\n signatureDate?: string\n transmissionDate?: string\n invoiceType?: string\n purpose?: string\n issueChannel?: string\n remark0?: string\n supplierBusinessRegistrationNumber?: string\n supplierBusinessName?: string\n supplierRepresentativeName?: string\n buyerBusinessRegistrationNumber?: string\n buyerBusinessName?: string\n buyerRepresentativeName?: string\n supplyAmount?: number\n taxAmount?: number\n totalAmount?: number\n taxInvoiceItems?: { sequence?: number; supplyDate?: string; itemName?: string; specification?: string; quantity?: number; unitPrice?: number; supplyPrice?: number; taxPrice?: number }[]\n}\n\n/** 1234567890 → 123-45-67890; anything else as it is. */\nexport const businessNumber = (value?: string) => (value && /^\\d{10}$/.test(value) ? value.replace(/(\\d{3})(\\d{2})(\\d{5})/, '$1-$2-$3') : value || '')\n\nconst amount = (value?: number | null) => (value === null || value === undefined ? '' : Number(value).toLocaleString(i18next.language || 'ko'))\n\n/** The other party: the buyer of a sale, the supplier of a purchase. */\nexport const counterpartOf = (value: { category?: string; supplierBusinessName?: string; buyerBusinessName?: string }) =>\n (value.category === Category.EXPORT ? value.buyerBusinessName : value.supplierBusinessName) || ''\n\nlet invoiceQueryField = 'taxInvoice'\n/** Applications may use their own domain-scoped ledger read door without granting framework privileges. */\nexport function configureTaxInvoice360Query(field: string): void {\n if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(field)) throw new Error('Invalid invoice query field')\n invoiceQueryField = field\n}\n\nexport function registerTaxInvoiceKind() {\n registerEntity360Kind({\n kind: 'tax-invoice',\n typenames: ['TaxInvoice'],\n assistantSubject: true,\n title: ({ value }) => `${i18next.t('title.tax invoice')} · ${counterpartOf(value) || value.name || value.approvalNo || ''}`,\n context: ({ value }) => [CATEGORY[value.category], value.issueDate, value.approvalNo].filter(Boolean).join(' · ')\n })\n registerEntity360Section('tax-invoice', {\n name: 'overview',\n order: 10,\n render: subject => html`<tax-invoice-overview-section .subject=${subject}></tax-invoice-overview-section>`\n })\n}\n\n@customElement('tax-invoice-overview-section')\nexport class TaxInvoiceOverviewSection extends LitElement {\n static styles = css`\n :host { font-size: var(--ui-t-body, 13px); line-height: 1.5; }\n h4 { font: inherit; font-weight: 600; margin: 12px 0 4px; }\n .info { font-size: var(--ui-t-body, 13px); margin-top: 0; }\n .info th { width: 1%; padding: 6px 8px; background: var(--md-sys-color-surface-container, transparent); font-size: var(--ui-t-small, 11.5px); }\n .info td { padding: 6px 8px; }\n .info { border-top: 1px solid var(--md-sys-color-outline-variant); }\n .items th { padding: 5px 6px; background: var(--md-sys-color-surface-container, transparent); }\n .items td { padding: 7px 6px; }\n\n th, .date { white-space: nowrap; }\n .info td { overflow-wrap: anywhere; }\n .secondary { display: block; color: var(--md-sys-color-on-surface-variant); font-size: var(--ui-t-small, 11.5px); }\n .item-layout { container-type: inline-size; }\n .items { table-layout: fixed; }\n .items-wide { display: none; }\n .items-wide .wide-name { width: 32%; }\n .items-wide .wide-date { width: 90px; }\n .items-wide .wide-spec { width: 8%; }\n @container (min-width: 720px) {\n .items-compact { display: none; }\n .items-wide { display: table; }\n }\n .item-col { width: 58%; }\n .item-name { overflow-wrap: anywhere; }\n .total { font-weight: 600; }\n\n dl {\n margin: 0;\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: var(--spacing-small, 4px) var(--spacing-large, 12px);\n font-size: var(--ui-t-body, 13px);\n }\n dt {\n color: var(--md-sys-color-on-surface-variant);\n }\n dd {\n margin: 0;\n color: var(--md-sys-color-on-surface);\n overflow-wrap: anywhere;\n font-variant-numeric: tabular-nums;\n }\n table {\n width: 100%;\n margin-top: var(--spacing-medium, 8px);\n border-collapse: collapse;\n font-size: var(--ui-t-small, 11.5px);\n font-variant-numeric: tabular-nums;\n color: var(--md-sys-color-on-surface);\n }\n th {\n text-align: left;\n font-weight: normal;\n color: var(--md-sys-color-on-surface-variant);\n }\n th,\n td {\n padding: var(--spacing-tiny, 2px) var(--spacing-small, 4px);\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n vertical-align: top;\n }\n .num {\n text-align: right;\n white-space: nowrap;\n }\n `\n\n @property({ attribute: false }) subject?: Entity360Subject\n\n /* The invoice the 360 shows, through the read door the application configured (ADR-0190). */\n private invoice = new QueryController(\n this,\n gql(`\n query ($id: String!) {\n taxInvoice: ${invoiceQueryField}(id: $id) {\n id category approvalNo originalApprovalNo issueDate signatureDate transmissionDate invoiceType purpose issueChannel remark0\n supplierBusinessRegistrationNumber supplierBusinessName supplierRepresentativeName\n buyerBusinessRegistrationNumber buyerBusinessName buyerRepresentativeName\n supplyAmount taxAmount totalAmount\n taxInvoiceItems { sequence supplyDate itemName specification quantity unitPrice supplyPrice taxPrice }\n }\n }\n `),\n { variables: () => (this.subject?.id ? { id: this.subject.id } : undefined) }\n )\n\n get answer(): Entity360DoorAnswer<Invoice | undefined> | undefined {\n return entity360Answer(this.invoice, data => data?.taxInvoice as Invoice | undefined)\n }\n\n render() {\n const answer = this.answer\n const one = answer?.data\n const t = (key: string) => i18next.t(key)\n const items = [...(one?.taxInvoiceItems ?? [])].sort((a, b) => (a.sequence ?? 0) - (b.sequence ?? 0))\n return html`<ox-entity360-section .heading=${t('title.tax invoice')} .state=${answer?.state ?? 'loading'} .message=${answer?.message ?? ''}>\n ${one\n ? html`\n <table class=\"info\" aria-label=${t('title.tax invoice')}>\n <tbody>\n <tr><th>${t('field.tax invoice category')}</th><td colspan=\"3\">${CATEGORY[one.category] ?? one.category} · ${INVOICE_TYPE[one.invoiceType!] ?? one.invoiceType} · ${PURPOSE[one.purpose!] ?? ''}</td></tr>\n <tr><th>${t('field.approval no')}</th><td colspan=\"3\">${one.approvalNo}</td></tr>\n ${one.originalApprovalNo ? html`<tr><th>${t('field.original approval no')}</th><td colspan=\"3\">${one.originalApprovalNo}</td></tr>` : ''}\n <tr><th>${t('field.issue date')}</th><td class=\"date\">${one.issueDate}</td><th>${t('field.signature date')}</th><td class=\"date\">${one.signatureDate ?? '—'}</td></tr>\n <tr><th>${t('field.transmission date')}</th><td class=\"date\">${one.transmissionDate ?? '—'}</td><th>${t('field.issue channel')}</th><td>${one.issueChannel ?? '—'}</td></tr>\n <tr><th>${t('field.tax invoice supplier')}</th><td colspan=\"3\">${one.supplierBusinessName}<span class=\"secondary\">${businessNumber(one.supplierBusinessRegistrationNumber)} · ${one.supplierRepresentativeName ?? ''}</span></td></tr>\n <tr><th>${t('field.tax invoice buyer')}</th><td colspan=\"3\">${one.buyerBusinessName}<span class=\"secondary\">${businessNumber(one.buyerBusinessRegistrationNumber)} · ${one.buyerRepresentativeName ?? ''}</span></td></tr>\n <tr><th>${t('field.supply amount')}</th><td class=\"num\">${amount(one.supplyAmount)}</td><th>${t('field.tax amount')}</th><td class=\"num\">${amount(one.taxAmount)}</td></tr>\n <tr><th>${t('field.total amount')}</th><td colspan=\"3\" class=\"num total\">${amount(one.totalAmount)}</td></tr>\n ${one.remark0 ? html`<tr><th>${t('field.remark0')}</th><td colspan=\"3\">${one.remark0}</td></tr>` : ''}\n </tbody>\n </table>\n ${items.length ? html`<h4>${t('field.tax invoice item name')} (${items.length})</h4>\n <div class=\"item-layout\"><table class=\"items items-compact\"><colgroup><col class=\"item-col\"/><col/><col/></colgroup>\n <thead><tr><th>${t('field.tax invoice item name')}</th><th class=\"num\">${t('field.supply amount')}</th><th class=\"num\">${t('field.tax amount')}</th></tr></thead>\n <tbody>${items.map(item => html`<tr>\n <td><span class=\"item-name\">${item.itemName ?? ''}</span><span class=\"secondary\">${item.supplyDate ?? ''}${item.specification ? html` · ${item.specification}` : ''}</span><span class=\"secondary\">${t('field.tax invoice quantity')} ${amount(item.quantity)} · ${t('field.tax invoice price')} ${amount(item.unitPrice)}</span></td>\n <td class=\"num\">${amount(item.supplyPrice)}</td><td class=\"num\">${amount(item.taxPrice)}</td>\n </tr>`)}</tbody>\n </table>\n <table class=\"items items-wide\">\n <colgroup><col class=\"wide-date\"/><col class=\"wide-name\"/><col class=\"wide-spec\"/><col/><col/><col/><col/></colgroup>\n <thead><tr>\n <th>${t('field.tax invoice supply date')}</th><th>${t('field.tax invoice item name')}</th><th>${t('field.tax invoice ea')}</th>\n <th class=\"num\">${t('field.tax invoice quantity')}</th><th class=\"num\">${t('field.tax invoice price')}</th><th class=\"num\">${t('field.supply amount')}</th><th class=\"num\">${t('field.tax amount')}</th>\n </tr></thead>\n <tbody>${items.map(item => html`<tr>\n <td class=\"date\">${item.supplyDate ?? ''}</td><td class=\"item-name\">${item.itemName ?? ''}</td><td>${item.specification ?? ''}</td>\n <td class=\"num\">${amount(item.quantity)}</td><td class=\"num\">${amount(item.unitPrice)}</td><td class=\"num\">${amount(item.supplyPrice)}</td><td class=\"num\">${amount(item.taxPrice)}</td>\n </tr>`)}</tbody>\n </table></div>` : ''}`\n : ''}\n </ox-entity360-section>`\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,OAAO,EACP,4BAA4B,EAC5B,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,8BAA8B,EAC/B,MAAM,2CAA2C,CAAA","sourcesContent":["export {\n Category,\n InvoiceType,\n Purpose,\n BusinessRegistrationCategory,\n CATEGORY,\n INVOICE_TYPE,\n PURPOSE,\n BUSINESS_REGISTRATION_CATEGORY\n} from './pages/tax-invoice/tax-invoice-list-page'\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../../client/pages/main.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEhD,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,kCAAkC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAG9E,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,QAAQ;IAGnC,MAAM;QACJ,OAAO,IAAI,CAAA;;;mBAGI,IAAI;;KAElB,CAAA;IACH,CAAC;IAKD,iBAAiB;QAEf,KAAK,CAAC,iBAAiB,EAAE,CAAA;QAEzB,IAAI,CAAC,WAAW,EAAE,CAAA;QAElB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAA;IAE/D,CAAC;IAGD,oBAAoB;QAElB,KAAK,CAAC,oBAAoB,EAAE,CAAA;QAE5B,IAAI,CAAC,YAAY,EAAE,EAAE,CAAA;IAEvB,CAAC;IAGO,WAAW;QAEjB,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAS,CAAA;QAC7C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC,UAAU,CAAA;IAE/C,CAAC;CACF,CAAA;AAxC6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDAAoB;AAD3C,cAAc;IADnB,aAAa,CAAC,kBAAkB,CAAC;GAC5B,cAAc,CAyCnB","sourcesContent":["import { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { store, PageView } from '@operato/shell'\n\nconst logo = new URL('/assets/images/hatiolab-logo.png', import.meta.url).href\n\n@customElement('tax-invoice-main')\nclass TaxInvoiceMain extends PageView {\n @property({ type: String }) taxInvoice?: string\n\n render() {\n return html`\n <section>\n <h2>TaxInvoice</h2>\n <img src=${logo}>\n </section>\n `\n }\n\n private _unsubscribe?: () => void\n\n\n connectedCallback() {\n\n super.connectedCallback()\n\n this._applyState()\n\n this._unsubscribe = store.subscribe(() => this._applyState())\n\n }\n\n\n disconnectedCallback() {\n\n super.disconnectedCallback()\n\n this._unsubscribe?.()\n\n }\n\n\n private _applyState() {\n\n const __state__ = store.getState() as any\nthis.taxInvoice = __state__.taxInvoice.state_main\n\n }\n}\n\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tax-audit-result-importer.js","sourceRoot":"","sources":["../../../client/pages/tax-audit-result/tax-audit-result-importer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,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;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD,MAAM,OAAO,sBAAuB,SAAQ,UAAU;IAAtD;;QAiB6B,oBAAe,GAAU,EAAE,CAAA;QAC1B,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;IAiCH,CAAC;aAzEQ,WAAM,GAAG;QACd,kBAAkB;QAClB,GAAG,CAAA;;;;;;;;;;;KAWF;KACF,AAdY,CAcZ;IA4BD,MAAM;QACJ,OAAO,IAAI,CAAA;;gBAEC,cAAc,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;kBAChC,IAAI,CAAC,OAAO;gBACd;YACN,OAAO,EAAE,IAAI,CAAC,eAAe;SAC9B;;;;;yBAKgB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gCAAgC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;;KAEhG,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,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE;SACrD,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;;AAxD0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;+DAA4B;AAC1B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAuB1B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@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'\nimport { CommonHeaderStyles } from '@operato/styles'\n\nexport class TaxAuditResultImporter extends LitElement {\n static styles = [\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) taxAuditResults: 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 render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.taxAuditResults\n }}\n ></ox-grist>\n\n <div class=\"footer\">\n <div filler></div>\n <button @click=${this.save.bind(this)} done><md-icon>save</md-icon>${i18next.t('button.save')}</button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importTaxAuditResults($taxAuditResults: [TaxAuditResultPatch!]!) {\n importTaxAuditResults(taxAuditResults: $taxAuditResults)\n }\n `,\n variables: { taxAuditResults: this.taxAuditResults }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tax-audit-result-list-page.js","sourceRoot":"","sources":["../../../client/pages/tax-audit-result/tax-audit-result-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACnI,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAgB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YAEI,OAAO,OAAO,CAAA;QACnB,CAAC,CAAC,CAAA;IACF,CAAC;IAEA,KAAK,CAAC,aAAa,CAAC,OAAO;QAAQ,MAAM,KAAK,GAAG,SAAS,CACtD,IAAI,CAAA;;6BAEmB,OAAO;sBACd,GAAG,EAAE;YAAe,OAAO,CAAC,IAAI,EAAE,CAAA;YAC5C,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QAC7B,CAAC;;OAEK,EACD,EAAU,QAAQ,EAAE,IAAI;YACtB,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC;SACvD,CACG,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG,GAAG,EAAE;YAAS,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QACpD,CAAC,CAAA;IACD,CAAC;;AAvN4B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2DAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAAoE;AAEpE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;qDAAA;AAxBjC,sBAAsB;IADlC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,sBAAsB,CA6OlC","sourcesContent":["import '@operato/data-grist'\n\nimport { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles, WorkSurfacePageStyles } 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 { 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 gql from 'graphql-tag'\n\nimport { TaxAuditResultImporter } from './tax-audit-result-importer'\n\n@customElement('tax-audit-result-list-page')\nexport class TaxAuditResultListPage extends localize(i18next)(ScopedElementsMixin(PageView)) { static styles = [\n /* The work surface frame for a list screen (ADR-0060 decision 8). */\n WorkSurfacePageStyles,\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host {\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n ox-filters-form { flex: 1;\n }\n `\n ]\n\n static get scopedElements() { return { 'tax-audit-result-importer': TaxAuditResultImporter\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() { return { title: i18next.t('title.tax-audit-result list'),\n search: { handler: (search: string) => { this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: { handler: () => { this.grist.toggleHeadroom()\n }\n },\n help: 'tax-invoice/tax-audit-result',\n actions: [\n { title: i18next.t('button.save'),\n action: this._updateTaxAuditResult.bind(this),\n ...CommonButtonStyles.save\n },\n { title: i18next.t('button.delete'),\n action: this._deleteTaxAuditResult.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: { name: i18next.t('title.tax-audit-result list'),\n data: this.exportHandler.bind(this)\n },\n importable: { handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() { const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist class=\"page-fill\" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-filters-form without-search autofocus></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 </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) { this.gristConfig = { list: { fields: ['name', 'description'],\n details: ['active', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n { type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: { editable: true\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n { type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: { editable: true\n },\n filter: 'search',\n width: 200\n },\n { type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: { editable: true\n },\n filter: true,\n sortable: true,\n width: 60\n },\n { type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: { editable: false\n },\n sortable: true,\n width: 120\n },\n { type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: { editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: { selectable: { multiple: true\n }\n },\n sorters: [\n { name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) { if (this.active) { // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) { const response = await client.query({ query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) { responses: taxAuditResults(filters: $filters, pagination: $pagination, sortings: $sortings) { items { id\n name\n description\n active\n updater { id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: { filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return { total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async _deleteTaxAuditResult() { if (\n await OxPrompt.open({ 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 ) { const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) { const response = await client.mutate({ mutation: gql`\n mutation ($ids: [String!]!) { deleteTaxAuditResults(ids: $ids)\n }\n `,\n variables: { ids\n }\n })\n\n if (!response.errors) { this.grist.fetch()\n notify({ message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n async _updateTaxAuditResult() { let patches = this.grist.dirtyRecords\n if (patches && patches.length) { patches = patches.map(patch => { let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) { patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({ mutation: gql`\n mutation ($patches: [TaxAuditResultPatch!]!) { updateMultipleTaxAuditResult(patches: $patches) { name\n }\n }\n `,\n variables: { patches\n }\n })\n\n if (!response.errors) { this.grist.fetch()\n }\n }\n }\n\n async exportHandler() { const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set(['id', 'name', 'description', 'active'])\n\n return exportTargets.map(taxAuditResult => { let tempObj = {}\n for (const field of targetFieldSet) { tempObj[field] = taxAuditResult[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) { const popup = openPopup(\n html`\n <tax-audit-result-importer\n .taxAuditResults=${records}\n @imported=${() => { history.back()\n this.grist.fetch()\n }}\n ></tax-audit-result-importer>\n `,\n { backdrop: true,\n size: 'large',\n title: i18next.t('title.import tax-audit-result')\n }\n )\n\n popup.onclosed = () => { this.grist.fetch()\n }\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tax-invoice-detail-popup.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice/tax-invoice-detail-popup.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;A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IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;oBAC3C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC;oBACjD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;oBAClD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,2BAA2B,CAAC;oBAC3D,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,+BAA+B,CAAC;;;;cAIrE,OAAO,CAAC,CAAC,CAAC,sCAAsC,EAAE;YAClD,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,wCAAwC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;SAChF,CAAC;;;;KAIT,CAAA;IACH,CAAC;IAEO,aAAa,CAAC,KAAa;QACjC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACnE,CAAC;;AA1S2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2DAA0B;AAzI1C,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAobjC","sourcesContent":["import '@operato/data-grist'\n\nimport { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { QueryController } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport gql from 'graphql-tag'\nimport { INVOICE_TYPE } from './tax-invoice-list-page'\n\n@customElement('tax-invoice-detail-popup')\nexport class TaxInvoiceDetailPopup extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n background-color: var(--md-sys-color-background);\n width: 100%;\n padding: 15px;\n font-size: 14px;\n overflow-y: scroll;\n }\n\n input {\n background-color: var(--input-field-background, var(--md-sys-color-surface-container-highest));\n color: var(--input-field-color, var(--md-sys-color-on-surface));\n border: var(--border-dim-color);\n padding: var(--spacing-small) var(--spacing-medium);\n max-width: 100px;\n font: var(--input-font);\n }\n\n table {\n border: solid;\n border-width: 2px 0;\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n .title table {\n border-color: #d3dbe5;\n width: 100%;\n height: 33px;\n\n th {\n background-color: #e9edf6;\n }\n td {\n padding-left: 10px;\n }\n }\n\n div.body {\n margin-top: 15px;\n font-size: 14px;\n\n div.data {\n display: flex;\n margin-top: 5px;\n\n table {\n flex: 1;\n\n td,\n th {\n padding: 5px;\n min-width: 60px;\n }\n td {\n padding-left: 8px;\n }\n th.target {\n width: 25px;\n writing-mode: vertical-rl;\n min-width: unset;\n }\n\n &.supplier {\n border-color: #f64843;\n\n td,\n th {\n background-color: #fef5f7;\n border: solid 1.5px #f5b1b1;\n }\n th.target {\n background-color: #fedbde;\n }\n }\n &.buyer {\n border-color: #007ed9;\n\n td,\n th {\n background-color: #f7f7ff;\n border: solid 1.5px #a7bcff;\n }\n th.target {\n background-color: #c6daf6;\n }\n }\n }\n }\n\n div.items,\n div.info,\n div.summary {\n margin-top: 15px;\n\n table {\n width: 100%;\n border-color: #000;\n border-width: 2px 0px 0px 0px;\n\n th {\n background-color: #e9edf5;\n }\n th,\n td {\n border: solid 1.5px #c4d2ff;\n padding: 5px;\n text-align: center;\n }\n }\n }\n\n div.summary {\n display: flex;\n\n & > table {\n flex: 6.7;\n }\n & > div {\n flex: 3.2;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1.5px solid #c4d2ff;\n border-top: 2px solid #000;\n }\n }\n }\n `\n ]\n\n @property({ type: String }) taxInvoiceId: string = ''\n /* The invoice the popup was opened for (ADR-0190). */\n private invoice = new QueryController(\n this,\n gql`\n query ($id: String!) {\n responses: taxInvoice(id: $id) {\n id\n category\n approvalNo\n originalApprovalNo\n issueDate\n signatureDate\n invoiceType\n purpose\n revisedReason\n remark0\n remark1\n remark2\n supplierBusinessRegistrationCategory\n supplierBusinessRegistrationNumber\n supplierBranchIdentification\n supplierBusinessName\n supplierRepresentativeName\n supplierAddress\n supplierBusinessType\n supplierIndustryType\n supplierDepartment\n supplierContactName\n supplierContactPhone\n supplierContactEmail\n supplierContactCellPhone\n buyerBusinessRegistrationCategory\n buyerBusinessRegistrationNumber\n buyerBranchIdentification\n buyerBusinessName\n buyerRepresentativeName\n buyerAddress\n buyerBusinessType\n buyerIndustryType\n buyer1stDepartment\n buyer1stContactName\n buyer1stContactPhone\n buyer1stContactEmail\n buyer1stContactCellPhone\n buyer2ndDepartment\n buyer2ndContactName\n buyer2ndContactPhone\n buyer2ndContactEmail\n buyer2ndContactCellPhone\n agentBusinessRegistrationCategory\n agentBusinessRegistrationNumber\n agentBranchIdentification\n agentBusinessName\n agentRepresentativeName\n agentAddress\n agentBusinessType\n agentIndustryType\n agentDepartment\n agentContactName\n agentContactPhone\n agentContactEmail\n agentContactCellPhone\n paymentAmountCash\n paymentAmountCheck\n paymentAmountPromissoryNote\n paymentAmountAccountsReceivable\n supplyAmount\n taxAmount\n totalAmount\n createdAt\n updater {\n id\n name\n }\n updatedAt\n\n taxInvoiceItems {\n id\n sequence\n supplyDate\n itemName\n specification\n quantity\n unitPrice\n supplyPrice\n taxPrice\n remark\n }\n }\n }\n `,\n { variables: () => (this.taxInvoiceId ? { id: this.taxInvoiceId } : undefined) }\n )\n\n get detail(): any {\n return this.invoice.data?.responses || {}\n }\n\n render() {\n return html`\n <div class=\"title\">\n <table>\n <tr>\n <th>${i18next.t('field.approval no')}</th>\n <td>${this.detail?.approvalNo?.replace(/(\\S{8})(\\S{8})(\\S{8})/g, '$1-$2-$3')}</td>\n </tr>\n </table>\n </div>\n\n <div class=\"body\">\n <div class=\"invoice-type\">* ${INVOICE_TYPE[this.detail.invoiceType]}</div>\n <div class=\"data\">\n <table class=\"supplier\">\n <colgroup>\n <col width=\"150px\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n </colgroup>\n <tr>\n <th rowspan=\"6\" class=\"target\">${i18next.t('field.tax invoice supplier')}</th>\n <th>${i18next.t('field.short business registration number')}</th>\n <td>${this.detail?.supplierBusinessRegistrationNumber?.replace(/(\\d{3})(\\d{2})(\\d{5})/g, '$1-$2-$3')}</td>\n <th>${i18next.t('field.short branch identification')}</th>\n <td>${this.detail.supplierBranchIdentification}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.short tax invoice business name')}</th>\n <td>${this.detail.supplierBusinessName}</td>\n <th>${i18next.t('field.short representative name')}</th>\n <td>${this.detail.supplierRepresentativeName}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.address')}</th>\n <td colspan=\"3\">${this.detail.supplierAddress}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.business type')}</th>\n <td>${this.detail.supplierBusinessType}</td>\n <th>${i18next.t('field.industry type')}</th>\n <td>${this.detail.supplierIndustryType}</td>\n </tr>\n <tr>\n <th rowspan=\"2\">${i18next.t('field.email')}</th>\n <td rowspan=\"2\" colspan=\"3\">${this.detail.supplierContactEmail}</td>\n </tr>\n <tr></tr>\n </table>\n\n <table class=\"buyer\">\n <colgroup>\n <col width=\"150px\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n </colgroup>\n <tr>\n <th rowspan=\"6\" class=\"target\">${i18next.t('field.tax invoice buyer')}</th>\n <th>${i18next.t('field.short business registration number')}</th>\n <td>${this.detail?.buyerBusinessRegistrationNumber?.replace(/(\\d{3})(\\d{2})(\\d{5})/g, '$1-$2-$3')}</td>\n <th>${i18next.t('field.short branch identification')}</th>\n <td>${this.detail.buyerBranchIdentification}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.short tax invoice business name')}</th>\n <td>${this.detail.buyerBusinessName}</td>\n <th>${i18next.t('field.short representative name')}</th>\n <td>${this.detail.buyerRepresentativeName}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.address')}</th>\n <td colspan=\"3\">${this.detail.buyerAddress}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.business type')}</th>\n <td>${this.detail.buyerBusinessType}</td>\n <th>${i18next.t('field.industry type')}</th>\n <td>${this.detail.buyerIndustryType}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.email')}</th>\n <td colspan=\"3\">${this.detail.buyer1stContactEmail}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.email')}</th>\n <td colspan=\"3\">${this.detail.buyer2ndContactEmail}</td>\n </tr>\n </table>\n </div>\n\n <div class=\"info\">\n <table>\n <colgroup>\n <col width=\"15%\" />\n <col width=\"15%\" />\n <col width=\"15%\" />\n <col width=\"15%\" />\n <col width=\"40%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.issue date')}</th>\n <th>${i18next.t('field.supply amount')}</th>\n <th>${i18next.t('field.tax amount')}</th>\n <th>${i18next.t('field.modification reason')}</th>\n <th>${i18next.t('field.remark0')}</th>\n </tr>\n <tr>\n <td>${this.detail.issueDate?.split('T')[0]}</td>\n <td>${this._numberFormat(this.detail.supplyAmount)}</td>\n <td>${this._numberFormat(this.detail.taxAmount)}</td>\n <td>${this.detail.modificationReason}</td>\n <td>${this.detail.remark0}</td>\n </tr>\n </table>\n </div>\n\n <div class=\"items\">\n <table>\n <colgroup>\n <col width=\"4%\" />\n <col width=\"4%\" />\n <col width=\"15%\" />\n <col width=\"9%\" />\n <col width=\"9%\" />\n <col width=\"13%\" />\n <col width=\"13%\" />\n <col width=\"13%\" />\n <col width=\"20%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.tax invoice month')}</th>\n <th>${i18next.t('field.tax invoice day')}</th>\n <th>${i18next.t('field.tax invoice item name')}</th>\n <th>${i18next.t('field.tax invoice ea')}</th>\n <th>${i18next.t('field.tax invoice quantity')}</th>\n <th>${i18next.t('field.tax invoice price')}</th>\n <th>${i18next.t('field.supply amount')}</th>\n <th>${i18next.t('field.tax amount')}</th>\n <th>${i18next.t('field.remark0')}</th>\n </tr>\n\n ${this.detail.taxInvoiceItems?.map(\n item => html`\n <tr>\n <td>${item.supplyDate.split('-')[1]}</td>\n <td>${item.supplyDate.split('-')[2]?.split('T')[0]}</td>\n <td>${item.itemName}</td>\n <td>${item.specification}</td>\n <td>${item.quantity}</td>\n <td>${this._numberFormat(item.unitPrice)}</td>\n <td>${this._numberFormat(item.supplyPrice)}</td>\n <td>${this._numberFormat(item.taxPrice)}</td>\n <td>${item.remark}</td>\n </tr>\n `\n )}\n </table>\n </div>\n\n <div class=\"summary\">\n <table>\n <colgroup>\n <col width=\"20%\" />\n <col width=\"20%\" />\n <col width=\"20%\" />\n <col width=\"20%\" />\n <col width=\"20%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.total amount')}</th>\n <th>${i18next.t('field.tax invoice payment cash')}</th>\n <th>${i18next.t('field.tax invoice payment check')}</th>\n <th>${i18next.t('field.tax invoice payment promissory note')}</th>\n <th>${i18next.t('field.tax invoice payment accounts receivable')}</th>\n </tr>\n <tr>\n <td>${this._numberFormat(this.detail.totalAmount)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountCash)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountCheck)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountPromissoryNote)}</td>\n <td>${this._numberFormat(this.detail.paymentAmountAccountsReceivable)}</td>\n </tr>\n </table>\n <div>\n ${i18next.t('text.tax invoice description payment', {\n value: i18next.t(`text.tax invoice description purpose ${this.detail.purpose}`)\n })}\n </div>\n </div>\n </div>\n `\n }\n\n private _numberFormat(value: number): string {\n return !value ? '' : new Intl.NumberFormat('en-US').format(value)\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tax-invoice-list-page.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice/tax-invoice-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,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'@operato/data-grist'\n\nimport { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, state, 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'\n\nimport './tax-invoice-detail-popup'\n\nexport enum Category {\n EXPORT = '10',\n IMPORT = '20',\n NTS = '30'\n}\nexport const CATEGORY = {\n [Category.EXPORT]: '매출',\n [Category.IMPORT]: '매입',\n [Category.NTS]: 'NTS'\n}\n\nexport enum InvoiceType {\n 'TAX_INVOICE' = '0101',\n 'SMALL_BUSINESS_TAX_INVOICE' = '0102',\n 'CONSIGNMENT_TAX_INVOICE' = '0103',\n 'IMPORT_TAX_INVOICE' = '0104',\n 'SMALL_BUSINESS_CONSIGNMENT_TAX_INVOICE' = '0105',\n 'REVISED_TAX_INVOICE' = '0201',\n 'REVISED_SMALL_BUSINESS_TAX_INVOICE' = '0202',\n 'REVISED_CONSIGNMENT_TAX_INVOICE' = '0203',\n 'REVISED_IMPORT_TAX_INVOICE' = '0204',\n 'REVISED_SMALL_BUSINESS_CONSIGNMENT_TAX_INVOICE' = '0205',\n 'INVOICE' = '0301',\n 'CONSIGNMENT_INVOICE' = '0303',\n 'IMPORT_INVOICE' = '0304',\n 'REVISED_INVOICE' = '0401',\n 'REVISED_CONSIGNMENT_INVOICE' = '0403',\n 'REVISED_IMPORT_INVOICE' = '0404'\n}\nexport const INVOICE_TYPE = {\n [InvoiceType.TAX_INVOICE]: '일반 전자세금계산서',\n [InvoiceType.SMALL_BUSINESS_TAX_INVOICE]: '영세율 전자세금계산서',\n [InvoiceType.CONSIGNMENT_TAX_INVOICE]: '위수탁 전자세금계산서',\n [InvoiceType.IMPORT_TAX_INVOICE]: '수입 전자세금계산서',\n [InvoiceType.SMALL_BUSINESS_CONSIGNMENT_TAX_INVOICE]: '영세율 위수탁 전자세금계산서',\n [InvoiceType.REVISED_TAX_INVOICE]: '수정 일반 전자세금계산서',\n [InvoiceType.REVISED_SMALL_BUSINESS_TAX_INVOICE]: '수정 영세율 전자세금계산서',\n [InvoiceType.REVISED_CONSIGNMENT_TAX_INVOICE]: '수정 위수탁 전자세금계산서',\n [InvoiceType.REVISED_IMPORT_TAX_INVOICE]: '수정 수입 전자세금계산서',\n [InvoiceType.REVISED_SMALL_BUSINESS_CONSIGNMENT_TAX_INVOICE]: '수정 영세율 위수탁 전자세금계산서',\n [InvoiceType.INVOICE]: '일반 전자계산서',\n [InvoiceType.CONSIGNMENT_INVOICE]: '위수탁 전자계산서',\n [InvoiceType.IMPORT_INVOICE]: '수입 전자계산서',\n [InvoiceType.REVISED_INVOICE]: '수정 일반 전자계산서',\n [InvoiceType.REVISED_CONSIGNMENT_INVOICE]: '수정 위수탁 전자계산서',\n [InvoiceType.REVISED_IMPORT_INVOICE]: '수정 수입 전자계산서'\n}\n\nexport enum Purpose {\n RECEIPT = '01',\n INVOICE = '02'\n}\nexport const PURPOSE = {\n [Purpose.RECEIPT]: '영수',\n [Purpose.INVOICE]: '청구'\n}\n\nexport enum BusinessRegistrationCategory {\n BUSINESS_REGISTRATION_NUMBER = '01', // 사업자등록번호\n RESIDENT_REGISTRATION_NUMBER = '02', // 주민등록번호\n FOREIGNER_REGISTRATION_NUMBER = '03' // 외국인등록번호\n}\nexport const BUSINESS_REGISTRATION_CATEGORY = {\n [BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER]: '사업자등록번호',\n [BusinessRegistrationCategory.RESIDENT_REGISTRATION_NUMBER]: '주민등록번호',\n [BusinessRegistrationCategory.FOREIGNER_REGISTRATION_NUMBER]: '외국인'\n}\n\n@customElement('tax-invoice-list-page')\nexport class TaxInvoiceListPage extends localize(i18next)(ScopedElementsMixin(PageView)) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n div.summary {\n display: grid;\n grid-template-columns: 0.7fr 1fr 0.7fr 1fr 0.7fr 1fr 0.7fr 1fr;\n border: solid #d3dbe5;\n border-width: 2px 0;\n margin: 15px 40px;\n align-content: center;\n\n span.title {\n background-color: #e9edf6;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 35px;\n font-weight: bold;\n }\n span.value {\n padding-left: 10px;\n display: flex;\n align-items: center;\n height: 35px;\n }\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 @property({ type: Object }) gristConfig: any\n @state() summary: { cnt: number; total_amount: number; supply_amount: number; tax_amount: number } | null = null\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n /*\n * Full text search sits in the title bar, the way these applications carry it\n * (ADR-0060 decision 9; user instruction 2026-09-18 - framework screens included).\n * It searches the columns that declare a search filter.\n */\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist?.searchText || ''\n },\n title: i18next.t('title.tax invoice list'),\n help: 'tax-invoice/tax-invoice',\n actions: [\n {\n title: i18next.t('button.memo save'),\n action: this._updateTaxInvoice.bind(this),\n ...CommonButtonStyles.save\n }\n ],\n exportable: {\n name: i18next.t('title.tax invoice list'),\n data: this.exportHandler.bind(this),\n accept: ['xlsx']\n }\n }\n }\n\n render() {\n const mode = 'GRID'\n const summary = this.summary\n\n return html`\n <div class=\"summary\">\n <span class=\"title\">${i18next.t('field.summary total count')}</span>\n <span class=\"value\">${this._numberFormat(summary?.cnt)}</span>\n <span class=\"title\">${i18next.t('field.summary total amount')}</span>\n <span class=\"value\">${this._numberFormat(summary?.total_amount)}</span>\n <span class=\"title\">${i18next.t('field.summary supply amount')}</span>\n <span class=\"value\">${this._numberFormat(summary?.supply_amount)}</span>\n <span class=\"title\">${i18next.t('field.summary tax amount')}</span>\n <span class=\"value\">${this._numberFormat(summary?.tax_amount)}</span>\n </div>\n\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-filters-form without-search autofocus></ox-filters-form>\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'reorder',\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n this.openDetailPopup(record.id)\n }\n }\n },\n {\n type: 'string',\n name: 'memo',\n header: i18next.t('field.memo'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 150\n },\n {\n type: 'string',\n name: 'category',\n header: i18next.t('field.tax invoice category'),\n record: {\n renderer: value => CATEGORY[value],\n classifier: function (record, rowIndex) {\n return {\n emphasized: record.category === Category.EXPORT ? ['#c6daf6', 'black'] : ['#fedbde', 'black']\n }\n },\n align: 'center'\n },\n filter: {\n type: 'select',\n value: Category.EXPORT,\n options: () => [\n {\n display: '전체',\n value: ''\n },\n {\n display: '매출',\n value: Category.EXPORT\n },\n {\n display: '매입',\n value: Category.IMPORT\n }\n ]\n },\n width: 80\n },\n {\n type: 'date',\n name: 'isMatched',\n header: i18next.t('field.is matched'),\n record: {\n align: 'center',\n renderer: value => (value ? 'Y' : '')\n },\n width: 80\n },\n {\n type: 'date',\n name: 'issueDate',\n header: i18next.t('field.issue date'),\n record: {\n align: 'center'\n },\n filter: {\n type: 'date',\n operator: 'between'\n },\n width: 120\n },\n {\n type: 'date',\n name: 'signatureDate',\n header: i18next.t('field.signature date'),\n record: {\n align: 'center'\n },\n width: 120\n },\n {\n type: 'string',\n name: 'supplierBusinessRegistrationNumber',\n header: i18next.t('field.supplier business registration number'),\n record: {\n align: 'center',\n renderer: value => value.replace(/(\\d{3})(\\d{2})(\\d{5})/g, '$1-$2-$3')\n },\n width: 150\n },\n {\n type: 'string',\n name: 'supplierBusinessName',\n header: i18next.t('field.supplier business name'),\n record: {\n align: 'center'\n },\n width: 140\n },\n {\n type: 'string',\n name: 'supplierRepresentativeName',\n header: i18next.t('field.supplier representative name'),\n record: {\n align: 'center'\n },\n width: 120\n },\n {\n type: 'number',\n name: 'totalAmount',\n header: i18next.t('field.total amount'),\n record: {\n renderer: value => value && this._numberFormat(value),\n align: 'center'\n },\n width: 90\n },\n {\n type: 'number',\n name: 'supplyAmount',\n header: i18next.t('field.supply amount'),\n record: {\n renderer: value => value && this._numberFormat(value),\n align: 'center'\n },\n width: 90\n },\n {\n type: 'number',\n name: 'taxAmount',\n header: i18next.t('field.tax amount'),\n record: {\n renderer: value => value && this._numberFormat(value),\n align: 'center'\n },\n width: 90\n },\n {\n type: 'string',\n name: 'approvalNo',\n header: i18next.t('field.approval no'),\n record: {\n align: 'center',\n renderer: value => value.replace(/(\\S{8})(\\S{8})(\\S{8})/g, '$1-$2-$3')\n },\n width: 200\n },\n {\n type: 'string',\n name: 'invoiceType',\n header: i18next.t('field.invoice type'),\n record: {\n renderer: value => INVOICE_TYPE[value],\n align: 'center'\n },\n width: 130\n },\n {\n type: 'string',\n name: 'remark0',\n header: i18next.t('field.remark0'),\n record: {\n align: 'center'\n },\n width: 80\n },\n {\n type: 'string',\n name: 'purpose',\n header: i18next.t('field.purpose'),\n record: {\n renderer: value => PURPOSE[value],\n align: 'center'\n },\n width: 80\n },\n {\n type: 'string',\n name: 'supplierContactEmail',\n header: i18next.t('field.supplier contact email'),\n record: {\n align: 'center'\n },\n width: 140\n },\n {\n type: 'string',\n name: 'buyer1stContactEmail',\n header: i18next.t('field.buyer 1st contact email'),\n record: {\n align: 'center'\n },\n width: 140\n },\n {\n type: 'string',\n name: 'buyer2ndContactEmail',\n header: i18next.t('field.buyer 2nd contact email'),\n record: {\n align: 'center'\n },\n width: 140\n }\n ],\n rows: {\n selectable: {\n multiple: true\n },\n appendable: false\n },\n sorters: [\n {\n name: 'issueDate'\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!], $summaryFilters: [Filter!]) {\n taxInvoices(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n memo\n category\n issueDate\n signatureDate\n supplierBusinessRegistrationNumber\n supplierBusinessName\n supplierRepresentativeName\n totalAmount\n supplyAmount\n taxAmount\n approvalNo\n invoiceType\n remark0\n purpose\n supplierContactEmail\n buyer1stContactEmail\n buyer2ndContactEmail\n isMatched\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n taxInvoicesSummary(filters: $summaryFilters) {\n summary\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings,\n summaryFilters: filters\n }\n })\n\n // 합계 필드 갱신\n this.summary = response.data.taxInvoicesSummary.summary\n\n return {\n total: response.data.taxInvoices.total || 0,\n records: response.data.taxInvoices.items || []\n }\n }\n\n async _updateTaxInvoice() {\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: [TaxInvoicePatch!]!) {\n updateMultipleTaxInvoice(patches: $patches) {\n id\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: i18next.t('text.info_x_successfully', { x: i18next.t('text.save') }) })\n } else {\n notify({ message: i18next.t('error.fail-save'), level: 'error' })\n }\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(['id', 'name'])\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 private openDetailPopup(id: string) {\n openPopup(html` <tax-invoice-detail-popup .taxInvoiceId=${id}> </tax-invoice-detail-popup>`, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.tax invoice detail')\n })\n }\n\n private _numberFormat = (num: number | undefined) => Intl.NumberFormat('en-US').format(num || 0)\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tax-invoice-api-page.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-api/tax-invoice-api-page.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACnI,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MA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,CAAC;oBACrB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;oBAClB,MAAM,CAAC;wBACL,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,0BAA0B,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC;qBAChF,CAAC,CAAA;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;;AA3X2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CAAoE;AAEpE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;gDAAA;AAtBjC,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CA+Y7B","sourcesContent":["import '@operato/data-grist'\n\nimport { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles, WorkSurfacePageStyles } 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 } from '@operato/layout'\nimport { isMobileDevice } from '@operato/utils'\nimport gql from 'graphql-tag'\nimport { OxPrompt } from '@operato/popup'\n\n@customElement('tax-invoice-api-page')\nexport class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(PageView)) {\n static styles = [\n /* The work surface frame for a list screen (ADR-0060 decision 8). */\n WorkSurfacePageStyles,\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host {\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n .header {\n grid-template-areas: 'filters actions';\n }\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 api'),\n help: 'tax-invoice-api/tax-invoice-api',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this._updateTaxInvoiceApi.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deleteTaxAuditResult.bind(this),\n ...CommonButtonStyles.delete\n }\n ]\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist class=\"page-fill\" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\" class=\"header\">\n <!-- <div class=\"filters\">\n <ox-filters-form autofocus without-search></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: 'boolean',\n name: 'isDefault',\n header: i18next.t('field.is_default'),\n record: {\n editable: true,\n align: 'center'\n },\n width: 70\n },\n {\n type: 'string',\n name: 'provider',\n header: i18next.t('field.provider'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'apiKey',\n header: i18next.t('field.api key'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'apiAccountId',\n header: i18next.t('field.api account id'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'password',\n name: 'apiAccountPassword',\n header: i18next.t('field.api account password'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'businessRegistrationNumber',\n header: i18next.t('field.business registration number'),\n record: { editable: true },\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.tax invoice business name'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'representativeName',\n header: i18next.t('field.tax invoice 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.getAttributeSetForEntity()\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 }\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: taxInvoiceApis(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n isDefault\n provider\n apiKey\n apiAccountId\n apiAccountPassword\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 _updateTaxInvoiceApi() {\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: [TaxInvoiceApiPatch!]!) {\n updateMultipleTaxInvoiceApi(patches: $patches) {\n provider\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: i18next.t('text.info_x_successfully', { x: i18next.t('text.save') }) })\n } else {\n notify({ message: i18next.t('error.fail-save'), level: 'error' })\n }\n }\n }\n\n async getAttributeSetForEntity() {\n const response = await client.query({\n query: gql`\n query {\n attributeSet: attributeSetByEntity(entity: \"TaxInvoiceApi\") {\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 _deleteTaxAuditResult() {\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 deleteTaxInvoiceApis(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"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"company-list-popup.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-send/company-list-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAG7C,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QAmBsB,gBAAW,GAAU,EAAE,CAAA;QACtB,YAAO,GAAG;YACpC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9B,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE;gBAC1C,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAC/D;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;oBAC/B,MAAM,EAAE;wBACN,QAAQ,EAAE,KAAK;qBAChB;oBACD,MAAM,EAAE,QAAQ;oBAChB,QAAQ,EAAE,IAAI;oBACd,KAAK,EAAE,GA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EAAE,mBAAmB;iBAC3B;gBACD,UAAU,EAAE,KAAK;aAClB;SACF,CAAA;IAwBH,CAAC;aAjLQ,WAAM,GAAG;QACd,kBAAkB;QAClB,GAAG,CAAA;;;;;;;;;;;KAWF;KACF,AAdY,CAcZ;IA6ID,MAAM;QACJ,OAAO,IAAI,CAAA;;gBAEC,MAAM;kBACJ,IAAI,CAAC,OAAO;gBACd;YACN,OAAO,EAAE,IAAI,CAAC,WAAW;SAC1B;;;;;yBAKgB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;+CACA,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;;;KAGpE,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM;QACV,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACrF,CAAC;;AAhK0B;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;+CAAA;AAEjB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;qDAAwB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDAsI1B;AA1JU,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CAkL5B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { DataGrist } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { CommonHeaderStyles } from '@operato/styles'\n\n@customElement('company-list-popup')\nexport class CompanyListPopup extends LitElement {\n static styles = [\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @query('ox-grist') private grist!: DataGrist\n\n @property({ type: Array }) companyList: any[] = []\n @property({ type: Object }) columns = {\n pagination: { infinite: true },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: false },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: false\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'businessRegistrationNumber',\n header: i18next.t('field.business registration number'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'branchIdentification',\n header: i18next.t('field.branch identification'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'businessName',\n header: i18next.t('field.tax invoice business name'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'representativeName',\n header: i18next.t('field.tax invoice representative name'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'address',\n header: i18next.t('field.address'),\n record: {\n editable: false\n },\n width: 200\n },\n {\n type: 'string',\n name: 'businessType',\n header: i18next.t('field.business type'),\n record: {\n editable: false\n },\n width: 100\n },\n {\n type: 'string',\n name: 'industryType',\n header: i18next.t('field.industry type'),\n record: {\n editable: false\n },\n width: 100\n },\n {\n type: 'string',\n name: 'department',\n header: i18next.t('field.department'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactName',\n header: i18next.t('field.contact name'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactPhone',\n header: i18next.t('field.contact phone'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactEmail',\n header: i18next.t('field.contact email'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactCellPhone',\n header: i18next.t('field.contact cell phone'),\n record: {\n editable: false\n },\n width: 150\n }\n ],\n rows: {\n selectable: {\n multiple: false\n },\n handlers: {\n click: 'select-row-toggle'\n },\n appendable: false\n }\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.companyList\n }}\n ></ox-grist>\n\n <div class=\"footer\">\n <div filler></div>\n <button @click=${this.select.bind(this)} done>\n <md-icon>select_check_box</md-icon>${i18next.t('button.select')}\n </button>\n </div>\n `\n }\n\n async select() {\n this.dispatchEvent(new CustomEvent('selected', { detail: this.grist.selected[0] }))\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tax-invoice-send-page.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-send/tax-invoice-send-page.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,4BAA4B,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AACnH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAA+C,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAChG,OAAO,oBAAoB,CAAA;AAGpB,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,QAAQ,CAAC,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AM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;OAIZ;YACD,SAAS,EAAE;gBACT,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC;aACtD;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACrB,MAAM,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAA;YACvD,IAAI,CAAC,cAAc,CAAC,UAAU,GAAG,EAAE,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAA;YAC9D,IAAI,CAAC,cAAc,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,CAAA;YAC1D,IAAI,CAAC,cAAc,CAAC,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE,CAAA;YACpD,IAAI,CAAC,cAAc,CAAC,eAAe,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAA;YACzE,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAA;QACrC,CAAC;IACH,CAAC;;AApLkC;IAAlC,KAAK,CAAC,kBAAkB,CAAC;8BAA0B,cAAc;0DAAA;AA4BzD;IAAR,KAAK,EAAE;;oDAA0C;AAQzC;IAAR,KAAK,EAAE;;iDAAiC;AAWhC;IAAR,KAAK,EAAE;;sDAAgD;AAY/C;IAAR,KAAK,EAAE;;2DAAwE;AA5DrE,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CAsL9B","sourcesContent":["import '@operato/data-grist'\n\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { CustomAlert, PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, state, query } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport { BusinessRegistrationCategory, Category, InvoiceType, Purpose } from '../tax-invoice/tax-invoice-list-page'\nimport { CompanyListPopup } from './company-list-popup'\nimport { Supplier, Buyer, TaxInvoice, TaxInvoiceItem, TaxInvoiceSend } from './tax-invoice-send'\nimport './tax-invoice-send'\n\n@customElement('tax-invoice-send-page')\nexport class TaxInvoiceSendPage extends localize(i18next)(ScopedElementsMixin(PageView)) {\n @query('tax-invoice-send') private taxInvoiceSend!: TaxInvoiceSend\n\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n }\n `\n ]\n\n static get scopedElements() {\n return {\n 'company-list-popup': CompanyListPopup\n }\n }\n\n // 오늘 날짜 YYYY-MM-DD 형식으로 뽑기\n private today: string = new Intl.DateTimeFormat('fr-CA', { timeZone: 'Asia/Seoul' }).format(new Date())\n\n private defaultSupplier = {\n supplierBusinessRegistrationCategory: '01',\n supplierBusinessRegistrationNumber: '',\n supplierBranchIdentification: '',\n supplierBusinessName: '',\n supplierRepresentativeName: ''\n }\n @state() supplier: Supplier = this.defaultSupplier\n\n private defaultBuyer = {\n buyerBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,\n buyerBusinessRegistrationNumber: '',\n buyerBusinessName: '',\n buyerRepresentativeName: ''\n }\n @state() buyer: Buyer = this.defaultBuyer\n\n private defaultTaxInvoice = {\n invoiceType: InvoiceType.TAX_INVOICE,\n category: Category.EXPORT,\n issueDate: this.today,\n purpose: Purpose.INVOICE,\n supplyAmount: 0,\n taxAmount: 0,\n totalAmount: 0\n }\n @state() taxInvoice: TaxInvoice = this.defaultTaxInvoice\n\n private defaultTaxInvoiceItem = {\n sequence: new Date().getTime(), // 구분용 임시 값 (중복되면 안되니 생성 마다 넣어주기)\n supplyDate: '',\n itemName: '',\n specification: '',\n quantity: 0,\n unitPrice: 0,\n supplyPrice: 0,\n taxPrice: 0\n }\n @state() taxInvoiceItems: TaxInvoiceItem[] = [{ ...this.defaultTaxInvoiceItem }]\n\n get context() {\n return {\n title: i18next.t('title.tax invoice send'),\n help: 'tax-invoice-send/tax-invoice-send',\n actions: [\n {\n title: i18next.t('button.tax invoice send'),\n action: this._sendTaxInvoice.bind(this),\n ...CommonButtonStyles.add\n }\n ]\n }\n }\n\n render() {\n return html` <tax-invoice-send .editMode=${true}></tax-invoice-send> `\n }\n\n async _sendTaxInvoice() {\n // 아이템 시퀀스 재 할당 + 날짜, 품목, 규격, 수량이 없으면 필터\n let taxInvoiceItems = this.taxInvoiceSend.taxInvoiceItems.map((item, idx) => ({\n ...item,\n sequence: idx + 1,\n quantity: Number(item.quantity),\n unitPrice: Number(item.unitPrice)\n }))\n taxInvoiceItems = taxInvoiceItems.filter(\n item => item.supplyDate && item.itemName && item.quantity && item.unitPrice\n )\n\n // taxInvoice 데이터 생성 및 타입 변환\n let taxInvoice = {\n ...this.taxInvoiceSend.taxInvoice,\n ...this.taxInvoiceSend.supplier,\n ...this.taxInvoiceSend.buyer\n }\n taxInvoice.paymentAmountCash = Number(taxInvoice.paymentAmountCash || 0)\n taxInvoice.paymentAmountCheck = Number(taxInvoice.paymentAmountCheck || 0)\n taxInvoice.paymentAmountPromissoryNote = Number(taxInvoice.paymentAmountPromissoryNote || 0)\n taxInvoice.paymentAmountAccountsReceivable = Number(taxInvoice.paymentAmountAccountsReceivable || 0)\n taxInvoice.supplyAmount = Number(taxInvoice.supplyAmount || 0)\n taxInvoice.taxAmount = Number(taxInvoice.taxAmount || 0)\n taxInvoice.buyerBusinessRegistrationNumber = taxInvoice.buyerBusinessRegistrationNumber.replace(/-/gi, '')\n taxInvoice.supplierBusinessRegistrationNumber = taxInvoice.supplierBusinessRegistrationNumber.replace(/-/gi, '')\n\n console.log('this.buyer :', this.taxInvoiceSend.buyer)\n\n // 공급받는자 필수 값 체크\n if (\n !this.taxInvoiceSend.buyer.buyerBusinessRegistrationNumber ||\n !this.taxInvoiceSend.buyer.buyerBusinessName ||\n !this.taxInvoiceSend.buyer.buyerRepresentativeName\n ) {\n await CustomAlert({\n type: 'warning',\n title: '공급받는자 필수 값을 모두 입력해 주세요.',\n text: '공급받는자 필수 값을 모두 입력해 주세요.',\n confirmButton: { text: i18next.t('button.confirm') }\n })\n return\n }\n\n // 아이템 개수 체크\n if (taxInvoiceItems.length === 0) {\n await CustomAlert({\n type: 'warning',\n title: '등록 가능한 아이템의 개수는 1개 이상이여야 합니다.',\n text: '등록 가능한 아이템의 개수는 1개 이상이여야 합니다.',\n confirmButton: { text: i18next.t('button.confirm') }\n })\n return\n }\n\n // 세금이 없는 타입인데 세금이 있는지 체크\n if (taxInvoice.invoiceType === InvoiceType.SMALL_BUSINESS_TAX_INVOICE && taxInvoice.taxAmount > 0) {\n await CustomAlert({\n type: 'warning',\n title: '세금이 0원이 아닙니다.',\n text: '세금이 0원이 아닙니다.',\n confirmButton: { text: i18next.t('button.confirm') }\n })\n return\n }\n\n // 현금, 수표, 어음, 외상미수금의 합계 = 총 합계금액 체크\n const paymentAmount: number =\n taxInvoice.paymentAmountCash +\n taxInvoice.paymentAmountCheck +\n taxInvoice.paymentAmountPromissoryNote +\n taxInvoice.paymentAmountAccountsReceivable\n if (paymentAmount > 0 && paymentAmount !== taxInvoice.totalAmount) {\n await CustomAlert({\n type: 'warning',\n title: '현금, 수표, 어음, 외상미수금의 합계는 총 합계금액과 동일해야 합니다.',\n text: '현금, 수표, 어음, 외상미수금의 합계는 총 합계금액과 동일해야 합니다.',\n confirmButton: { text: i18next.t('button.confirm') }\n })\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation SendTaxInvoicesByApi($taxInvoiceSendList: [TaxInvoiceSend!]!) {\n response: sendTaxInvoicesByApi(taxInvoiceSendList: $taxInvoiceSendList)\n }\n `,\n variables: {\n taxInvoiceSendList: [{ taxInvoice, taxInvoiceItems }]\n }\n })\n\n if (!response.errors) {\n notify({ message: i18next.t('text.success tax send') })\n this.taxInvoiceSend.taxInvoice = { ...this.defaultTaxInvoice }\n this.taxInvoiceSend.supplier = { ...this.defaultSupplier }\n this.taxInvoiceSend.buyer = { ...this.defaultBuyer }\n this.taxInvoiceSend.taxInvoiceItems = [{ ...this.defaultTaxInvoiceItem }]\n this.taxInvoiceSend.requestUpdate()\n }\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tax-invoice-send.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-send/tax-invoice-send.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EACL,8BAA8B,EAC9B,4BAA4B,EAC5B,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,OAAO,EACP,OAAO,EACR,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,WAAW,EAAE;QACX,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,IAAI;QAC/B,CAAC,WAAW,CAAC,0BAA0B,CAAC,EAAE,KAAK;QAC/C,CAAC,WAAW,CAAC,uBAAuB,CAAC,EAAE,KAAK;QAC5C,CAAC,WAAW,CAAC,sCAAsC,CAAC,EAAE,QAAQ;KA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E,MAAM,EAAE,CAAC;;6CAAiC;AAChC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDAAgD;AAChD;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;uDAAwE;AAxUvF,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAioC1B","sourcesContent":["import '@operato/input/ox-input-date.js'\nimport '@operato/data-grist'\n\nimport { css, html, LitElement } from 'lit'\nimport { CustomAlert } from '@operato/shell'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { property, customElement } from 'lit/decorators.js'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport gql from 'graphql-tag'\nimport {\n BUSINESS_REGISTRATION_CATEGORY,\n BusinessRegistrationCategory,\n Category,\n INVOICE_TYPE,\n InvoiceType,\n PURPOSE,\n Purpose\n} from '../tax-invoice/tax-invoice-list-page'\nimport { openPopup } from '@operato/layout'\n\nexport const SHORT_INVOICE_TYPE = {\n TAX_INVOICE: {\n [InvoiceType.TAX_INVOICE]: '일반',\n [InvoiceType.SMALL_BUSINESS_TAX_INVOICE]: '영세율',\n [InvoiceType.CONSIGNMENT_TAX_INVOICE]: '위수탁',\n [InvoiceType.SMALL_BUSINESS_CONSIGNMENT_TAX_INVOICE]: '위수탁영세율'\n },\n INVOICE: {\n [InvoiceType.INVOICE]: '일반',\n [InvoiceType.CONSIGNMENT_INVOICE]: '위수탁'\n // [InvoiceType.IMPORT_INVOICE]: INVOICE_TYPE[IMPORT_INVOICE],\n }\n}\n\nexport const SHORT_BUSINESS_REGISTRATION_CATEGORY = {\n [BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER]: '사업자',\n [BusinessRegistrationCategory.RESIDENT_REGISTRATION_NUMBER]: '개인',\n [BusinessRegistrationCategory.FOREIGNER_REGISTRATION_NUMBER]: '외국인'\n}\n\nexport interface Supplier {\n supplierBusinessRegistrationCategory: string\n supplierBusinessRegistrationNumber: string\n supplierBranchIdentification?: string\n supplierBusinessName: string\n supplierRepresentativeName: string\n supplierAddress?: string\n supplierBusinessType?: string\n supplierIndustryType?: string\n supplierDepartment?: string\n supplierContactName?: string\n supplierContactPhone?: string\n supplierContactEmail?: string\n supplierContactCellPhone?: string\n}\nexport interface Buyer {\n buyerBusinessRegistrationCategory: BusinessRegistrationCategory\n buyerBusinessRegistrationNumber: string\n buyerBranchIdentification?: string\n buyerBusinessName: string\n buyerRepresentativeName: string\n buyerAddress?: string\n buyerBusinessType?: string\n buyerIndustryType?: string\n buyer1stDepartment?: string\n buyer1stContactName?: string\n buyer1stContactPhone?: string\n buyer1stContactEmail?: string\n buyer1stContactCellPhone?: string\n buyer2ndDepartment?: string\n buyer2ndContactName?: string\n buyer2ndContactPhone?: string\n buyer2ndContactEmail?: string\n buyer2ndContactCellPhone?: string\n}\nexport interface TaxInvoice {\n category: Category\n issueNo?: string\n approvalNo?: string\n originalApprovalNo?: string\n issueDate: string\n signatureDate?: string\n invoiceType: InvoiceType\n purpose: Purpose\n remark0?: string\n remark1?: string\n remark2?: string\n paymentAmountCash?: number\n paymentAmountCheck?: number\n paymentAmountPromissoryNote?: number\n paymentAmountAccountsReceivable?: number\n supplyAmount: number\n taxAmount: number\n totalAmount: number\n // revisedReason?: RevisedReason\n}\nexport interface TaxInvoiceItem {\n sequence: number\n supplyDate: string\n itemName: string\n specification: string\n quantity: number\n unitPrice: number\n supplyPrice: number\n taxPrice: number\n remark?: string\n}\n\n@customElement('tax-invoice-send')\nexport class TaxInvoiceSend extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n\n width: 100%;\n min-width: 850px;\n padding: 0 40px 40px 40px;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n .flex-row {\n display: flex;\n flex-direction: row;\n }\n .flex-column {\n display: flex;\n flex-direction: column;\n }\n\n input[type='text'],\n ox-input-date,\n input[type='number'] {\n width: 85%;\n max-width: calc(100% - 12px);\n height: 14px;\n margin: 0;\n padding: 4px 5px 5px;\n line-height: 14px;\n border: 1px solid #bbb;\n background: #fff;\n letter-spacing: 0.5px;\n }\n ox-input-date {\n width: auto;\n }\n input[readonly],\n input:disabled {\n background-color: #eee;\n }\n input[type='radio'] {\n cursor: pointer;\n }\n input[type='radio']:disabled {\n cursor: default;\n }\n input[type='radio'] + label,\n label + input[type='radio'] {\n cursor: pointer;\n }\n\n div.invoice-type {\n font-size: 18px;\n margin-top: 15px;\n }\n\n table {\n border: solid;\n border-width: 2px 0;\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n .title table {\n border-color: #d3dbe5;\n width: 100%;\n height: 33px;\n margin-top: 10px;\n font-size: 12px;\n\n th {\n font-size: 13px;\n background-color: #e9edf6;\n min-width: 140px;\n }\n td {\n width: 50%;\n padding-left: 10px;\n\n & > * {\n vertical-align: middle;\n }\n & > input {\n margin: 0 5px 0 1px;\n }\n & .radio-wrapper {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n margin-right: 6px;\n cursor: pointer;\n\n input[type='radio'] {\n margin: 0;\n }\n }\n }\n }\n\n div.body {\n margin-top: 15px;\n font-size: 14px;\n\n div.data {\n display: flex;\n margin-top: 5px;\n\n table {\n flex: 1;\n\n td,\n th {\n padding: 5px;\n min-width: 60px;\n }\n td {\n padding-left: 8px;\n }\n th.target {\n width: 25px;\n writing-mode: vertical-rl;\n min-width: unset;\n }\n\n &.supplier {\n border-color: #f64843;\n\n td,\n th {\n background-color: #fef5f7;\n border: solid 1.5px #f5b1b1;\n }\n th.target {\n background-color: #fedbde;\n }\n }\n &.buyer {\n border-color: #007ed9;\n\n td,\n th {\n background-color: #f7f7ff;\n border: solid 1.5px #a7bcff;\n }\n th.target {\n background-color: #c6daf6;\n }\n }\n }\n }\n\n div.header {\n display: flex;\n\n span {\n flex: 1;\n }\n }\n\n div.info {\n margin-top: 15px;\n border: solid;\n border-color: #000;\n border-width: 2px 0px 0px 0px;\n\n div.flex-row div {\n border: solid #c4d2ff;\n border-width: 0px 1.5px 1.5px 1.5px;\n margin-right: -1px;\n padding: 5px;\n text-align: center;\n\n &.title {\n background-color: #e9edf5;\n font-weight: bold;\n flex: 1;\n }\n &.value {\n flex: 3;\n text-align: left;\n\n .desc {\n font-size: 11px;\n color: #c90000;\n }\n }\n }\n }\n\n div.items,\n div.summary {\n margin-top: 20px;\n\n table {\n width: 100%;\n border-color: #000;\n border-width: 2px 0px 0px 0px;\n\n th {\n background-color: #e9edf5;\n }\n th,\n td {\n border: solid 1.5px #c4d2ff;\n padding: 5px;\n text-align: center;\n }\n }\n }\n\n div.summary {\n display: flex;\n\n & > table {\n flex: 6.7;\n }\n & > div {\n flex: 3.2;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1.5px solid #c4d2ff;\n border-top: 2px solid #000;\n }\n\n span.type-wrapper {\n margin: 0 10px;\n cursor: pointer;\n\n & > div {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n\n input[type='radio' i] {\n margin: 0px;\n }\n }\n }\n }\n\n div.items {\n div.desc {\n font-weight: 400;\n font-size: 12px;\n margin-bottom: 5px;\n }\n div.desc-date {\n color: #005d98;\n }\n button {\n font-size: 13px;\n height: 25px;\n cursor: pointer;\n text-align: center;\n font-weight: 600;\n border-radius: 2px;\n border-color: #ccc;\n }\n .btn-add {\n color: #333;\n background-color: #f9f9f9;\n }\n .btn-delete {\n color: #fff;\n background-color: #5c636e;\n border: none;\n }\n }\n\n *[required]::before {\n content: '*';\n color: red;\n margin-right: 2px;\n }\n }\n `\n ]\n\n // 오늘 날짜 YYYY-MM-DD 형식으로 뽑기\n private today: string = new Intl.DateTimeFormat('fr-CA', { timeZone: 'Asia/Seoul' }).format(new Date())\n private isTaxFree = false\n private defaultSupplier = {\n supplierBusinessRegistrationCategory: '01',\n supplierBusinessRegistrationNumber: '',\n supplierBranchIdentification: '',\n supplierBusinessName: '',\n supplierRepresentativeName: ''\n }\n private defaultBuyer = {\n buyerBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,\n buyerBusinessRegistrationNumber: '',\n buyerBusinessName: '',\n buyerRepresentativeName: ''\n }\n private defaultTaxInvoice = {\n invoiceType: InvoiceType.TAX_INVOICE,\n category: Category.EXPORT,\n issueDate: this.today,\n purpose: Purpose.INVOICE,\n supplyAmount: 0,\n taxAmount: 0,\n totalAmount: 0\n }\n private defaultTaxInvoiceItem = {\n sequence: new Date().getTime(), // 구분용 임시 값 (중복되면 안되니 생성 마다 넣어주기)\n supplyDate: '',\n itemName: '',\n specification: '',\n quantity: 0,\n unitPrice: 0,\n supplyPrice: 0,\n taxPrice: 0\n }\n\n @property({ type: Boolean }) editMode: boolean = true\n @property({ type: Object }) supplier: Supplier = this.defaultSupplier\n @property({ type: Object }) buyer: Buyer = this.defaultBuyer\n @property({ type: Object }) taxInvoice: TaxInvoice = this.defaultTaxInvoice\n @property({ type: Array }) taxInvoiceItems: TaxInvoiceItem[] = [{ ...this.defaultTaxInvoiceItem }]\n\n render() {\n let invoiceTypeKey = this.taxInvoice?.invoiceType || InvoiceType.TAX_INVOICE\n // 일반 전자계산서는 일반 전자세금계산서 타입으로 변환\n invoiceTypeKey = invoiceTypeKey === InvoiceType.INVOICE ? InvoiceType.TAX_INVOICE : invoiceTypeKey\n\n const invoiceTypeLabel = INVOICE_TYPE[invoiceTypeKey] || ''\n const buyerRegCategoryKey =\n this.buyer?.buyerBusinessRegistrationCategory || BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER\n const buyerRegCategoryLabel = SHORT_BUSINESS_REGISTRATION_CATEGORY[buyerRegCategoryKey] || ''\n const readOnly = !this.editMode\n\n return html`\n <div class=\"invoice-type\">* ${invoiceTypeLabel} (${buyerRegCategoryLabel})</div>\n\n <div class=\"title\">\n <table>\n <tr>\n <th>${i18next.t('field.short invoice type')}</th>\n <td>\n ${Object.keys(SHORT_INVOICE_TYPE['TAX_INVOICE']).map(key => {\n const disabled: boolean =\n key !== InvoiceType.TAX_INVOICE && key !== InvoiceType.SMALL_BUSINESS_TAX_INVOICE\n const checked: boolean = key === invoiceTypeKey\n return html`\n <span class=\"radio-wrapper\">\n <label for=\"${'tax_' + key}\">${SHORT_INVOICE_TYPE['TAX_INVOICE'][key]}</label>\n <input\n type=\"radio\"\n id=\"${'tax_' + key}\"\n .value=\"${key}\"\n name=\"invoiceType\"\n ?checked=${checked}\n ?disabled=${disabled || readOnly}\n @change=${this._onInputTaxInvoice}\n />\n </span>\n `\n })}\n </td>\n <th>${i18next.t('field.tax invoice buyer registration category')}</th>\n <td>\n ${Object.keys(BUSINESS_REGISTRATION_CATEGORY).map(key => {\n const disabled: boolean = key !== BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER\n const checked: boolean = key === BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER\n return html`\n <label for=\"${'tax_' + key}\">${BUSINESS_REGISTRATION_CATEGORY[key]}</label>\n <input\n type=\"radio\"\n id=\"${'tax_' + key}\"\n value=\"${key}\"\n name=\"buyerBusinessRegistrationCategory\"\n ?checked=${checked}\n ?disabled=${disabled || readOnly}\n />\n `\n })}\n </td>\n </tr>\n </table>\n </div>\n\n <div class=\"body\">\n <div class=\"header\">\n <span><button @click=${this._openSupplierPopup} ?disabled=${readOnly}>공급처 선택</button></span>\n <span><button @click=${this._openBuyerPopup} ?disabled=${readOnly}>공급받는자 선택</button></span>\n </div>\n\n <div class=\"data\">\n <table class=\"supplier\">\n <colgroup>\n <col width=\"150px\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n </colgroup>\n <tr>\n <th rowspan=\"6\" class=\"target\">${i18next.t('field.tax invoice supplier')}</th>\n <th required>${i18next.t('field.short business registration number')}</th>\n <td>\n ${this.supplier?.supplierBusinessRegistrationNumber?.replace(/(\\S{3})(\\S{2})(\\S{5})/g, '$1-$2-$3')}\n </td>\n <th>${i18next.t('field.short branch identification')}</th>\n <td>${this.supplier?.supplierBranchIdentification}</td>\n </tr>\n <tr>\n <th required>${i18next.t('field.short tax invoice business name')}</th>\n <td>\n <input\n type=\"text\"\n name=\"supplierBusinessName\"\n .value=${this.supplier?.supplierBusinessName || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n <th required>${i18next.t('field.tax invoice representative name')}</th>\n <td>\n <input\n type=\"text\"\n name=\"supplierRepresentativeName\"\n .value=${this.supplier?.supplierRepresentativeName || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n </tr>\n <tr>\n <th>${i18next.t('field.address')}</th>\n <td colspan=\"3\">${this.supplier?.supplierAddress}</td>\n </tr>\n <tr>\n <th>${i18next.t('field.business type')}</th>\n <td>\n <input\n type=\"text\"\n name=\"supplierBusinessType\"\n .value=${this.supplier?.supplierBusinessType || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n <th>${i18next.t('field.industry type')}</th>\n <td>\n <input\n type=\"text\"\n name=\"supplierIndustryType\"\n .value=${this.supplier?.supplierIndustryType || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n </tr>\n <tr>\n <th rowspan=\"2\">${i18next.t('field.email')}</th>\n <td rowspan=\"2\" colspan=\"3\">\n <input\n type=\"text\"\n name=\"supplierContactEmail\"\n .value=${this.supplier?.supplierContactEmail || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n </tr>\n <tr></tr>\n </table>\n\n <table class=\"buyer\">\n <colgroup>\n <col width=\"150px\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n <col width=\"18%\" />\n <col width=\"32%\" />\n </colgroup>\n <tr>\n <th rowspan=\"6\" class=\"target\">${i18next.t('field.tax invoice buyer')}</th>\n <th required>${i18next.t('field.short business registration number')}</th>\n <td>\n <input\n type=\"text\"\n maxlength=\"10\"\n name=\"buyerBusinessRegistrationNumber\"\n .value=${this.buyer?.buyerBusinessRegistrationNumber || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n <th>${i18next.t('field.short branch identification')}</th>\n <td>\n <input\n type=\"text\"\n name=\"buyerBranchIdentification\"\n .value=${this.buyer?.buyerBranchIdentification || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n </tr>\n <tr>\n <th required>${i18next.t('field.short tax invoice business name')}</th>\n <td>\n <input\n type=\"text\"\n name=\"buyerBusinessName\"\n .value=${this.buyer?.buyerBusinessName || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n <th required>${i18next.t('field.tax invoice representative name')}</th>\n <td>\n <input\n type=\"text\"\n name=\"buyerRepresentativeName\"\n .value=${this.buyer?.buyerRepresentativeName || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n </tr>\n <tr>\n <th>${i18next.t('field.address')}</th>\n <td colspan=\"3\">\n <input\n type=\"text\"\n name=\"buyerAddress\"\n .value=${this.buyer?.buyerAddress || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n </tr>\n <tr>\n <th>${i18next.t('field.business type')}</th>\n <td>\n <input\n type=\"text\"\n name=\"buyerBusinessType\"\n .value=${this.buyer?.buyerBusinessType || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n\n <th>${i18next.t('field.industry type')}</th>\n <td>\n <input\n type=\"text\"\n name=\"buyerIndustryType\"\n .value=${this.buyer?.buyerIndustryType || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n </tr>\n <tr>\n <th>${i18next.t('field.email')}</th>\n <td colspan=\"3\">\n <input\n type=\"text\"\n name=\"buyer1stContactEmail\"\n .value=${this.buyer?.buyer1stContactEmail || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n </tr>\n <tr>\n <th>${i18next.t('field.email')}</th>\n <td colspan=\"3\">\n <input\n type=\"text\"\n name=\"buyer2ndContactEmail\"\n .value=${this.buyer?.buyer2ndContactEmail || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n </tr>\n </table>\n </div>\n\n <div class=\"info flex-column\">\n <div class=\"flex-row\">\n <div class=\"title\" required>${i18next.t('field.issue date')}</div>\n <div class=\"value\">\n <ox-input-date\n type=\"date\"\n name=\"issueDate\"\n .value=${this.taxInvoice.issueDate}\n @change=${this._onInputTaxInvoice}\n ></ox-input-date>\n <span class=\"desc\">※ 작성일자는 공급 연월일을 의미함</span>\n </div>\n <div class=\"title\">${i18next.t('field.remark0')}</div>\n <div class=\"value\">\n <input\n type=\"text\"\n name=\"remark0\"\n .value=${this.taxInvoice?.remark0 || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </div>\n </div>\n <div class=\"flex-row\">\n <div class=\"title\">${i18next.t('field.total amount')}</div>\n <div class=\"value\">${this._numberFormat(this.taxInvoice?.totalAmount)}</div>\n <div class=\"title\">${i18next.t('field.supply amount')}</div>\n <div class=\"value\">${this._numberFormat(this.taxInvoice?.supplyAmount)}</div>\n <div class=\"title\">${i18next.t('field.tax amount')}</div>\n <div class=\"value\">${this._numberFormat(this.taxInvoice?.taxAmount)}</div>\n </div>\n </div>\n\n <div class=\"items\">\n <div class=\"desc desc-date\">\n ※ 아래 '품목'의 '월'은 상단 '작성일자'의 '월'이 자동 반영됩니다. 합계의 '계산' 버튼은 금액을 공급가액과\n 세액으로 계산할 수 있습니다.\n </div>\n <div class=\"desc\">\n <button class=\"btn-add\" @click=${this._onAddInvoiceItem} ?disabled=${readOnly}>품목추가</button> 품목은 최대\n 16개까지 추가, 삭제 가능\n </div>\n\n <table>\n <colgroup>\n <col width=\"5%\" />\n <col width=\"5%\" />\n <col width=\"14%\" />\n <col width=\"7%\" />\n <col width=\"7%\" />\n <col width=\"12%\" />\n <col width=\"12%\" />\n <col width=\"12%\" />\n <col width=\"16%\" />\n <col width=\"8%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.tax invoice month')}</th>\n <th required>${i18next.t('field.tax invoice day')}</th>\n <th required>${i18next.t('field.tax invoice item name')}</th>\n <th>${i18next.t('field.tax invoice ea')}</th>\n <th required>${i18next.t('field.tax invoice quantity')}</th>\n <th required>${i18next.t('field.tax invoice price')}</th>\n <th>${i18next.t('field.supply amount')}</th>\n <th>${i18next.t('field.tax amount')}</th>\n <th>${i18next.t('field.remark0')}</th>\n <th>${i18next.t('field.delete')}</th>\n </tr>\n\n ${this.taxInvoiceItems.map(\n (item, idx) => html`\n <tr>\n <input type=\"hidden\" name=\"sequence\" value=${item.sequence} />\n <td>${this.taxInvoice.issueDate.split('-')[1]}</td>\n <td>\n <input\n type=\"text\"\n numeric\n maxlength=\"2\"\n name=\"supplyDate\"\n .value=${item.supplyDate?.split('-')?.[2] || ''}\n @input=${e => this._onInputItem(e, idx)}\n />\n </td>\n <td>\n <input\n type=\"text\"\n name=\"itemName\"\n .value=${item.itemName}\n @input=${e => this._onInputItem(e, idx)}\n ?disabled=${readOnly}\n />\n </td>\n <td>\n <input\n type=\"text\"\n name=\"specification\"\n .value=${item.specification}\n @input=${e => this._onInputItem(e, idx)}\n ?disabled=${readOnly}\n />\n </td>\n <td>\n <input\n type=\"text\"\n numeric\n name=\"quantity\"\n .value=${this._numberFormat(item.quantity)}\n @input=${e => this._onInputItem(e, idx)}\n ?disabled=${readOnly}\n />\n </td>\n <td>\n <input\n type=\"text\"\n numeric\n name=\"unitPrice\"\n .value=${this._numberFormat(item.unitPrice)}\n @input=${e => this._onInputItem(e, idx)}\n ?disabled=${readOnly}\n />\n </td>\n <td>\n <input\n type=\"text\"\n numeric\n name=\"supplyPrice\"\n .value=${this._numberFormat(item.supplyPrice)}\n @input=${e => this._onInputItem(e, idx)}\n ?disabled=${readOnly}\n />\n </td>\n <td>\n <input\n type=\"text\"\n numeric\n name=\"taxPrice\"\n .value=${this._numberFormat(item.taxPrice)}\n @input=${e => this._onInputItem(e, idx)}\n ?disabled=${this.isTaxFree || readOnly}\n />\n </td>\n <td>\n <input\n type=\"text\"\n name=\"remark\"\n .value=${item.remark || ''}\n @input=${e => this._onInputItem(e, idx)}\n ?disabled=${readOnly}\n />\n </td>\n <td>\n <button\n class=\"btn-delete\"\n @click=${e => this._onRemoveInvoiceItem(e, item.sequence)}\n ?disabled=${readOnly}\n >\n 삭제\n </button>\n </td>\n </tr>\n `\n )}\n </table>\n </div>\n\n <div class=\"summary\">\n <table>\n <colgroup>\n <col width=\"25%\" />\n <col width=\"25%\" />\n <col width=\"25%\" />\n <col width=\"25%\" />\n </colgroup>\n <tr>\n <th>${i18next.t('field.tax invoice payment cash')}</th>\n <th>${i18next.t('field.tax invoice payment check')}</th>\n <th>${i18next.t('field.tax invoice payment promissory note')}</th>\n <th>${i18next.t('field.tax invoice payment accounts receivable')}</th>\n </tr>\n <tr>\n <td>\n <input\n type=\"text\"\n numeric\n name=\"paymentAmountCash\"\n .value=${this.taxInvoice?.paymentAmountCash || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n <td>\n <input\n type=\"text\"\n numeric\n name=\"paymentAmountCheck\"\n .value=${this.taxInvoice?.paymentAmountCheck || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n <td>\n <input\n type=\"text\"\n numeric\n name=\"paymentAmountPromissoryNote\"\n .value=${this.taxInvoice?.paymentAmountPromissoryNote || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n <td>\n <input\n type=\"text\"\n numeric\n name=\"paymentAmountAccountsReceivable\"\n .value=${this.taxInvoice?.paymentAmountAccountsReceivable || ''}\n @input=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n </td>\n </tr>\n </table>\n <div>\n ${i18next.t('text.prev tax invoice description payment') + ' ('}\n <span class=\"type-wrapper\">\n <div>\n <input\n type=\"radio\"\n id=\"purpose_20\"\n name=\"purpose\"\n .value=${Purpose.INVOICE}\n @change=${this._onInputTaxInvoice}\n checked\n ?disabled=${readOnly}\n />\n <label for=\"purpose_20\">${PURPOSE[Purpose.INVOICE]}</label>\n </div>\n <div>\n <input\n type=\"radio\"\n id=\"purpose_10\"\n name=\"purpose\"\n .value=${Purpose.RECEIPT}\n @change=${this._onInputTaxInvoice}\n ?disabled=${readOnly}\n />\n <label for=\"purpose_10\">${PURPOSE[Purpose.RECEIPT]}</label>\n </div>\n </span>\n ${') ' + i18next.t('text.next tax invoice description payment')}\n </div>\n </div>\n </div>\n `\n }\n\n async firstUpdated() {\n this._fetchSupplier()\n }\n\n async _fetchSupplier() {\n const response = await client.query({\n query: gql`\n query taxInvoiceDefaultCompany {\n response: taxInvoiceDefaultCompany {\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 }\n }\n `\n })\n\n const supplier = response.data.response\n this.supplier = {\n supplierBusinessRegistrationCategory: supplier.businessRegistrationCategory,\n supplierBusinessRegistrationNumber: supplier.businessRegistrationNumber,\n supplierBranchIdentification: supplier.branchIdentification,\n supplierBusinessName: supplier.businessName,\n supplierRepresentativeName: supplier.representativeName,\n supplierAddress: supplier.address,\n supplierBusinessType: supplier.businessType,\n supplierIndustryType: supplier.industryType,\n supplierDepartment: supplier.department,\n supplierContactName: supplier.contactName,\n supplierContactPhone: supplier.contactPhone,\n supplierContactEmail: supplier.contactEmail,\n supplierContactCellPhone: supplier.contactCellPhone\n }\n }\n\n private _numberFormat(value: number): string {\n return !value ? '' : new Intl.NumberFormat('en-US').format(value) || ''\n }\n\n // Input 요소의 값이 변경될 때 호출되는 콜백 함수\n private async _onInputTaxInvoice(event: InputEvent) {\n const target = event.target as HTMLInputElement\n\n // 숫자 타입은 다른 문자 입력 제거\n if (target.hasAttribute('numeric')) {\n target.value = target.value.replace(/\\D/g, '')\n }\n\n if (target.name.startsWith('supplier')) {\n this.supplier[target.name] = target.value\n } else if (target.name.startsWith('buyer')) {\n this.buyer[target.name] = target.value\n } else {\n // 날짜 체크가 오늘 날짜를 넘어가면 값 변경 되면 안됨\n if (target.name === 'issueDate' && target.value > this.today) {\n target.value = this.taxInvoice['issueDate']\n\n await CustomAlert({\n type: 'warning',\n title: '작성일자는 현재일까지 입력하시기 바랍니다.',\n text: '작성일자는 현재일까지 입력하시기 바랍니다.',\n confirmButton: { text: i18next.t('button.confirm') }\n })\n return\n }\n\n // 세금이 없는 영세율이 선택 시 모든 아이템의 세금 0원으로 초기화\n if (target.name === 'invoiceType' && target.value === InvoiceType.SMALL_BUSINESS_TAX_INVOICE) {\n this.isTaxFree = true\n this.taxInvoice = { ...this.taxInvoice, taxAmount: 0 }\n this.taxInvoiceItems = this.taxInvoiceItems.map(item => ({ ...item, taxPrice: 0 }))\n }\n\n // 변경시에는 아이템 변경도 리 렌더가 필요해서 데이터 갱신\n this.taxInvoice[target.name] = target.value\n this.taxInvoice = { ...this.taxInvoice }\n }\n }\n\n // Input 요소의 값이 변경될 때 호출되는 콜백 함수\n private async _onInputItem(e: InputEvent, idx: number) {\n const target = e.target as HTMLInputElement\n let inputVal: any = target.value\n\n // 숫자 타입은 다른 문자 입력 제거\n if (target.hasAttribute('numeric')) {\n inputVal = Number(inputVal.replace(/\\D/g, ''))\n target.value = inputVal\n }\n\n // 공급일자 케이스 시 => 세금계산서의 작성일자의 YYYY-MM + 아이템의 입력된 DD\n if (target.name === 'supplyDate') {\n const itemDate = this.taxInvoice.issueDate.substring(0, 8) + inputVal.toString().padStart(2, '0')\n if (itemDate > this.taxInvoice.issueDate) {\n await CustomAlert({\n type: 'warning',\n title: '품목의 일자는 작성일자보다 클 수 없습니다.',\n text: '품목의 일자는 작성일자보다 클 수 없습니다.',\n confirmButton: { text: i18next.t('button.confirm') }\n })\n\n target.value = ''\n }\n inputVal = itemDate\n }\n\n // 수량, 단가 수정시 공급가액/세액 자동 계산\n if (target.name == 'quantity' || target.name == 'unitPrice') {\n const supplyPrice =\n target.name == 'quantity'\n ? Number(inputVal) * this.taxInvoiceItems[idx]['unitPrice']\n : Number(inputVal) * this.taxInvoiceItems[idx]['quantity']\n this.taxInvoiceItems[idx]['supplyPrice'] = supplyPrice\n this.taxInvoiceItems[idx]['taxPrice'] = this.isTaxFree ? 0 : Math.floor(supplyPrice / 10)\n }\n\n // 인풋에 값 넣기\n this.taxInvoiceItems[idx][target.name] = inputVal\n\n // 아이템 금액에 관련된 필드 수정시 합계 계산\n if (['quantity', 'unitPrice', 'supplyPrice', 'taxPrice'].includes(target.name)) {\n this.taxInvoiceItems = [...this.taxInvoiceItems]\n this._setTaxInvoiceSummaryCalc()\n }\n }\n\n private async _openSupplierPopup() {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: taxInvoiceApis(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name: provider\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 }\n }\n }\n `\n })\n\n const items = response.data.responses.items || []\n openPopup(\n html`\n <company-list-popup\n .companyList=${items}\n @selected=${e => {\n this.supplier = {\n supplierBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,\n supplierBusinessRegistrationNumber: e.detail.businessRegistrationNumber || '',\n supplierBranchIdentification: e.detail.branchIdentification || '',\n supplierBusinessName: e.detail.businessName || '',\n supplierRepresentativeName: e.detail.representativeName || '',\n supplierAddress: e.detail.address || '',\n supplierBusinessType: e.detail.businessType || '',\n supplierIndustryType: e.detail.industryType || '',\n supplierDepartment: e.detail.department || '',\n supplierContactName: e.detail.contactName || '',\n supplierContactPhone: e.detail.contactPhone || '',\n supplierContactEmail: e.detail.contactEmail || '',\n supplierContactCellPhone: e.detail.contactCellPhone || ''\n }\n\n this.dispatchEvent(\n new CustomEvent('supplier-selected', {\n detail: { supplier: this.supplier },\n bubbles: true,\n composed: true\n })\n )\n\n history.back()\n }}\n >\n </company-list-popup>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.company list popup')\n }\n )\n }\n\n private async _openBuyerPopup() {\n const response = await client.query({\n query: gql`\n query TaxInvoiceBuyerList {\n responses: taxInvoiceBuyerList {\n id\n name\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 }\n }\n `\n })\n\n const items = response.data.responses || []\n openPopup(\n html`\n <company-list-popup\n .companyList=${items}\n @selected=${e => {\n this.buyer = {\n buyerBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,\n buyerBusinessRegistrationNumber: e.detail.businessRegistrationNumber || '',\n buyerBranchIdentification: e.detail.branchIdentification || '',\n buyerBusinessName: e.detail.businessName || '',\n buyerRepresentativeName: e.detail.representativeName || '',\n buyerAddress: e.detail.address || '',\n buyerBusinessType: e.detail.businessType || '',\n buyerIndustryType: e.detail.industryType || '',\n buyer1stDepartment: e.detail.department || '',\n buyer1stContactName: e.detail.contactName || '',\n buyer1stContactPhone: e.detail.contactPhone || '',\n buyer1stContactEmail: e.detail.contactEmail || '',\n buyer1stContactCellPhone: e.detail.contactCellPhone || ''\n }\n\n this.dispatchEvent(\n new CustomEvent('buyer-selected', {\n detail: { buyer: this.buyer },\n bubbles: true,\n composed: true\n })\n )\n\n history.back()\n }}\n >\n </company-list-popup>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.company list popup')\n }\n )\n }\n\n private async _onAddInvoiceItem(e: Event) {\n e.preventDefault()\n if (this.taxInvoiceItems.length >= 16) {\n await CustomAlert({\n type: 'warning',\n title: '품목은 최대 16개까지 추가 가능합니다.',\n text: '품목은 최대 16개까지 추가 가능합니다.',\n confirmButton: { text: i18next.t('button.confirm') }\n })\n\n return\n }\n\n this.taxInvoiceItems = [...this.taxInvoiceItems, { ...this.defaultTaxInvoiceItem, sequence: new Date().getTime() }]\n }\n\n private _onRemoveInvoiceItem(e: Event, sequence: number) {\n e.preventDefault()\n this.taxInvoiceItems = [...this.taxInvoiceItems.filter(item => item.sequence != sequence)]\n this._setTaxInvoiceSummaryCalc()\n }\n\n private _setTaxInvoiceSummaryCalc() {\n const supplyPrice: number = this.taxInvoiceItems.reduce((prev, item) => prev + Number(item.supplyPrice), 0) || 0\n const taxPrice: number = this.isTaxFree\n ? 0\n : this.taxInvoiceItems.reduce((prev, item) => prev + Number(item.taxPrice), 0) || 0\n const totalAmount: number = supplyPrice + taxPrice\n\n this.taxInvoice = { ...this.taxInvoice, supplyAmount: supplyPrice, taxAmount: taxPrice, totalAmount: totalAmount }\n }\n}\n"]}
@@ -1 +0,0 @@
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,CAAC;QACb,KAAK,kBAAkB;YACrB,MAAM,CAAC,2CAA2C,CAAC,CAAA;YACnD,OAAO,IAAI,CAAA;QAEb,KAAK,kBAAkB;YACrB,MAAM,CAAC,gDAAgD,CAAC,CAAA;YACxD,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;IACf,CAAC;AACH,CAAC","sourcesContent":["export default function route(page: string) {\n switch (page) {\n case 'tax-invoice-list':\n import('./pages/tax-invoice/tax-invoice-list-page')\n return page\n\n case 'tax-invoice-send':\n import('./pages/tax-invoice-send/tax-invoice-send-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"]}