@things-factory/tax-invoice 6.2.138 → 6.2.142

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.
@@ -0,0 +1,22 @@
1
+ import '@operato/data-grist';
2
+ import { LitElement } from 'lit';
3
+ export declare class TaxInvoiceCompanyImporter extends LitElement {
4
+ static styles: import("lit").CSSResult[];
5
+ taxInvoiceCompanies: any[];
6
+ columns: {
7
+ list: {
8
+ fields: string[];
9
+ };
10
+ pagination: {
11
+ infinite: boolean;
12
+ };
13
+ columns: {
14
+ type: string;
15
+ name: string;
16
+ header: string;
17
+ width: number;
18
+ }[];
19
+ };
20
+ render(): import("lit-html").TemplateResult<1>;
21
+ save(): Promise<void>;
22
+ }
@@ -0,0 +1,172 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@operato/data-grist';
3
+ import gql from 'graphql-tag';
4
+ import { css, html, LitElement } from 'lit';
5
+ import { property } from 'lit/decorators.js';
6
+ import { client } from '@operato/graphql';
7
+ import { i18next } from '@operato/i18n';
8
+ import { isMobileDevice } from '@operato/utils';
9
+ export class TaxInvoiceCompanyImporter extends LitElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.taxInvoiceCompanies = [];
13
+ this.columns = {
14
+ list: { fields: ['name', 'description'] },
15
+ pagination: { infinite: true },
16
+ columns: [
17
+ {
18
+ type: 'string',
19
+ name: 'name',
20
+ header: i18next.t('field.name'),
21
+ width: 150
22
+ },
23
+ {
24
+ type: 'string',
25
+ name: 'description',
26
+ header: i18next.t('field.description'),
27
+ width: 200
28
+ },
29
+ {
30
+ type: 'string',
31
+ name: 'businessRegistrationNumber',
32
+ header: i18next.t('field.business registration number'),
33
+ width: 150
34
+ },
35
+ {
36
+ type: 'string',
37
+ name: 'branchIdentification',
38
+ header: i18next.t('field.branch identification'),
39
+ width: 150
40
+ },
41
+ {
42
+ type: 'string',
43
+ name: 'businessName',
44
+ header: i18next.t('field.tax invoice business name'),
45
+ width: 150
46
+ },
47
+ {
48
+ type: 'string',
49
+ name: 'representativeName',
50
+ header: i18next.t('field.tax invoice representative name'),
51
+ width: 150
52
+ },
53
+ {
54
+ type: 'string',
55
+ name: 'address',
56
+ header: i18next.t('field.address'),
57
+ width: 200
58
+ },
59
+ {
60
+ type: 'string',
61
+ name: 'businessType',
62
+ header: i18next.t('field.business type'),
63
+ width: 100
64
+ },
65
+ {
66
+ type: 'string',
67
+ name: 'industryType',
68
+ header: i18next.t('field.industry type'),
69
+ width: 100
70
+ },
71
+ {
72
+ type: 'string',
73
+ name: 'department',
74
+ header: i18next.t('field.department'),
75
+ width: 150
76
+ },
77
+ {
78
+ type: 'string',
79
+ name: 'contactName',
80
+ header: i18next.t('field.contact name'),
81
+ width: 150
82
+ },
83
+ {
84
+ type: 'string',
85
+ name: 'contactPhone',
86
+ header: i18next.t('field.contact phone'),
87
+ width: 150
88
+ },
89
+ {
90
+ type: 'string',
91
+ name: 'contactEmail',
92
+ header: i18next.t('field.contact email'),
93
+ width: 150
94
+ },
95
+ {
96
+ type: 'string',
97
+ name: 'contactCellPhone',
98
+ header: i18next.t('field.contact cell phone'),
99
+ width: 150
100
+ },
101
+ {
102
+ type: 'attributes',
103
+ name: 'attributes',
104
+ header: i18next.t('field.attributes'),
105
+ width: 150
106
+ }
107
+ ]
108
+ };
109
+ }
110
+ render() {
111
+ return html `
112
+ <ox-grist
113
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
114
+ .config=${this.columns}
115
+ .data=${{
116
+ records: this.taxInvoiceCompanies
117
+ }}
118
+ ></ox-grist>
119
+
120
+ <div class="button-container">
121
+ <mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
122
+ </div>
123
+ `;
124
+ }
125
+ async save() {
126
+ var _a;
127
+ const response = await client.mutate({
128
+ mutation: gql `
129
+ mutation importTaxInvoiceCompanies($taxInvoiceCompanies: [TaxInvoiceCompanyPatch!]!) {
130
+ importTaxInvoiceCompanies(taxInvoiceCompanies: $taxInvoiceCompanies)
131
+ }
132
+ `,
133
+ variables: { taxInvoiceCompanies: this.taxInvoiceCompanies }
134
+ });
135
+ if ((_a = response.errors) === null || _a === void 0 ? void 0 : _a.length)
136
+ return;
137
+ this.dispatchEvent(new CustomEvent('imported'));
138
+ }
139
+ }
140
+ TaxInvoiceCompanyImporter.styles = [
141
+ css `
142
+ :host {
143
+ display: flex;
144
+ flex-direction: column;
145
+
146
+ background-color: #fff;
147
+ }
148
+
149
+ ox-grist {
150
+ flex: 1;
151
+ }
152
+
153
+ .button-container {
154
+ display: flex;
155
+ margin-left: auto;
156
+ padding: var(--padding-default);
157
+ }
158
+
159
+ mwc-button {
160
+ margin-left: var(--margin-default);
161
+ }
162
+ `
163
+ ];
164
+ __decorate([
165
+ property({ type: Array }),
166
+ __metadata("design:type", Array)
167
+ ], TaxInvoiceCompanyImporter.prototype, "taxInvoiceCompanies", void 0);
168
+ __decorate([
169
+ property({ type: Object }),
170
+ __metadata("design:type", Object)
171
+ ], TaxInvoiceCompanyImporter.prototype, "columns", void 0);
172
+ //# sourceMappingURL=tax-invoice-company-importer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tax-invoice-company-importer.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-company/tax-invoice-company-importer.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,OAAO,yBAA0B,SAAQ,UAAU;IAAzD;;QA0B6B,wBAAmB,GAAU,EAAE,CAAA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,MAAM;kBAChC,IAAI,CAAC,OAAO;gBACd;YACN,OAAO,EAAE,IAAI,CAAC,mBAAmB;SAClC;;;;qCAI4B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;;KAEjF,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,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE;SAC7D,CAAC,CAAA;QAEF,IAAI,MAAA,QAAQ,CAAC,MAAM,0CAAE,MAAM;YAAE,OAAM;QAEnC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IACjD,CAAC;;AAxJM,gCAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;KAqBF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;sEAAgC;AAC1D;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DA+F1B","sourcesContent":["import '@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'\n\nexport class TaxInvoiceCompanyImporter extends LitElement {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n padding: var(--padding-default);\n }\n\n mwc-button {\n margin-left: var(--margin-default);\n }\n `\n ]\n\n @property({ type: Array }) taxInvoiceCompanies: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'string',\n name: 'businessRegistrationNumber',\n header: i18next.t('field.business registration number'),\n width: 150\n },\n {\n type: 'string',\n name: 'branchIdentification',\n header: i18next.t('field.branch identification'),\n width: 150\n },\n {\n type: 'string',\n name: 'businessName',\n header: i18next.t('field.tax invoice business name'),\n width: 150\n },\n {\n type: 'string',\n name: 'representativeName',\n header: i18next.t('field.tax invoice representative name'),\n width: 150\n },\n {\n type: 'string',\n name: 'address',\n header: i18next.t('field.address'),\n width: 200\n },\n {\n type: 'string',\n name: 'businessType',\n header: i18next.t('field.business type'),\n width: 100\n },\n {\n type: 'string',\n name: 'industryType',\n header: i18next.t('field.industry type'),\n width: 100\n },\n {\n type: 'string',\n name: 'department',\n header: i18next.t('field.department'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactName',\n header: i18next.t('field.contact name'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactPhone',\n header: i18next.t('field.contact phone'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactEmail',\n header: i18next.t('field.contact email'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactCellPhone',\n header: i18next.t('field.contact cell phone'),\n width: 150\n },\n {\n type: 'attributes',\n name: 'attributes',\n header: i18next.t('field.attributes'),\n width: 150\n }\n ]\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.taxInvoiceCompanies\n }}\n ></ox-grist>\n\n <div class=\"button-container\">\n <mwc-button raised @click=\"${this.save.bind(this)}\">${i18next.t('button.save')}</mwc-button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importTaxInvoiceCompanies($taxInvoiceCompanies: [TaxInvoiceCompanyPatch!]!) {\n importTaxInvoiceCompanies(taxInvoiceCompanies: $taxInvoiceCompanies)\n }\n `,\n variables: { taxInvoiceCompanies: this.taxInvoiceCompanies }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
@@ -0,0 +1,77 @@
1
+ import '@operato/data-grist';
2
+ import { LitElement } from 'lit';
3
+ export declare class SupplierListPopup extends LitElement {
4
+ static styles: import("lit").CSSResult[];
5
+ private grist;
6
+ supplierList: any[];
7
+ columns: {
8
+ pagination: {
9
+ infinite: boolean;
10
+ };
11
+ columns: ({
12
+ type: string;
13
+ gutterName: string;
14
+ multiple?: undefined;
15
+ name?: undefined;
16
+ header?: undefined;
17
+ record?: undefined;
18
+ filter?: undefined;
19
+ sortable?: undefined;
20
+ width?: undefined;
21
+ } | {
22
+ type: string;
23
+ gutterName: string;
24
+ multiple: boolean;
25
+ name?: undefined;
26
+ header?: undefined;
27
+ record?: undefined;
28
+ filter?: undefined;
29
+ sortable?: undefined;
30
+ width?: undefined;
31
+ } | {
32
+ type: string;
33
+ name: string;
34
+ header: string;
35
+ record: {
36
+ editable: boolean;
37
+ };
38
+ filter: string;
39
+ sortable: boolean;
40
+ width: number;
41
+ gutterName?: undefined;
42
+ multiple?: undefined;
43
+ } | {
44
+ type: string;
45
+ name: string;
46
+ header: string;
47
+ record: {
48
+ editable: boolean;
49
+ };
50
+ filter: string;
51
+ width: number;
52
+ gutterName?: undefined;
53
+ multiple?: undefined;
54
+ sortable?: undefined;
55
+ } | {
56
+ type: string;
57
+ name: string;
58
+ header: string;
59
+ record: {
60
+ editable: boolean;
61
+ };
62
+ width: number;
63
+ gutterName?: undefined;
64
+ multiple?: undefined;
65
+ filter?: undefined;
66
+ sortable?: undefined;
67
+ })[];
68
+ rows: {
69
+ selectable: {
70
+ multiple: boolean;
71
+ };
72
+ appendable: boolean;
73
+ };
74
+ };
75
+ render(): import("lit-html").TemplateResult<1>;
76
+ select(): Promise<void>;
77
+ }
@@ -0,0 +1,209 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@operato/data-grist';
3
+ import { css, html, LitElement } from 'lit';
4
+ import { property, query } from 'lit/decorators.js';
5
+ import { DataGrist } from '@operato/data-grist';
6
+ import { i18next } from '@operato/i18n';
7
+ export class SupplierListPopup extends LitElement {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.supplierList = [];
11
+ this.columns = {
12
+ pagination: { infinite: true },
13
+ columns: [
14
+ { type: 'gutter', gutterName: 'sequence' },
15
+ { type: 'gutter', gutterName: 'row-selector', multiple: false },
16
+ {
17
+ type: 'string',
18
+ name: 'name',
19
+ header: i18next.t('field.name'),
20
+ record: {
21
+ editable: false
22
+ },
23
+ filter: 'search',
24
+ sortable: true,
25
+ width: 150
26
+ },
27
+ {
28
+ type: 'string',
29
+ name: 'description',
30
+ header: i18next.t('field.description'),
31
+ record: {
32
+ editable: false
33
+ },
34
+ filter: 'search',
35
+ width: 200
36
+ },
37
+ {
38
+ type: 'string',
39
+ name: 'businessRegistrationNumber',
40
+ header: i18next.t('field.business registration number'),
41
+ record: {
42
+ editable: false
43
+ },
44
+ width: 150
45
+ },
46
+ {
47
+ type: 'string',
48
+ name: 'branchIdentification',
49
+ header: i18next.t('field.branch identification'),
50
+ record: {
51
+ editable: false
52
+ },
53
+ width: 150
54
+ },
55
+ {
56
+ type: 'string',
57
+ name: 'businessName',
58
+ header: i18next.t('field.tax invoice business name'),
59
+ record: {
60
+ editable: false
61
+ },
62
+ width: 150
63
+ },
64
+ {
65
+ type: 'string',
66
+ name: 'representativeName',
67
+ header: i18next.t('field.tax invoice representative name'),
68
+ record: {
69
+ editable: false
70
+ },
71
+ width: 150
72
+ },
73
+ {
74
+ type: 'string',
75
+ name: 'address',
76
+ header: i18next.t('field.address'),
77
+ record: {
78
+ editable: false
79
+ },
80
+ width: 200
81
+ },
82
+ {
83
+ type: 'string',
84
+ name: 'businessType',
85
+ header: i18next.t('field.business type'),
86
+ record: {
87
+ editable: false
88
+ },
89
+ width: 100
90
+ },
91
+ {
92
+ type: 'string',
93
+ name: 'industryType',
94
+ header: i18next.t('field.industry type'),
95
+ record: {
96
+ editable: false
97
+ },
98
+ width: 100
99
+ },
100
+ {
101
+ type: 'string',
102
+ name: 'department',
103
+ header: i18next.t('field.department'),
104
+ record: {
105
+ editable: false
106
+ },
107
+ width: 150
108
+ },
109
+ {
110
+ type: 'string',
111
+ name: 'contactName',
112
+ header: i18next.t('field.contact name'),
113
+ record: {
114
+ editable: false
115
+ },
116
+ width: 150
117
+ },
118
+ {
119
+ type: 'string',
120
+ name: 'contactPhone',
121
+ header: i18next.t('field.contact phone'),
122
+ record: {
123
+ editable: false
124
+ },
125
+ width: 150
126
+ },
127
+ {
128
+ type: 'string',
129
+ name: 'contactEmail',
130
+ header: i18next.t('field.contact email'),
131
+ record: {
132
+ editable: false
133
+ },
134
+ width: 150
135
+ },
136
+ {
137
+ type: 'string',
138
+ name: 'contactCellPhone',
139
+ header: i18next.t('field.contact cell phone'),
140
+ record: {
141
+ editable: false
142
+ },
143
+ width: 150
144
+ }
145
+ ],
146
+ rows: {
147
+ selectable: {
148
+ multiple: false
149
+ },
150
+ appendable: false
151
+ }
152
+ };
153
+ }
154
+ render() {
155
+ return html `
156
+ <ox-grist
157
+ .mode=${'GRID'}
158
+ .config=${this.columns}
159
+ .data=${{
160
+ records: this.supplierList
161
+ }}
162
+ ></ox-grist>
163
+
164
+ <div class="button-container">
165
+ <mwc-button raised @click="${this.select.bind(this)}">${i18next.t('button.select')}</mwc-button>
166
+ </div>
167
+ `;
168
+ }
169
+ async select() {
170
+ this.dispatchEvent(new CustomEvent('selected', { detail: this.grist.selected[0] }));
171
+ }
172
+ }
173
+ SupplierListPopup.styles = [
174
+ css `
175
+ :host {
176
+ display: flex;
177
+ flex-direction: column;
178
+
179
+ background-color: #fff;
180
+ }
181
+
182
+ ox-grist {
183
+ flex: 1;
184
+ }
185
+
186
+ .button-container {
187
+ display: flex;
188
+ margin-left: auto;
189
+ padding: var(--padding-default);
190
+ }
191
+
192
+ mwc-button {
193
+ margin-left: var(--margin-default);
194
+ }
195
+ `
196
+ ];
197
+ __decorate([
198
+ query('ox-grist'),
199
+ __metadata("design:type", DataGrist)
200
+ ], SupplierListPopup.prototype, "grist", void 0);
201
+ __decorate([
202
+ property({ type: Array }),
203
+ __metadata("design:type", Array)
204
+ ], SupplierListPopup.prototype, "supplierList", void 0);
205
+ __decorate([
206
+ property({ type: Object }),
207
+ __metadata("design:type", Object)
208
+ ], SupplierListPopup.prototype, "columns", void 0);
209
+ //# sourceMappingURL=supplier-list-popup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supplier-list-popup.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-send/supplier-list-popup.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAG5B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAA;AAG5D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAAjD;;QA4B6B,iBAAY,GAAU,EAAE,CAAA;QACvB,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,QA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;oBACd,IAAI,EAAE,kBAAkB;oBACxB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC;oBAC7C,MAAM,EAAE;wBACN,QAAQ,EAAE,KAAK;qBAChB;oBACD,KAAK,EAAE,GAAG;iBACX;aACF;YACD,IAAI,EAAE;gBACJ,UAAU,EAAE;oBACV,QAAQ,EAAE,KAAK;iBAChB;gBACD,UAAU,EAAE,KAAK;aAClB;SACF,CAAA;IAqBH,CAAC;IAnBC,MAAM;QACJ,OAAO,IAAI,CAAA;;gBAEC,MAAM;kBACJ,IAAI,CAAC,OAAO;gBACd;YACN,OAAO,EAAE,IAAI,CAAC,YAAY;SAC3B;;;;qCAI4B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;;KAErF,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;;AA7LM,wBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;KAqBF;CACF,CAAA;AAED;IAAC,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;gDAAA;AAE5C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;uDAAyB;AACnD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDA6I1B","sourcesContent":["import '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property, state, query } from 'lit/decorators.js'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { Supplier } from './tax-invoice-send-page'\n\nexport class SupplierListPopup extends LitElement {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n padding: var(--padding-default);\n }\n\n mwc-button {\n margin-left: var(--margin-default);\n }\n `\n ]\n\n @query('ox-grist') private grist!: DataGrist\n\n @property({ type: Array }) supplierList: 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: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: false\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: 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 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.supplierList\n }}\n ></ox-grist>\n\n <div class=\"button-container\">\n <mwc-button raised @click=\"${this.select.bind(this)}\">${i18next.t('button.select')}</mwc-button>\n </div>\n `\n }\n\n async select() {\n this.dispatchEvent(new CustomEvent('selected', { detail: this.grist.selected[0] }))\n }\n}\n"]}