@things-factory/code-ui 6.2.6 → 6.2.8
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,7 +11,7 @@ import { client, gqlContext, buildArgs } from '@operato/graphql'
|
|
|
11
11
|
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
12
12
|
import { isMobileDevice } from '@operato/utils'
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
|
15
15
|
|
|
16
16
|
export class CodeManagementDetail extends localize(i18next)(LitElement) {
|
|
17
17
|
static get styles() {
|
|
@@ -99,7 +99,7 @@ export class CodeManagementDetail extends localize(i18next)(LitElement) {
|
|
|
99
99
|
async firstUpdated() {
|
|
100
100
|
this.config = {
|
|
101
101
|
rows: { selectable: { multiple: true } },
|
|
102
|
-
pagination: { pages
|
|
102
|
+
pagination: { pages: [100, 200, 500] },
|
|
103
103
|
columns: [
|
|
104
104
|
{ type: 'gutter', gutterName: 'dirty' },
|
|
105
105
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -224,33 +224,34 @@ export class CodeManagementDetail extends localize(i18next)(LitElement) {
|
|
|
224
224
|
return this.showToast(i18next.t('text.there_is_nothing_to_delete'))
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
227
|
+
if (
|
|
228
|
+
await OxPrompt.open({
|
|
229
|
+
type: 'warning',
|
|
230
|
+
title: i18next.t('button.delete'),
|
|
231
|
+
text: i18next.t('text.are_you_sure'),
|
|
232
|
+
confirmButton: { text: i18next.t('button.delete') },
|
|
233
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
234
|
+
})
|
|
235
|
+
) {
|
|
236
|
+
const response = await client.query({
|
|
237
|
+
query: gql`
|
|
238
|
+
mutation {
|
|
239
|
+
deleteCommonCodeDetails(${buildArgs({ ids })})
|
|
240
|
+
}
|
|
241
|
+
`,
|
|
242
|
+
context: gqlContext()
|
|
243
|
+
})
|
|
234
244
|
|
|
235
|
-
|
|
245
|
+
if (!response.errors) {
|
|
246
|
+
OxPrompt.open({
|
|
247
|
+
type: 'success',
|
|
248
|
+
title: i18next.t('text.completed'),
|
|
249
|
+
text: i18next.t('text.data_deleted_successfully'),
|
|
250
|
+
confirmButton: { text: i18next.t('button.confirm') }
|
|
251
|
+
})
|
|
236
252
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
mutation {
|
|
240
|
-
deleteCommonCodeDetails(${buildArgs({ ids })})
|
|
241
|
-
}
|
|
242
|
-
`,
|
|
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'),
|
|
251
|
-
confirmButton: { text: i18next.t('button.confirm') }
|
|
252
|
-
})
|
|
253
|
-
this.dataGrist.fetch()
|
|
253
|
+
this.dataGrist.fetch()
|
|
254
|
+
}
|
|
254
255
|
}
|
|
255
256
|
}
|
|
256
257
|
|
|
@@ -14,7 +14,7 @@ import { PageView } from '@operato/shell'
|
|
|
14
14
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
15
15
|
import { isMobileDevice } from '@operato/utils'
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
|
18
18
|
|
|
19
19
|
class CodeManagement extends localize(i18next)(PageView) {
|
|
20
20
|
static get properties() {
|
|
@@ -113,7 +113,7 @@ class CodeManagement extends localize(i18next)(PageView) {
|
|
|
113
113
|
pageInitialized() {
|
|
114
114
|
this.config = {
|
|
115
115
|
rows: { selectable: { multiple: true } },
|
|
116
|
-
pagination: { pages
|
|
116
|
+
pagination: { pages: [50, 100, 200] },
|
|
117
117
|
columns: [
|
|
118
118
|
{ type: 'gutter', gutterName: 'dirty' },
|
|
119
119
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -230,33 +230,34 @@ class CodeManagement extends localize(i18next)(PageView) {
|
|
|
230
230
|
return this.showToast(i18next.t('text.there_is_nothing_to_delete'))
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
233
|
+
if (
|
|
234
|
+
await OxPrompt.open({
|
|
235
|
+
type: 'warning',
|
|
236
|
+
title: i18next.t('button.delete'),
|
|
237
|
+
text: i18next.t('text.are_you_sure'),
|
|
238
|
+
confirmButton: { text: i18next.t('button.delete') },
|
|
239
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
240
|
+
})
|
|
241
|
+
) {
|
|
242
|
+
const response = await client.query({
|
|
243
|
+
query: gql`
|
|
244
|
+
mutation {
|
|
245
|
+
deleteCommonCodes(${buildArgs({ ids })})
|
|
246
|
+
}
|
|
247
|
+
`,
|
|
248
|
+
context: gqlContext()
|
|
249
|
+
})
|
|
242
250
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
})
|
|
251
|
+
if (!response.errors) {
|
|
252
|
+
OxPrompt.open({
|
|
253
|
+
type: 'success',
|
|
254
|
+
title: i18next.t('text.completed'),
|
|
255
|
+
text: i18next.t('text.data_deleted_successfully'),
|
|
256
|
+
confirmButton: { text: i18next.t('button.confirm') }
|
|
257
|
+
})
|
|
251
258
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
type: 'success',
|
|
255
|
-
title: i18next.t('text.completed'),
|
|
256
|
-
text: i18next.t('text.data_deleted_successfully'),
|
|
257
|
-
confirmButton: { text: i18next.t('button.confirm') }
|
|
258
|
-
})
|
|
259
|
-
this.dataGrist.fetch()
|
|
259
|
+
this.dataGrist.fetch()
|
|
260
|
+
}
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
263
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/code-ui",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.8",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"@things-factory/i18n-base": "^6.2.6",
|
|
36
36
|
"@things-factory/shell": "^6.2.6"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "1687e2d45b0451ade0aeb1043f0fe107d097426e"
|
|
39
39
|
}
|