@things-factory/sales-ui 4.0.22 → 4.0.26
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.
- package/client/pages/vas-list.js +25 -22
- package/package.json +11 -11
package/client/pages/vas-list.js
CHANGED
|
@@ -4,7 +4,7 @@ import { getCodeByName } from '@things-factory/code-base'
|
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { openImportPopUp } from '@things-factory/import-ui'
|
|
6
6
|
import { client, CustomAlert, PageView } from '@things-factory/shell'
|
|
7
|
-
import {
|
|
7
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
8
8
|
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
9
9
|
import gql from 'graphql-tag'
|
|
10
10
|
import { css, html } from 'lit-element'
|
|
@@ -253,12 +253,8 @@ class VasList extends localize(i18next)(PageView) {
|
|
|
253
253
|
async fetchHandler({ page, limit, sorters = [{ name: 'name' }] }) {
|
|
254
254
|
const response = await client.query({
|
|
255
255
|
query: gql`
|
|
256
|
-
query {
|
|
257
|
-
vass(${
|
|
258
|
-
filters: this.searchForm.queryFilters,
|
|
259
|
-
pagination: { page, limit },
|
|
260
|
-
sortings: sorters
|
|
261
|
-
})}) {
|
|
256
|
+
query vass($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
257
|
+
vass(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
262
258
|
items {
|
|
263
259
|
id
|
|
264
260
|
name
|
|
@@ -270,7 +266,7 @@ class VasList extends localize(i18next)(PageView) {
|
|
|
270
266
|
operationGuideType
|
|
271
267
|
operationGuide
|
|
272
268
|
updatedAt
|
|
273
|
-
updater{
|
|
269
|
+
updater {
|
|
274
270
|
name
|
|
275
271
|
description
|
|
276
272
|
}
|
|
@@ -278,7 +274,12 @@ class VasList extends localize(i18next)(PageView) {
|
|
|
278
274
|
total
|
|
279
275
|
}
|
|
280
276
|
}
|
|
281
|
-
|
|
277
|
+
`,
|
|
278
|
+
variables: {
|
|
279
|
+
filters: this.searchForm.queryFilters,
|
|
280
|
+
pagination: { page, limit },
|
|
281
|
+
sortings: sorters
|
|
282
|
+
}
|
|
282
283
|
})
|
|
283
284
|
|
|
284
285
|
return {
|
|
@@ -296,16 +297,17 @@ class VasList extends localize(i18next)(PageView) {
|
|
|
296
297
|
}
|
|
297
298
|
})
|
|
298
299
|
|
|
299
|
-
const response = await client.
|
|
300
|
-
|
|
301
|
-
mutation {
|
|
302
|
-
updateMultipleVas(${
|
|
303
|
-
patches
|
|
304
|
-
})}) {
|
|
300
|
+
const response = await client.mutate({
|
|
301
|
+
mutation: gql`
|
|
302
|
+
mutation updateMultipleVas($patches: [VasPatch!]) {
|
|
303
|
+
updateMultipleVas(patches: $patches) {
|
|
305
304
|
name
|
|
306
305
|
}
|
|
307
306
|
}
|
|
308
|
-
|
|
307
|
+
`,
|
|
308
|
+
variables: {
|
|
309
|
+
patches
|
|
310
|
+
}
|
|
309
311
|
})
|
|
310
312
|
|
|
311
313
|
if (!response.errors) {
|
|
@@ -333,12 +335,13 @@ class VasList extends localize(i18next)(PageView) {
|
|
|
333
335
|
|
|
334
336
|
if (!anwer.value) return
|
|
335
337
|
|
|
336
|
-
const response = await client.
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
338
|
+
const response = await client.mutate({
|
|
339
|
+
mutation: gql`
|
|
340
|
+
mutation deleteVass($ids: [String!]) {
|
|
341
|
+
deleteVass(ids: $ids)
|
|
342
|
+
}
|
|
343
|
+
`,
|
|
344
|
+
variables: { ids }
|
|
342
345
|
})
|
|
343
346
|
|
|
344
347
|
if (!response.errors) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/sales-ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.26",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,15 +24,15 @@
|
|
|
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.0.
|
|
28
|
-
"@things-factory/form-ui": "^4.0.
|
|
29
|
-
"@things-factory/grist-ui": "^4.0.
|
|
30
|
-
"@things-factory/i18n-base": "^4.0.
|
|
31
|
-
"@things-factory/import-ui": "^4.0.
|
|
32
|
-
"@things-factory/sales-base": "^4.0.
|
|
33
|
-
"@things-factory/setting-ui": "^4.0.
|
|
34
|
-
"@things-factory/shell": "^4.0.
|
|
35
|
-
"@things-factory/warehouse-ui": "^4.0.
|
|
27
|
+
"@things-factory/code-base": "^4.0.26",
|
|
28
|
+
"@things-factory/form-ui": "^4.0.26",
|
|
29
|
+
"@things-factory/grist-ui": "^4.0.26",
|
|
30
|
+
"@things-factory/i18n-base": "^4.0.26",
|
|
31
|
+
"@things-factory/import-ui": "^4.0.26",
|
|
32
|
+
"@things-factory/sales-base": "^4.0.26",
|
|
33
|
+
"@things-factory/setting-ui": "^4.0.26",
|
|
34
|
+
"@things-factory/shell": "^4.0.26",
|
|
35
|
+
"@things-factory/warehouse-ui": "^4.0.26"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "c4b39c74b9ce2472f30c26eb36ec62054c1ecf82"
|
|
38
38
|
}
|