biz9-logic 4.9.49 → 4.9.50

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/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='9.1.9'
1
+ VERSION='9.2.0'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -41,6 +41,12 @@ class Item_Logic {
41
41
  const item = DataItem.get_new(data_type,0,{title:title,title_url:Str.get_title_url(title),setting_visible:"1"});
42
42
  return item;
43
43
  };
44
+ static bind_child_parent_obj = (child_obj,parent_obj)=>{
45
+ for(const prop in parent_obj) {
46
+ child_obj['parent_'+prop] = parent_obj[prop];
47
+ }
48
+ return child_obj;
49
+ };
44
50
  static get_test = (title,data_type,id,option)=>{
45
51
  data_type = data_type ? data_type : DataType.BLANK;
46
52
  id = id ? id : 0;
@@ -117,8 +123,6 @@ class Title {
117
123
  static SOCIAL_URL_INSTAGRAM="https://instagram.com/";
118
124
  static SOCIAL_URL_YOUTUBE="https://youtube.com/";
119
125
  static SOCIAL_URL_LINKEDIN="https://linkedin.com/";
120
- //stat
121
- static STAT_NUMBER="ST-";
122
126
  //str
123
127
  static CATEGORY='Category';
124
128
  static DESCRIPTION='Description';
@@ -414,7 +418,6 @@ class Stat_Logic {
414
418
  let new_stat = DataItem.get_new(DataType.STAT,0,
415
419
  {
416
420
  user_id:user_id,
417
- stat_number:Title.STAT_NUMBER + Num.get_id(99999),
418
421
  stat_type:stat_type,
419
422
  parent_data_type:parent_data_type,
420
423
  parent_id:parent_id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.9.49",
3
+ "version": "4.9.50",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const series = require('async-series');
2
- const {DataItem,DataType,Item_Logic,Page_Logic,Product_Logic,Type,Title,Stat_Logic,Service_Logic,Blog_Post_Logic,Event_Logic,Demo_Logic,Cart_Logic,Order_Logic} = require('./index');
2
+ const {DataItem,DataType,Item_Logic,User_Logic,Page_Logic,Product_Logic,Type,Title,Stat_Logic,Service_Logic,Blog_Post_Logic,Event_Logic,Demo_Logic,Cart_Logic,Order_Logic} = require('./index');
3
3
  const {Log,Num,Str} = require('biz9-utility');
4
4
  const {Scriptz}= require('biz9-scriptz');
5
5
 
@@ -38,11 +38,12 @@ describe("connect", () => {
38
38
  let parent_id = 3334;
39
39
  let user_id = 0;
40
40
  let item = Product_Logic.get_test();
41
+ let user = User_Logic.get_test();
41
42
  item.id = 333;
42
43
  item.items = ['a','b'];
43
- console.log('here');
44
- let stat = Stat_Logic.get_new(parent_data_type,parent_id,Type.STAT_VIEW,user_id,item);
45
- Log.w('stat',stat);
44
+ Log.w('bind_obj',Item_Logic.bind_child_parent_obj(item,user));
45
+ //let stat = Stat_Logic.get_new(parent_data_type,parent_id,Type.STAT_VIEW,user_id,item);
46
+ //Log.w('stat',stat);
46
47
  console.log('CONNECT-BASE-END');
47
48
  }
48
49
  /*