@things-factory/sales-ui 4.0.39 → 4.0.43
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.
|
@@ -912,7 +912,7 @@ class PurchaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
912
912
|
purchaseOrder.orderProducts = this._getOrderProducts()
|
|
913
913
|
purchaseOrder.otherCharges = this._getPoOtherCharges()
|
|
914
914
|
|
|
915
|
-
const
|
|
915
|
+
const fileUploader = this._document?.files ? this._document.files : undefined
|
|
916
916
|
|
|
917
917
|
const objectNames = [
|
|
918
918
|
'bizplace|name',
|
|
@@ -931,36 +931,25 @@ class PurchaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
931
931
|
delete purchaseOrder[objectName]
|
|
932
932
|
})
|
|
933
933
|
|
|
934
|
-
const args = {
|
|
935
|
-
purchaseOrder: {
|
|
936
|
-
...purchaseOrder,
|
|
937
|
-
status,
|
|
938
|
-
ownTransport: this._purchaseOrderData?.importCargo ? true : this._purchaseOrderData?.ownTransport,
|
|
939
|
-
supplier: { id: purchaseOrder?.supplier?.id }
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
|
|
943
934
|
const response = await client.mutate({
|
|
944
935
|
mutation: gql`
|
|
945
|
-
mutation upsertPurchaseOrder($purchaseOrder: PurchaseOrderPatch!, $
|
|
946
|
-
upsertPurchaseOrder(purchaseOrder: $purchaseOrder,
|
|
936
|
+
mutation upsertPurchaseOrder($purchaseOrder: PurchaseOrderPatch!, $files: [Upload!]) {
|
|
937
|
+
upsertPurchaseOrder(purchaseOrder: $purchaseOrder, files: $files) {
|
|
947
938
|
id
|
|
948
939
|
name
|
|
949
940
|
}
|
|
950
941
|
}
|
|
951
942
|
`,
|
|
952
943
|
variables: {
|
|
953
|
-
attachments,
|
|
954
944
|
purchaseOrder: {
|
|
955
945
|
...purchaseOrder,
|
|
956
946
|
status,
|
|
957
947
|
ownTransport: this._purchaseOrderData?.importCargo ? true : this._purchaseOrderData?.ownTransport,
|
|
958
948
|
supplier: { id: purchaseOrder?.supplier?.id }
|
|
959
|
-
}
|
|
949
|
+
},
|
|
950
|
+
files: fileUploader
|
|
960
951
|
},
|
|
961
|
-
context: {
|
|
962
|
-
hasUpload: true
|
|
963
|
-
}
|
|
952
|
+
context: { hasUpload: true }
|
|
964
953
|
})
|
|
965
954
|
|
|
966
955
|
if (!response.errors) {
|
|
@@ -1081,9 +1070,7 @@ class PurchaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1081
1070
|
}
|
|
1082
1071
|
}
|
|
1083
1072
|
`,
|
|
1084
|
-
variables: {
|
|
1085
|
-
name: this._poNo
|
|
1086
|
-
}
|
|
1073
|
+
variables: { name: this._poNo }
|
|
1087
1074
|
})
|
|
1088
1075
|
|
|
1089
1076
|
if (!response.errors) {
|
|
@@ -1283,7 +1270,7 @@ class PurchaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1283
1270
|
html`
|
|
1284
1271
|
<contact-points-popup
|
|
1285
1272
|
type="SUPPLIER"
|
|
1286
|
-
partnerBizplaceId=${this.partnerBizplaceId}
|
|
1273
|
+
partnerBizplaceId=${this.partnerBizplaceId ? this.partnerBizplaceId : this._purchaseOrderData.bizplace?.id}
|
|
1287
1274
|
@selected="${e => {
|
|
1288
1275
|
this._purchaseOrderData = {
|
|
1289
1276
|
...this._purchaseOrderData,
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { getCodeByName } from '@things-factory/code-base'
|
|
2
1
|
import '@things-factory/form-ui'
|
|
3
2
|
import '@things-factory/grist-ui'
|
|
3
|
+
|
|
4
|
+
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html } from 'lit-element'
|
|
6
|
+
|
|
7
|
+
import { getCodeByName } from '@things-factory/code-base'
|
|
4
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
9
|
import { client, navigate, PageView } from '@things-factory/shell'
|
|
6
|
-
import {
|
|
10
|
+
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
7
11
|
import { isMobileDevice } from '@things-factory/utils'
|
|
8
|
-
import gql from 'graphql-tag'
|
|
9
|
-
import { css, html } from 'lit-element'
|
|
10
|
-
// import { ORDER_STATUS } from '../../constants'
|
|
11
12
|
|
|
12
13
|
class PurchaseOrderList extends localize(i18next)(PageView) {
|
|
13
14
|
static get styles() {
|
|
@@ -318,7 +319,7 @@ class PurchaseOrderList extends localize(i18next)(PageView) {
|
|
|
318
319
|
async _fetchContactPoints() {
|
|
319
320
|
const response = await client.query({
|
|
320
321
|
query: gql`
|
|
321
|
-
query contactPoints($filters: [Filter!]
|
|
322
|
+
query contactPoints($filters: [Filter!]!, $pagination: Pagination, $sortings: [Sorting!]!) {
|
|
322
323
|
contactPoints(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
323
324
|
items {
|
|
324
325
|
id
|
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.43",
|
|
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.43",
|
|
28
|
+
"@things-factory/form-ui": "^4.0.43",
|
|
29
|
+
"@things-factory/grist-ui": "^4.0.43",
|
|
30
|
+
"@things-factory/i18n-base": "^4.0.43",
|
|
31
|
+
"@things-factory/import-ui": "^4.0.43",
|
|
32
|
+
"@things-factory/sales-base": "^4.0.43",
|
|
33
|
+
"@things-factory/setting-ui": "^4.0.43",
|
|
34
|
+
"@things-factory/shell": "^4.0.43",
|
|
35
|
+
"@things-factory/warehouse-ui": "^4.0.43"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "8f2a8008eb61b6efd266412be267186c5059fab6"
|
|
38
38
|
}
|