@things-factory/operato-mms 4.3.544-alpha.0 → 4.3.548

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.
@@ -90,7 +90,12 @@ class OrderInitPopup extends localize(i18next)(LitElement) {
90
90
  marketplaceOrderItems.map(item => {
91
91
  const marketplaceOrderShippingItems = item.marketplaceOrderShippingItems
92
92
  marketplaceOrderShippingItems.map(itm => {
93
- const marketplaceOrderShipping = itm.marketplaceOrderShipping
93
+ const marketplaceOrderShipping = {
94
+ ...itm.marketplaceOrderShipping,
95
+ address1: this.maskString(itm.marketplaceOrderShipping.address1),
96
+ attentionTo: this.maskString(itm.marketplaceOrderShipping.attentionTo),
97
+ phone1: this.maskString(itm.marketplaceOrderShipping.phone1)
98
+ }
94
99
 
95
100
  if (marketplaceOrderShipping) {
96
101
  marketplaceOrderShippings.push(marketplaceOrderShipping)
@@ -102,6 +107,16 @@ class OrderInitPopup extends localize(i18next)(LitElement) {
102
107
  return marketplaceOrderShippings.find(a => a.id === id)
103
108
  })
104
109
  }
110
+
111
+ maskString(str, visibleStart = 1, visibleEnd = 1) {
112
+ if (str.length <= visibleStart + visibleEnd) {
113
+ return str
114
+ }
115
+ const regex = new RegExp(`^(.{${visibleStart}})(.+)(.{${visibleEnd}})$`)
116
+ return str.replace(regex, (match, start, middle, end) => {
117
+ return start + '*'.repeat(middle.length) + end
118
+ })
119
+ }
105
120
  }
106
121
 
107
122
  window.customElements.define('order-init-popup', OrderInitPopup)
@@ -190,6 +190,11 @@ class OrderByStore extends localize(i18next)(PageView) {
190
190
  type: 'date',
191
191
  props: {
192
192
  searchOper: 'eq',
193
+ min: (() => {
194
+ let date = new Date()
195
+ date.setMonth(date.getMonth() - 3)
196
+ return date.toISOString().split('T')[0]
197
+ })(),
193
198
  max: new Date().toISOString().split('T')[0]
194
199
  },
195
200
  value: (() => {
@@ -205,7 +210,16 @@ class OrderByStore extends localize(i18next)(PageView) {
205
210
  type: 'date',
206
211
  props: {
207
212
  searchOper: 'eq',
208
- max: new Date().toISOString().split('T')[0]
213
+ min: (() => {
214
+ let date = new Date()
215
+ date.setMonth(date.getMonth() - 3)
216
+ return date.toISOString().split('T')[0]
217
+ })(),
218
+ max: (() => {
219
+ var max = new Date()
220
+ max.setMonth(max.getMonth())
221
+ return max.toISOString().split('T')[0]
222
+ })()
209
223
  },
210
224
  value: new Date().toISOString().split('T')[0]
211
225
  },
@@ -520,7 +534,7 @@ class OrderByStore extends localize(i18next)(PageView) {
520
534
  }
521
535
 
522
536
  get _toDateInput() {
523
- return this._searchForm.shadowRoot.querySelector('input[name=toDate]')
537
+ return this.searchForm.shadowRoot.querySelector('input[name=toDate]')
524
538
  }
525
539
 
526
540
  async fetchStore(id) {
@@ -1136,7 +1150,7 @@ class OrderByStore extends localize(i18next)(PageView) {
1136
1150
  _modifyDateRange(e) {
1137
1151
  try {
1138
1152
  const fromDate = e.currentTarget.value
1139
-
1153
+ let a = this?._toDateInput?.value
1140
1154
  if (this?._toDateInput?.value < fromDate) this._toDateInput.value = fromDate
1141
1155
 
1142
1156
  let min = new Date(fromDate)
@@ -1149,6 +1163,30 @@ class OrderByStore extends localize(i18next)(PageView) {
1149
1163
  } catch (e) {}
1150
1164
  }
1151
1165
 
1166
+ // _modifyDateRange(e) {
1167
+ // const fromDate = e.currentTarget.value
1168
+
1169
+ // if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
1170
+
1171
+ // let min = new Date(fromDate)
1172
+ // let max = new Date(fromDate)
1173
+ // max.setMonth(max.getMonth() + 1)
1174
+
1175
+ // let today = new Date()
1176
+ // today.setHours(0, 0, 0, 0)
1177
+ // if (!Number.isNaN(new Date(min).getTime())) {
1178
+ // min = min.toISOString().split('T')[0]
1179
+ // max = max.toISOString().split('T')[0]
1180
+ // } else {
1181
+ // return
1182
+ // }
1183
+
1184
+ // if (this._toDateInput.value > max) this._toDateInput.value = max
1185
+
1186
+ // this._toDateInput.min = min
1187
+ // this._toDateInput.max = max
1188
+ // }
1189
+
1152
1190
  _showToast({ type, message }) {
1153
1191
  document.dispatchEvent(
1154
1192
  new CustomEvent('notify', {
@@ -2,17 +2,46 @@ module.exports = {
2
2
  domainType: 'company',
3
3
  domainExtType: 'company',
4
4
  subdomainOffset: 2,
5
+ port: 1300,
5
6
  ormconfig: {
6
7
  name: 'default',
7
8
  type: 'postgres',
8
- database: 'musz_00',
9
+ database: 'postgres',
9
10
  username: 'postgres',
10
- password: 'hatio',
11
- host: '192.168.0.153',
12
- port: 15432,
11
+ password: 'abcd1234',
12
+ host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
13
+ port: 55432,
13
14
  synchronize: false,
14
15
  logging: true
15
16
  },
17
+ // ormconfig: {
18
+ // name: 'default',
19
+ // type: 'postgres',
20
+ // database: 'v3-hub1',
21
+ // username: 'postgres',
22
+ // password: 'hatio',
23
+ // host: 'localhost',
24
+ // port: 15432,
25
+ // synchronize: true,
26
+ // logging: true
27
+ // },
28
+ sftpFileStorage: {
29
+ type: 's3',
30
+ accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
31
+ secretAccessKey: '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',
32
+ bucketName: 'operato-sftp'
33
+ },
34
+ // ormconfig: {
35
+ // name: 'default',
36
+ // type: 'postgres',
37
+ // database: 'postgres',
38
+ // username: 'postgres',
39
+ // password: 'hatio',
40
+ // host: 'localhost',
41
+ // port: 35432,
42
+ // synchronize: true,
43
+ // logging: true
44
+ // },
16
45
  inspect: '9280',
17
46
  password: {
18
47
  lowerCase: true,
@@ -30,12 +59,11 @@ module.exports = {
30
59
  platforms: [
31
60
  {
32
61
  name: 'Operato Hub',
33
- apiURL: 'http://operato.com:9002/api'
62
+ apiURL: 'http://operato-h.com:3000/api'
34
63
  }
35
64
  ]
36
65
  },
37
66
  useVirtualHostBasedDomain: false,
38
- port: 9003,
39
67
  uploads: 'uploads',
40
68
  attachmentsPath: 'attachments',
41
69
  SECRET: '0xD58F835B69D207A76CC5F84a70a1D0d4C79dfC95',
@@ -86,69 +114,38 @@ module.exports = {
86
114
  privateKey: '4pmlt3Wk019u7nqU3Q_oGZE6LbUDjjf8DpmAcn9-iss'
87
115
  }
88
116
  },
89
- // marketplaceIntegrationShopee: {
90
- // platform: 'shopee',
91
- // isUAT: true,
92
- // application: 'Operato MMS V2',
93
- // partnerId: 1007818,
94
- // partnerKey: '4aba24b16c8004e0257844120dd5b3882f2654dd269bd2417cd44800187037de',
95
- // v2: true
96
- // },
97
- // marketplaceIntegrationShopee: {
98
- // platform: 'shopee',
99
- // isUAT: false,
100
- // application: 'Operato MMS V2 Live',
101
- // partnerId: 2004140,
102
- // partnerKey: '825dcae5af73426f887bc8b1ddb5b494b70e0057b50b77298f85350273017bd2',
103
- // v2: true
104
- // },
117
+ fulfillmentIntegrationOperato: {
118
+ host: 'operato-h.com:3000',
119
+ protocol: 'http',
120
+ platform: 'operato',
121
+ application: 'Operato MMS',
122
+ appKey: 'a9bf751e622bf146662b240d58971051',
123
+ appSecret: '1c385935dc131c4b902b9bbf6a4798af',
124
+ callback: 'http://operato-h.com:5000/callback-operato'
125
+ },
126
+ sellercraftChannelIntegrationConfig: {
127
+ apiKey: 'eqDVmIp0kxakM4sNnzqTkySBM73UGMS1nOPDN5Z1',
128
+ tokenCraftUrl: 'https://staging-tokencraft.sellercraft.co/v1/get-shop'
129
+ },
105
130
  marketplaceIntegrationShopee: {
106
131
  platform: 'shopee',
107
132
  isUAT: false,
108
- application: 'Staging MMS',
133
+ application: 'Operato MMS',
109
134
  partnerId: 846025,
110
- partnerKey: 'd34cfd85a603f196a0d74ebe08043280c1a27788bb36bdffd61e7e0bb1c90b64',
111
- v2: true
135
+ partnerKey: 'd34cfd85a603f196a0d74ebe08043280c1a27788bb36bdffd61e7e0bb1c90b64'
112
136
  },
113
- // marketplaceIntegrationShopee: {
114
- // platform: 'shopee',
115
- // isUAT: true,
116
- // application: 'Staging MMS',
117
- // partnerId: 1029117,
118
- // partnerKey: '7767596c6674587545554d724c524742704541705977656b5866437766485462',
119
- // v2: true
120
- // },
121
137
  marketplaceIntegrationLazada: {
122
138
  platform: 'lazada',
123
139
  application: 'operato-mms',
124
- appKey: '116408',
125
- appSecret: 'UHZvMBS4jxjRLuFfToJkrmhvwbfmsPcH',
140
+ appKey: '120961',
141
+ appSecret: 'HB3RTNEXHlVSlBr9SmWF8AjbSUT7a825',
126
142
  callback: 'https://maybank.operato-m.com/lazada-callback'
127
143
  },
128
- fulfillmentIntegrationOperato: {
129
- host: '192.168.0.161:9002',
130
- protocol: 'http',
131
- platform: 'operato',
132
- application: 'Operato MMS',
133
- appKey: 'a9bf751e622bf146662b240d58971051',
134
- appSecret: '1c385935dc131c4b902b9bbf6a4798af',
135
- callback: 'http://192.168.0.161:9003/callback-operato'
136
- },
137
- fulfillmentIntegrationOperatoSftp: {
138
- host: 'operato.com:9002',
139
- protocol: 'http',
140
- platform: 'operato',
141
- application: 'Operato SFTP',
142
- appKey: 'd3ebaf18121947931b5902d78adc9a98',
143
- appSecret: '41e5591dd6597a75ae5d54603494525b',
144
- type: 'SFTP',
145
- callback: 'http://operato.com:9003/callback-operato'
146
- },
147
144
  marketplaceIntegrationShopify: {
148
145
  platform: 'shopify',
149
146
  application: 'Operato',
150
- apiKey: '30c45195bb39192127d00fdc49932018',
151
- apiSecret: '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'
147
+ apiKey: '37da47200ab87c8aaf0634869c80bd5f',
148
+ apiSecret: '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'
152
149
  },
153
150
  marketplaceIntegrationShopifyPrivate: {
154
151
  platform: 'shopify',
@@ -168,25 +165,5 @@ module.exports = {
168
165
  oauth_verifier: '',
169
166
  oauth_consumer_key: '',
170
167
  oauth_consumer_secret: ''
171
- },
172
- sellercraftChannelIntegrationConfig: {
173
- tokenCraftApiKey: 'gf2oZbK2rv47qO0bQPbkV8RsqhlHcnSVq267W5I8',
174
- apiKey: 'eqDVmIp0kxakM4sNnzqTkySBM73UGMS1nOPDN5Z1',
175
- tokenCraftUrl: 'https://tokencraft.piggylabs.com/v1/get-shop',
176
- getShopsTokenCraftUrl: 'https://tokencraft.piggylabs.com/v1/get-shops'
177
- },
178
- awbFileStorage: {
179
- type: 's3',
180
- accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
181
- secretAccessKey: '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',
182
- bucketName: 'operato-awb',
183
- region: 'ap-southeast-1'
184
- },
185
- logStorage: {
186
- type: 's3',
187
- accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
188
- secretAccessKey: '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',
189
- bucketName: 'opa-one',
190
- region: 'ap-southeast-1'
191
168
  }
192
169
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-mms",
3
- "version": "4.3.544-alpha.0",
3
+ "version": "4.3.548",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -59,52 +59,52 @@
59
59
  "@operato/scene-table": "^0.1.8",
60
60
  "@operato/scene-timer": "^0.1.8",
61
61
  "@operato/scene-wheel-sorter": "^0.1.8",
62
- "@things-factory/apptool-ui": "^4.3.544-alpha.0",
63
- "@things-factory/attachment-base": "^4.3.544-alpha.0",
64
- "@things-factory/auth-ui": "^4.3.544-alpha.0",
65
- "@things-factory/biz-base": "^4.3.544-alpha.0",
66
- "@things-factory/board-service": "^4.3.544-alpha.0",
67
- "@things-factory/board-ui": "^4.3.544-alpha.0",
68
- "@things-factory/code-ui": "^4.3.544-alpha.0",
69
- "@things-factory/context-ui": "^4.3.544-alpha.0",
70
- "@things-factory/dashboard": "^4.3.544-alpha.0",
71
- "@things-factory/export-ui": "^4.3.544-alpha.0",
72
- "@things-factory/export-ui-csv": "^4.3.544-alpha.0",
73
- "@things-factory/export-ui-excel": "^4.3.544-alpha.0",
74
- "@things-factory/geography": "^4.3.544-alpha.0",
75
- "@things-factory/grist-ui": "^4.3.544-alpha.0",
76
- "@things-factory/help": "^4.3.544-alpha.0",
77
- "@things-factory/i18n-base": "^4.3.544-alpha.0",
78
- "@things-factory/import-ui": "^4.3.544-alpha.0",
79
- "@things-factory/import-ui-excel": "^4.3.544-alpha.0",
80
- "@things-factory/integration-fulfillment": "^4.3.544-alpha.0",
81
- "@things-factory/integration-lmd": "^4.3.544-alpha.0",
82
- "@things-factory/lite-menu": "^4.3.544-alpha.0",
83
- "@things-factory/marketplace-base": "^4.3.544-alpha.0",
84
- "@things-factory/more-ui": "^4.3.544-alpha.0",
85
- "@things-factory/notification": "^4.3.544-alpha.0",
86
- "@things-factory/oauth2-client": "^4.3.544-alpha.0",
87
- "@things-factory/pdf": "^4.3.544-alpha.0",
88
- "@things-factory/product-base": "^4.3.544-alpha.0",
89
- "@things-factory/resource-ui": "^4.3.544-alpha.0",
90
- "@things-factory/scene-data-transform": "^4.3.544-alpha.0",
91
- "@things-factory/scene-excel": "^4.3.544-alpha.0",
92
- "@things-factory/scene-firebase": "^4.3.544-alpha.0",
93
- "@things-factory/scene-form": "^4.3.544-alpha.0",
94
- "@things-factory/scene-google-map": "^4.3.544-alpha.0",
95
- "@things-factory/scene-graphql": "^4.3.544-alpha.0",
96
- "@things-factory/scene-label": "^4.3.544-alpha.0",
97
- "@things-factory/scene-marker": "^4.3.544-alpha.0",
98
- "@things-factory/scene-mqtt": "^4.3.544-alpha.0",
99
- "@things-factory/scene-restful": "^4.3.544-alpha.0",
100
- "@things-factory/scene-visualizer": "^4.3.544-alpha.0",
101
- "@things-factory/setting-ui": "^4.3.544-alpha.0",
102
- "@things-factory/system-ui": "^4.3.544-alpha.0",
103
- "@things-factory/warehouse-base": "^4.3.544-alpha.0"
62
+ "@things-factory/apptool-ui": "^4.3.535",
63
+ "@things-factory/attachment-base": "^4.3.535",
64
+ "@things-factory/auth-ui": "^4.3.535",
65
+ "@things-factory/biz-base": "^4.3.535",
66
+ "@things-factory/board-service": "^4.3.535",
67
+ "@things-factory/board-ui": "^4.3.535",
68
+ "@things-factory/code-ui": "^4.3.535",
69
+ "@things-factory/context-ui": "^4.3.535",
70
+ "@things-factory/dashboard": "^4.3.535",
71
+ "@things-factory/export-ui": "^4.3.535",
72
+ "@things-factory/export-ui-csv": "^4.3.535",
73
+ "@things-factory/export-ui-excel": "^4.3.535",
74
+ "@things-factory/geography": "^4.3.535",
75
+ "@things-factory/grist-ui": "^4.3.535",
76
+ "@things-factory/help": "^4.3.535",
77
+ "@things-factory/i18n-base": "^4.3.535",
78
+ "@things-factory/import-ui": "^4.3.535",
79
+ "@things-factory/import-ui-excel": "^4.3.535",
80
+ "@things-factory/integration-fulfillment": "^4.3.544",
81
+ "@things-factory/integration-lmd": "^4.3.544",
82
+ "@things-factory/lite-menu": "^4.3.535",
83
+ "@things-factory/marketplace-base": "^4.3.544",
84
+ "@things-factory/more-ui": "^4.3.535",
85
+ "@things-factory/notification": "^4.3.535",
86
+ "@things-factory/oauth2-client": "^4.3.535",
87
+ "@things-factory/pdf": "^4.3.534",
88
+ "@things-factory/product-base": "^4.3.535",
89
+ "@things-factory/resource-ui": "^4.3.535",
90
+ "@things-factory/scene-data-transform": "^4.3.534",
91
+ "@things-factory/scene-excel": "^4.3.534",
92
+ "@things-factory/scene-firebase": "^4.3.534",
93
+ "@things-factory/scene-form": "^4.3.534",
94
+ "@things-factory/scene-google-map": "^4.3.534",
95
+ "@things-factory/scene-graphql": "^4.3.534",
96
+ "@things-factory/scene-label": "^4.3.535",
97
+ "@things-factory/scene-marker": "^4.3.534",
98
+ "@things-factory/scene-mqtt": "^4.3.534",
99
+ "@things-factory/scene-restful": "^4.3.534",
100
+ "@things-factory/scene-visualizer": "^4.3.534",
101
+ "@things-factory/setting-ui": "^4.3.535",
102
+ "@things-factory/system-ui": "^4.3.535",
103
+ "@things-factory/warehouse-base": "^4.3.544"
104
104
  },
105
105
  "devDependencies": {
106
- "@things-factory/builder": "^4.3.544-alpha.0",
106
+ "@things-factory/builder": "^4.3.534",
107
107
  "@types/node-fetch": "^2.5.7"
108
108
  },
109
- "gitHead": "361b1adbe994c386b722d3660545b4956b56c387"
109
+ "gitHead": "f4b0d3681ce2920b0ec7bb4046830a6bf43e784d"
110
110
  }