@steedos/service-core-objects 3.0.0-beta.92 → 3.0.0-beta.94
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/base.en/base.en.objectTranslation.yml +4 -0
- package/main/default/objectTranslations/base.zh-CN/base.zh-CN.objectTranslation.yml +4 -0
- package/main/default/objectTranslations/company.en/company.en.objectTranslation.yml +5 -0
- package/main/default/objectTranslations/company.zh-CN/company.zh-CN.objectTranslation.yml +5 -0
- package/main/default/objectTranslations/object_actions.en/object_actions.en.objectTranslation.yml +2 -0
- package/main/default/objectTranslations/object_actions.zh-CN/object_actions.zh-CN.objectTranslation.yml +2 -0
- package/main/default/objectTranslations/object_triggers.en/object_triggers.en.objectTranslation.yml +9 -0
- package/main/default/objectTranslations/object_triggers.zh-CN/object_triggers.zh-CN.objectTranslation.yml +9 -0
- package/main/default/objectTranslations/object_webhooks.en/object_webhooks.en.objectTranslation.yml +8 -6
- package/main/default/objectTranslations/object_webhooks.zh-CN/object_webhooks.zh-CN.objectTranslation.yml +8 -6
- package/main/default/objectTranslations/objects.en/objects.en.objectTranslation.yml +5 -1
- package/main/default/objectTranslations/objects.zh-CN/objects.zh-CN.objectTranslation.yml +5 -1
- package/main/default/objectTranslations/settings.en/settings.en.objectTranslation.yml +9 -0
- package/main/default/objectTranslations/settings.zh-CN/settings.zh-CN.objectTranslation.yml +9 -0
- package/main/default/objects/api_keys/buttons/copy.button.yml +1 -1
- package/main/default/objects/apps/buttons/disable.button.js +6 -6
- package/main/default/objects/apps/buttons/enable.button.js +6 -6
- package/main/default/objects/company/buttons/updateOrgs.button.yml +3 -6
- package/main/default/objects/object_actions/fields/is_system.field.yml +1 -1
- package/main/default/objects/objects/buttons/custom.button.yml +1 -5
- package/package.json +3 -3
|
@@ -48,3 +48,8 @@ listviews:
|
|
|
48
48
|
actions:
|
|
49
49
|
updateOrgs:
|
|
50
50
|
label: Update The Whole Company
|
|
51
|
+
CustomLabels:
|
|
52
|
+
company_actions_updateOrgs_confirmText_prefix: Update the company「
|
|
53
|
+
company_actions_updateOrgs_confirmText_suffix: 」info?
|
|
54
|
+
company_actions_updateOrgs_success: The company has updated successfully
|
|
55
|
+
company_actions_updateOrgs_failed: The company failed to update. Please try again later
|
|
@@ -48,3 +48,8 @@ listviews:
|
|
|
48
48
|
actions:
|
|
49
49
|
updateOrgs:
|
|
50
50
|
label: 更新组织
|
|
51
|
+
CustomLabels:
|
|
52
|
+
company_actions_updateOrgs_confirmText_prefix: 更新「
|
|
53
|
+
company_actions_updateOrgs_confirmText_suffix: 」组织信息?
|
|
54
|
+
company_actions_updateOrgs_success: 更新组织信息成功
|
|
55
|
+
company_actions_updateOrgs_failed: 更新组织信息失败,请稍后再试
|
package/main/default/objectTranslations/object_webhooks.en/object_webhooks.en.objectTranslation.yml
CHANGED
|
@@ -10,21 +10,23 @@ fields:
|
|
|
10
10
|
label: Object
|
|
11
11
|
help:
|
|
12
12
|
description:
|
|
13
|
-
|
|
14
|
-
label:
|
|
13
|
+
event:
|
|
14
|
+
label: When to trigger
|
|
15
15
|
help:
|
|
16
16
|
options:
|
|
17
|
-
- label:
|
|
17
|
+
- label: The record has been created.
|
|
18
18
|
value: create
|
|
19
|
-
- label:
|
|
19
|
+
- label: The record has been updated.
|
|
20
20
|
value: update
|
|
21
|
-
- label:
|
|
21
|
+
- label: The record has been created or updated
|
|
22
|
+
value: createAndUpdate
|
|
23
|
+
- label: The record has been deleted.
|
|
22
24
|
value: delete
|
|
23
25
|
description:
|
|
24
26
|
fields:
|
|
25
27
|
label: Fields
|
|
26
28
|
help:
|
|
27
|
-
description:
|
|
29
|
+
description: If not configured, push all fields
|
|
28
30
|
payload_url:
|
|
29
31
|
label: Payload URL
|
|
30
32
|
help:
|
|
@@ -10,21 +10,23 @@ fields:
|
|
|
10
10
|
label: 对象
|
|
11
11
|
help:
|
|
12
12
|
description:
|
|
13
|
-
|
|
14
|
-
label:
|
|
13
|
+
event:
|
|
14
|
+
label: 何时触发
|
|
15
15
|
help:
|
|
16
16
|
options:
|
|
17
|
-
- label:
|
|
17
|
+
- label: 记录已创建
|
|
18
18
|
value: create
|
|
19
|
-
- label:
|
|
19
|
+
- label: 记录已更新
|
|
20
20
|
value: update
|
|
21
|
-
- label:
|
|
21
|
+
- label: 记录已创建或已更新
|
|
22
|
+
value: createAndUpdate
|
|
23
|
+
- label: 记录已删除
|
|
22
24
|
value: delete
|
|
23
25
|
description:
|
|
24
26
|
fields:
|
|
25
27
|
label: 推送字段
|
|
26
28
|
help:
|
|
27
|
-
description:
|
|
29
|
+
description: 如果未配置, 则推送所有字段
|
|
28
30
|
payload_url:
|
|
29
31
|
label: URL
|
|
30
32
|
help:
|
|
@@ -194,6 +194,8 @@ actions:
|
|
|
194
194
|
label: Reset
|
|
195
195
|
delete_object:
|
|
196
196
|
label: Delete
|
|
197
|
+
custom:
|
|
198
|
+
label: Customize
|
|
197
199
|
CustomLabels:
|
|
198
200
|
objects_field_datasource_defaultValue: Default data source
|
|
199
201
|
objects_field_datasource_meteor: Meteor
|
|
@@ -204,4 +206,6 @@ CustomLabels:
|
|
|
204
206
|
objects_actions_delete_object_dialog_title_prefix: "Delete Object:"
|
|
205
207
|
objects_actions_delete_object_dialog_content: "<div>\n<div style=\"text-align: left;\">To delete a custom object, perform the following operations:</div>\n<ul>\n<li style=\"text-align: left;\">Delete the fields and buttons of the object</li>\n<li style=\"text-align: left;\">Delete the tabs and list views of the object</li>\n<li style=\"text-align: left;\">Delete the page layouts of the object</li>\n<li style=\"text-align: left;\">Delete the permission of the object</li>\n<li style=\"text-align: left;\">Delete the validation rules of the object</li>\n<li style=\"text-align: left;\">Delete the restriction rules of the object</li>\n<li style=\"text-align: left;\">Delete the sharing rules of the object</li>\n<li style=\"text-align: left;\">Delete the workflow mapping that uses this object</li>\n<li style=\"text-align: left;\">Delete the open processes that use this object</li>\n<li style=\"text-align: left;\">Delete the pages that uses this object</li>\n</ul>\n</div>"
|
|
206
208
|
objects_actions_reset_dialog_title_prefix: "Reset Object:"
|
|
207
|
-
objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">Reset a custom object by performing the following operations:</div>\n<ul>\n<li style=\"text-align: left;\">Delete the custom object</li>\n<li style=\"text-align: left;\">Delete the fields of the custom object</li>\n</ul>\n</div>"
|
|
209
|
+
objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">Reset a custom object by performing the following operations:</div>\n<ul>\n<li style=\"text-align: left;\">Delete the custom object</li>\n<li style=\"text-align: left;\">Delete the fields of the custom object</li>\n</ul>\n</div>"
|
|
210
|
+
objects_actions_custom_success: The object has been customized.
|
|
211
|
+
objects_actions_custom_failed: Custom failed====
|
|
@@ -199,6 +199,8 @@ actions:
|
|
|
199
199
|
label: 重置
|
|
200
200
|
delete_object:
|
|
201
201
|
label: 删除
|
|
202
|
+
custom:
|
|
203
|
+
label: 自定义
|
|
202
204
|
CustomLabels:
|
|
203
205
|
objects_field_datasource_defaultValue: 默认数据源
|
|
204
206
|
objects_field_datasource_meteor: Meteor
|
|
@@ -209,4 +211,6 @@ CustomLabels:
|
|
|
209
211
|
objects_actions_delete_object_dialog_title_prefix: "删除对象:"
|
|
210
212
|
objects_actions_delete_object_dialog_content: "<div>\n<div style=\"text-align: left;\">删除一个自定义对象进行以下操作:</div>\n<ul>\n<li style=\"text-align: left;\">删除对象的字段和按钮</li>\n<li style=\"text-align: left;\">删除对象的选项卡和列表视图</li>\n<li style=\"text-align: left;\">删除对象的页面布局</li>\n<li style=\"text-align: left;\">删除对象的权限</li>\n<li style=\"text-align: left;\">删除对象的验证规则</li>\n<li style=\"text-align: left;\">删除对象的限制规则</li>\n<li style=\"text-align: left;\">删除对象的共享规则</li>\n<li style=\"text-align: left;\">删除使用该对象的流程映射</li>\n<li style=\"text-align: left;\">删除使用该对象的开放流程</li>\n<li style=\"text-align: left;\">删除使用该对象的页面</li>\n</ul>\n</div>"
|
|
211
213
|
objects_actions_reset_dialog_title_prefix: "重置对象: "
|
|
212
|
-
objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">重置一个自定义对象进行以下操作:</div>\n<ul>\n<li style=\"text-align: left;\">删除自定义的对象</li>\n<li style=\"text-align: left;\">删除自定义对象的字段</li>\n</ul>\n</div>"
|
|
214
|
+
objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">重置一个自定义对象进行以下操作:</div>\n<ul>\n<li style=\"text-align: left;\">删除自定义的对象</li>\n<li style=\"text-align: left;\">删除自定义对象的字段</li>\n</ul>\n</div>"
|
|
215
|
+
objects_actions_custom_success: 对象已自定义。
|
|
216
|
+
objects_actions_custom_failed: 自定义失败
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: baozhoutao@steedos.com
|
|
3
3
|
* @Date: 2024-03-30 11:37:53
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
5
|
+
* @LastEditTime: 2025-09-01 20:52:46
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
module.exports = {
|
|
9
9
|
disable: function (object_name, record_id, record_permissions, data) {
|
|
10
10
|
Steedos.sobject(object_name).retrieve(record_id).then((record)=>{
|
|
11
11
|
if(!record){
|
|
12
|
-
return SteedosUI.notification.error({message: '
|
|
12
|
+
return SteedosUI.notification.error({message: t('apps_not_found')})
|
|
13
13
|
}
|
|
14
14
|
SteedosUI.Modal.confirm({
|
|
15
|
-
title: '
|
|
16
|
-
content:
|
|
17
|
-
okText: '
|
|
15
|
+
title: t('apps_actions_disable_dialog_title'),
|
|
16
|
+
content: `${t('apps_actions_disable_dialog_content_prefix')}${record.name}${t('apps_actions_disable_dialog_content_suffix')}`,
|
|
17
|
+
okText: t('CustomAction.apps.disable'),
|
|
18
18
|
cancelText: t('Cancel'),
|
|
19
19
|
onOk: function(){
|
|
20
20
|
Steedos.authRequest(Steedos.absoluteUrl(`/api/v1/apps/${record_id}`), {type: 'put', async: false, data: JSON.stringify({
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: baozhoutao@steedos.com
|
|
3
3
|
* @Date: 2024-03-30 11:37:53
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
5
|
+
* @LastEditTime: 2025-09-01 20:52:51
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
module.exports = {
|
|
9
9
|
enable: function (object_name, record_id) {
|
|
10
10
|
Steedos.sobject(object_name).retrieve(record_id).then((record)=>{
|
|
11
11
|
if(!record){
|
|
12
|
-
return SteedosUI.notification.error({message: '
|
|
12
|
+
return SteedosUI.notification.error({message: t('apps_not_found')})
|
|
13
13
|
}
|
|
14
14
|
SteedosUI.Modal.confirm({
|
|
15
|
-
title: '
|
|
16
|
-
content:
|
|
17
|
-
okText: '
|
|
15
|
+
title: t('apps_actions_enable_dialog_title'),
|
|
16
|
+
content: `${t('apps_actions_enable_dialog_content_prefix')}${record.name}${t('apps_actions_enable_dialog_content_suffix')}`,
|
|
17
|
+
okText: t('CustomAction.apps.enable'),
|
|
18
18
|
cancelText: t('Cancel'),
|
|
19
19
|
onOk: function(){
|
|
20
20
|
Steedos.authRequest(Steedos.absoluteUrl(`/api/v1/apps/${record_id}`), {type: 'put', async: false, data: JSON.stringify({
|
|
@@ -5,10 +5,10 @@ amis_schema: |-
|
|
|
5
5
|
"body": [
|
|
6
6
|
{
|
|
7
7
|
"type": "button",
|
|
8
|
-
"label": "
|
|
8
|
+
"label": "${'CustomAction.company.updateOrgs' | t}",
|
|
9
9
|
"id": "u:updateOrgs",
|
|
10
10
|
"editorState": "default",
|
|
11
|
-
"confirmText": "
|
|
11
|
+
"confirmText": "${'CustomLabels.company_actions_updateOrgs_confirmText_prefix' | t}${name}${'CustomLabels.company_actions_updateOrgs_confirmText_suffix' | t}",
|
|
12
12
|
"onEvent": {
|
|
13
13
|
"click": {
|
|
14
14
|
"weight": 0,
|
|
@@ -23,10 +23,7 @@ amis_schema: |-
|
|
|
23
23
|
"method": "post",
|
|
24
24
|
"requestAdaptor": "api.data = {\n companyId: context.recordId\n}\nreturn api;",
|
|
25
25
|
"adaptor": "",
|
|
26
|
-
"
|
|
27
|
-
"success": "更新组织信息成功",
|
|
28
|
-
"failed": "更新组织信息失败"
|
|
29
|
-
},
|
|
26
|
+
"adaptor": "return payload.updatedOrgs ? {data: {...payload}, status: 0, msg: t('CustomLabels.company_actions_updateOrgs_success')} : {...payload, status: 1, msg: t('CustomLabels.company_actions_updateOrgs_failed')};",
|
|
30
27
|
"dataType": "json"
|
|
31
28
|
}
|
|
32
29
|
}
|
|
@@ -32,11 +32,7 @@ amis_schema: |-
|
|
|
32
32
|
"method": "post",
|
|
33
33
|
"sendOn": "docForCustomize",
|
|
34
34
|
"requestAdaptor": "var doc = context.docForCustomize;\ndoc.is_customize = true;\ndoc.is_enable = true;\ndoc.in_development = \"0\";\n// delete doc.is_system;\ndelete doc.record_permissions;\ndelete doc.NAME_FIELD_KEY;\ndelete doc.idFieldName;\ndelete doc.idFieldNames;\ndelete doc.table_name;\ndelete doc.originalFields;\ndelete doc.extend;\ndelete doc.listeners;\ndelete doc.responseData;\ndelete doc.responseNsg;\ndelete doc.responseStatus;\ndelete doc.__filename;\ndelete doc.__timestamp;\nvar data = {\n query: `mutation{objects__upsert(id: \"${doc.name}\", doc: ${JSON.stringify(JSON.stringify(doc))}){_id,name}}`\n};\nreturn {\n ...api,\n data\n};",
|
|
35
|
-
"adaptor": ""
|
|
36
|
-
"messages": {
|
|
37
|
-
"success": "对象已自定义。",
|
|
38
|
-
"failed": "${msg}"
|
|
39
|
-
}
|
|
35
|
+
"adaptor": "return payload.data.objects__upsert ? {...payload, status: 0, msg: t('CustomLabels.objects_actions_custom_success')} : {...payload, status: 1, msg: t('CustomLabels.objects_actions_custom_failed')};"
|
|
40
36
|
}
|
|
41
37
|
},
|
|
42
38
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-core-objects",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.94",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"steedos"
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@steedos/service-package-loader": "3.0.0-beta.
|
|
13
|
+
"@steedos/service-package-loader": "3.0.0-beta.94",
|
|
14
14
|
"json2xls": "^0.1.2",
|
|
15
15
|
"lodash": "^4.17.21"
|
|
16
16
|
},
|
|
17
17
|
"description": "steedos package",
|
|
18
18
|
"repository": {},
|
|
19
19
|
"license": "MIT",
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "d68342dfd2550f36cb8ed16af61c96720ed7bf07"
|
|
21
21
|
}
|