@things-factory/biz-ui 4.3.105-alpha.0 → 4.3.113-alpha.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.
- package/client/pages/contact-point-list.js +17 -4
- package/package.json +10 -10
|
@@ -88,7 +88,7 @@ export class ContactPointList extends localize(i18next)(PageView) {
|
|
|
88
88
|
|
|
89
89
|
return patch
|
|
90
90
|
})
|
|
91
|
-
this._validateImport(patches)
|
|
91
|
+
await this._validateImport(patches)
|
|
92
92
|
await this._saveContactPoints(patches)
|
|
93
93
|
history.back()
|
|
94
94
|
} catch (e) {
|
|
@@ -256,7 +256,12 @@ export class ContactPointList extends localize(i18next)(PageView) {
|
|
|
256
256
|
type: 'string',
|
|
257
257
|
name: 'address',
|
|
258
258
|
record: { editable: true },
|
|
259
|
-
imex: {
|
|
259
|
+
imex: {
|
|
260
|
+
header: '*' + i18next.t('field.contact_point_company_address'),
|
|
261
|
+
key: 'address',
|
|
262
|
+
width: 40,
|
|
263
|
+
type: 'string'
|
|
264
|
+
},
|
|
260
265
|
header: '*' + i18next.t('field.contact_point_company_address'),
|
|
261
266
|
width: 300
|
|
262
267
|
},
|
|
@@ -461,10 +466,12 @@ export class ContactPointList extends localize(i18next)(PageView) {
|
|
|
461
466
|
|
|
462
467
|
let data = this.dataGrist._data.records.map(itm => {
|
|
463
468
|
itm.error = false
|
|
469
|
+
z
|
|
464
470
|
|
|
465
471
|
if (isEmpty(itm.name) || '') {
|
|
466
472
|
itm.error = true
|
|
467
|
-
if (!errors.find(err => err.type == 'customerName'))
|
|
473
|
+
if (!errors.find(err => err.type == 'customerName'))
|
|
474
|
+
errors.push({ type: 'customerName', value: 'customer name is required' })
|
|
468
475
|
}
|
|
469
476
|
return itm
|
|
470
477
|
})
|
|
@@ -516,7 +523,8 @@ export class ContactPointList extends localize(i18next)(PageView) {
|
|
|
516
523
|
}
|
|
517
524
|
}
|
|
518
525
|
|
|
519
|
-
_validateImport(data) {
|
|
526
|
+
async _validateImport(data) {
|
|
527
|
+
const contactTypes = await getCodeByName('CONTACT_TYPES')
|
|
520
528
|
let errors = []
|
|
521
529
|
|
|
522
530
|
data = data.map(item => {
|
|
@@ -550,6 +558,11 @@ export class ContactPointList extends localize(i18next)(PageView) {
|
|
|
550
558
|
}
|
|
551
559
|
}
|
|
552
560
|
|
|
561
|
+
let foundContactTypes = contactTypes.find(exist => exist.name == item.type)
|
|
562
|
+
if (!foundContactTypes) {
|
|
563
|
+
throw new Error(i18next.t('text.contact_type_does_not_exist'))
|
|
564
|
+
}
|
|
565
|
+
|
|
553
566
|
return item
|
|
554
567
|
})
|
|
555
568
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/biz-ui",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.113-alpha.0",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@things-factory/biz-base": "^4.3.
|
|
28
|
-
"@things-factory/code-base": "^4.3.
|
|
29
|
-
"@things-factory/form-ui": "^4.3.
|
|
30
|
-
"@things-factory/grist-ui": "^4.3.
|
|
31
|
-
"@things-factory/i18n-base": "^4.3.
|
|
32
|
-
"@things-factory/import-ui": "^4.3.
|
|
33
|
-
"@things-factory/layout-base": "^4.3.
|
|
34
|
-
"@things-factory/shell": "^4.3.
|
|
27
|
+
"@things-factory/biz-base": "^4.3.113-alpha.0",
|
|
28
|
+
"@things-factory/code-base": "^4.3.113-alpha.0",
|
|
29
|
+
"@things-factory/form-ui": "^4.3.113-alpha.0",
|
|
30
|
+
"@things-factory/grist-ui": "^4.3.113-alpha.0",
|
|
31
|
+
"@things-factory/i18n-base": "^4.3.113-alpha.0",
|
|
32
|
+
"@things-factory/import-ui": "^4.3.113-alpha.0",
|
|
33
|
+
"@things-factory/layout-base": "^4.3.113-alpha.0",
|
|
34
|
+
"@things-factory/shell": "^4.3.113-alpha.0"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "3dd2e6f58cc2828ab5e2658d3fa47120165c802b"
|
|
37
37
|
}
|