@things-factory/sales-ui 4.0.23 → 4.0.27

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.
@@ -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 { gqlBuilder, isMobileDevice } from '@things-factory/utils'
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(${gqlBuilder.buildArgs({
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.query({
300
- query: gql`
301
- mutation {
302
- updateMultipleVas(${gqlBuilder.buildArgs({
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.query({
337
- query: gql`
338
- mutation {
339
- deleteVass(${gqlBuilder.buildArgs({ ids })})
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.23",
3
+ "version": "4.0.27",
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.23",
28
- "@things-factory/form-ui": "^4.0.23",
29
- "@things-factory/grist-ui": "^4.0.23",
30
- "@things-factory/i18n-base": "^4.0.23",
31
- "@things-factory/import-ui": "^4.0.23",
32
- "@things-factory/sales-base": "^4.0.23",
33
- "@things-factory/setting-ui": "^4.0.23",
34
- "@things-factory/shell": "^4.0.23",
35
- "@things-factory/warehouse-ui": "^4.0.23"
27
+ "@things-factory/code-base": "^4.0.27",
28
+ "@things-factory/form-ui": "^4.0.27",
29
+ "@things-factory/grist-ui": "^4.0.27",
30
+ "@things-factory/i18n-base": "^4.0.27",
31
+ "@things-factory/import-ui": "^4.0.27",
32
+ "@things-factory/sales-base": "^4.0.27",
33
+ "@things-factory/setting-ui": "^4.0.27",
34
+ "@things-factory/shell": "^4.0.27",
35
+ "@things-factory/warehouse-ui": "^4.0.27"
36
36
  },
37
- "gitHead": "49ba662dea1d349e9608a9a58c8fcfbc1310a5d6"
37
+ "gitHead": "276eaface2890c8f229ce6c9f64cde9c6b1e0083"
38
38
  }