@steedos/standard-object-database 2.6.6 → 2.6.7-beta.10
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/main/default/objectTranslations/object_fields.en/object_fields.en.objectTranslation.yml +8 -0
- package/main/default/objectTranslations/object_fields.zh-CN/object_fields.zh-CN.objectTranslation.yml +8 -0
- package/main/default/objectTranslations/object_listviews.en/object_listviews.en.objectTranslation.yml +16 -0
- package/main/default/objectTranslations/object_listviews.zh-CN/object_listviews.zh-CN.objectTranslation.yml +16 -0
- package/main/default/objectTranslations/objects.en/objects.en.objectTranslation.yml +4 -0
- package/main/default/objectTranslations/objects.zh-CN/objects.zh-CN.objectTranslation.yml +4 -0
- package/main/default/objects/object_fields.object.yml +11 -1
- package/main/default/objects/object_listviews.object.js +34 -3
- package/main/default/objects/object_listviews.object.yml +25 -0
- package/main/default/objects/objects.object.js +2 -0
- package/main/default/objects/objects.object.yml +6 -0
- package/main/default/pages/object_detail.page.amis.json +1 -1
- package/package.json +3 -3
- package/package.service.js +1 -1
package/main/default/objectTranslations/object_fields.en/object_fields.en.objectTranslation.yml
CHANGED
|
@@ -163,6 +163,10 @@ fields:
|
|
|
163
163
|
label: Description
|
|
164
164
|
help:
|
|
165
165
|
description:
|
|
166
|
+
autonumber_enable_modify:
|
|
167
|
+
label: Allow modification of numbers
|
|
168
|
+
help:
|
|
169
|
+
description:
|
|
166
170
|
formula:
|
|
167
171
|
label: Formula
|
|
168
172
|
help: This field must be filled when the field type is 'Autonumber' or 'Formula'
|
|
@@ -274,6 +278,10 @@ fields:
|
|
|
274
278
|
label: Required
|
|
275
279
|
help:
|
|
276
280
|
description:
|
|
281
|
+
disable_thousands:
|
|
282
|
+
label: Don't display thousands separators
|
|
283
|
+
help:
|
|
284
|
+
description:
|
|
277
285
|
deleted_lookup_record_behavior:
|
|
278
286
|
label: What to do if the lookup record is deleted?
|
|
279
287
|
help:
|
|
@@ -155,6 +155,10 @@ fields:
|
|
|
155
155
|
label: 描述
|
|
156
156
|
help:
|
|
157
157
|
description:
|
|
158
|
+
autonumber_enable_modify:
|
|
159
|
+
label: 允许修改编号
|
|
160
|
+
help:
|
|
161
|
+
description:
|
|
158
162
|
formula:
|
|
159
163
|
label: 公式
|
|
160
164
|
help: 字段类型为自动编号或公式时,必须填写此字段。
|
|
@@ -258,6 +262,10 @@ fields:
|
|
|
258
262
|
label: 必填
|
|
259
263
|
help:
|
|
260
264
|
description:
|
|
265
|
+
disable_thousands:
|
|
266
|
+
label: 不显示千分符
|
|
267
|
+
help:
|
|
268
|
+
description:
|
|
261
269
|
deleted_lookup_record_behavior:
|
|
262
270
|
label: 如果相关表记录被删除怎么办?
|
|
263
271
|
help:
|
|
@@ -30,6 +30,21 @@ fields:
|
|
|
30
30
|
label: Shared to All Users
|
|
31
31
|
help:
|
|
32
32
|
description:
|
|
33
|
+
shared_to:
|
|
34
|
+
label: Who can see this list view?
|
|
35
|
+
help:
|
|
36
|
+
description:
|
|
37
|
+
options:
|
|
38
|
+
- label: Only I can view this list view.
|
|
39
|
+
value: mine
|
|
40
|
+
- label: This list view is available to all users.
|
|
41
|
+
value: space
|
|
42
|
+
- label: Share the list view with some organizations.
|
|
43
|
+
value: organizations
|
|
44
|
+
shared_to_organizations:
|
|
45
|
+
label: Shared to which organizations?
|
|
46
|
+
help:
|
|
47
|
+
description:
|
|
33
48
|
show_count:
|
|
34
49
|
label: Show Record Count
|
|
35
50
|
help:
|
|
@@ -176,6 +191,7 @@ fields:
|
|
|
176
191
|
description:
|
|
177
192
|
groups:
|
|
178
193
|
advanced: Advanced
|
|
194
|
+
share_rules: Share Rules
|
|
179
195
|
show_columns: Show Columns
|
|
180
196
|
sort: Sort
|
|
181
197
|
filters: Filters
|
|
@@ -27,6 +27,21 @@ fields:
|
|
|
27
27
|
label: 共享视图到工作区
|
|
28
28
|
help:
|
|
29
29
|
description:
|
|
30
|
+
shared_to:
|
|
31
|
+
label: 谁可以查看此列表视图?
|
|
32
|
+
help:
|
|
33
|
+
description:
|
|
34
|
+
options:
|
|
35
|
+
- label: 只有我可以查看此列表视图
|
|
36
|
+
value: mine
|
|
37
|
+
- label: 所有用户均可以查看此列表视图
|
|
38
|
+
value: space
|
|
39
|
+
- label: 与组织共享列表视图
|
|
40
|
+
value: organizations
|
|
41
|
+
shared_to_organizations:
|
|
42
|
+
label: 共享列表视图给哪些组织?
|
|
43
|
+
help:
|
|
44
|
+
description:
|
|
30
45
|
show_count:
|
|
31
46
|
label: 显示条目数
|
|
32
47
|
help:
|
|
@@ -171,6 +186,7 @@ fields:
|
|
|
171
186
|
description:
|
|
172
187
|
groups:
|
|
173
188
|
advanced: 高级
|
|
189
|
+
share_rules: 共享设置
|
|
174
190
|
show_columns: 显示列
|
|
175
191
|
sort: 排序
|
|
176
192
|
filters: 过滤
|
|
@@ -289,10 +289,15 @@ fields:
|
|
|
289
289
|
label: Write requires master read
|
|
290
290
|
type: boolean
|
|
291
291
|
inlineHelpText: Sets the minimum sharing access level required on the master record to create, edit, or delete child records. This field applies only to master-detail or junction object custom field types. true—Allows users with “Read” access to the master record permission to create, edit, or delete child records. This setting makes sharing less restrictive. false—Allows users with “Read/Write” access to the master record permission to create, edit, or delete child records. This setting is more restrictive than true, and is the default value.
|
|
292
|
-
visible_on:
|
|
292
|
+
visible_on: c
|
|
293
293
|
sort_no: 200
|
|
294
294
|
amis:
|
|
295
295
|
disabledOn: "${is_system == true}"
|
|
296
|
+
autonumber_enable_modify:
|
|
297
|
+
label: 允许修改编号
|
|
298
|
+
type: boolean
|
|
299
|
+
visible_on: "{{formData.type === 'autonumber' ? true: false}}"
|
|
300
|
+
sort_no: 205
|
|
296
301
|
formula:
|
|
297
302
|
label: Formula
|
|
298
303
|
type: textarea
|
|
@@ -689,6 +694,11 @@ fields:
|
|
|
689
694
|
# group: Advanced
|
|
690
695
|
visible_on: "{{['autonumber','summary','formula'].indexOf(formData.type) > -1 ? false: true}}"
|
|
691
696
|
sort_no: 272
|
|
697
|
+
disable_thousands:
|
|
698
|
+
type: boolean
|
|
699
|
+
label: 不显示千分符
|
|
700
|
+
sort_no: 273
|
|
701
|
+
visible_on: "{{['number','currency','percent'].indexOf(formData.type) > -1 ? true: false}}"
|
|
692
702
|
deleted_lookup_record_behavior:
|
|
693
703
|
type: select
|
|
694
704
|
label: 如果相关表记录被删除怎么办?
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: baozhoutao@steedos.com
|
|
3
3
|
* @Date: 2022-03-28 09:35:34
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
5
|
+
* @LastEditTime: 2024-02-05 13:35:32
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
const _ = require("underscore");
|
|
@@ -65,6 +65,17 @@ Creator.Objects['object_listviews'].triggers = Object.assign(Creator.Objects['ob
|
|
|
65
65
|
checkName(doc.name);
|
|
66
66
|
if (!Steedos.isSpaceAdmin(doc.space, userId)) {
|
|
67
67
|
doc.shared = false;
|
|
68
|
+
delete doc.shared_to;
|
|
69
|
+
delete doc.shared_to_organizations;
|
|
70
|
+
}
|
|
71
|
+
if(doc.shared_to === "mine" || doc.shared_to === "organizations"){
|
|
72
|
+
doc.shared = false;
|
|
73
|
+
}
|
|
74
|
+
else if(doc.shared_to === "space"){
|
|
75
|
+
doc.shared = true;
|
|
76
|
+
}
|
|
77
|
+
if(doc.shared_to !== "organizations"){
|
|
78
|
+
delete doc.shared_to_organizations;
|
|
68
79
|
}
|
|
69
80
|
doc.filters = transformFilters(doc.filters);
|
|
70
81
|
}
|
|
@@ -79,8 +90,28 @@ Creator.Objects['object_listviews'].triggers = Object.assign(Creator.Objects['ob
|
|
|
79
90
|
checkName(modifier.$set.name);
|
|
80
91
|
}
|
|
81
92
|
|
|
82
|
-
if (
|
|
93
|
+
if (!Steedos.isSpaceAdmin(doc.space, userId)) {
|
|
83
94
|
modifier.$set.shared = false;
|
|
95
|
+
delete modifier.$set.shared_to;
|
|
96
|
+
delete modifier.$set.shared_to_organizations;
|
|
97
|
+
if (!modifier.$unset) {
|
|
98
|
+
modifier.$unset = {};
|
|
99
|
+
}
|
|
100
|
+
modifier.$unset.shared_to = 1;
|
|
101
|
+
modifier.$unset.shared_to_organizations = 1;
|
|
102
|
+
}
|
|
103
|
+
if(modifier.$set.shared_to === "mine" || modifier.$set.shared_to === "organizations"){
|
|
104
|
+
modifier.$set.shared = false;
|
|
105
|
+
}
|
|
106
|
+
else if(modifier.$set.shared_to === "space"){
|
|
107
|
+
modifier.$set.shared = true;
|
|
108
|
+
}
|
|
109
|
+
if(modifier.$set.shared_to && modifier.$set.shared_to !== "organizations"){
|
|
110
|
+
delete modifier.$set.shared_to_organizations;
|
|
111
|
+
if (!modifier.$unset) {
|
|
112
|
+
modifier.$unset = {};
|
|
113
|
+
}
|
|
114
|
+
modifier.$unset.shared_to_organizations = 1;
|
|
84
115
|
}
|
|
85
116
|
if(modifier.$set.filters){
|
|
86
117
|
modifier.$set.filters = transformFilters(modifier.$set.filters);
|
|
@@ -38,6 +38,31 @@ fields:
|
|
|
38
38
|
shared:
|
|
39
39
|
label: Shared to All Users
|
|
40
40
|
type: boolean
|
|
41
|
+
visible_on: "{{false}}"
|
|
42
|
+
group: share_rules
|
|
43
|
+
shared_to:
|
|
44
|
+
label: Who can see this list view?
|
|
45
|
+
type: select
|
|
46
|
+
defaultValue: mine
|
|
47
|
+
options:
|
|
48
|
+
- label: Only I can view this list view.
|
|
49
|
+
value: mine
|
|
50
|
+
- label: This list view is available to all users.
|
|
51
|
+
value: space
|
|
52
|
+
- label: Share the list view with some organizations.
|
|
53
|
+
value: organizations
|
|
54
|
+
visible_on: "${global.user.is_space_admin}"
|
|
55
|
+
group: share_rules
|
|
56
|
+
shared_to_organizations:
|
|
57
|
+
label: Shared to which organizations?
|
|
58
|
+
type: lookup
|
|
59
|
+
reference_to: organizations
|
|
60
|
+
multiple: true
|
|
61
|
+
is_wide: true
|
|
62
|
+
depend_on:
|
|
63
|
+
- shared_to
|
|
64
|
+
visible_on: "${global.user.is_space_admin && shared_to ==='organizations'}"
|
|
65
|
+
group: share_rules
|
|
41
66
|
show_count:
|
|
42
67
|
label: Show Record Count
|
|
43
68
|
type: boolean
|
|
@@ -337,6 +337,7 @@ let objectTriggers = {
|
|
|
337
337
|
owner: userId,
|
|
338
338
|
object_name: doc.name,
|
|
339
339
|
shared: true,
|
|
340
|
+
shared_to: "space",
|
|
340
341
|
filter_scope: "space",
|
|
341
342
|
columns: [{field: 'name'}],
|
|
342
343
|
"sort" : [
|
|
@@ -353,6 +354,7 @@ let objectTriggers = {
|
|
|
353
354
|
owner: userId,
|
|
354
355
|
object_name: doc.name,
|
|
355
356
|
shared: true,
|
|
357
|
+
shared_to: "space",
|
|
356
358
|
filter_scope: "space",
|
|
357
359
|
columns: [{field: 'name'}]
|
|
358
360
|
});
|
|
@@ -154,6 +154,12 @@ fields:
|
|
|
154
154
|
label: Enable Split
|
|
155
155
|
group: Switch
|
|
156
156
|
defaultValue: false
|
|
157
|
+
enable_lock_detail:
|
|
158
|
+
type: boolean
|
|
159
|
+
label: Enable Lock Details
|
|
160
|
+
inlineHelpText: When the main watch is locked all sub tables are read only.
|
|
161
|
+
group: Switch
|
|
162
|
+
defaultValue: false
|
|
157
163
|
# enable_audit:
|
|
158
164
|
# type: boolean
|
|
159
165
|
# label: Enable Audit
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
],
|
|
181
181
|
"id": "u:6a3b45d7adcf",
|
|
182
182
|
"tabsMode": "vertical",
|
|
183
|
-
"className": "
|
|
183
|
+
"className": "steedos-record-tabs bg-white mt-3 border-y",
|
|
184
184
|
"toolbarClassName": "",
|
|
185
185
|
"linksClassName": "",
|
|
186
186
|
"contentClassName": "bg-white",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-object-database",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.7-beta.10",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"description": "steedos package",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@steedos-widgets/amis-lib": "^1.0.22",
|
|
15
|
-
"@steedos/standard-objects": "2.6.
|
|
15
|
+
"@steedos/standard-objects": "2.6.7-beta.10"
|
|
16
16
|
},
|
|
17
17
|
"repository": {},
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "1361c449164e5a04d38a14295689bbff8eb76e38"
|
|
20
20
|
}
|
package/package.service.js
CHANGED
|
@@ -116,7 +116,7 @@ module.exports = {
|
|
|
116
116
|
}
|
|
117
117
|
if(data.is_system){
|
|
118
118
|
// 'label' 先禁止编辑label , 目前由于i18n的问题导致 label无效.
|
|
119
|
-
data = _.pick(data, ['defaultValue', 'group', 'rows', 'sort_no', 'is_wide', 'index', 'sortable', 'searchable', 'filterable', 'visible_on', 'inlineHelpText', 'description', 'amis', 'required', 'unique', 'readonly', 'hidden', 'deleted_lookup_record_behavior']);
|
|
119
|
+
data = _.pick(data, ['defaultValue', 'group', 'rows', 'sort_no', 'is_wide', 'index', 'sortable', 'searchable', 'filterable', 'visible_on', 'inlineHelpText', 'description', 'amis', 'required', 'unique', 'readonly', 'hidden', 'deleted_lookup_record_behavior', 'disable_thousands']);
|
|
120
120
|
}
|
|
121
121
|
return object.update(id, data, userSession)
|
|
122
122
|
},
|