@things-factory/document-template-ui 6.2.6 → 6.2.9
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.
|
@@ -11,10 +11,12 @@ import { openPopup } from '@operato/layout'
|
|
|
11
11
|
import { getCodeByName } from '@things-factory/code-base'
|
|
12
12
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
13
13
|
import { client, gqlContext } from '@operato/graphql'
|
|
14
|
-
import {
|
|
14
|
+
import { PageView } from '@things-factory/shell'
|
|
15
15
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
16
16
|
import { isMobileDevice } from '@operato/utils'
|
|
17
17
|
|
|
18
|
+
import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
|
19
|
+
|
|
18
20
|
class DocumentTemplateList extends localize(i18next)(PageView) {
|
|
19
21
|
static get properties() {
|
|
20
22
|
return {
|
|
@@ -224,32 +226,33 @@ class DocumentTemplateList extends localize(i18next)(PageView) {
|
|
|
224
226
|
return this.showToast(i18next.t('text.there_is_nothing_to_delete'))
|
|
225
227
|
}
|
|
226
228
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
if (!result.value) return
|
|
236
|
-
const response = await client.mutate({
|
|
237
|
-
mutation: gql`
|
|
238
|
-
mutation deleteAttachment($id: String!) {
|
|
239
|
-
deleteAttachment(id: $id)
|
|
240
|
-
}
|
|
241
|
-
`,
|
|
242
|
-
variables: { id },
|
|
243
|
-
context: gqlContext()
|
|
244
|
-
})
|
|
245
|
-
|
|
246
|
-
if (!response.errors) {
|
|
247
|
-
CustomAlert({
|
|
248
|
-
type: 'success',
|
|
249
|
-
title: i18next.t('text.completed'),
|
|
250
|
-
text: i18next.t('text.data_deleted_successfully')
|
|
229
|
+
if (
|
|
230
|
+
await OxPrompt.open({
|
|
231
|
+
type: 'warning',
|
|
232
|
+
title: i18next.t('button.delete'),
|
|
233
|
+
text: i18next.t('text.are_you_sure'),
|
|
234
|
+
confirmButton: { text: i18next.t('button.delete') },
|
|
235
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
251
236
|
})
|
|
252
|
-
|
|
237
|
+
) {
|
|
238
|
+
const response = await client.mutate({
|
|
239
|
+
mutation: gql`
|
|
240
|
+
mutation deleteAttachment($id: String!) {
|
|
241
|
+
deleteAttachment(id: $id)
|
|
242
|
+
}
|
|
243
|
+
`,
|
|
244
|
+
variables: { id },
|
|
245
|
+
context: gqlContext()
|
|
246
|
+
})
|
|
247
|
+
|
|
248
|
+
if (!response.errors) {
|
|
249
|
+
OxPrompt.open({
|
|
250
|
+
type: 'success',
|
|
251
|
+
title: i18next.t('text.completed'),
|
|
252
|
+
text: i18next.t('text.data_deleted_successfully')
|
|
253
|
+
})
|
|
254
|
+
this.dataGrist.fetch()
|
|
255
|
+
}
|
|
253
256
|
}
|
|
254
257
|
}
|
|
255
258
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/document-template-ui",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.9",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@operato/data-grist": "^1.3.5",
|
|
28
|
-
"@things-factory/code-base": "^6.2.
|
|
29
|
-
"@things-factory/document-template-base": "^6.2.
|
|
28
|
+
"@things-factory/code-base": "^6.2.9",
|
|
29
|
+
"@things-factory/document-template-base": "^6.2.9",
|
|
30
30
|
"@things-factory/form-ui": "^6.2.0",
|
|
31
31
|
"@things-factory/i18n-base": "^6.2.6",
|
|
32
32
|
"@things-factory/styles": "^6.2.0",
|
|
33
33
|
"@things-factory/utils": "^6.2.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "693195e55200a1160edb9837ea5498b746f82577"
|
|
36
36
|
}
|