@things-factory/document-template-ui 4.3.99 → 4.3.109-alpha.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.
@@ -85,18 +85,6 @@ class DocumentTemplateList extends localize(i18next)(PageView) {
85
85
  this.templateTypes = await getCodeByName('TEMPLATE_TYPES')
86
86
 
87
87
  this.searchFields = [
88
- {
89
- name: 'name',
90
- label: i18next.t('field.name'),
91
- type: 'text',
92
- props: { searchOper: 'i_like' }
93
- },
94
- {
95
- name: 'description',
96
- label: i18next.t('field.description'),
97
- type: 'text',
98
- props: { searchOper: 'i_like' }
99
- },
100
88
  {
101
89
  name: 'category',
102
90
  label: i18next.t('field.category'),
@@ -107,7 +95,7 @@ class DocumentTemplateList extends localize(i18next)(PageView) {
107
95
 
108
96
  this.config = {
109
97
  list: {
110
- fields: ['category', 'domain', 'updatedAt', 'updater']
98
+ fields: ['category', 'description', 'domain', 'updatedAt', 'updater']
111
99
  },
112
100
  rows: { appendable: false, selectable: { multiple: true } },
113
101
  columns: [
@@ -121,6 +109,14 @@ class DocumentTemplateList extends localize(i18next)(PageView) {
121
109
  sortable: true,
122
110
  width: 150
123
111
  },
112
+ {
113
+ type: 'string',
114
+ name: 'description',
115
+ header: i18next.t('field.description'),
116
+ record: { editable: false, align: 'left' },
117
+ sortable: true,
118
+ width: 200
119
+ },
124
120
  {
125
121
  type: 'object',
126
122
  name: 'domain',
@@ -121,7 +121,10 @@ class DocumentUploadTemplate extends localize(i18next)(LitElement) {
121
121
  }
122
122
 
123
123
  _getAttachmentInfo() {
124
- if (this.renderRoot.querySelector('form').checkValidity()) {
124
+ if (!this._template.files) {
125
+ throw new Error('no attachment uploaded')
126
+ }
127
+ else if (this.renderRoot.querySelector('form').checkValidity()) {
125
128
  return {
126
129
  file: this._template.files[0],
127
130
  category: this._getInputByName('category').value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/document-template-ui",
3
- "version": "4.3.99",
3
+ "version": "4.3.109-alpha.0",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,13 +24,13 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/code-base": "^4.3.99",
28
- "@things-factory/document-template-base": "^4.3.99",
29
- "@things-factory/form-ui": "^4.3.99",
30
- "@things-factory/grist-ui": "^4.3.99",
31
- "@things-factory/i18n-base": "^4.3.99",
32
- "@things-factory/styles": "^4.3.99",
33
- "@things-factory/utils": "^4.3.99"
27
+ "@things-factory/code-base": "^4.3.109-alpha.0",
28
+ "@things-factory/document-template-base": "^4.3.109-alpha.0",
29
+ "@things-factory/form-ui": "^4.3.109-alpha.0",
30
+ "@things-factory/grist-ui": "^4.3.109-alpha.0",
31
+ "@things-factory/i18n-base": "^4.3.109-alpha.0",
32
+ "@things-factory/styles": "^4.3.109-alpha.0",
33
+ "@things-factory/utils": "^4.3.109-alpha.0"
34
34
  },
35
- "gitHead": "01f43a1b95b1573e8f2f3e134d950a0bbbe16324"
35
+ "gitHead": "a4e928b10c5db079df6e2a9ece616de77625ed0a"
36
36
  }