@things-factory/reference-app 7.0.1-alpha.2 → 7.0.1-alpha.5

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.
@@ -11,7 +11,7 @@ import { i18next, localize } from '@operato/i18n'
11
11
  import { openPopup } from '@operato/layout'
12
12
  import { CommonButtonStyles, CommonGristStyles } from '@operato/styles'
13
13
  import { isMobileDevice } from '@operato/utils'
14
- import { CustomAlert, PageView } from '@things-factory/shell'
14
+ import { CustomAlert, PageView } from '@operato/shell'
15
15
 
16
16
  import { createOperation, deleteOperations, fetchOperations, saveOperations } from './operation-api'
17
17
 
@@ -46,6 +46,7 @@ class OperationMaster extends localize(i18next)(PageView) {
46
46
  constructor() {
47
47
  super()
48
48
  this.mode = isMobileDevice() ? 'CARD' : 'GRID'
49
+ this.importHandler = this.defaultImportHandler
49
50
  }
50
51
 
51
52
  render() {
@@ -292,7 +293,7 @@ class OperationMaster extends localize(i18next)(PageView) {
292
293
  }
293
294
  }
294
295
 
295
- async importHandler(patches) {
296
+ async defaultImportHandler(patches) {
296
297
  const response = await saveOperations(patches)
297
298
 
298
299
  if (!response.errors) {
@@ -417,9 +418,7 @@ class OperationMaster extends localize(i18next)(PageView) {
417
418
  ...this._columns
418
419
  .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
419
420
  .reduce((record, column) => {
420
- record[column.imex.key] = column.imex.key
421
- .split('.')
422
- .reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
421
+ record[column.imex.key] = column.imex.key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
423
422
  return record
424
423
  }, {})
425
424
  }
@@ -38,6 +38,7 @@ class ProductMaster extends localize(i18next)(PageView) {
38
38
  constructor() {
39
39
  super()
40
40
  this.mode = isMobileDevice() ? 'LIST' : 'GRID'
41
+ this.importHandler = this.defaultImportHandler
41
42
  }
42
43
 
43
44
  static get properties() {
@@ -725,7 +726,7 @@ class ProductMaster extends localize(i18next)(PageView) {
725
726
  }
726
727
  }
727
728
 
728
- async importHandler(patches) {
729
+ async defaultImportHandler(patches) {
729
730
  const response = await saveProducts(patches)
730
731
 
731
732
  if (!response.errors) {
@@ -842,9 +843,7 @@ class ProductMaster extends localize(i18next)(PageView) {
842
843
  ...this._columns
843
844
  .filter(column => column.type !== 'gutter' && !!column.imex)
844
845
  .reduce((record, column) => {
845
- record[column.imex.key] = column.imex.key
846
- .split('.')
847
- .reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
846
+ record[column.imex.key] = column.imex.key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
848
847
  return record
849
848
  }, {})
850
849
  }
@@ -866,15 +865,13 @@ class ProductMaster extends localize(i18next)(PageView) {
866
865
  if (!errors.find(err => err.type == 'type')) errors.push({ type: 'type', value: 'Product type is required' })
867
866
  }
868
867
  if (_.isEmpty(itm.packingType) || '') {
869
- if (!errors.find(err => err.type == 'packingType'))
870
- errors.push({ type: 'packingType', value: 'Packing type is required' })
868
+ if (!errors.find(err => err.type == 'packingType')) errors.push({ type: 'packingType', value: 'Packing type is required' })
871
869
  }
872
870
  if (_.isEmpty(itm.uom) || '') {
873
871
  if (!errors.find(err => err.type == 'uom')) errors.push({ type: 'uom', value: 'UOM is required' })
874
872
  }
875
873
  if (!_.isNumber(itm.uomValue) || _.isNaN(itm.uomValue) || '' || itm?.uomValue < 0) {
876
- if (!errors.find(err => err.type == 'uomValue'))
877
- errors.push({ type: 'uomValue', value: 'UOM Value is required' })
874
+ if (!errors.find(err => err.type == 'uomValue')) errors.push({ type: 'uomValue', value: 'UOM Value is required' })
878
875
  }
879
876
  return itm
880
877
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/reference-app",
3
- "version": "7.0.1-alpha.2",
3
+ "version": "7.0.1-alpha.5",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -67,43 +67,43 @@
67
67
  "@operato/scene-tab": "^2.0.0-alpha.0",
68
68
  "@operato/shell": "^2.0.0-alpha.0",
69
69
  "@operato/utils": "^2.0.0-alpha.0",
70
- "@things-factory/api": "^7.0.1-alpha.1",
71
- "@things-factory/apptool-ui": "^7.0.1-alpha.1",
72
- "@things-factory/attachment-base": "^7.0.1-alpha.1",
73
- "@things-factory/auth-ui": "^7.0.1-alpha.1",
74
- "@things-factory/board-service": "^7.0.1-alpha.1",
75
- "@things-factory/board-ui": "^7.0.1-alpha.1",
76
- "@things-factory/ccp": "^7.0.1-alpha.1",
77
- "@things-factory/code-ui": "^7.0.1-alpha.2",
78
- "@things-factory/contact": "^7.0.1-alpha.1",
79
- "@things-factory/context-ui": "^7.0.1-alpha.1",
80
- "@things-factory/dashboard": "^7.0.1-alpha.1",
81
- "@things-factory/dataset": "^7.0.1-alpha.1",
82
- "@things-factory/export-ui": "^7.0.1-alpha.1",
83
- "@things-factory/export-ui-excel": "^7.0.1-alpha.1",
84
- "@things-factory/help": "^7.0.1-alpha.1",
85
- "@things-factory/integration-ui": "^7.0.1-alpha.1",
86
- "@things-factory/lite-menu": "^7.0.1-alpha.1",
87
- "@things-factory/more-ui": "^7.0.1-alpha.1",
88
- "@things-factory/notification": "^7.0.1-alpha.1",
89
- "@things-factory/oauth2-client": "^7.0.1-alpha.1",
90
- "@things-factory/organization": "^7.0.1-alpha.1",
91
- "@things-factory/print-ui": "^7.0.1-alpha.1",
92
- "@things-factory/product-base": "^7.0.1-alpha.1",
93
- "@things-factory/qc": "^7.0.1-alpha.1",
94
- "@things-factory/resource-ui": "^7.0.1-alpha.1",
95
- "@things-factory/routing-base": "^7.0.1-alpha.1",
96
- "@things-factory/setting-base": "^7.0.1-alpha.1",
97
- "@things-factory/setting-ui": "^7.0.1-alpha.1",
98
- "@things-factory/shell": "^7.0.1-alpha.1",
99
- "@things-factory/system": "^7.0.1-alpha.1",
100
- "@things-factory/web-editor": "^7.0.1-alpha.1",
101
- "@things-factory/work-shift": "^7.0.1-alpha.1",
70
+ "@things-factory/api": "^7.0.1-alpha.5",
71
+ "@things-factory/apptool-ui": "^7.0.1-alpha.5",
72
+ "@things-factory/attachment-base": "^7.0.1-alpha.5",
73
+ "@things-factory/auth-ui": "^7.0.1-alpha.5",
74
+ "@things-factory/board-service": "^7.0.1-alpha.5",
75
+ "@things-factory/board-ui": "^7.0.1-alpha.5",
76
+ "@things-factory/ccp": "^7.0.1-alpha.5",
77
+ "@things-factory/code-ui": "^7.0.1-alpha.5",
78
+ "@things-factory/contact": "^7.0.1-alpha.5",
79
+ "@things-factory/context-ui": "^7.0.1-alpha.5",
80
+ "@things-factory/dashboard": "^7.0.1-alpha.5",
81
+ "@things-factory/dataset": "^7.0.1-alpha.5",
82
+ "@things-factory/export-ui": "^7.0.1-alpha.5",
83
+ "@things-factory/export-ui-excel": "^7.0.1-alpha.5",
84
+ "@things-factory/help": "^7.0.1-alpha.5",
85
+ "@things-factory/integration-ui": "^7.0.1-alpha.5",
86
+ "@things-factory/lite-menu": "^7.0.1-alpha.5",
87
+ "@things-factory/more-ui": "^7.0.1-alpha.5",
88
+ "@things-factory/notification": "^7.0.1-alpha.5",
89
+ "@things-factory/oauth2-client": "^7.0.1-alpha.5",
90
+ "@things-factory/organization": "^7.0.1-alpha.5",
91
+ "@things-factory/print-ui": "^7.0.1-alpha.5",
92
+ "@things-factory/product-base": "^7.0.1-alpha.5",
93
+ "@things-factory/qc": "^7.0.1-alpha.5",
94
+ "@things-factory/resource-ui": "^7.0.1-alpha.5",
95
+ "@things-factory/routing-base": "^7.0.1-alpha.5",
96
+ "@things-factory/setting-base": "^7.0.1-alpha.5",
97
+ "@things-factory/setting-ui": "^7.0.1-alpha.5",
98
+ "@things-factory/shell": "^7.0.1-alpha.5",
99
+ "@things-factory/system": "^7.0.1-alpha.5",
100
+ "@things-factory/web-editor": "^7.0.1-alpha.5",
101
+ "@things-factory/work-shift": "^7.0.1-alpha.5",
102
102
  "@tinymce/tinymce-webcomponent": "^2.0.1",
103
103
  "random-words": "^1.2.0"
104
104
  },
105
105
  "devDependencies": {
106
106
  "@things-factory/builder": "^7.0.1-alpha.0"
107
107
  },
108
- "gitHead": "a86c8c91120135535386cbe3659f50798f3f9c01"
108
+ "gitHead": "3a1ceb942521a89f14c4b16a323b506ff676d349"
109
109
  }
package/schema.graphql CHANGED
@@ -404,6 +404,7 @@ input ActivityTemplatePatch {
404
404
  type ActivityThread {
405
405
  activityApprovals: [ActivityApproval!]!
406
406
  activityInstance: ActivityInstance
407
+ activityThreadHistories: [ActivityThreadHistory!]!
407
408
  assignedAt: DateTimeISO
408
409
  assignee: User
409
410
  createdAt: DateTimeISO
@@ -412,6 +413,34 @@ type ActivityThread {
412
413
  dueAt: DateTimeISO
413
414
  id: ID!
414
415
  output: Object
416
+
417
+ """Specific reason for the execution of the last transaction"""
418
+ reason: String
419
+ round: Float
420
+ startedAt: DateTimeISO
421
+ state: String
422
+ terminatedAt: DateTimeISO
423
+ terminator: User
424
+ transaction: String
425
+ updatedAt: DateTimeISO
426
+ updater: User
427
+ version: Float
428
+ }
429
+
430
+ """History Entity of ActivityThread"""
431
+ type ActivityThreadHistory {
432
+ activityInstance: ActivityInstance
433
+ assignedAt: DateTimeISO
434
+ assignee: User
435
+ createdAt: DateTimeISO
436
+ creator: User
437
+ domain: Domain
438
+ dueAt: DateTimeISO
439
+ id: ID!
440
+ output: Object
441
+
442
+ """Specific reason for the execution of the last transaction"""
443
+ reason: String
415
444
  round: Float
416
445
  startedAt: DateTimeISO
417
446
  state: String
@@ -991,6 +1020,7 @@ type CommonCodeDetail {
991
1020
  description: String
992
1021
  domain: Domain
993
1022
  id: ID!
1023
+ labels: Object
994
1024
  name: String!
995
1025
  rank: Float
996
1026
  updatedAt: DateTimeISO
@@ -1007,6 +1037,7 @@ input CommonCodeDetailPatch {
1007
1037
  cuFlag: String
1008
1038
  description: String
1009
1039
  id: ID
1040
+ labels: Object
1010
1041
  name: String
1011
1042
  rank: Float
1012
1043
  }
@@ -1066,6 +1097,7 @@ type Connection {
1066
1097
  creator: User
1067
1098
  description: String
1068
1099
  domain: Domain
1100
+ edge: Appliance
1069
1101
  endpoint: String
1070
1102
  id: ID!
1071
1103
  name: String!
@@ -1085,6 +1117,7 @@ input ConnectionPatch {
1085
1117
  active: Boolean
1086
1118
  cuFlag: String
1087
1119
  description: String
1120
+ edge: ObjectRef
1088
1121
  endpoint: String
1089
1122
  id: ID
1090
1123
  name: String
@@ -1095,6 +1128,7 @@ input ConnectionPatch {
1095
1128
  type ConnectionState {
1096
1129
  description: String
1097
1130
  domain: Domain
1131
+ edge: Appliance
1098
1132
  id: String
1099
1133
  name: String
1100
1134
  state: String
@@ -1181,10 +1215,12 @@ type ContactPoint {
1181
1215
  domain: Domain!
1182
1216
  email: String
1183
1217
  fax: String
1218
+ fax2: String
1184
1219
  id: ID!
1185
1220
  managerName: String
1186
1221
  name: String!
1187
1222
  phone: String
1223
+ phone2: String
1188
1224
  postCode: String
1189
1225
  registrationNo: String
1190
1226
  state: String
@@ -1211,10 +1247,12 @@ input ContactPointPatch {
1211
1247
  description: String
1212
1248
  email: String
1213
1249
  fax: String
1250
+ fax2: String
1214
1251
  id: String
1215
1252
  managerName: String
1216
1253
  name: String
1217
1254
  phone: String
1255
+ phone2: String
1218
1256
  postCode: String
1219
1257
  registrationNo: String
1220
1258
  state: String
@@ -1265,6 +1303,11 @@ type DataItem {
1265
1303
  """Indicates if the data item is active"""
1266
1304
  active: Boolean
1267
1305
 
1306
+ """
1307
+ Aggregation functions to be used in data summarizing logic for a given period.
1308
+ """
1309
+ agg: String
1310
+
1268
1311
  """A description of the data item"""
1269
1312
  description: String
1270
1313
 
@@ -1289,7 +1332,7 @@ type DataItem {
1289
1332
  spec: Object
1290
1333
 
1291
1334
  """
1292
- The grouping logic for data summarization in the given field during periodic task deadlines.
1335
+ The grouping logic for data finalize in the given field during periodic task deadlines.
1293
1336
  """
1294
1337
  stat: String
1295
1338
 
@@ -1309,6 +1352,11 @@ input DataItemPatch {
1309
1352
  """Indicates if the data item is active"""
1310
1353
  active: Boolean
1311
1354
 
1355
+ """
1356
+ Aggregation functions to be used in data summarizing logic for a given period.
1357
+ """
1358
+ agg: String
1359
+
1312
1360
  """A description of the data item"""
1313
1361
  description: String
1314
1362
 
@@ -1356,6 +1404,7 @@ enum DataItemType {
1356
1404
  datetime
1357
1405
  file
1358
1406
  number
1407
+ radio
1359
1408
  select
1360
1409
  text
1361
1410
  }
@@ -1420,6 +1469,7 @@ type DataOoc {
1420
1469
  creator: User
1421
1470
  data: Object
1422
1471
  dataItems: [DataItem!]
1472
+ dataSample: DataSample
1423
1473
  dataSet: DataSet
1424
1474
  dataSetVersion: Float
1425
1475
  description: String
@@ -1432,11 +1482,13 @@ type DataOoc {
1432
1482
  key03: String
1433
1483
  key04: String
1434
1484
  key05: String
1435
- name: String!
1485
+ name: String
1436
1486
  ooc: Boolean
1437
1487
  oos: Boolean
1438
1488
  partitionKeys: Object
1439
1489
  rawData: String
1490
+ resolveActivityInstance: ActivityInstance
1491
+ reviewActivityInstance: ActivityInstance
1440
1492
  reviewedAt: DateTimeISO
1441
1493
  reviewer: User
1442
1494
  source: String
@@ -1474,6 +1526,7 @@ type DataSample {
1474
1526
  creator: User
1475
1527
  data: Object
1476
1528
  dataItems: [DataItem!]
1529
+ dataOoc: DataOoc
1477
1530
  dataSet: DataSet!
1478
1531
  dataSetVersion: Float
1479
1532
  description: String
@@ -1485,11 +1538,12 @@ type DataSample {
1485
1538
  key03: String
1486
1539
  key04: String
1487
1540
  key05: String
1488
- name: String!
1541
+ name: String
1489
1542
  ooc: Boolean
1490
1543
  oos: Boolean
1491
1544
  partitionKeys: Object
1492
1545
  rawData: String
1546
+ reviewActivityInstance: ActivityInstance
1493
1547
  source: String
1494
1548
  type: String
1495
1549
  updatedAt: DateTimeISO
@@ -1517,6 +1571,11 @@ type DataSensor {
1517
1571
  createdAt: DateTimeISO
1518
1572
  creator: User
1519
1573
  dataSet: DataSet
1574
+
1575
+ """
1576
+ The decoder scenario that automatically executes based on the trigger of raw data collection
1577
+ """
1578
+ decoder: Scenario
1520
1579
  description: String
1521
1580
  deviceId: String
1522
1581
  domain: Domain
@@ -1542,6 +1601,7 @@ input DataSensorPatch {
1542
1601
  brand: String
1543
1602
  cuFlag: String!
1544
1603
  dataSet: ObjectRef
1604
+ decoder: ObjectRef
1545
1605
  description: String
1546
1606
  deviceId: String
1547
1607
  id: ID
@@ -1876,7 +1936,6 @@ type Department {
1876
1936
  name: String
1877
1937
  parent: Department
1878
1938
  picture: String
1879
- state: String
1880
1939
  updatedAt: DateTimeISO
1881
1940
  updater: User
1882
1941
  version: Float
@@ -1897,13 +1956,6 @@ input DepartmentPatch {
1897
1956
  name: String
1898
1957
  parent: ObjectRef
1899
1958
  picture: Upload
1900
- state: DepartmentStatus
1901
- }
1902
-
1903
- """state enumeration of a department"""
1904
- enum DepartmentStatus {
1905
- STATUS_A
1906
- STATUS_B
1907
1959
  }
1908
1960
 
1909
1961
  type Domain {
@@ -3385,14 +3437,20 @@ type Mutation {
3385
3437
 
3386
3438
  """To end a ActivityThread"""
3387
3439
  endActivityThread(id: String!, output: Object, reason: String): ActivityThread!
3440
+
3441
+ """To finalize data collection for the given period"""
3442
+ finalizeDataCollection(dataSetId: String!, date: String!, period: String!): Boolean!
3443
+
3444
+ """To finalize new Data Summaries"""
3445
+ finalizeLatestDataCollection(dataSetId: String!): Boolean!
3388
3446
  generateApplianceSecret(id: String!): Appliance!
3389
3447
  generateApplicationSecret(id: String!): Application!
3390
3448
 
3391
- """To generate new Data Summaries"""
3392
- generateDataSummaries(dataSetId: String!, date: String!, period: String!): Boolean!
3449
+ """Deprecated. Use finalizeDataCollection"""
3450
+ generateDataSummaries(dataSetId: String!, date: String!, period: String!): Boolean! @deprecated(reason: "This resolver has been replaced by finalizeDataCollection")
3393
3451
 
3394
- """To generate new Data Summaries"""
3395
- generateLatestDataSummaries(dataSetId: String!): Boolean!
3452
+ """Deprecated. Use finalizeLatestDataCollection"""
3453
+ generateLatestDataSummaries(dataSetId: String!): Boolean! @deprecated(reason: "This resolver has been replaced by finalizeLatestDataCollection")
3396
3454
 
3397
3455
  """To generate data sample one"""
3398
3456
  generateMockupData(params: DataSampleMockupInfo!): Boolean!
@@ -4073,6 +4131,7 @@ input NewCommonCode {
4073
4131
  input NewCommonCodeDetail {
4074
4132
  commonCode: ObjectRef!
4075
4133
  description: String
4134
+ labels: Object
4076
4135
  name: String!
4077
4136
  rank: Float!
4078
4137
  }
@@ -4090,6 +4149,7 @@ input NewCompany {
4090
4149
 
4091
4150
  input NewConnection {
4092
4151
  description: String
4152
+ edge: ObjectRef
4093
4153
  endpoint: String
4094
4154
  name: String!
4095
4155
  params: String
@@ -4120,9 +4180,11 @@ input NewContactPoint {
4120
4180
  description: String
4121
4181
  email: String
4122
4182
  fax: String
4183
+ fax2: String
4123
4184
  managerName: String
4124
4185
  name: String!
4125
4186
  phone: String
4187
+ phone2: String
4126
4188
  postCode: String
4127
4189
  registrationNo: String
4128
4190
  state: String
@@ -4181,6 +4243,7 @@ input NewDataSensor {
4181
4243
  appliance: ObjectRef
4182
4244
  brand: String
4183
4245
  dataSet: ObjectRef
4246
+ decoder: ObjectRef
4184
4247
  description: String
4185
4248
  deviceId: String
4186
4249
  model: String
@@ -4232,7 +4295,6 @@ input NewDepartment {
4232
4295
  name: String!
4233
4296
  parent: ObjectRef
4234
4297
  picture: Upload
4235
- state: DepartmentStatus
4236
4298
  }
4237
4299
 
4238
4300
  input NewEmployee {
@@ -5526,7 +5588,7 @@ input ProductDetailBizplaceSettingPatch {
5526
5588
  cuFlag: String
5527
5589
  id: String
5528
5590
  maxQty: Int
5529
- minQty: Int
5591
+ minQty: Float
5530
5592
  name: String
5531
5593
  productDetail: ObjectRef
5532
5594
  requirePacking: Boolean
@@ -5568,7 +5630,7 @@ input ProductDetailPatch {
5568
5630
  isTrackedAsInventory: Boolean
5569
5631
  lengthUnit: String
5570
5632
  maxQty: Int
5571
- minQty: Int
5633
+ minQty: Float
5572
5634
  movement: String
5573
5635
  mrpPrice: Float
5574
5636
  name: String
@@ -6002,8 +6064,8 @@ type Query {
6002
6064
  """To fetch a Department"""
6003
6065
  department(id: String!): Department
6004
6066
 
6005
- """To fetch a Root Department"""
6006
- departmentRoot: Department
6067
+ """To fetch a Root Departments"""
6068
+ departmentRoots(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): DepartmentList
6007
6069
 
6008
6070
  """To fetch multiple Departments"""
6009
6071
  departments(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): DepartmentList!
@@ -6023,6 +6085,9 @@ type Query {
6023
6085
  """To fetch my own ActivityInstances"""
6024
6086
  draftList(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): ActivityInstanceList!
6025
6087
 
6088
+ """To fetch multiple appliance"""
6089
+ edges(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): ApplianceList!
6090
+
6026
6091
  """To fetch a Employee"""
6027
6092
  employee(id: String!): Employee
6028
6093
 
@@ -6153,9 +6218,6 @@ type Query {
6153
6218
  """To fetch my notifications"""
6154
6219
  myNotifications(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): NotificationList!
6155
6220
 
6156
- """To fetch current users privileges for current domain"""
6157
- myPrivileges: [Privilege!]!
6158
-
6159
6221
  """To fetch roles of current user"""
6160
6222
  myRoles: [Role!]!
6161
6223
 
@@ -6653,7 +6715,7 @@ type Step {
6653
6715
  params: String
6654
6716
 
6655
6717
  """
6656
- a boolean attribute indicating the inclusion status of an element in the result
6718
+ A boolean attribute indicating the inclusion status of an element in the result
6657
6719
  """
6658
6720
  result: Boolean
6659
6721
  scenario: Scenario