@steedos/standard-object-database 2.6.7-beta.6 → 2.6.7-beta.7

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.
@@ -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: 过滤
@@ -94,6 +94,10 @@ fields:
94
94
  label: Enable Split
95
95
  help:
96
96
  description:
97
+ enable_lock_detail:
98
+ label: Enable Lock Details
99
+ help: When the main watch is locked all sub tables are read only.
100
+ description:
97
101
  description:
98
102
  label: Description
99
103
  help:
@@ -91,6 +91,10 @@ fields:
91
91
  label: 默认使用分栏视图
92
92
  help:
93
93
  description:
94
+ enable_lock_detail:
95
+ label: 锁定子表
96
+ help: 当主表锁定时,所有子表只读。
97
+ description:
94
98
  description:
95
99
  label: 备注
96
100
  help:
@@ -1,8 +1,8 @@
1
1
  /*
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2022-03-28 09:35:34
4
- * @LastEditors: 孙浩林 sunhaolin@steedos.com
5
- * @LastEditTime: 2023-07-13 13:28:02
4
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5
+ * @LastEditTime: 2024-02-01 15:39:15
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,19 @@ Creator.Objects['object_listviews'].triggers = Object.assign(Creator.Objects['ob
79
90
  checkName(modifier.$set.name);
80
91
  }
81
92
 
82
- if (modifier.$set.shared && !Steedos.isSpaceAdmin(doc.space, userId)) {
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
+ }
98
+ if(modifier.$set.shared_to === "mine" || modifier.$set.shared_to === "organizations"){
99
+ modifier.$set.shared = false;
100
+ }
101
+ else if(modifier.$set.shared_to === "space"){
102
+ modifier.$set.shared = true;
103
+ }
104
+ if(modifier.$set.shared_to !== "organizations"){
105
+ delete modifier.$set.shared_to_organizations;
84
106
  }
85
107
  if(modifier.$set.filters){
86
108
  modifier.$set.filters = transformFilters(modifier.$set.filters);
@@ -38,6 +38,33 @@ fields:
38
38
  shared:
39
39
  label: Shared to All Users
40
40
  type: boolean
41
+ visible_on: "{{global.mode ==='read' ? true : 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
+ group: share_rules
55
+ amis:
56
+ type: radios
57
+ inline: false
58
+ shared_to_organizations:
59
+ label: Shared to which organizations?
60
+ type: lookup
61
+ reference_to: organizations
62
+ multiple: true
63
+ is_wide: true
64
+ depend_on:
65
+ - shared_to
66
+ visible_on: "${shared_to ==='organizations'}"
67
+ group: share_rules
41
68
  show_count:
42
69
  label: Show Record Count
43
70
  type: boolean
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-object-database",
3
- "version": "2.6.7-beta.6",
3
+ "version": "2.6.7-beta.7",
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.7-beta.6"
15
+ "@steedos/standard-objects": "2.6.7-beta.7"
16
16
  },
17
17
  "repository": {},
18
18
  "license": "MIT",
19
- "gitHead": "273f8f0d999ccc8d4a616a04cacb30df9261dcda"
19
+ "gitHead": "739cff0ce33d90509d13637af7173d1c033f0f7c"
20
20
  }