@things-factory/sales-base 4.1.38 → 4.2.0

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.
@@ -263,6 +263,7 @@ export class ReleaseGoodQuery {
263
263
  const bizplaceFilter = params.filters.find(param => param.name === 'bizplaceId')
264
264
  const noOfItemsFilter = params.filters.find(param => param.name === 'noOfItems')
265
265
  const skuFilter = params.filters.find(param => param.name === 'sku')
266
+ const routeId = params.filters.find(param => param.name === 'routeId')
266
267
 
267
268
  if (await checkUserBelongsDomain(domain, user)) {
268
269
  if (!statusFilter && !params.filters.some(e => e.name === 'name')) {
@@ -288,6 +289,15 @@ export class ReleaseGoodQuery {
288
289
  params.filters = params.filters.filter(param => param.name !== 'sku')
289
290
  }
290
291
 
292
+ if (routeId) {
293
+ if (routeId.value == true) {
294
+ params.filters.find(param => param.name === 'routeId').value = 'null'
295
+ } else {
296
+ params.filters.find(param => param.name === 'routeId').operator = 'is_null'
297
+ params.filters.find(param => param.name === 'routeId').value = null
298
+ }
299
+ }
300
+
291
301
  const fromDateParamIdx = params.filters.findIndex(param => param.name === 'fromDate')
292
302
  if (fromDateParamIdx >= 0) {
293
303
  let fromDateVal = new Date(params.filters[fromDateParamIdx].value)
@@ -389,9 +399,13 @@ export class ReleaseGoodQuery {
389
399
  const PROD_ALIAS = 'PROD'
390
400
  const GAN_ALIAS = 'GAN'
391
401
  const conditions = filters
392
- let { batchId = null, containerNo = null, product = [], packingType = null, inventory = [] } = getConditionValues(
393
- conditions
394
- )
402
+ let {
403
+ batchId = null,
404
+ containerNo = null,
405
+ product = [],
406
+ packingType = null,
407
+ inventory = []
408
+ } = getConditionValues(conditions)
395
409
 
396
410
  const SELECT: string = `
397
411
  SELECT
@@ -812,9 +826,7 @@ function _extractData(rawData, validatedData) {
812
826
  })
813
827
  }
814
828
 
815
- function getConditionValues(
816
- conditions: Filter[]
817
- ): {
829
+ function getConditionValues(conditions: Filter[]): {
818
830
  batchId?: string
819
831
  containerNo?: string
820
832
  product?: string[]
@@ -347,6 +347,18 @@ export class NewReleaseGood {
347
347
 
348
348
  @Field({ nullable: true })
349
349
  errorMsg: string
350
+
351
+ @Field({ nullable: true })
352
+ storeName: string
353
+
354
+ @Field({ nullable: true })
355
+ storeId: string
356
+
357
+ @Field({ nullable: true })
358
+ routeId: string
359
+
360
+ @Field({ nullable: true })
361
+ stopId: string
350
362
  }
351
363
 
352
364
  @InputType()
@@ -503,4 +515,16 @@ export class ReleaseGoodPatch {
503
515
 
504
516
  @Field({ nullable: true })
505
517
  description: string
518
+
519
+ @Field({ nullable: true })
520
+ storeName: string
521
+
522
+ @Field({ nullable: true })
523
+ storeId: string
524
+
525
+ @Field({ nullable: true })
526
+ routeId: string
527
+
528
+ @Field({ nullable: true })
529
+ stopId: string
506
530
  }
@@ -389,4 +389,20 @@ export class ReleaseGood {
389
389
 
390
390
  @Field({ nullable: true })
391
391
  errorMsg: string
392
+
393
+ @Column({ nullable: true })
394
+ @Field({ nullable: true })
395
+ storeId: string
396
+
397
+ @Column({ nullable: true })
398
+ @Field({ nullable: true })
399
+ storeName: string
400
+
401
+ @Column({ nullable: true })
402
+ @Field({ nullable: true })
403
+ routeId: string
404
+
405
+ @Column({ nullable: true })
406
+ @Field({ nullable: true })
407
+ stopId: string
392
408
  }