biz9-logic 4.9.40 → 4.9.42

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.
Files changed (4) hide show
  1. package/biz9_config +1 -1
  2. package/index.js +11 -14
  3. package/package.json +1 -1
  4. package/test.js +14 -4
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='9.1.0'
1
+ VERSION='9.1.2'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -117,12 +117,14 @@ class Title {
117
117
  static SOCIAL_URL_INSTAGRAM="https://instagram.com/";
118
118
  static SOCIAL_URL_YOUTUBE="https://youtube.com/";
119
119
  static SOCIAL_URL_LINKEDIN="https://linkedin.com/";
120
- //type
121
- static Type='Type';
120
+ //str
121
+ static CATEGORY='Category';
122
+ static DESCRIPTION='Description';
123
+ static TYPE='Type';
122
124
  }
123
125
  class Demo_Logic {
124
126
  static get_new_type = (title,option) => {
125
- title = !Str.check_is_null(title)?title:Title.Type+" " +Num.get_id(999);
127
+ title = !Str.check_is_null(title)?title:Title.TYPE+" " +Num.get_id(999);
126
128
  option = option ? option : {get_category:false,category_count:6,categorys:'',category_data_type:DataType.BLANK,get_item:false,items:'',item_data_type:DataType.BLANK,item_count:6};
127
129
  const item = Item_Logic.get_new(title,DataType.TYPE);
128
130
  //category
@@ -137,7 +139,7 @@ class Demo_Logic {
137
139
  option.category_count = 1;
138
140
  }
139
141
  for(let a = 1;a<parseInt(option.category_count)+1;a++){
140
- category_title_list.push(title + " Category " +a);
142
+ category_title_list.push(Title.CATEGORY+" "+a);
141
143
  }
142
144
  }
143
145
  category_title_list.forEach(cat_item => {
@@ -170,7 +172,7 @@ class Demo_Logic {
170
172
  child_item.type = cat_item.type;
171
173
  child_item.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
172
174
  child_item.category = cat_item.title;
173
- child_item.description = "Description "+String(Num.get_id());
175
+ child_item.description =Title.DESCRIPTION+" "+ String(Num.get_id());
174
176
  child_item.note = Field_Logic.get_test_note(),
175
177
  cat_item.items.push(child_item);
176
178
  full_item_list.push(child_item);
@@ -421,28 +423,23 @@ class Stat_Logic {
421
423
  stat.type=stat_type;
422
424
  if(item.parent_id){
423
425
  stat.parent_id=item.parent_id;
424
- }
425
- if(item.parent_data_type==DataType.PRODUCT || item.parent_data_type==DataType.SERVICE || item.parent_data_type==DataType.EVENT ){
426
426
  stat.parent_data_type=item.parent_data_type;
427
- stat.parent_id=item.parent_id;
427
+ }
428
+ if(item.cost){
428
429
  stat.parent_cost = item.cost;
430
+ }
431
+ if(item.quanity){
429
432
  stat.parent_quanity = item.quanity;
430
433
  }
431
434
  if(item.data_type==DataType.CART_ITEM){
432
- stat.parent_data_type=item.parent_data_type;
433
- stat.parent_id=item.parent_id;
434
435
  stat.parent_cart_id = item.cart_id;
435
436
  stat.parent_cart_number = item.cart_number;
436
437
  }
437
438
  if(item.data_type==DataType.ORDER_ITEM){
438
- stat.parent_data_type=item.parent_data_type;
439
- stat.parent_id=item.parent_id;
440
439
  stat.parent_order_id = item.order_id;
441
440
  stat.parent_order_number = item.order_number;
442
441
  }
443
442
  if(item.data_type==DataType.ORDER_PAYMENT){
444
- stat.parent_data_type=item.data_type;
445
- stat.parent_id=item.id;
446
443
  stat.parent_order_number = item.order_number;
447
444
  stat.parent_payment_method_type = item.payment_method_type;
448
445
  stat.parent_payment_amount = item.payment_amount;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.9.40",
3
+ "version": "4.9.42",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -29,14 +29,21 @@ const biz9_config ={
29
29
  describe("connect", () => {
30
30
  it("_connect", () => {
31
31
  series([
32
+
33
+ /* --- TEST LOGIC - CONNECT - START --- */
32
34
  function(call) {
33
35
  console.log('CONNECT-CMS-DEMO-START');
34
-
35
36
  let category_type = DataType.PRODUCT;
36
37
  let category_count = 12;
37
38
  let item_count = 500;
38
- let category_type_title_list = ['Add On','Admin Panel','Hosting','Landing Page','Mobile','Website'];
39
- let category_title_list = ['Beauty','Church','Fashion','Food Trucks','Health Care','Music','Pets','Services','Service Repair','Sports','Trucking'];
39
+
40
+ //let category_type_title_list = ['Add On','Admin Panel','Hosting','Landing Page','Mobile','Website'];
41
+ //let category_title_list = ['Beauty','Church','Fashion','Food Trucks','Health Care','Music','Pets','Services','Service Repair','Sports','Trucking'];
42
+
43
+ let category_type_title_list = '';
44
+ let category_title_list = '';
45
+
46
+
40
47
  let item_title_list = [];
41
48
  let post_type_list = [];
42
49
  let val_category_title = '';
@@ -81,11 +88,14 @@ describe("connect", () => {
81
88
  //console.log('CONNECT-END');
82
89
  //call();
83
90
  },
84
- */
91
+ /* --- TEST LOGIC - CONNECT - END --- */
92
+
93
+ /*
85
94
  function(call) {
86
95
  console.log('BLANK-START');
87
96
  console.log('BLANK-END');
88
97
  },
98
+ */
89
99
  ], function(err) {
90
100
  console.log(err.message) // "another thing"
91
101
  })