@things-factory/tax-invoice 7.0.0-alpha.8 → 7.0.0

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 (153) hide show
  1. package/client/bootstrap.ts +1 -0
  2. package/client/pages/tax-audit-result/tax-audit-result-importer.ts +8 -19
  3. package/client/pages/tax-audit-result/tax-audit-result-list-page.ts +10 -25
  4. package/client/pages/tax-invoice/tax-invoice-detail-popup.ts +21 -19
  5. package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +99 -61
  6. package/client/pages/tax-invoice-company/tax-invoice-company-list-page.ts +2 -67
  7. package/client/pages/{tax-invoice-company/tax-invoice-company-importer.ts → tax-invoice-send/company-list-popup.ts} +69 -57
  8. package/client/pages/tax-invoice-send/tax-invoice-send-page.ts +78 -742
  9. package/client/pages/tax-invoice-send/tax-invoice-send.ts +1181 -0
  10. package/config/config.development.js +13 -0
  11. package/config/config.production.js +13 -0
  12. package/dist-client/bootstrap.d.ts +1 -0
  13. package/dist-client/bootstrap.js +1 -1
  14. package/dist-client/bootstrap.js.map +1 -1
  15. package/dist-client/pages/main.js.map +1 -1
  16. package/dist-client/pages/tax-audit-result/tax-audit-result-importer.d.ts +1 -0
  17. package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js +5 -12
  18. package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js.map +1 -1
  19. package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js +8 -16
  20. package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js.map +1 -1
  21. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.d.ts +0 -1
  22. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js +20 -17
  23. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js.map +1 -1
  24. package/dist-client/pages/tax-invoice/tax-invoice-list-page.d.ts +5 -5
  25. package/dist-client/pages/tax-invoice/tax-invoice-list-page.js.map +1 -1
  26. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.d.ts +3 -2
  27. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +91 -61
  28. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js.map +1 -1
  29. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.d.ts +0 -16
  30. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js +3 -62
  31. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js.map +1 -1
  32. package/dist-client/pages/tax-invoice-send/company-list-popup.d.ts +69 -0
  33. package/dist-client/pages/{tax-invoice-company/tax-invoice-company-importer.js → tax-invoice-send/company-list-popup.js} +75 -60
  34. package/dist-client/pages/tax-invoice-send/company-list-popup.js.map +1 -0
  35. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.d.ts +11 -78
  36. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +65 -654
  37. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -1
  38. package/dist-client/pages/tax-invoice-send/tax-invoice-send.d.ts +112 -0
  39. package/dist-client/pages/tax-invoice-send/tax-invoice-send.js +1086 -0
  40. package/dist-client/pages/tax-invoice-send/tax-invoice-send.js.map +1 -0
  41. package/dist-client/route.d.ts +1 -1
  42. package/dist-client/route.js.map +1 -1
  43. package/dist-client/tsconfig.tsbuildinfo +1 -1
  44. package/dist-server/index.d.ts +2 -0
  45. package/dist-server/routes.d.ts +1 -0
  46. package/dist-server/service/index.d.ts +9 -0
  47. package/dist-server/service/index.js +1 -0
  48. package/dist-server/service/index.js.map +1 -1
  49. package/dist-server/service/tax-audit-result/event-subscriber.d.ts +7 -0
  50. package/dist-server/service/tax-audit-result/event-subscriber.js +2 -2
  51. package/dist-server/service/tax-audit-result/event-subscriber.js.map +1 -1
  52. package/dist-server/service/tax-audit-result/index.d.ts +7 -0
  53. package/dist-server/service/tax-audit-result/tax-audit-result-history.d.ts +25 -0
  54. package/dist-server/service/tax-audit-result/tax-audit-result-history.js +10 -6
  55. package/dist-server/service/tax-audit-result/tax-audit-result-history.js.map +1 -1
  56. package/dist-server/service/tax-audit-result/tax-audit-result-mutation.d.ts +10 -0
  57. package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js +2 -2
  58. package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js.map +1 -1
  59. package/dist-server/service/tax-audit-result/tax-audit-result-query.d.ts +12 -0
  60. package/dist-server/service/tax-audit-result/tax-audit-result-query.js +3 -3
  61. package/dist-server/service/tax-audit-result/tax-audit-result-query.js.map +1 -1
  62. package/dist-server/service/tax-audit-result/tax-audit-result-type.d.ts +23 -0
  63. package/dist-server/service/tax-audit-result/tax-audit-result-type.js +6 -6
  64. package/dist-server/service/tax-audit-result/tax-audit-result-type.js.map +1 -1
  65. package/dist-server/service/tax-audit-result/tax-audit-result.d.ts +25 -0
  66. package/dist-server/service/tax-audit-result/tax-audit-result.js +4 -4
  67. package/dist-server/service/tax-audit-result/tax-audit-result.js.map +1 -1
  68. package/dist-server/service/tax-invoice/index.d.ts +5 -0
  69. package/dist-server/service/tax-invoice/tax-invoice-mutation.d.ts +10 -0
  70. package/dist-server/service/tax-invoice/tax-invoice-mutation.js +2 -6
  71. package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +1 -1
  72. package/dist-server/service/tax-invoice/tax-invoice-query.d.ts +14 -0
  73. package/dist-server/service/tax-invoice/tax-invoice-query.js +22 -10
  74. package/dist-server/service/tax-invoice/tax-invoice-query.js.map +1 -1
  75. package/dist-server/service/tax-invoice/tax-invoice-type.d.ts +86 -0
  76. package/dist-server/service/tax-invoice/tax-invoice-type.js +12 -8
  77. package/dist-server/service/tax-invoice/tax-invoice-type.js.map +1 -1
  78. package/dist-server/service/tax-invoice/tax-invoice-util.d.ts +133 -0
  79. package/dist-server/service/tax-invoice/tax-invoice-util.js +2 -2
  80. package/dist-server/service/tax-invoice/tax-invoice-util.js.map +1 -1
  81. package/dist-server/service/tax-invoice/tax-invoice.d.ts +120 -0
  82. package/dist-server/service/tax-invoice/tax-invoice.js +15 -10
  83. package/dist-server/service/tax-invoice/tax-invoice.js.map +1 -1
  84. package/dist-server/service/tax-invoice-api/index.d.ts +5 -0
  85. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.d.ts +8 -0
  86. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js +46 -16
  87. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js.map +1 -1
  88. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.d.ts +10 -0
  89. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js +15 -9
  90. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js.map +1 -1
  91. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.d.ts +32 -0
  92. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +9 -13
  93. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +1 -1
  94. package/dist-server/service/tax-invoice-api/tax-invoice-api.d.ts +31 -0
  95. package/dist-server/service/tax-invoice-api/tax-invoice-api.js +12 -24
  96. package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +1 -1
  97. package/dist-server/service/tax-invoice-company/index.d.ts +5 -0
  98. package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.d.ts +7 -0
  99. package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js +2 -2
  100. package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js.map +1 -1
  101. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.d.ts +14 -0
  102. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js +44 -9
  103. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js.map +1 -1
  104. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.d.ts +38 -0
  105. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js +59 -9
  106. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js.map +1 -1
  107. package/dist-server/service/tax-invoice-company/tax-invoice-company.d.ts +29 -0
  108. package/dist-server/service/tax-invoice-company/tax-invoice-company.js +14 -24
  109. package/dist-server/service/tax-invoice-company/tax-invoice-company.js.map +1 -1
  110. package/dist-server/service/tax-invoice-item/index.d.ts +5 -0
  111. package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.d.ts +10 -0
  112. package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js +2 -2
  113. package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js.map +1 -1
  114. package/dist-server/service/tax-invoice-item/tax-invoice-item-query.d.ts +11 -0
  115. package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js +3 -3
  116. package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js.map +1 -1
  117. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.d.ts +29 -0
  118. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js +6 -6
  119. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js.map +1 -1
  120. package/dist-server/service/tax-invoice-item/tax-invoice-item.d.ts +23 -0
  121. package/dist-server/service/tax-invoice-item/tax-invoice-item.js +7 -7
  122. package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +1 -1
  123. package/dist-server/service/unipost-api/tax-invoice-inquiry.d.ts +16 -0
  124. package/dist-server/service/unipost-api/tax-invoice-inquiry.js +10 -14
  125. package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +1 -1
  126. package/dist-server/service/unipost-api/tax-invoice-send.d.ts +1 -0
  127. package/dist-server/service/unipost-api/tax-invoice-send.js +5 -7
  128. package/dist-server/service/unipost-api/tax-invoice-send.js.map +1 -1
  129. package/dist-server/tsconfig.tsbuildinfo +1 -1
  130. package/package.json +8 -7
  131. package/server/service/index.ts +1 -0
  132. package/server/service/tax-audit-result/tax-audit-result-history.ts +10 -6
  133. package/server/service/tax-audit-result/tax-audit-result-query.ts +4 -1
  134. package/server/service/tax-audit-result/tax-audit-result.ts +6 -2
  135. package/server/service/tax-invoice/tax-invoice-mutation.ts +0 -3
  136. package/server/service/tax-invoice/tax-invoice-query.ts +36 -9
  137. package/server/service/tax-invoice/tax-invoice-type.ts +3 -0
  138. package/server/service/tax-invoice/tax-invoice-util.ts +1 -0
  139. package/server/service/tax-invoice/tax-invoice.ts +19 -4
  140. package/server/service/tax-invoice-api/tax-invoice-api-mutation.ts +63 -24
  141. package/server/service/tax-invoice-api/tax-invoice-api-query.ts +15 -6
  142. package/server/service/tax-invoice-api/tax-invoice-api-type.ts +2 -5
  143. package/server/service/tax-invoice-api/tax-invoice-api.ts +23 -20
  144. package/server/service/tax-invoice-company/tax-invoice-company-query.ts +39 -6
  145. package/server/service/tax-invoice-company/tax-invoice-company-type.ts +40 -4
  146. package/server/service/tax-invoice-company/tax-invoice-company.ts +11 -21
  147. package/server/service/tax-invoice-item/tax-invoice-item-query.ts +4 -1
  148. package/server/service/tax-invoice-item/tax-invoice-item.ts +22 -8
  149. package/server/service/unipost-api/tax-invoice-inquiry.ts +6 -10
  150. package/server/service/unipost-api/tax-invoice-send.ts +5 -5
  151. package/translations/ko.json +3 -0
  152. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.d.ts +0 -31
  153. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tax-invoice-company-list-page.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-company/tax-invoice-company-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,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,OAA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AE,MAAM,EAAE,CAAC;;uDAAoE;AAE/F;IAAC,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;wDAAA;AAzBjC,yBAAyB;IADrC,aAAa,CAAC,+BAA+B,CAAC;GAClC,yBAAyB,CAqdrC;SArdY,yBAAyB","sourcesContent":["import '@operato/data-grist'\n\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\nimport gql from 'graphql-tag'\nimport { TaxInvoiceCompanyImporter } from './tax-invoice-company-importer'\n\nexport enum CompanyType {\n SUPPLIER = 10, // 공급자\n BUYER = 20 // 거래처\n}\nexport const COMPANY_TYPE_LABEL = {\n [CompanyType.SUPPLIER]: '공급자',\n [CompanyType.BUYER]: '거래처'\n}\n\n@customElement('tax-invoice-company-list-page')\nexport class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsMixin(PageView)) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n `\n ]\n\n static get scopedElements() {\n return {\n 'tax-invoice-company-importer': TaxInvoiceCompanyImporter\n }\n }\n\n @property({ type: Object }) gristConfig: any\n @property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('title.tax invoice company list'),\n help: 'tax-invoice-company/tax-invoice-company',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this._updateTaxInvoiceCompany.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deleteTaxInvoiceCompany.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('title.tax invoice company list'),\n data: this.exportHandler.bind(this)\n },\n importable: {\n handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\">\n <div id=\"filters\">\n <ox-filters-form autofocus></ox-filters-form>\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n list: {\n fields: ['name', 'description'],\n details: ['name', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true,\n classifier: () => ({ emphasized: ['#D1E8FF', '#000'] })\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'select',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n editable: true,\n classifier: () => ({ emphasized: ['#D1E8FF', '#000'] }),\n options: [\n {},\n {\n display: i18next.t('text.company supplier'),\n value: CompanyType.SUPPLIER\n },\n {\n display: i18next.t('text.company buyer'),\n value: CompanyType.BUYER\n }\n ]\n },\n width: 100\n },\n {\n type: 'string',\n name: 'businessRegistrationNumber',\n header: i18next.t('field.business registration number'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'branchIdentification',\n header: i18next.t('field.branch identification'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'businessName',\n header: i18next.t('field.business name'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'representativeName',\n header: i18next.t('field.representative name'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'address',\n header: i18next.t('field.address'),\n record: {\n editable: true\n },\n width: 200\n },\n {\n type: 'string',\n name: 'businessType',\n header: i18next.t('field.business type'),\n record: {\n editable: true\n },\n width: 100\n },\n {\n type: 'string',\n name: 'industryType',\n header: i18next.t('field.industry type'),\n record: {\n editable: true\n },\n width: 100\n },\n {\n type: 'string',\n name: 'department',\n header: i18next.t('field.department'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactName',\n header: i18next.t('field.contact name'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactPhone',\n header: i18next.t('field.contact phone'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactEmail',\n header: i18next.t('field.contact email'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactCellPhone',\n header: i18next.t('field.contact cell phone'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'attributes',\n name: 'attributes',\n header: i18next.t('field.attributes'),\n record: {\n editable: true,\n options: async () => {\n return {\n objectified: true,\n attributeSet: await this.getAttributeSetForDomain()\n }\n }\n },\n width: 150\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n this.grist.fetch()\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: taxInvoiceCompanies(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n type\n businessRegistrationNumber\n branchIdentification\n businessName\n representativeName\n address\n businessType\n industryType\n department\n contactName\n contactPhone\n contactEmail\n contactCellPhone\n attributes\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async _deleteTaxInvoiceCompany() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteTaxInvoiceCompanies(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n async _updateTaxInvoiceCompany() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = key === 'type' ? Number(dirtyFields[key].after) : dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [TaxInvoiceCompanyPatch!]!) {\n updateMultipleTaxInvoiceCompany(patches: $patches) {\n name\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n }\n\n async getAttributeSetForDomain() {\n const response = await client.query({\n query: gql`\n query {\n attributeSet: attributeSetByEntity(entity: \"Domain\") {\n entity\n description\n items {\n name\n description\n tag\n type\n active\n hidden\n options\n }\n }\n }\n `\n })\n\n return response.data?.attributeSet || {}\n }\n\n async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set([\n 'id',\n 'name',\n 'description',\n 'type',\n 'businessRegistrationNumber',\n 'branchIdentification',\n 'businessName',\n 'representativeName',\n 'address',\n 'businessType',\n 'industryType',\n 'department',\n 'contactName',\n 'contactPhone',\n 'contactEmail',\n 'contactCellPhone',\n 'attributes'\n ])\n\n return exportTargets.map(taxInvoice => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = taxInvoice[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) {\n const popup = openPopup(\n html`\n <tax-invoice-company-importer\n .taxInvoiceCompanies=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></tax-invoice-company-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import tax invoice company')\n }\n )\n\n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n}\n"]}
1
+ {"version":3,"file":"tax-invoice-company-list-page.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-company/tax-invoice-company-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,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,O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,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAA;QACrG,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;YAC7B,IAAI;YACJ,MAAM;YACN,aAAa;YACb,4BAA4B;YAC5B,sBAAsB;YACtB,cAAc;YACd,oBAAoB;YACpB,SAAS;YACT,cAAc;YACd,cAAc;YACd,YAAY;YACZ,aAAa;YACb,cAAc;YACd,cAAc;YACd,kBAAkB;YAClB,YAAY;SACb,CAAC,CAAA;QAEF,OAAO,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;YACpC,IAAI,OAAO,GAAG,EAAE,CAAA;YAChB,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;gBACnC,OAAO,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAA;YACpC,CAAC;YAED,OAAO,OAAO,CAAA;QAChB,CAAC,CAAC,CAAA;IACJ,CAAC;;AA5ZM,gCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;KASF;CACF,AAbY,CAaZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8DAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAoE;AAEpE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;wDAAA;AAnBjC,yBAAyB;IADrC,aAAa,CAAC,+BAA+B,CAAC;GAClC,yBAAyB,CA8ZrC","sourcesContent":["import '@operato/data-grist'\n\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\nimport gql from 'graphql-tag'\n\n@customElement('tax-invoice-company-list-page')\nexport class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsMixin(PageView)) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n `\n ]\n\n @property({ type: Object }) gristConfig: any\n @property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('title.tax invoice company list'),\n help: 'tax-invoice-company/tax-invoice-company',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this._updateTaxInvoiceCompany.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deleteTaxInvoiceCompany.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('title.tax invoice company list'),\n data: this.exportHandler.bind(this)\n }\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\">\n <div id=\"filters\">\n <ox-filters-form autofocus></ox-filters-form>\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n list: {\n fields: ['name', 'description'],\n details: ['name', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true,\n classifier: () => ({ emphasized: ['#D1E8FF', '#000'] })\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'string',\n name: 'businessRegistrationNumber',\n header: i18next.t('field.business registration number'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'branchIdentification',\n header: i18next.t('field.branch identification'),\n record: {\n editable: true\n },\n width: 150\n },\n {\n type: 'string',\n name: 'businessName',\n header: i18next.t('field.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.getAttributeSetForDomain()\n }\n }\n },\n width: 150\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n this.grist.fetch()\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: taxInvoiceCompanies(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n businessRegistrationNumber\n branchIdentification\n businessName\n representativeName\n address\n businessType\n industryType\n department\n contactName\n contactPhone\n contactEmail\n contactCellPhone\n attributes\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async _deleteTaxInvoiceCompany() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteTaxInvoiceCompanies(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n async _updateTaxInvoiceCompany() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = key === 'type' ? Number(dirtyFields[key].after) : dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [TaxInvoiceCompanyPatch!]!) {\n updateMultipleTaxInvoiceCompany(patches: $patches) {\n name\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n }\n\n async getAttributeSetForDomain() {\n const response = await client.query({\n query: gql`\n query {\n attributeSet: attributeSetByEntity(entity: \"Domain\") {\n entity\n description\n items {\n name\n description\n tag\n type\n active\n hidden\n options\n }\n }\n }\n `\n })\n\n return response.data?.attributeSet || {}\n }\n\n async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set([\n 'id',\n 'name',\n 'description',\n 'businessRegistrationNumber',\n 'branchIdentification',\n 'businessName',\n 'representativeName',\n 'address',\n 'businessType',\n 'industryType',\n 'department',\n 'contactName',\n 'contactPhone',\n 'contactEmail',\n 'contactCellPhone',\n 'attributes'\n ])\n\n return exportTargets.map(taxInvoice => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = taxInvoice[field]\n }\n\n return tempObj\n })\n }\n}\n"]}
@@ -0,0 +1,69 @@
1
+ import '@material/web/icon/icon.js';
2
+ import '@operato/data-grist';
3
+ import { LitElement } from 'lit';
4
+ export declare class CompanyListPopup extends LitElement {
5
+ static styles: import("lit").CSSResult[];
6
+ private grist;
7
+ companyList: any[];
8
+ columns: {
9
+ pagination: {
10
+ infinite: boolean;
11
+ };
12
+ columns: ({
13
+ type: string;
14
+ gutterName: string;
15
+ multiple?: undefined;
16
+ name?: undefined;
17
+ header?: undefined;
18
+ record?: undefined;
19
+ filter?: undefined;
20
+ sortable?: undefined;
21
+ width?: undefined;
22
+ } | {
23
+ type: string;
24
+ gutterName: string;
25
+ multiple: boolean;
26
+ name?: undefined;
27
+ header?: undefined;
28
+ record?: undefined;
29
+ filter?: undefined;
30
+ sortable?: undefined;
31
+ width?: undefined;
32
+ } | {
33
+ type: string;
34
+ name: string;
35
+ header: string;
36
+ record: {
37
+ editable: boolean;
38
+ };
39
+ filter: string;
40
+ sortable: boolean;
41
+ width: number;
42
+ gutterName?: undefined;
43
+ multiple?: undefined;
44
+ } | {
45
+ type: string;
46
+ name: string;
47
+ header: string;
48
+ record: {
49
+ editable: boolean;
50
+ };
51
+ width: number;
52
+ gutterName?: undefined;
53
+ multiple?: undefined;
54
+ filter?: undefined;
55
+ sortable?: undefined;
56
+ })[];
57
+ rows: {
58
+ selectable: {
59
+ multiple: boolean;
60
+ };
61
+ handlers: {
62
+ click: string;
63
+ };
64
+ appendable: boolean;
65
+ };
66
+ };
67
+ render(): import("lit-html").TemplateResult<1>;
68
+ select(): Promise<void>;
69
+ }
@@ -1,182 +1,197 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
2
3
  import '@operato/data-grist';
3
- import gql from 'graphql-tag';
4
4
  import { css, html, LitElement } from 'lit';
5
- import { property } from 'lit/decorators.js';
6
- import { client } from '@operato/graphql';
5
+ import { property, query } from 'lit/decorators.js';
6
+ import { DataGrist } from '@operato/data-grist';
7
7
  import { i18next } from '@operato/i18n';
8
- import { isMobileDevice } from '@operato/utils';
9
- import { COMPANY_TYPE_LABEL } from './tax-invoice-company-list-page';
10
- export class TaxInvoiceCompanyImporter extends LitElement {
8
+ import { ButtonContainerStyles } from '@operato/styles';
9
+ export class CompanyListPopup extends LitElement {
11
10
  constructor() {
12
11
  super(...arguments);
13
- this.taxInvoiceCompanies = [];
12
+ this.companyList = [];
14
13
  this.columns = {
15
- list: { fields: ['name', 'description'] },
16
14
  pagination: { infinite: true },
17
15
  columns: [
16
+ { type: 'gutter', gutterName: 'sequence' },
17
+ { type: 'gutter', gutterName: 'row-selector', multiple: false },
18
18
  {
19
19
  type: 'string',
20
20
  name: 'name',
21
21
  header: i18next.t('field.name'),
22
- width: 150
23
- },
24
- {
25
- type: 'string',
26
- name: 'description',
27
- header: i18next.t('field.description'),
28
- width: 200
29
- },
30
- {
31
- type: 'select',
32
- name: 'type',
33
- header: i18next.t('field.type'),
34
22
  record: {
35
- renderer: value => COMPANY_TYPE_LABEL[value]
23
+ editable: false
36
24
  },
37
- width: 100
25
+ filter: 'search',
26
+ sortable: true,
27
+ width: 150
38
28
  },
39
29
  {
40
30
  type: 'string',
41
31
  name: 'businessRegistrationNumber',
42
32
  header: i18next.t('field.business registration number'),
33
+ record: {
34
+ editable: false
35
+ },
43
36
  width: 150
44
37
  },
45
38
  {
46
39
  type: 'string',
47
40
  name: 'branchIdentification',
48
41
  header: i18next.t('field.branch identification'),
42
+ record: {
43
+ editable: false
44
+ },
49
45
  width: 150
50
46
  },
51
47
  {
52
48
  type: 'string',
53
49
  name: 'businessName',
54
50
  header: i18next.t('field.tax invoice business name'),
51
+ record: {
52
+ editable: false
53
+ },
55
54
  width: 150
56
55
  },
57
56
  {
58
57
  type: 'string',
59
58
  name: 'representativeName',
60
59
  header: i18next.t('field.tax invoice representative name'),
60
+ record: {
61
+ editable: false
62
+ },
61
63
  width: 150
62
64
  },
63
65
  {
64
66
  type: 'string',
65
67
  name: 'address',
66
68
  header: i18next.t('field.address'),
69
+ record: {
70
+ editable: false
71
+ },
67
72
  width: 200
68
73
  },
69
74
  {
70
75
  type: 'string',
71
76
  name: 'businessType',
72
77
  header: i18next.t('field.business type'),
78
+ record: {
79
+ editable: false
80
+ },
73
81
  width: 100
74
82
  },
75
83
  {
76
84
  type: 'string',
77
85
  name: 'industryType',
78
86
  header: i18next.t('field.industry type'),
87
+ record: {
88
+ editable: false
89
+ },
79
90
  width: 100
80
91
  },
81
92
  {
82
93
  type: 'string',
83
94
  name: 'department',
84
95
  header: i18next.t('field.department'),
96
+ record: {
97
+ editable: false
98
+ },
85
99
  width: 150
86
100
  },
87
101
  {
88
102
  type: 'string',
89
103
  name: 'contactName',
90
104
  header: i18next.t('field.contact name'),
105
+ record: {
106
+ editable: false
107
+ },
91
108
  width: 150
92
109
  },
93
110
  {
94
111
  type: 'string',
95
112
  name: 'contactPhone',
96
113
  header: i18next.t('field.contact phone'),
114
+ record: {
115
+ editable: false
116
+ },
97
117
  width: 150
98
118
  },
99
119
  {
100
120
  type: 'string',
101
121
  name: 'contactEmail',
102
122
  header: i18next.t('field.contact email'),
123
+ record: {
124
+ editable: false
125
+ },
103
126
  width: 150
104
127
  },
105
128
  {
106
129
  type: 'string',
107
130
  name: 'contactCellPhone',
108
131
  header: i18next.t('field.contact cell phone'),
109
- width: 150
110
- },
111
- {
112
- type: 'attributes',
113
- name: 'attributes',
114
- header: i18next.t('field.attributes'),
132
+ record: {
133
+ editable: false
134
+ },
115
135
  width: 150
116
136
  }
117
- ]
137
+ ],
138
+ rows: {
139
+ selectable: {
140
+ multiple: false
141
+ },
142
+ handlers: {
143
+ click: 'select-row-toggle'
144
+ },
145
+ appendable: false
146
+ }
118
147
  };
119
148
  }
120
149
  render() {
121
150
  return html `
122
151
  <ox-grist
123
- .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
152
+ .mode=${'GRID'}
124
153
  .config=${this.columns}
125
154
  .data=${{
126
- records: this.taxInvoiceCompanies
155
+ records: this.companyList
127
156
  }}
128
157
  ></ox-grist>
129
158
 
130
159
  <div class="button-container">
131
- <mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
160
+ <button @click="${this.select.bind(this)}">
161
+ <md-icon>select_check_box</md-icon>${i18next.t('button.select')}
162
+ </button>
132
163
  </div>
133
164
  `;
134
165
  }
135
- async save() {
136
- var _a;
137
- const response = await client.mutate({
138
- mutation: gql `
139
- mutation importTaxInvoiceCompanies($taxInvoiceCompanies: [TaxInvoiceCompanyPatch!]!) {
140
- importTaxInvoiceCompanies(taxInvoiceCompanies: $taxInvoiceCompanies)
141
- }
142
- `,
143
- variables: { taxInvoiceCompanies: this.taxInvoiceCompanies }
144
- });
145
- if ((_a = response.errors) === null || _a === void 0 ? void 0 : _a.length)
146
- return;
147
- this.dispatchEvent(new CustomEvent('imported'));
166
+ async select() {
167
+ this.dispatchEvent(new CustomEvent('selected', { detail: this.grist.selected[0] }));
148
168
  }
149
169
  }
150
- TaxInvoiceCompanyImporter.styles = [
170
+ CompanyListPopup.styles = [
171
+ ButtonContainerStyles,
151
172
  css `
152
173
  :host {
153
174
  display: flex;
154
175
  flex-direction: column;
155
176
 
156
- background-color: #fff;
177
+ background-color: var(--md-sys-color-surface);
157
178
  }
158
179
 
159
180
  ox-grist {
160
181
  flex: 1;
161
182
  }
162
-
163
- .button-container {
164
- display: flex;
165
- margin-left: auto;
166
- padding: var(--padding-default);
167
- }
168
-
169
- mwc-button {
170
- margin-left: var(--margin-default);
171
- }
172
183
  `
173
184
  ];
185
+ __decorate([
186
+ query('ox-grist'),
187
+ __metadata("design:type", DataGrist)
188
+ ], CompanyListPopup.prototype, "grist", void 0);
174
189
  __decorate([
175
190
  property({ type: Array }),
176
191
  __metadata("design:type", Array)
177
- ], TaxInvoiceCompanyImporter.prototype, "taxInvoiceCompanies", void 0);
192
+ ], CompanyListPopup.prototype, "companyList", void 0);
178
193
  __decorate([
179
194
  property({ type: Object }),
180
195
  __metadata("design:type", Object)
181
- ], TaxInvoiceCompanyImporter.prototype, "columns", void 0);
182
- //# sourceMappingURL=tax-invoice-company-importer.js.map
196
+ ], CompanyListPopup.prototype, "columns", void 0);
197
+ //# sourceMappingURL=company-list-popup.js.map
@@ -0,0 +1 @@
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,QAAQ,EAAE,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C,CAAC,CAAA;IACrF,CAAC;;AA/KM,uBAAM,GAAG;IACd,qBAAqB;IACrB,GAAG,CAAA;;;;;;;;;;;KAWF;CACF,AAdY,CAcZ;AAE0B;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","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { css, html, LitElement } from 'lit'\nimport { property, query } from 'lit/decorators.js'\nimport { DataGrist } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { ButtonContainerStyles } from '@operato/styles'\n\nexport class CompanyListPopup extends LitElement {\n static styles = [\n ButtonContainerStyles,\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=\"button-container\">\n <button @click=\"${this.select.bind(this)}\">\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,78 +1,20 @@
1
1
  import '@operato/data-grist';
2
2
  import { PageView } from '@operato/shell';
3
- import { BusinessRegistrationCategory, Category, InvoiceType, Purpose } from '../tax-invoice/tax-invoice-list-page';
4
- interface Supplier {
5
- supplierBusinessRegistrationCategory: string;
6
- supplierBusinessRegistrationNumber: string;
7
- supplierBranchIdentification?: string;
8
- supplierBusinessName: string;
9
- supplierRepresentativeName: string;
10
- supplierAddress?: string;
11
- supplierBusinessType?: string;
12
- supplierIndustryType?: string;
13
- supplierDepartment?: string;
14
- supplierContactName?: string;
15
- supplierContactPhone?: string;
16
- supplierContactEmail?: string;
17
- supplierContactCellPhone?: string;
18
- }
19
- interface Buyer {
20
- buyerBusinessRegistrationCategory: BusinessRegistrationCategory;
21
- buyerBusinessRegistrationNumber: string;
22
- buyerBranchIdentification?: string;
23
- buyerBusinessName: string;
24
- buyerRepresentativeName: string;
25
- buyerAddress?: string;
26
- buyerBusinessType?: string;
27
- buyerIndustryType?: string;
28
- buyer1stDepartment?: string;
29
- buyer1stContactName?: string;
30
- buyer1stContactPhone?: string;
31
- buyer1stContactEmail?: string;
32
- buyer1stContactCellPhone?: string;
33
- buyer2ndDepartment?: string;
34
- buyer2ndContactName?: string;
35
- buyer2ndContactPhone?: string;
36
- buyer2ndContactEmail?: string;
37
- buyer2ndContactCellPhone?: string;
38
- }
39
- interface TaxInvoice {
40
- category: Category;
41
- issueNo?: string;
42
- approvalNo?: string;
43
- originalApprovalNo?: string;
44
- issueDate: string;
45
- signatureDate?: string;
46
- invoiceType: InvoiceType;
47
- purpose: Purpose;
48
- remark0?: string;
49
- remark1?: string;
50
- remark2?: string;
51
- paymentAmountCash?: number;
52
- paymentAmountCheck?: number;
53
- paymentAmountPromissoryNote?: number;
54
- paymentAmountAccountsReceivable?: number;
55
- supplyAmount: number;
56
- taxAmount?: number;
57
- totalAmount: number;
58
- }
59
- interface TaxInvoiceItem {
60
- sequence: number;
61
- supplyDate: string;
62
- itemName: string;
63
- specification: string;
64
- quantity: number;
65
- unitPrice: number;
66
- supplyPrice: number;
67
- taxPrice: number;
68
- remark?: string;
69
- }
3
+ import { CompanyListPopup } from './company-list-popup';
4
+ import { Supplier, Buyer, TaxInvoice, TaxInvoiceItem } from './tax-invoice-send';
5
+ import './tax-invoice-send';
70
6
  declare const TaxInvoiceSendPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
71
7
  export declare class TaxInvoiceSendPage extends TaxInvoiceSendPage_base {
72
8
  static styles: import("lit").CSSResult[];
9
+ static get scopedElements(): {
10
+ 'company-list-popup': typeof CompanyListPopup;
11
+ };
73
12
  private today;
13
+ private defaultSupplier;
74
14
  supplier: Supplier;
15
+ private defaultBuyer;
75
16
  buyer: Buyer;
17
+ private defaultTaxInvoice;
76
18
  taxInvoice: TaxInvoice;
77
19
  private defaultTaxInvoiceItem;
78
20
  taxInvoiceItems: TaxInvoiceItem[];
@@ -88,19 +30,10 @@ export declare class TaxInvoiceSendPage extends TaxInvoiceSendPage_base {
88
30
  danger: boolean;
89
31
  };
90
32
  title: string;
91
- action: (num: string) => Promise<void>;
33
+ action: () => Promise<void>;
92
34
  }[];
93
35
  };
94
36
  render(): import("lit-html").TemplateResult<1>;
95
- pageInitialized(lifecycle: any): Promise<void>;
96
- _fetchSupplier(): Promise<void>;
97
- pageUpdated(changes: any, lifecycle: any): Promise<void>;
98
- _sendTaxInvoice(num: string): Promise<void>;
99
- private _numberFormat;
100
- private _onInputTaxInvoice;
101
- private _onInputItem;
102
- private _onAddInvoiceItem;
103
- private _onRemoveInvoiceItem;
104
- private _setTaxInvoiceSummaryCalc;
37
+ _sendTaxInvoice(): Promise<void>;
105
38
  }
106
39
  export {};