@things-factory/tax-invoice 6.2.125 → 6.2.129

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 (48) hide show
  1. package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +99 -61
  2. package/client/pages/tax-invoice-company/tax-invoice-company-importer.ts +0 -10
  3. package/client/pages/tax-invoice-company/tax-invoice-company-list-page.ts +0 -32
  4. package/client/pages/tax-invoice-send/tax-invoice-send-page.ts +2 -2
  5. package/config/config.development.js +13 -0
  6. package/config/config.production.js +13 -0
  7. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.d.ts +3 -2
  8. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +91 -61
  9. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js.map +1 -1
  10. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.d.ts +2 -11
  11. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js +0 -10
  12. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +1 -1
  13. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.d.ts +0 -8
  14. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js +0 -32
  15. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js.map +1 -1
  16. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +2 -2
  17. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -1
  18. package/dist-client/tsconfig.tsbuildinfo +1 -1
  19. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js +20 -12
  20. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js.map +1 -1
  21. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js +13 -7
  22. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js.map +1 -1
  23. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +3 -7
  24. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +1 -1
  25. package/dist-server/service/tax-invoice-api/tax-invoice-api.js +9 -21
  26. package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +1 -1
  27. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js +27 -6
  28. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js.map +1 -1
  29. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js +55 -5
  30. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js.map +1 -1
  31. package/dist-server/service/tax-invoice-company/tax-invoice-company.js +1 -19
  32. package/dist-server/service/tax-invoice-company/tax-invoice-company.js.map +1 -1
  33. package/dist-server/service/unipost-api/tax-invoice-inquiry.js +6 -10
  34. package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +1 -1
  35. package/dist-server/service/unipost-api/tax-invoice-send.js +4 -5
  36. package/dist-server/service/unipost-api/tax-invoice-send.js.map +1 -1
  37. package/dist-server/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +6 -5
  39. package/server/service/tax-invoice-api/tax-invoice-api-mutation.ts +34 -20
  40. package/server/service/tax-invoice-api/tax-invoice-api-query.ts +12 -6
  41. package/server/service/tax-invoice-api/tax-invoice-api-type.ts +2 -5
  42. package/server/service/tax-invoice-api/tax-invoice-api.ts +9 -19
  43. package/server/service/tax-invoice-company/tax-invoice-company-query.ts +24 -5
  44. package/server/service/tax-invoice-company/tax-invoice-company-type.ts +40 -4
  45. package/server/service/tax-invoice-company/tax-invoice-company.ts +0 -18
  46. package/server/service/unipost-api/tax-invoice-inquiry.ts +6 -10
  47. package/server/service/unipost-api/tax-invoice-send.ts +5 -5
  48. package/translations/ko.json +1 -0
@@ -11,6 +11,7 @@ import { i18next, localize } from '@operato/i18n'
11
11
  import { notify } from '@operato/layout'
12
12
  import { isMobileDevice } from '@operato/utils'
13
13
  import gql from 'graphql-tag'
14
+ import { OxPrompt } from '@operato/popup'
14
15
 
15
16
  @customElement('tax-invoice-api-page')
16
17
  export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(PageView)) {
@@ -47,6 +48,11 @@ export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(Pag
47
48
  title: i18next.t('button.save'),
48
49
  action: this._updateTaxInvoiceApi.bind(this),
49
50
  ...CommonButtonStyles.save
51
+ },
52
+ {
53
+ title: i18next.t('button.delete'),
54
+ action: this._deleteTaxAuditResult.bind(this),
55
+ ...CommonButtonStyles.delete
50
56
  }
51
57
  ]
52
58
  }
@@ -68,25 +74,23 @@ export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(Pag
68
74
  { type: 'gutter', gutterName: 'sequence' },
69
75
  { type: 'gutter', gutterName: 'row-selector', multiple: true },
70
76
  {
71
- type: 'string',
72
- name: 'name',
73
- header: i18next.t('field.name'),
77
+ type: 'boolean',
78
+ name: 'isDefault',
79
+ header: i18next.t('field.is_default'),
74
80
  record: {
75
81
  editable: true,
76
- classifier: () => ({ emphasized: ['#D1E8FF', '#000'] })
82
+ align: 'center'
77
83
  },
78
- sortable: true,
79
- width: 150
84
+ width: 70
80
85
  },
81
86
  {
82
87
  type: 'string',
83
- name: 'description',
84
- header: i18next.t('field.description'),
88
+ name: 'provider',
89
+ header: i18next.t('field.provider'),
85
90
  record: {
86
91
  editable: true
87
92
  },
88
- filter: 'search',
89
- width: 200
93
+ width: 150
90
94
  },
91
95
  {
92
96
  type: 'string',
@@ -119,9 +123,7 @@ export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(Pag
119
123
  type: 'string',
120
124
  name: 'businessRegistrationNumber',
121
125
  header: i18next.t('field.business registration number'),
122
- record: {
123
- editable: true
124
- },
126
+ record: { editable: true },
125
127
  width: 150
126
128
  },
127
129
  {
@@ -256,78 +258,82 @@ export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(Pag
256
258
  },
257
259
  width: 180
258
260
  }
259
- ],
260
- rows: {
261
- selectable: {
262
- multiple: true
263
- },
264
- appendable: false
265
- }
261
+ ]
266
262
  }
267
263
  }
268
264
 
269
265
  async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {
270
266
  const response = await client.query({
271
267
  query: gql`
272
- query TaxInvoiceApi {
273
- response: taxInvoiceApi {
274
- id
275
- name
276
- description
277
- apiKey
278
- apiAccountId
279
- apiAccountPassword
280
- businessRegistrationNumber
281
- branchIdentification
282
- businessName
283
- representativeName
284
- address
285
- businessType
286
- industryType
287
- department
288
- contactName
289
- contactPhone
290
- contactEmail
291
- contactCellPhone
292
- attributes
293
- updater {
268
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
269
+ responses: taxInvoiceApis(filters: $filters, pagination: $pagination, sortings: $sortings) {
270
+ items {
294
271
  id
295
- name
272
+ isDefault
273
+ provider
274
+ apiKey
275
+ apiAccountId
276
+ apiAccountPassword
277
+ businessRegistrationNumber
278
+ branchIdentification
279
+ businessName
280
+ representativeName
281
+ address
282
+ businessType
283
+ industryType
284
+ department
285
+ contactName
286
+ contactPhone
287
+ contactEmail
288
+ contactCellPhone
289
+ attributes
290
+ updater {
291
+ id
292
+ name
293
+ }
294
+ updatedAt
296
295
  }
297
- updatedAt
296
+ total
298
297
  }
299
298
  }
300
- `
299
+ `,
300
+ variables: {
301
+ filters,
302
+ pagination: { page, limit },
303
+ sortings
304
+ }
301
305
  })
302
306
 
303
- const records = response.data.response ? [response.data.response] : [{}]
304
-
305
307
  return {
306
- total: 1,
307
- records: records
308
+ total: response.data.responses.total || 0,
309
+ records: response.data.responses.items || []
308
310
  }
309
311
  }
310
312
 
311
313
  async _updateTaxInvoiceApi() {
312
- let patch = this.grist.dirtyRecords[0]
313
- if (patch) {
314
- let patchField: any = patch.id ? { id: patch.id } : {}
315
- const dirtyFields = patch.__dirtyfields__
316
- for (let key in dirtyFields) {
317
- patchField[key] = key === 'type' ? Number(dirtyFields[key].after) : dirtyFields[key].after
318
- }
319
- patchField.cuFlag = patch.id ? 'M' : '+'
314
+ let patches = this.grist.dirtyRecords
315
+ if (patches && patches.length) {
316
+ patches = patches.map(patch => {
317
+ let patchField: any = patch.id ? { id: patch.id } : {}
318
+ const dirtyFields = patch.__dirtyfields__
319
+ for (let key in dirtyFields) {
320
+ patchField[key] = dirtyFields[key].after
321
+ }
322
+ patchField.cuFlag = patch.__dirty__
323
+
324
+ return patchField
325
+ })
320
326
 
321
327
  const response = await client.mutate({
322
328
  mutation: gql`
323
- mutation ($patch: TaxInvoiceApiPatch!) {
324
- updateMultipleTaxInvoiceApi(patch: $patch) {
325
- name
329
+ mutation ($patches: [TaxInvoiceApiPatch!]!) {
330
+ updateMultipleTaxInvoiceApi(patches: $patches) {
331
+ provider
326
332
  }
327
333
  }
328
334
  `,
329
335
  variables: {
330
- patch: patchField
336
+ patches
331
337
  }
332
338
  })
333
339
 
@@ -363,4 +369,36 @@ export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(Pag
363
369
 
364
370
  return response.data?.attributeSet || {}
365
371
  }
372
+
373
+ async _deleteTaxAuditResult() {
374
+ if (
375
+ await OxPrompt.open({
376
+ title: i18next.t('text.are_you_sure'),
377
+ text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
378
+ confirmButton: { text: i18next.t('button.confirm') },
379
+ cancelButton: { text: i18next.t('button.cancel') }
380
+ })
381
+ ) {
382
+ const ids = this.grist.selected.map(record => record.id)
383
+ if (ids && ids.length > 0) {
384
+ const response = await client.mutate({
385
+ mutation: gql`
386
+ mutation ($ids: [String!]!) {
387
+ deleteTaxInvoiceApis(ids: $ids)
388
+ }
389
+ `,
390
+ variables: {
391
+ ids
392
+ }
393
+ })
394
+
395
+ if (!response.errors) {
396
+ this.grist.fetch()
397
+ notify({
398
+ message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
399
+ })
400
+ }
401
+ }
402
+ }
403
+ }
366
404
  }
@@ -7,7 +7,6 @@ import { property } from 'lit/decorators.js'
7
7
  import { client } from '@operato/graphql'
8
8
  import { i18next } from '@operato/i18n'
9
9
  import { isMobileDevice } from '@operato/utils'
10
- import { COMPANY_TYPE_LABEL } from './tax-invoice-company-list-page'
11
10
 
12
11
  export class TaxInvoiceCompanyImporter extends LitElement {
13
12
  static styles = [
@@ -52,15 +51,6 @@ export class TaxInvoiceCompanyImporter extends LitElement {
52
51
  header: i18next.t('field.description'),
53
52
  width: 200
54
53
  },
55
- {
56
- type: 'select',
57
- name: 'type',
58
- header: i18next.t('field.type'),
59
- record: {
60
- renderer: value => COMPANY_TYPE_LABEL[value]
61
- },
62
- width: 100
63
- },
64
54
  {
65
55
  type: 'string',
66
56
  name: 'businessRegistrationNumber',
@@ -14,15 +14,6 @@ import { isMobileDevice } from '@operato/utils'
14
14
  import gql from 'graphql-tag'
15
15
  import { TaxInvoiceCompanyImporter } from './tax-invoice-company-importer'
16
16
 
17
- export enum CompanyType {
18
- SUPPLIER = 10, // 공급자
19
- BUYER = 20 // 거래처
20
- }
21
- export const COMPANY_TYPE_LABEL = {
22
- [CompanyType.SUPPLIER]: '공급자',
23
- [CompanyType.BUYER]: '거래처'
24
- }
25
-
26
17
  @customElement('tax-invoice-company-list-page')
27
18
  export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsMixin(PageView)) {
28
19
  static styles = [
@@ -122,27 +113,6 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
122
113
  filter: 'search',
123
114
  width: 200
124
115
  },
125
- {
126
- type: 'select',
127
- name: 'type',
128
- header: i18next.t('field.type'),
129
- record: {
130
- editable: true,
131
- classifier: () => ({ emphasized: ['#D1E8FF', '#000'] }),
132
- options: [
133
- {},
134
- {
135
- display: i18next.t('text.company supplier'),
136
- value: CompanyType.SUPPLIER
137
- },
138
- {
139
- display: i18next.t('text.company buyer'),
140
- value: CompanyType.BUYER
141
- }
142
- ]
143
- },
144
- width: 100
145
- },
146
116
  {
147
117
  type: 'string',
148
118
  name: 'businessRegistrationNumber',
@@ -313,7 +283,6 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
313
283
  id
314
284
  name
315
285
  description
316
- type
317
286
  businessRegistrationNumber
318
287
  branchIdentification
319
288
  businessName
@@ -445,7 +414,6 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
445
414
  'id',
446
415
  'name',
447
416
  'description',
448
- 'type',
449
417
  'businessRegistrationNumber',
450
418
  'branchIdentification',
451
419
  'businessName',
@@ -675,8 +675,8 @@ export class TaxInvoiceSendPage extends localize(i18next)(ScopedElementsMixin(Pa
675
675
  async _fetchSupplier() {
676
676
  const response = await client.query({
677
677
  query: gql`
678
- query TaxInvoiceApi {
679
- response: taxInvoiceApi {
678
+ query taxInvoiceDefaultCompany {
679
+ response: taxInvoiceDefaultCompany {
680
680
  businessRegistrationNumber
681
681
  branchIdentification
682
682
  businessName
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 유니택스 API 개발서버 URL (! 운영서버 URL은 config.production 참고)
3
+ * INQUIRY_URL: 세금계산서 조회
4
+ * CONFIRM_URL: 세금계산서 조회 후 유니택스에 처리 결과 갱신
5
+ * SEND_URL: 세금계산서 발행
6
+ */
7
+ module.exports = {
8
+ unitax: {
9
+ INQUIRY_URL: 'https://inf1dev.unipost.co.kr:47523/unitax/rest/v3/hometax/searchbills',
10
+ CONFIRM_URL: 'https://inf1dev.unipost.co.kr:47523/unitax/rest/v3/hometax/updateBills',
11
+ SEND_URL: 'https://inf2dev.unipost.co.kr:47543/mbill-etaxr-server/api/rest/v3/receivebill'
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 유니택스 API 운영서버 URL (! 개발서버 URL은 config.development 참고)
3
+ * INQUIRY_URL: 세금계산서 조회
4
+ * CONFIRM_URL: 세금계산서 조회 후 유니택스에 처리 결과 갱신
5
+ * SEND_URL: 세금계산서 발행
6
+ */
7
+ module.exports = {
8
+ unitax: {
9
+ INQUIRY_URL: 'https://inf1.unipost.co.kr/unitax/rest/v3/hometax/searchbills',
10
+ CONFIRM_URL: 'https://inf1.unipost.co.kr/unitax/rest/v3/hometax/updateBills',
11
+ SEND_URL: 'https://inf1.unipost.co.kr/mbill-etaxr-server/api/rest/v3/receivebill'
12
+ }
13
+ }
@@ -25,10 +25,11 @@ export declare class TaxInvoiceApiPage extends TaxInvoiceApiPage_base {
25
25
  render(): import("lit-html").TemplateResult<1>;
26
26
  pageInitialized(lifecycle: any): Promise<void>;
27
27
  fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
28
- total: number;
29
- records: any[];
28
+ total: any;
29
+ records: any;
30
30
  }>;
31
31
  _updateTaxInvoiceApi(): Promise<void>;
32
32
  getAttributeSetForEntity(): Promise<any>;
33
+ _deleteTaxAuditResult(): Promise<void>;
33
34
  }
34
35
  export {};
@@ -11,6 +11,7 @@ import { i18next, localize } from '@operato/i18n';
11
11
  import { notify } from '@operato/layout';
12
12
  import { isMobileDevice } from '@operato/utils';
13
13
  import gql from 'graphql-tag';
14
+ import { OxPrompt } from '@operato/popup';
14
15
  let TaxInvoiceApiPage = class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(PageView)) {
15
16
  constructor() {
16
17
  super(...arguments);
@@ -21,7 +22,8 @@ let TaxInvoiceApiPage = class TaxInvoiceApiPage extends localize(i18next)(Scoped
21
22
  title: i18next.t('title.tax invoice api'),
22
23
  help: 'tax-invoice-api/tax-invoice-api',
23
24
  actions: [
24
- Object.assign({ title: i18next.t('button.save'), action: this._updateTaxInvoiceApi.bind(this) }, CommonButtonStyles.save)
25
+ Object.assign({ title: i18next.t('button.save'), action: this._updateTaxInvoiceApi.bind(this) }, CommonButtonStyles.save),
26
+ Object.assign({ title: i18next.t('button.delete'), action: this._deleteTaxAuditResult.bind(this) }, CommonButtonStyles.delete)
25
27
  ]
26
28
  };
27
29
  }
@@ -39,25 +41,23 @@ let TaxInvoiceApiPage = class TaxInvoiceApiPage extends localize(i18next)(Scoped
39
41
  { type: 'gutter', gutterName: 'sequence' },
40
42
  { type: 'gutter', gutterName: 'row-selector', multiple: true },
41
43
  {
42
- type: 'string',
43
- name: 'name',
44
- header: i18next.t('field.name'),
44
+ type: 'boolean',
45
+ name: 'isDefault',
46
+ header: i18next.t('field.is_default'),
45
47
  record: {
46
48
  editable: true,
47
- classifier: () => ({ emphasized: ['#D1E8FF', '#000'] })
49
+ align: 'center'
48
50
  },
49
- sortable: true,
50
- width: 150
51
+ width: 70
51
52
  },
52
53
  {
53
54
  type: 'string',
54
- name: 'description',
55
- header: i18next.t('field.description'),
55
+ name: 'provider',
56
+ header: i18next.t('field.provider'),
56
57
  record: {
57
58
  editable: true
58
59
  },
59
- filter: 'search',
60
- width: 200
60
+ width: 150
61
61
  },
62
62
  {
63
63
  type: 'string',
@@ -90,9 +90,7 @@ let TaxInvoiceApiPage = class TaxInvoiceApiPage extends localize(i18next)(Scoped
90
90
  type: 'string',
91
91
  name: 'businessRegistrationNumber',
92
92
  header: i18next.t('field.business registration number'),
93
- record: {
94
- editable: true
95
- },
93
+ record: { editable: true },
96
94
  width: 150
97
95
  },
98
96
  {
@@ -227,73 +225,77 @@ let TaxInvoiceApiPage = class TaxInvoiceApiPage extends localize(i18next)(Scoped
227
225
  },
228
226
  width: 180
229
227
  }
230
- ],
231
- rows: {
232
- selectable: {
233
- multiple: true
234
- },
235
- appendable: false
236
- }
228
+ ]
237
229
  };
238
230
  }
239
231
  async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }) {
240
232
  const response = await client.query({
241
233
  query: gql `
242
- query TaxInvoiceApi {
243
- response: taxInvoiceApi {
244
- id
245
- name
246
- description
247
- apiKey
248
- apiAccountId
249
- apiAccountPassword
250
- businessRegistrationNumber
251
- branchIdentification
252
- businessName
253
- representativeName
254
- address
255
- businessType
256
- industryType
257
- department
258
- contactName
259
- contactPhone
260
- contactEmail
261
- contactCellPhone
262
- attributes
263
- updater {
234
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
235
+ responses: taxInvoiceApis(filters: $filters, pagination: $pagination, sortings: $sortings) {
236
+ items {
264
237
  id
265
- name
238
+ isDefault
239
+ provider
240
+ apiKey
241
+ apiAccountId
242
+ apiAccountPassword
243
+ businessRegistrationNumber
244
+ branchIdentification
245
+ businessName
246
+ representativeName
247
+ address
248
+ businessType
249
+ industryType
250
+ department
251
+ contactName
252
+ contactPhone
253
+ contactEmail
254
+ contactCellPhone
255
+ attributes
256
+ updater {
257
+ id
258
+ name
259
+ }
260
+ updatedAt
266
261
  }
267
- updatedAt
262
+ total
268
263
  }
269
264
  }
270
- `
265
+ `,
266
+ variables: {
267
+ filters,
268
+ pagination: { page, limit },
269
+ sortings
270
+ }
271
271
  });
272
- const records = response.data.response ? [response.data.response] : [{}];
273
272
  return {
274
- total: 1,
275
- records: records
273
+ total: response.data.responses.total || 0,
274
+ records: response.data.responses.items || []
276
275
  };
277
276
  }
278
277
  async _updateTaxInvoiceApi() {
279
- let patch = this.grist.dirtyRecords[0];
280
- if (patch) {
281
- let patchField = patch.id ? { id: patch.id } : {};
282
- const dirtyFields = patch.__dirtyfields__;
283
- for (let key in dirtyFields) {
284
- patchField[key] = key === 'type' ? Number(dirtyFields[key].after) : dirtyFields[key].after;
285
- }
286
- patchField.cuFlag = patch.id ? 'M' : '+';
278
+ let patches = this.grist.dirtyRecords;
279
+ if (patches && patches.length) {
280
+ patches = patches.map(patch => {
281
+ let patchField = patch.id ? { id: patch.id } : {};
282
+ const dirtyFields = patch.__dirtyfields__;
283
+ for (let key in dirtyFields) {
284
+ patchField[key] = dirtyFields[key].after;
285
+ }
286
+ patchField.cuFlag = patch.__dirty__;
287
+ return patchField;
288
+ });
287
289
  const response = await client.mutate({
288
290
  mutation: gql `
289
- mutation ($patch: TaxInvoiceApiPatch!) {
290
- updateMultipleTaxInvoiceApi(patch: $patch) {
291
- name
291
+ mutation ($patches: [TaxInvoiceApiPatch!]!) {
292
+ updateMultipleTaxInvoiceApi(patches: $patches) {
293
+ provider
292
294
  }
293
295
  }
294
296
  `,
295
297
  variables: {
296
- patch: patchField
298
+ patches
297
299
  }
298
300
  });
299
301
  if (!response.errors) {
@@ -328,6 +330,34 @@ let TaxInvoiceApiPage = class TaxInvoiceApiPage extends localize(i18next)(Scoped
328
330
  });
329
331
  return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.attributeSet) || {};
330
332
  }
333
+ async _deleteTaxAuditResult() {
334
+ if (await OxPrompt.open({
335
+ title: i18next.t('text.are_you_sure'),
336
+ text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
337
+ confirmButton: { text: i18next.t('button.confirm') },
338
+ cancelButton: { text: i18next.t('button.cancel') }
339
+ })) {
340
+ const ids = this.grist.selected.map(record => record.id);
341
+ if (ids && ids.length > 0) {
342
+ const response = await client.mutate({
343
+ mutation: gql `
344
+ mutation ($ids: [String!]!) {
345
+ deleteTaxInvoiceApis(ids: $ids)
346
+ }
347
+ `,
348
+ variables: {
349
+ ids
350
+ }
351
+ });
352
+ if (!response.errors) {
353
+ this.grist.fetch();
354
+ notify({
355
+ message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
356
+ });
357
+ }
358
+ }
359
+ }
360
+ }
331
361
  };
332
362
  TaxInvoiceApiPage.styles = [
333
363
  ScrollbarStyles,