@things-factory/operato-hub 3.7.15 → 3.8.3
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/dist-server/controllers/bizplace-initializer/dataset/settings.js +5 -0
- package/dist-server/controllers/bizplace-initializer/dataset/settings.js.map +1 -1
- package/dist-server/graphql/resolvers/synchronization/fetch-sync-purchase-orders.js +3 -5
- package/dist-server/graphql/resolvers/synchronization/fetch-sync-purchase-orders.js.map +1 -1
- package/dist-server/routers/api/restful-apis/unstable/add-release-order.js +3 -1
- package/dist-server/routers/api/restful-apis/unstable/add-release-order.js.map +1 -1
- package/dist-server/routers/api/restful-apis/unstable/index.js +1 -0
- package/dist-server/routers/api/restful-apis/unstable/index.js.map +1 -1
- package/dist-server/routers/api/restful-apis/unstable/update-release-order-details.js +82 -0
- package/dist-server/routers/api/restful-apis/unstable/update-release-order-details.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/add-release-order.js +3 -1
- package/dist-server/routers/api/restful-apis/v1/add-release-order.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/index.js +1 -0
- package/dist-server/routers/api/restful-apis/v1/index.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/update-release-order-details.js +82 -0
- package/dist-server/routers/api/restful-apis/v1/update-release-order-details.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v2/add-release-order.js +3 -1
- package/dist-server/routers/api/restful-apis/v2/add-release-order.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v2/index.js +1 -0
- package/dist-server/routers/api/restful-apis/v2/index.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v2/update-release-order-details.js +82 -0
- package/dist-server/routers/api/restful-apis/v2/update-release-order-details.js.map +1 -0
- package/openapi/unstable/outbound.yaml +85 -0
- package/openapi/v1/outbound.yaml +85 -0
- package/openapi/v2/outbound.yaml +85 -0
- package/package.json +39 -39
- package/server/controllers/bizplace-initializer/dataset/settings.ts +5 -0
- package/server/graphql/resolvers/synchronization/fetch-sync-purchase-orders.ts +3 -5
- package/server/routers/api/restful-apis/unstable/add-release-order.ts +4 -2
- package/server/routers/api/restful-apis/unstable/index.ts +1 -0
- package/server/routers/api/restful-apis/unstable/update-release-order-details.ts +94 -0
- package/server/routers/api/restful-apis/v1/add-release-order.ts +4 -2
- package/server/routers/api/restful-apis/v1/index.ts +1 -0
- package/server/routers/api/restful-apis/v1/update-release-order-details.ts +94 -0
- package/server/routers/api/restful-apis/v2/add-release-order.ts +4 -2
- package/server/routers/api/restful-apis/v2/index.ts +1 -0
- package/server/routers/api/restful-apis/v2/update-release-order-details.ts +94 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
+
const typeorm_1 = require("typeorm");
|
|
8
|
+
const api_1 = require("@things-factory/api");
|
|
9
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
10
|
+
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
11
|
+
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
12
|
+
const debug = require('debug')('things-factory:operato-hub:restful-api:v2:update-release-order-details');
|
|
13
|
+
api_1.restfulApiRouter.post('/v2/warehouse/:warehouseId/update-release-order-details', business_middleware_1.businessMiddleware, warehouse_middleware_1.warehouseMiddleware, async (context, next) => {
|
|
14
|
+
var _a;
|
|
15
|
+
const { client, domain } = context.state;
|
|
16
|
+
const { warehouseId: customerBizplaceId } = context.params;
|
|
17
|
+
const { t } = context;
|
|
18
|
+
const bodyReq = context.request.body;
|
|
19
|
+
if (!customerBizplaceId)
|
|
20
|
+
context.throw(404, t('error.warehouse id not found'));
|
|
21
|
+
const customerBizplace = await (0, typeorm_1.getRepository)(biz_base_1.Bizplace).findOne({
|
|
22
|
+
where: { id: customerBizplaceId }
|
|
23
|
+
});
|
|
24
|
+
if (typeof bodyReq === undefined || !((_a = Object.keys(bodyReq)) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
25
|
+
debug('bodyReq', bodyReq);
|
|
26
|
+
context.throw(400, t('error.invalid body request format'));
|
|
27
|
+
}
|
|
28
|
+
let patch = {};
|
|
29
|
+
if (bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.releaseOrder)
|
|
30
|
+
patch.releaseGood = bodyReq.releaseOrder;
|
|
31
|
+
else
|
|
32
|
+
context.throw(400, t('error.body request require releaseGood property'));
|
|
33
|
+
if (bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.shippingOrder)
|
|
34
|
+
patch.shippingOrder = bodyReq.shippingOrder;
|
|
35
|
+
else
|
|
36
|
+
patch.shippingOrder = null;
|
|
37
|
+
context.body = {
|
|
38
|
+
result: (await client.mutate({
|
|
39
|
+
mutation: (0, graphql_tag_1.default) `
|
|
40
|
+
mutation updateReleaseGoodDetails($releaseGood: ReleaseGoodPatch!, $shippingOrder: ShippingOrderPatch) {
|
|
41
|
+
updateReleaseGoodDetails(releaseGood: $releaseGood, shippingOrder: $shippingOrder) {
|
|
42
|
+
id
|
|
43
|
+
name
|
|
44
|
+
refNo
|
|
45
|
+
refNo2
|
|
46
|
+
refNo3
|
|
47
|
+
ownTransport
|
|
48
|
+
collectionOrderNo
|
|
49
|
+
exportOption
|
|
50
|
+
courierOption
|
|
51
|
+
packingOption
|
|
52
|
+
type
|
|
53
|
+
billingAddress
|
|
54
|
+
deliveryAddress1
|
|
55
|
+
deliveryAddress2
|
|
56
|
+
deliveryAddress3
|
|
57
|
+
deliveryAddress4
|
|
58
|
+
deliveryAddress5
|
|
59
|
+
attentionTo
|
|
60
|
+
attentionCompany
|
|
61
|
+
city
|
|
62
|
+
state
|
|
63
|
+
postalCode
|
|
64
|
+
country
|
|
65
|
+
phone1
|
|
66
|
+
phone2
|
|
67
|
+
email
|
|
68
|
+
handoverType
|
|
69
|
+
dropoffAddress
|
|
70
|
+
pickupAddress
|
|
71
|
+
transporter
|
|
72
|
+
trackingNo
|
|
73
|
+
marketplaceOrderStatus
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`,
|
|
77
|
+
variables: Object.assign({}, patch),
|
|
78
|
+
context: Object.assign(Object.assign({}, context), { state: Object.assign(Object.assign({}, context.state), { bizplace: customerBizplace, domain, type: 'api' }) })
|
|
79
|
+
})).data
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
//# sourceMappingURL=update-release-order-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-release-order-details.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v2/update-release-order-details.ts"],"names":[],"mappings":";;;;;AAAA,8DAA6B;AAC7B,qCAAuC;AAEvC,6CAAgE;AAChE,uDAAmD;AAEnD,qFAAgF;AAChF,uFAAkF;AAElF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,wEAAwE,CAAC,CAAA;AAExG,sBAAM,CAAC,IAAI,CACT,yDAAyD,EACzD,wCAAkB,EAClB,0CAAmB,EACnB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;;IACtB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IACxC,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,MAAM,CAAA;IAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAA;IACrB,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAA;IAEpC,IAAI,CAAC,kBAAkB;QAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAA;IAC9E,MAAM,gBAAgB,GAAa,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC;QACvE,KAAK,EAAE,EAAE,EAAE,EAAE,kBAAkB,EAAE;KAClC,CAAC,CAAA;IAEF,IAAI,OAAO,OAAO,KAAK,SAAS,IAAI,CAAC,CAAA,MAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,0CAAE,MAAM,CAAA,EAAE;QACjE,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;QACzB,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAA;KAC3D;IAED,IAAI,KAAK,GAAQ,EAAE,CAAA;IACnB,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY;QAAE,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC,YAAY,CAAA;;QAC9D,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,iDAAiD,CAAC,CAAC,CAAA;IAE7E,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa;QAAE,KAAK,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAA;;QAClE,KAAK,CAAC,aAAa,GAAG,IAAI,CAAA;IAE/B,OAAO,CAAC,IAAI,GAAG;QACb,MAAM,EAAE,CACN,MAAM,MAAM,CAAC,MAAM,CAAC;YAClB,QAAQ,EAAE,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAqCZ;YACD,SAAS,oBAAO,KAAK,CAAE;YACvB,OAAO,kCACF,OAAO,KACV,KAAK,kCACA,OAAO,CAAC,KAAK,KAChB,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EACN,IAAI,EAAE,KAAK,MAEd;SACK,CAAC,CACV,CAAC,IAAI;KACP,CAAA;AACH,CAAC,CACF,CAAA"}
|
|
@@ -193,6 +193,91 @@ paths:
|
|
|
193
193
|
'500':
|
|
194
194
|
description: 'Server error'
|
|
195
195
|
deprecated: false
|
|
196
|
+
/warehouse/{warehouseId}/update-release-order-details:
|
|
197
|
+
post:
|
|
198
|
+
tags:
|
|
199
|
+
- 'outbound'
|
|
200
|
+
description: 'Update release order details'
|
|
201
|
+
operationId: 'updateReleaseOrderDetails'
|
|
202
|
+
produces:
|
|
203
|
+
- 'application/json'
|
|
204
|
+
parameters:
|
|
205
|
+
- in: 'path'
|
|
206
|
+
name: 'warehouseId'
|
|
207
|
+
required: true
|
|
208
|
+
type: 'string'
|
|
209
|
+
- in: 'body'
|
|
210
|
+
name: 'body'
|
|
211
|
+
required: true
|
|
212
|
+
schema:
|
|
213
|
+
type: 'object'
|
|
214
|
+
properties:
|
|
215
|
+
releaseGood:
|
|
216
|
+
type: 'object'
|
|
217
|
+
properties:
|
|
218
|
+
collectionOrderNo:
|
|
219
|
+
type: 'string'
|
|
220
|
+
refNo:
|
|
221
|
+
type: 'string'
|
|
222
|
+
refNo2:
|
|
223
|
+
type: 'string'
|
|
224
|
+
refNo3:
|
|
225
|
+
type: 'string'
|
|
226
|
+
marketplaceOrderStatus:
|
|
227
|
+
type: 'string'
|
|
228
|
+
billingAddress:
|
|
229
|
+
type: 'string'
|
|
230
|
+
deliveryAddress1:
|
|
231
|
+
type: 'string'
|
|
232
|
+
attentionTo:
|
|
233
|
+
type: 'string'
|
|
234
|
+
city:
|
|
235
|
+
type: 'string'
|
|
236
|
+
country:
|
|
237
|
+
type: 'string'
|
|
238
|
+
postalCode:
|
|
239
|
+
type: 'string'
|
|
240
|
+
phone1:
|
|
241
|
+
type: 'string'
|
|
242
|
+
transporter:
|
|
243
|
+
type: 'string'
|
|
244
|
+
trackingNo:
|
|
245
|
+
type: 'string'
|
|
246
|
+
airwayBill:
|
|
247
|
+
type: 'string'
|
|
248
|
+
invoice:
|
|
249
|
+
type: 'string'
|
|
250
|
+
shippingOrder:
|
|
251
|
+
type: 'object'
|
|
252
|
+
properties:
|
|
253
|
+
shipName:
|
|
254
|
+
type: 'string'
|
|
255
|
+
containerNo:
|
|
256
|
+
type: 'string'
|
|
257
|
+
loadType:
|
|
258
|
+
type: 'string'
|
|
259
|
+
from:
|
|
260
|
+
type: 'string'
|
|
261
|
+
to:
|
|
262
|
+
type: 'string'
|
|
263
|
+
containerArrivalDate:
|
|
264
|
+
type: 'string'
|
|
265
|
+
example: '2020-02-14'
|
|
266
|
+
containerLeavingDate:
|
|
267
|
+
type: 'string'
|
|
268
|
+
example: '2020-02-14'
|
|
269
|
+
responses:
|
|
270
|
+
'200':
|
|
271
|
+
description: 'Successful Operation'
|
|
272
|
+
'400':
|
|
273
|
+
description: 'Bad request is sent'
|
|
274
|
+
'401':
|
|
275
|
+
description: 'Authentication Error'
|
|
276
|
+
'404':
|
|
277
|
+
description: 'Resource not found'
|
|
278
|
+
'500':
|
|
279
|
+
description: 'Server error'
|
|
280
|
+
deprecated: false
|
|
196
281
|
/warehouse/{warehouseId}/get-release-order-list:
|
|
197
282
|
get:
|
|
198
283
|
tags:
|
package/openapi/v1/outbound.yaml
CHANGED
|
@@ -193,6 +193,91 @@ paths:
|
|
|
193
193
|
'500':
|
|
194
194
|
description: 'Server error'
|
|
195
195
|
deprecated: false
|
|
196
|
+
/warehouse/{warehouseId}/update-release-order-details:
|
|
197
|
+
post:
|
|
198
|
+
tags:
|
|
199
|
+
- 'outbound'
|
|
200
|
+
description: 'Update release order details'
|
|
201
|
+
operationId: 'updateReleaseOrderDetails'
|
|
202
|
+
produces:
|
|
203
|
+
- 'application/json'
|
|
204
|
+
parameters:
|
|
205
|
+
- in: 'path'
|
|
206
|
+
name: 'warehouseId'
|
|
207
|
+
required: true
|
|
208
|
+
type: 'string'
|
|
209
|
+
- in: 'body'
|
|
210
|
+
name: 'body'
|
|
211
|
+
required: true
|
|
212
|
+
schema:
|
|
213
|
+
type: 'object'
|
|
214
|
+
properties:
|
|
215
|
+
releaseGood:
|
|
216
|
+
type: 'object'
|
|
217
|
+
properties:
|
|
218
|
+
collectionOrderNo:
|
|
219
|
+
type: 'string'
|
|
220
|
+
refNo:
|
|
221
|
+
type: 'string'
|
|
222
|
+
refNo2:
|
|
223
|
+
type: 'string'
|
|
224
|
+
refNo3:
|
|
225
|
+
type: 'string'
|
|
226
|
+
marketplaceOrderStatus:
|
|
227
|
+
type: 'string'
|
|
228
|
+
billingAddress:
|
|
229
|
+
type: 'string'
|
|
230
|
+
deliveryAddress1:
|
|
231
|
+
type: 'string'
|
|
232
|
+
attentionTo:
|
|
233
|
+
type: 'string'
|
|
234
|
+
city:
|
|
235
|
+
type: 'string'
|
|
236
|
+
country:
|
|
237
|
+
type: 'string'
|
|
238
|
+
postalCode:
|
|
239
|
+
type: 'string'
|
|
240
|
+
phone1:
|
|
241
|
+
type: 'string'
|
|
242
|
+
transporter:
|
|
243
|
+
type: 'string'
|
|
244
|
+
trackingNo:
|
|
245
|
+
type: 'string'
|
|
246
|
+
airwayBill:
|
|
247
|
+
type: 'string'
|
|
248
|
+
invoice:
|
|
249
|
+
type: 'string'
|
|
250
|
+
shippingOrder:
|
|
251
|
+
type: 'object'
|
|
252
|
+
properties:
|
|
253
|
+
shipName:
|
|
254
|
+
type: 'string'
|
|
255
|
+
containerNo:
|
|
256
|
+
type: 'string'
|
|
257
|
+
loadType:
|
|
258
|
+
type: 'string'
|
|
259
|
+
from:
|
|
260
|
+
type: 'string'
|
|
261
|
+
to:
|
|
262
|
+
type: 'string'
|
|
263
|
+
containerArrivalDate:
|
|
264
|
+
type: 'string'
|
|
265
|
+
example: '2020-02-14'
|
|
266
|
+
containerLeavingDate:
|
|
267
|
+
type: 'string'
|
|
268
|
+
example: '2020-02-14'
|
|
269
|
+
responses:
|
|
270
|
+
'200':
|
|
271
|
+
description: 'Successful Operation'
|
|
272
|
+
'400':
|
|
273
|
+
description: 'Bad request is sent'
|
|
274
|
+
'401':
|
|
275
|
+
description: 'Authentication Error'
|
|
276
|
+
'404':
|
|
277
|
+
description: 'Resource not found'
|
|
278
|
+
'500':
|
|
279
|
+
description: 'Server error'
|
|
280
|
+
deprecated: false
|
|
196
281
|
/warehouse/{warehouseId}/get-release-order-list:
|
|
197
282
|
get:
|
|
198
283
|
tags:
|
package/openapi/v2/outbound.yaml
CHANGED
|
@@ -193,6 +193,91 @@ paths:
|
|
|
193
193
|
'500':
|
|
194
194
|
description: 'Server error'
|
|
195
195
|
deprecated: false
|
|
196
|
+
/warehouse/{warehouseId}/update-release-order-details:
|
|
197
|
+
post:
|
|
198
|
+
tags:
|
|
199
|
+
- 'outbound'
|
|
200
|
+
description: 'Update release order details'
|
|
201
|
+
operationId: 'updateReleaseOrderDetails'
|
|
202
|
+
produces:
|
|
203
|
+
- 'application/json'
|
|
204
|
+
parameters:
|
|
205
|
+
- in: 'path'
|
|
206
|
+
name: 'warehouseId'
|
|
207
|
+
required: true
|
|
208
|
+
type: 'string'
|
|
209
|
+
- in: 'body'
|
|
210
|
+
name: 'body'
|
|
211
|
+
required: true
|
|
212
|
+
schema:
|
|
213
|
+
type: 'object'
|
|
214
|
+
properties:
|
|
215
|
+
releaseGood:
|
|
216
|
+
type: 'object'
|
|
217
|
+
properties:
|
|
218
|
+
collectionOrderNo:
|
|
219
|
+
type: 'string'
|
|
220
|
+
refNo:
|
|
221
|
+
type: 'string'
|
|
222
|
+
refNo2:
|
|
223
|
+
type: 'string'
|
|
224
|
+
refNo3:
|
|
225
|
+
type: 'string'
|
|
226
|
+
marketplaceOrderStatus:
|
|
227
|
+
type: 'string'
|
|
228
|
+
billingAddress:
|
|
229
|
+
type: 'string'
|
|
230
|
+
deliveryAddress1:
|
|
231
|
+
type: 'string'
|
|
232
|
+
attentionTo:
|
|
233
|
+
type: 'string'
|
|
234
|
+
city:
|
|
235
|
+
type: 'string'
|
|
236
|
+
country:
|
|
237
|
+
type: 'string'
|
|
238
|
+
postalCode:
|
|
239
|
+
type: 'string'
|
|
240
|
+
phone1:
|
|
241
|
+
type: 'string'
|
|
242
|
+
transporter:
|
|
243
|
+
type: 'string'
|
|
244
|
+
trackingNo:
|
|
245
|
+
type: 'string'
|
|
246
|
+
airwayBill:
|
|
247
|
+
type: 'string'
|
|
248
|
+
invoice:
|
|
249
|
+
type: 'string'
|
|
250
|
+
shippingOrder:
|
|
251
|
+
type: 'object'
|
|
252
|
+
properties:
|
|
253
|
+
shipName:
|
|
254
|
+
type: 'string'
|
|
255
|
+
containerNo:
|
|
256
|
+
type: 'string'
|
|
257
|
+
loadType:
|
|
258
|
+
type: 'string'
|
|
259
|
+
from:
|
|
260
|
+
type: 'string'
|
|
261
|
+
to:
|
|
262
|
+
type: 'string'
|
|
263
|
+
containerArrivalDate:
|
|
264
|
+
type: 'string'
|
|
265
|
+
example: '2020-02-14'
|
|
266
|
+
containerLeavingDate:
|
|
267
|
+
type: 'string'
|
|
268
|
+
example: '2020-02-14'
|
|
269
|
+
responses:
|
|
270
|
+
'200':
|
|
271
|
+
description: 'Successful Operation'
|
|
272
|
+
'400':
|
|
273
|
+
description: 'Bad request is sent'
|
|
274
|
+
'401':
|
|
275
|
+
description: 'Authentication Error'
|
|
276
|
+
'404':
|
|
277
|
+
description: 'Resource not found'
|
|
278
|
+
'500':
|
|
279
|
+
description: 'Server error'
|
|
280
|
+
deprecated: false
|
|
196
281
|
/warehouse/{warehouseId}/get-release-order-list:
|
|
197
282
|
get:
|
|
198
283
|
tags:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-hub",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.3",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -41,40 +41,40 @@
|
|
|
41
41
|
"@material/mwc-formfield": "^0.22.1",
|
|
42
42
|
"@material/mwc-linear-progress": "^0.22.1",
|
|
43
43
|
"@material/mwc-radio": "^0.22.1",
|
|
44
|
-
"@things-factory/api": "^3.
|
|
45
|
-
"@things-factory/apptool-ui": "^3.
|
|
46
|
-
"@things-factory/attachment-base": "^3.
|
|
47
|
-
"@things-factory/auth-base": "^3.
|
|
48
|
-
"@things-factory/auth-ui": "^3.
|
|
49
|
-
"@things-factory/biz-base": "^3.
|
|
50
|
-
"@things-factory/biz-ui": "^3.
|
|
51
|
-
"@things-factory/board-service": "^3.
|
|
52
|
-
"@things-factory/board-ui": "^3.
|
|
53
|
-
"@things-factory/code-ui": "^3.
|
|
44
|
+
"@things-factory/api": "^3.8.0",
|
|
45
|
+
"@things-factory/apptool-ui": "^3.8.0",
|
|
46
|
+
"@things-factory/attachment-base": "^3.8.0",
|
|
47
|
+
"@things-factory/auth-base": "^3.8.0",
|
|
48
|
+
"@things-factory/auth-ui": "^3.8.0",
|
|
49
|
+
"@things-factory/biz-base": "^3.8.0",
|
|
50
|
+
"@things-factory/biz-ui": "^3.8.0",
|
|
51
|
+
"@things-factory/board-service": "^3.8.0",
|
|
52
|
+
"@things-factory/board-ui": "^3.8.0",
|
|
53
|
+
"@things-factory/code-ui": "^3.8.0",
|
|
54
54
|
"@things-factory/component-ui": "^3.7.5",
|
|
55
|
-
"@things-factory/context-ui": "^3.
|
|
56
|
-
"@things-factory/document-template-ui": "^3.
|
|
57
|
-
"@things-factory/export-ui": "^3.
|
|
58
|
-
"@things-factory/export-ui-csv": "^3.
|
|
59
|
-
"@things-factory/export-ui-excel": "^3.
|
|
55
|
+
"@things-factory/context-ui": "^3.8.0",
|
|
56
|
+
"@things-factory/document-template-ui": "^3.8.0",
|
|
57
|
+
"@things-factory/export-ui": "^3.8.0",
|
|
58
|
+
"@things-factory/export-ui-csv": "^3.8.0",
|
|
59
|
+
"@things-factory/export-ui-excel": "^3.8.0",
|
|
60
60
|
"@things-factory/grist-ui": "^3.7.5",
|
|
61
|
-
"@things-factory/i18n-base": "^3.
|
|
62
|
-
"@things-factory/i18n-ui": "^3.
|
|
63
|
-
"@things-factory/import-ui": "^3.
|
|
64
|
-
"@things-factory/import-ui-excel": "^3.
|
|
65
|
-
"@things-factory/integration-accounting": "^3.
|
|
66
|
-
"@things-factory/integration-fulfillment": "^3.
|
|
67
|
-
"@things-factory/integration-lmd": "^3.
|
|
68
|
-
"@things-factory/integration-marketplace": "^3.
|
|
69
|
-
"@things-factory/integration-pos": "^3.
|
|
70
|
-
"@things-factory/integration-sellercraft": "^3.
|
|
71
|
-
"@things-factory/lite-menu": "^3.
|
|
72
|
-
"@things-factory/more-ui": "^3.
|
|
73
|
-
"@things-factory/notification": "^3.
|
|
61
|
+
"@things-factory/i18n-base": "^3.8.0",
|
|
62
|
+
"@things-factory/i18n-ui": "^3.8.0",
|
|
63
|
+
"@things-factory/import-ui": "^3.8.0",
|
|
64
|
+
"@things-factory/import-ui-excel": "^3.8.0",
|
|
65
|
+
"@things-factory/integration-accounting": "^3.8.3",
|
|
66
|
+
"@things-factory/integration-fulfillment": "^3.8.3",
|
|
67
|
+
"@things-factory/integration-lmd": "^3.8.0",
|
|
68
|
+
"@things-factory/integration-marketplace": "^3.8.3",
|
|
69
|
+
"@things-factory/integration-pos": "^3.8.0",
|
|
70
|
+
"@things-factory/integration-sellercraft": "^3.8.3",
|
|
71
|
+
"@things-factory/lite-menu": "^3.8.0",
|
|
72
|
+
"@things-factory/more-ui": "^3.8.0",
|
|
73
|
+
"@things-factory/notification": "^3.8.0",
|
|
74
74
|
"@things-factory/pdf": "^3.7.5",
|
|
75
|
-
"@things-factory/product-ui": "^3.
|
|
76
|
-
"@things-factory/resource-ui": "^3.
|
|
77
|
-
"@things-factory/sales-base": "^3.
|
|
75
|
+
"@things-factory/product-ui": "^3.8.3",
|
|
76
|
+
"@things-factory/resource-ui": "^3.8.0",
|
|
77
|
+
"@things-factory/sales-base": "^3.8.3",
|
|
78
78
|
"@things-factory/scene-chartjs": "^3.7.5",
|
|
79
79
|
"@things-factory/scene-clock": "^3.7.5",
|
|
80
80
|
"@things-factory/scene-clone": "^3.7.5",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@things-factory/scene-graphql": "^3.7.5",
|
|
89
89
|
"@things-factory/scene-half-roundrect": "^3.7.5",
|
|
90
90
|
"@things-factory/scene-indoor-map": "^3.7.5",
|
|
91
|
-
"@things-factory/scene-label": "^3.
|
|
91
|
+
"@things-factory/scene-label": "^3.8.0",
|
|
92
92
|
"@things-factory/scene-legend": "^3.7.5",
|
|
93
93
|
"@things-factory/scene-marker": "^3.7.5",
|
|
94
94
|
"@things-factory/scene-mqtt": "^3.7.5",
|
|
@@ -101,11 +101,11 @@
|
|
|
101
101
|
"@things-factory/scene-table": "^3.7.5",
|
|
102
102
|
"@things-factory/scene-visualizer": "^3.7.5",
|
|
103
103
|
"@things-factory/scene-wheel-sorter": "^3.7.5",
|
|
104
|
-
"@things-factory/setting-ui": "^3.
|
|
105
|
-
"@things-factory/shell": "^3.
|
|
106
|
-
"@things-factory/system-ui": "^3.
|
|
107
|
-
"@things-factory/warehouse-base": "^3.
|
|
108
|
-
"@things-factory/worksheet-base": "^3.
|
|
104
|
+
"@things-factory/setting-ui": "^3.8.0",
|
|
105
|
+
"@things-factory/shell": "^3.8.0",
|
|
106
|
+
"@things-factory/system-ui": "^3.8.0",
|
|
107
|
+
"@things-factory/warehouse-base": "^3.8.3",
|
|
108
|
+
"@things-factory/worksheet-base": "^3.8.3",
|
|
109
109
|
"koa2-swagger-ui": "^5.0.2",
|
|
110
110
|
"swagger-jsdoc": "^5.0.0",
|
|
111
111
|
"yamljs": "^0.3.0"
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"resolutions": {
|
|
117
117
|
"core-js": "^3.16.0"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "b1c118ec9834b1cb4ccf9e85b70623250a8f6745"
|
|
120
120
|
}
|
|
@@ -48,6 +48,11 @@ export const SETTINGS = {
|
|
|
48
48
|
name: 'hide-cc-columns',
|
|
49
49
|
description: 'hide cycle count info for blind count. true - blind count , false - normal count',
|
|
50
50
|
category: 'id-rule'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'allow-ro-add-product',
|
|
54
|
+
description: 'allow edit release order product',
|
|
55
|
+
category: 'id-rule'
|
|
51
56
|
}
|
|
52
57
|
],
|
|
53
58
|
retail: []
|
|
@@ -51,8 +51,8 @@ export async function createInboundOrder(
|
|
|
51
51
|
purchaseOrders: any[],
|
|
52
52
|
customerBizplaceId: string
|
|
53
53
|
) {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
for (var i = 0; i < purchaseOrders.length; i++) {
|
|
55
|
+
try {
|
|
56
56
|
const purchaseOrder = purchaseOrders[i]
|
|
57
57
|
|
|
58
58
|
const existingArrivalNotice = await FulfillmentAPI.getInboundOrder(fulfilmentCenter, {
|
|
@@ -67,8 +67,6 @@ export async function createInboundOrder(
|
|
|
67
67
|
purchaseOrder
|
|
68
68
|
})
|
|
69
69
|
}
|
|
70
|
-
}
|
|
71
|
-
} catch (e) {
|
|
72
|
-
throw new Error(e)
|
|
70
|
+
} catch (e) {}
|
|
73
71
|
}
|
|
74
72
|
}
|
|
@@ -6,7 +6,7 @@ import { Bizplace, getCompanyBizplace } from '@things-factory/biz-base'
|
|
|
6
6
|
import { Product, ProductBundle, ProductDetail } from '@things-factory/product-base'
|
|
7
7
|
import { ORDER_TYPES, OrderInventory } from '@things-factory/sales-base'
|
|
8
8
|
import { Setting } from '@things-factory/setting-base'
|
|
9
|
-
import { Inventory, INVENTORY_STATUS } from '@things-factory/warehouse-base'
|
|
9
|
+
import { Inventory, INVENTORY_STATUS, LOCATION_TYPE } from '@things-factory/warehouse-base'
|
|
10
10
|
import { WorksheetDetail } from '@things-factory/worksheet-base'
|
|
11
11
|
|
|
12
12
|
import { businessMiddleware } from '../../../../middlewares/business-middleware'
|
|
@@ -255,12 +255,14 @@ router.post(
|
|
|
255
255
|
.andWhere('"iv"."packing_type" = :packingType')
|
|
256
256
|
.andWhere('"iv"."product_id" = :productId')
|
|
257
257
|
.andWhere('"iv"."status" = :status')
|
|
258
|
+
.andWhere('"loc"."type" NOT IN (:...locationTypes)')
|
|
258
259
|
.setParameters({
|
|
259
260
|
domainId: domain.id,
|
|
260
261
|
bizplaceId: customerBizplace.id,
|
|
261
262
|
packingType: packingType,
|
|
262
263
|
productId: product.id,
|
|
263
|
-
status: INVENTORY_STATUS.STORED
|
|
264
|
+
status: INVENTORY_STATUS.STORED,
|
|
265
|
+
locationTypes: [LOCATION_TYPE.QUARANTINE, LOCATION_TYPE.RESERVE]
|
|
264
266
|
})
|
|
265
267
|
|
|
266
268
|
if (locationSortingRules?.length > 0) {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
import { getRepository } from 'typeorm'
|
|
3
|
+
|
|
4
|
+
import { restfulApiRouter as router } from '@things-factory/api'
|
|
5
|
+
import { Bizplace } from '@things-factory/biz-base'
|
|
6
|
+
|
|
7
|
+
import { businessMiddleware } from '../../../../middlewares/business-middleware'
|
|
8
|
+
import { warehouseMiddleware } from '../../../../middlewares/warehouse-middleware'
|
|
9
|
+
|
|
10
|
+
const debug = require('debug')('things-factory:operato-hub:restful-api:unstable:update-release-order-details')
|
|
11
|
+
|
|
12
|
+
router.post(
|
|
13
|
+
'/unstable/warehouse/:warehouseId/update-release-order-details',
|
|
14
|
+
businessMiddleware,
|
|
15
|
+
warehouseMiddleware,
|
|
16
|
+
async (context, next) => {
|
|
17
|
+
const { client, domain } = context.state
|
|
18
|
+
const { warehouseId: customerBizplaceId } = context.params
|
|
19
|
+
const { t } = context
|
|
20
|
+
const bodyReq = context.request.body
|
|
21
|
+
|
|
22
|
+
if (!customerBizplaceId) context.throw(404, t('error.warehouse id not found'))
|
|
23
|
+
const customerBizplace: Bizplace = await getRepository(Bizplace).findOne({
|
|
24
|
+
where: { id: customerBizplaceId }
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
if (typeof bodyReq === undefined || !Object.keys(bodyReq)?.length) {
|
|
28
|
+
debug('bodyReq', bodyReq)
|
|
29
|
+
context.throw(400, t('error.invalid body request format'))
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
let patch: any = {}
|
|
33
|
+
if (bodyReq?.releaseOrder) patch.releaseGood = bodyReq.releaseOrder
|
|
34
|
+
else context.throw(400, t('error.body request require releaseGood property'))
|
|
35
|
+
|
|
36
|
+
if (bodyReq?.shippingOrder) patch.shippingOrder = bodyReq.shippingOrder
|
|
37
|
+
else patch.shippingOrder = null
|
|
38
|
+
|
|
39
|
+
context.body = {
|
|
40
|
+
result: (
|
|
41
|
+
await client.mutate({
|
|
42
|
+
mutation: gql`
|
|
43
|
+
mutation updateReleaseGoodDetails($releaseGood: ReleaseGoodPatch!, $shippingOrder: ShippingOrderPatch) {
|
|
44
|
+
updateReleaseGoodDetails(releaseGood: $releaseGood, shippingOrder: $shippingOrder) {
|
|
45
|
+
id
|
|
46
|
+
name
|
|
47
|
+
refNo
|
|
48
|
+
refNo2
|
|
49
|
+
refNo3
|
|
50
|
+
ownTransport
|
|
51
|
+
collectionOrderNo
|
|
52
|
+
exportOption
|
|
53
|
+
courierOption
|
|
54
|
+
packingOption
|
|
55
|
+
type
|
|
56
|
+
billingAddress
|
|
57
|
+
deliveryAddress1
|
|
58
|
+
deliveryAddress2
|
|
59
|
+
deliveryAddress3
|
|
60
|
+
deliveryAddress4
|
|
61
|
+
deliveryAddress5
|
|
62
|
+
attentionTo
|
|
63
|
+
attentionCompany
|
|
64
|
+
city
|
|
65
|
+
state
|
|
66
|
+
postalCode
|
|
67
|
+
country
|
|
68
|
+
phone1
|
|
69
|
+
phone2
|
|
70
|
+
email
|
|
71
|
+
handoverType
|
|
72
|
+
dropoffAddress
|
|
73
|
+
pickupAddress
|
|
74
|
+
transporter
|
|
75
|
+
trackingNo
|
|
76
|
+
marketplaceOrderStatus
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`,
|
|
80
|
+
variables: { ...patch },
|
|
81
|
+
context: {
|
|
82
|
+
...context,
|
|
83
|
+
state: {
|
|
84
|
+
...context.state,
|
|
85
|
+
bizplace: customerBizplace,
|
|
86
|
+
domain,
|
|
87
|
+
type: 'api'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} as any)
|
|
91
|
+
).data
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
)
|
|
@@ -6,7 +6,7 @@ import { Bizplace, getCompanyBizplace } from '@things-factory/biz-base'
|
|
|
6
6
|
import { Product, ProductBundle, ProductDetail } from '@things-factory/product-base'
|
|
7
7
|
import { ORDER_TYPES, OrderInventory } from '@things-factory/sales-base'
|
|
8
8
|
import { Setting } from '@things-factory/setting-base'
|
|
9
|
-
import { Inventory, INVENTORY_STATUS } from '@things-factory/warehouse-base'
|
|
9
|
+
import { Inventory, INVENTORY_STATUS, LOCATION_TYPE } from '@things-factory/warehouse-base'
|
|
10
10
|
import { WorksheetDetail } from '@things-factory/worksheet-base'
|
|
11
11
|
|
|
12
12
|
import { businessMiddleware } from '../../../../middlewares/business-middleware'
|
|
@@ -249,12 +249,14 @@ router.post(
|
|
|
249
249
|
.andWhere('"iv"."packing_type" = :packingType')
|
|
250
250
|
.andWhere('"iv"."product_id" = :productId')
|
|
251
251
|
.andWhere('"iv"."status" = :status')
|
|
252
|
+
.andWhere('"loc"."type" NOT IN (:...locationTypes)')
|
|
252
253
|
.setParameters({
|
|
253
254
|
domainId: domain.id,
|
|
254
255
|
bizplaceId: customerBizplace.id,
|
|
255
256
|
packingType: packingType,
|
|
256
257
|
productId: product.id,
|
|
257
|
-
status: INVENTORY_STATUS.STORED
|
|
258
|
+
status: INVENTORY_STATUS.STORED,
|
|
259
|
+
locationTypes: [LOCATION_TYPE.QUARANTINE, LOCATION_TYPE.RESERVE]
|
|
258
260
|
})
|
|
259
261
|
|
|
260
262
|
if (locationSortingRules?.length > 0) {
|