@steedos/standard-object-database 2.7.10 → 2.7.11-beta.1

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.
@@ -169,6 +169,7 @@ function _sendObjectMeta(objectConfig){
169
169
  if(res){
170
170
  // console.log('send object meta success', length);
171
171
  broker.broadcast("$packages.statisticsActivatedPackages", {});
172
+ broker.emit(`translations.object.change`, {});
172
173
  }
173
174
  })
174
175
  _objectConfigs = [];
@@ -1,8 +1,8 @@
1
1
  /*
2
2
  * @Author: sunhaolin@hotoa.com
3
3
  * @Date: 2022-05-28 11:07:57
4
- * @LastEditors: 孙浩林 sunhaolin@steedos.com
5
- * @LastEditTime: 2024-05-11 13:57:23
4
+ * @LastEditors: baozhoutao@steedos.com
5
+ * @LastEditTime: 2024-10-31 17:36:24
6
6
  * @Description:
7
7
  */
8
8
  const InternalData = require('@steedos/standard-objects').internalData;
@@ -17,7 +17,22 @@ module.exports = {
17
17
  doc.visible;
18
18
  },
19
19
  beforeUpdate: async function(){
20
- const { doc } = this;
20
+ const { doc, id } = this;
21
+ if(doc.label){
22
+ const dbRecord = await this.getObject('object_actions').findOne(id);
23
+
24
+ const amis_schema = doc.amis_schema || dbRecord.amis_schema;
25
+
26
+ if(dbRecord && dbRecord.label != doc.label && amis_schema && _.isString(amis_schema) ){
27
+ try {
28
+ const json = JSON.parse(amis_schema);
29
+ json.body[0].label = doc.label
30
+ doc.amis_schema = JSON.stringify(json)
31
+ } catch (error) {
32
+ console.log(error)
33
+ }
34
+ }
35
+ }
21
36
  delete doc.visible_type
22
37
  doc.visible;
23
38
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-object-database",
3
- "version": "2.7.10",
3
+ "version": "2.7.11-beta.1",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -12,14 +12,14 @@
12
12
  "description": "steedos package",
13
13
  "dependencies": {
14
14
  "@steedos-widgets/amis-lib": "^1.0.22",
15
- "@steedos/metadata-core": "2.7.10",
16
- "@steedos/service-object-mixin": "2.7.10",
17
- "@steedos/standard-objects": "2.7.10",
15
+ "@steedos/metadata-core": "2.7.11-beta.1",
16
+ "@steedos/service-object-mixin": "2.7.11-beta.1",
17
+ "@steedos/standard-objects": "2.7.11-beta.1",
18
18
  "amis-formula": "~6.3.0",
19
19
  "clone": "^2.1.2",
20
20
  "moleculer-bullmq": "3.0.0"
21
21
  },
22
22
  "repository": {},
23
23
  "license": "MIT",
24
- "gitHead": "169ba256ef73de2bd5866d6fa6995810dbbf2af4"
24
+ "gitHead": "fec77cc34bb34fb76878ee04861815bc0505f669"
25
25
  }