@things-factory/tax-invoice 10.1.302 → 10.1.304

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.
@@ -1,4 +1,5 @@
1
1
  import '@operato/data-grist';
2
+ import '@things-factory/ai-assistant/dist-client/index.js';
2
3
  import { PageView } from '@operato/shell';
3
4
  import { FetchOption } from '@operato/data-grist';
4
5
  import { TaxAuditResultImporter } from './tax-audit-result-importer';
@@ -1,5 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import '@operato/data-grist';
3
+ import '@things-factory/ai-assistant/dist-client/index.js';
3
4
  import { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles';
4
5
  import { PageView } from '@operato/shell';
5
6
  import { css, html } from 'lit';
@@ -53,10 +54,6 @@ let TaxAuditResultListPage = class TaxAuditResultListPage extends localize(i18ne
53
54
  { title: i18next.t('button.save'),
54
55
  action: this._updateTaxAuditResult.bind(this),
55
56
  ...CommonButtonStyles.save
56
- },
57
- { title: i18next.t('button.delete'),
58
- action: this._deleteTaxAuditResult.bind(this),
59
- ...CommonButtonStyles.delete
60
57
  }
61
58
  ],
62
59
  exportable: { name: i18next.t('title.tax-audit-result list'),
@@ -69,6 +66,14 @@ let TaxAuditResultListPage = class TaxAuditResultListPage extends localize(i18ne
69
66
  const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
70
67
  return html `
71
68
  <ox-grist class="page-fill" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
69
+ <!-- What is done to the picked rows: over the column heads while rows are picked (ADR-0225). -->
70
+ <ox-assistant-selection-bar
71
+ slot="selection"
72
+ .gridOf=${() => this.grist}
73
+ name=${i18next.t('title.tax-audit-result list')}
74
+ .assistant=${false}
75
+ .actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this._deleteTaxAuditResult() }]}
76
+ ></ox-assistant-selection-bar>
72
77
  <div slot="headroom" class="header">
73
78
  <div class="filters">
74
79
  <ox-filters-form without-search autofocus></ox-filters-form>
@@ -219,8 +224,9 @@ let TaxAuditResultListPage = class TaxAuditResultListPage extends localize(i18ne
219
224
  }
220
225
  }
221
226
  }
227
+ /* The list's own export is the rows it shows; the picked rows go out by the selection bar's 「선택 내보내기」 (ADR-0225). */
222
228
  async exportHandler() {
223
- const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records;
229
+ const exportTargets = this.grist.dirtyData.records;
224
230
  const targetFieldSet = new Set(['id', 'name', 'description', 'active']);
225
231
  return exportTargets.map(taxAuditResult => {
226
232
  let tempObj = {};
@@ -1,4 +1,5 @@
1
1
  import '@operato/data-grist';
2
+ import '@things-factory/ai-assistant/dist-client/index.js';
2
3
  import { PageView } from '@operato/shell';
3
4
  import { FetchOption } from '@operato/data-grist';
4
5
  import './tax-invoice-detail-popup';
@@ -1,5 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import '@operato/data-grist';
3
+ import '@things-factory/ai-assistant/dist-client/index.js';
3
4
  import { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
4
5
  import { PageView } from '@operato/shell';
5
6
  import { css, html } from 'lit';
@@ -125,6 +126,40 @@ let TaxInvoiceListPage = class TaxInvoiceListPage extends localize(i18next)(Scop
125
126
  }
126
127
  }
127
128
 
129
+ /*
130
+ * The four figures stand two to a line on a phone: the eight-track line above gave each label 30px at 375px and broke
131
+ * 「총 건수」 into one letter a line, and its 40px side margins took the room the figures need (2026-11-22).
132
+ */
133
+ @media (max-width: 600px) {
134
+ /*
135
+ * The other list screens' text stands on a 13px base; this page left it at the browser's 16px. A card's text is 1.1em
136
+ * and 0.9em of it, and the filter's selected value (「매출」) takes it whole, so on a phone the cards read 20% larger
137
+ * and the filter values 3px larger than on the other screens.
138
+ */
139
+ :host {
140
+ font-size: 13px;
141
+ }
142
+
143
+ div.summary {
144
+ grid-template-columns: max-content 1fr max-content 1fr;
145
+ margin: 12px;
146
+ font-size: 12px;
147
+
148
+ span.title {
149
+ white-space: nowrap;
150
+ padding: 0 8px;
151
+ height: 30px;
152
+ }
153
+ span.value {
154
+ padding: 0 8px;
155
+ height: 30px;
156
+ min-width: 0;
157
+ font-variant-numeric: tabular-nums;
158
+ justify-content: flex-end;
159
+ }
160
+ }
161
+ }
162
+
128
163
  ox-grist {
129
164
  overflow-y: auto;
130
165
  flex: 1;
@@ -179,7 +214,10 @@ let TaxInvoiceListPage = class TaxInvoiceListPage extends localize(i18next)(Scop
179
214
  <span class="value">${this._numberFormat(summary?.tax_amount)}</span>
180
215
  </div>
181
216
 
182
- <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
217
+ <!-- A table at a desk; cards on a phone (2026-11-22 card audit). -->
218
+ <ox-grist .mode=${mode} narrow-mode="CARD" .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
219
+ <!-- The picked rows go out by the bar's 「선택 내보내기」, over the column heads while rows are picked (ADR-0225). -->
220
+ <ox-assistant-selection-bar slot="selection" .gridOf=${() => this.grist} name=${i18next.t('title.tax invoice list')} .assistant=${false}></ox-assistant-selection-bar>
183
221
  <div slot="headroom" class="header">
184
222
  <div class="filters">
185
223
  <ox-filters-form without-search autofocus></ox-filters-form>
@@ -190,19 +228,33 @@ let TaxInvoiceListPage = class TaxInvoiceListPage extends localize(i18next)(Scop
190
228
  }
191
229
  async pageInitialized(lifecycle) {
192
230
  this.gristConfig = {
231
+ /* On a phone: whom the invoice is with and the total, then which side, the issue date, whether it is matched and the supply amount - each with its name. */
232
+ list: { fields: ['partyName', 'totalAmount'], details: ['category', 'issueDate', 'isMatched', 'supplyAmount'], labeled: true },
193
233
  columns: [
194
- { type: 'gutter', gutterName: 'sequence' },
195
- { type: 'gutter', gutterName: 'row-selector', multiple: true },
234
+ /* The gutters and the counterparty come first, all fixed, so they stay in place while the grid scrolls sideways (data-grist `fixed`). */
235
+ { type: 'gutter', gutterName: 'sequence', fixed: true },
236
+ { type: 'gutter', gutterName: 'row-selector', multiple: true, fixed: true },
196
237
  {
197
238
  type: 'gutter',
198
239
  gutterName: 'button',
199
240
  icon: 'reorder',
241
+ fixed: true,
200
242
  handlers: {
201
243
  click: (columns, data, column, record, rowIndex) => {
202
244
  this.openDetailPopup(record.id);
203
245
  }
204
246
  }
205
247
  },
248
+ {
249
+ type: 'string',
250
+ name: 'partyName',
251
+ header: i18next.t('field.tax invoice party'),
252
+ record: {
253
+ editable: false
254
+ },
255
+ fixed: true,
256
+ width: 200
257
+ },
206
258
  {
207
259
  type: 'string',
208
260
  name: 'memo',
@@ -434,6 +486,7 @@ let TaxInvoiceListPage = class TaxInvoiceListPage extends localize(i18next)(Scop
434
486
  signatureDate
435
487
  supplierBusinessRegistrationNumber
436
488
  supplierBusinessName
489
+ buyerBusinessName
437
490
  supplierRepresentativeName
438
491
  totalAmount
439
492
  supplyAmount
@@ -468,9 +521,14 @@ let TaxInvoiceListPage = class TaxInvoiceListPage extends localize(i18next)(Scop
468
521
  });
469
522
  // 합계 필드 갱신
470
523
  this.summary = response.data.taxInvoicesSummary.summary;
524
+ /* Who the invoice is with: the buyer on one we issued (매출), the supplier on one we received (매입) - never our own company. */
525
+ const records = (response.data.taxInvoices.items || []).map((one) => ({
526
+ ...one,
527
+ partyName: one.category === Category.EXPORT ? one.buyerBusinessName : one.supplierBusinessName
528
+ }));
471
529
  return {
472
530
  total: response.data.taxInvoices.total || 0,
473
- records: response.data.taxInvoices.items || []
531
+ records
474
532
  };
475
533
  }
476
534
  async _updateTaxInvoice() {
@@ -506,8 +564,9 @@ let TaxInvoiceListPage = class TaxInvoiceListPage extends localize(i18next)(Scop
506
564
  }
507
565
  }
508
566
  }
567
+ /* The list's own export is the rows it shows; the picked rows go out by the selection bar's 「선택 내보내기」 (ADR-0225). */
509
568
  async exportHandler() {
510
- const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records;
569
+ const exportTargets = this.grist.dirtyData.records;
511
570
  const targetFieldSet = new Set(['id', 'name']);
512
571
  return exportTargets.map(taxInvoice => {
513
572
  let tempObj = {};
@@ -1,4 +1,5 @@
1
1
  import '@operato/data-grist';
2
+ import '@things-factory/ai-assistant/dist-client/index.js';
2
3
  import { PageView } from '@operato/shell';
3
4
  import { FetchOption } from '@operato/data-grist';
4
5
  declare const TaxInvoiceApiPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
@@ -1,5 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import '@operato/data-grist';
3
+ import '@things-factory/ai-assistant/dist-client/index.js';
3
4
  import { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles';
4
5
  import { PageView } from '@operato/shell';
5
6
  import { css, html } from 'lit';
@@ -43,11 +44,6 @@ let TaxInvoiceApiPage = class TaxInvoiceApiPage extends localize(i18next)(Scoped
43
44
  title: i18next.t('button.save'),
44
45
  action: this._updateTaxInvoiceApi.bind(this),
45
46
  ...CommonButtonStyles.save
46
- },
47
- {
48
- title: i18next.t('button.delete'),
49
- action: this._deleteTaxAuditResult.bind(this),
50
- ...CommonButtonStyles.delete
51
47
  }
52
48
  ]
53
49
  };
@@ -56,6 +52,14 @@ let TaxInvoiceApiPage = class TaxInvoiceApiPage extends localize(i18next)(Scoped
56
52
  const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
57
53
  return html `
58
54
  <ox-grist class="page-fill" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
55
+ <!-- What is done to the picked rows: over the column heads while rows are picked (ADR-0225). -->
56
+ <ox-assistant-selection-bar
57
+ slot="selection"
58
+ .gridOf=${() => this.grist}
59
+ name=${i18next.t('title.tax invoice api')}
60
+ .assistant=${false}
61
+ .actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this._deleteTaxAuditResult() }]}
62
+ ></ox-assistant-selection-bar>
59
63
  <div slot="headroom" class="header">
60
64
  <!-- <div class="filters">
61
65
  <ox-filters-form autofocus without-search></ox-filters-form>
@@ -66,9 +70,11 @@ let TaxInvoiceApiPage = class TaxInvoiceApiPage extends localize(i18next)(Scoped
66
70
  }
67
71
  async pageInitialized(lifecycle) {
68
72
  this.gristConfig = {
73
+ /* On a phone: the business and the provider, then its registration number, whether it is the default and the last change - each with its name. */
69
74
  list: {
70
- fields: ['name', 'description'],
71
- details: ['name', 'updatedAt']
75
+ fields: ['businessName', 'provider'],
76
+ details: ['businessRegistrationNumber', 'isDefault', 'updatedAt'],
77
+ labeled: true
72
78
  },
73
79
  columns: [
74
80
  { type: 'gutter', gutterName: 'sequence' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/tax-invoice",
3
- "version": "10.1.302",
3
+ "version": "10.1.304",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "files": [
@@ -50,14 +50,14 @@
50
50
  "@operato/input": "^10.29.79",
51
51
  "@operato/layout": "^10.29.69",
52
52
  "@operato/shell": "^10.29.69",
53
- "@things-factory/ai-assistant": "^10.1.302",
54
- "@things-factory/attachment-base": "^10.1.302",
55
- "@things-factory/auth-base": "^10.1.302",
53
+ "@things-factory/ai-assistant": "^10.1.304",
54
+ "@things-factory/attachment-base": "^10.1.304",
55
+ "@things-factory/auth-base": "^10.1.304",
56
56
  "@things-factory/env": "^10.1.298",
57
- "@things-factory/export-ui-excel": "^10.1.302",
58
- "@things-factory/shell": "^10.1.302",
57
+ "@things-factory/export-ui-excel": "^10.1.304",
58
+ "@things-factory/shell": "^10.1.304",
59
59
  "graphql-upload": "^15.0.2",
60
60
  "xlsx": "^0.18.5"
61
61
  },
62
- "gitHead": "2e754aaeafcd39f5c6f4b7c8847a6c60ffe0789c"
62
+ "gitHead": "76ce38519069ba90190d69d2a9d6c130bc981cf0"
63
63
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "title.tax invoice": "Tax invoice",
3
+ "field.tax invoice party": "Counterparty",
3
4
  "field.tax invoice category": "Category",
4
5
  "field.issue date": "Written",
5
6
  "field.signature date": "Issued",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "title.tax invoice": "세금계산서",
3
- "title.tax invoice list": "세금계산서 리스트",
3
+ "title.tax invoice list": "세금계산서 목록",
4
4
  "title.title.import tax invoice": "세금계산서 임포트",
5
5
  "title.company list": "업체 리스트",
6
6
  "title.tax invoice send": "세금계산서 보내기",
@@ -40,6 +40,7 @@
40
40
  "field.api key": "API Key",
41
41
  "field.api account id": "API 계정 ID",
42
42
  "field.api account password": "API 계정 비밀번호",
43
+ "field.tax invoice party": "거래처",
43
44
  "field.tax invoice category": "분류",
44
45
  "field.issue date": "작성일자",
45
46
  "field.signature date": "발급일자",