@things-factory/document-template-ui 4.3.131 → 4.3.138
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',
|
|
@@ -85,6 +85,7 @@ class DocumentUploadTemplate extends localize(i18next)(LitElement) {
|
|
|
85
85
|
async _createAttachment() {
|
|
86
86
|
try {
|
|
87
87
|
const attachment = this._getAttachmentInfo()
|
|
88
|
+
if (!attachment?.file) throw new Error('No file uploaded')
|
|
88
89
|
const response = await client.mutate({
|
|
89
90
|
mutation: gql`
|
|
90
91
|
mutation ($attachment: NewAttachment!) {
|
|
@@ -121,7 +122,10 @@ class DocumentUploadTemplate extends localize(i18next)(LitElement) {
|
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
_getAttachmentInfo() {
|
|
124
|
-
if (this.
|
|
125
|
+
if (!this._template.files) {
|
|
126
|
+
throw new Error('no attachment uploaded')
|
|
127
|
+
}
|
|
128
|
+
else if (this.renderRoot.querySelector('form').checkValidity()) {
|
|
125
129
|
return {
|
|
126
130
|
file: this._template.files[0],
|
|
127
131
|
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.
|
|
3
|
+
"version": "4.3.138",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@things-factory/code-base": "^4.3.
|
|
26
|
+
"@things-factory/code-base": "^4.3.138",
|
|
27
27
|
"@things-factory/document-template-base": "^4.3.131",
|
|
28
28
|
"@things-factory/form-ui": "^4.3.131",
|
|
29
|
-
"@things-factory/grist-ui": "^4.3.
|
|
29
|
+
"@things-factory/grist-ui": "^4.3.138",
|
|
30
30
|
"@things-factory/i18n-base": "^4.3.131",
|
|
31
31
|
"@things-factory/styles": "^4.3.131",
|
|
32
32
|
"@things-factory/utils": "^4.3.131"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "1d4e0a3ff6b8792c843b9735a28a3f5fb946b144"
|
|
35
35
|
}
|