biz9-logic 4.0.28 → 4.0.30

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='4.2.8'
1
+ VERSION='4.3.0'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -39,6 +39,9 @@ class Page{
39
39
  if(!option){
40
40
  option = {item_count:9,page_count:9,get_value:false,get_item:false};
41
41
  }
42
+ if(!option.item_count){
43
+ option.item_count=10;
44
+ }
42
45
  let page = DataItem.get_new_full_item(
43
46
  DataItem.get_new(DataType.PAGE,Number.get_id()),
44
47
  DataItem.get_new(DataType.PAGE,0),
@@ -98,7 +101,7 @@ class Product{
98
101
  for(let a=0;a<category_list.length;a++){
99
102
  for(let b=0;b<product_count;b++){
100
103
  item_count++;
101
- let product = Product.get_test("Product " + String(item_count));
104
+ let product = Product.get_test({item_count:0,product_count:product_count,get_value:false,get_item:false});
102
105
  product.category = category_list[Number.get_id(category_list.length-1)].title;
103
106
  product_list.push(product);
104
107
  }
@@ -111,6 +114,9 @@ class Service{
111
114
  if(!option){
112
115
  option = {item_count:9,service_count:9,get_value:false,get_item:false};
113
116
  }
117
+ if(!option.item_count){
118
+ option.item_count=10;
119
+ }
114
120
  let service = DataItem.get_new_full_item(
115
121
  DataItem.get_new(DataType.SERVICE,Number.get_id()),
116
122
  DataItem.get_new(DataType.SERVICE,0),
@@ -147,6 +153,9 @@ class Event{
147
153
  if(!option){
148
154
  option = {item_count:9,event_count:9,get_value:false,get_item:false};
149
155
  }
156
+ if(!option.item_count){
157
+ option.item_count=10;
158
+ }
150
159
  let event = DataItem.get_new_full_item(
151
160
  DataItem.get_new(DataType.EVENT,Number.get_id()),
152
161
  DataItem.get_new(DataType.EVENT,0),
@@ -328,6 +337,9 @@ class Blog_Post{
328
337
  if(!option){
329
338
  option = {item_count:9,blog_post_count:9,get_value:false,get_item:false};
330
339
  }
340
+ if(!option.item_count){
341
+ option.item_count=10;
342
+ }
331
343
  let blog_post = DataItem.get_new_full_item(
332
344
  DataItem.get_new(DataType.BLOG_POST,Number.get_id()),
333
345
  DataItem.get_new(DataType.BLOG_POST,0),
@@ -385,7 +397,7 @@ class Review{
385
397
  };
386
398
  }
387
399
  class Business {
388
- static get_new = (title) =>{
400
+ static get_new = () =>{
389
401
  if(!title){
390
402
  title="";
391
403
  }
@@ -393,7 +405,7 @@ class Business {
393
405
  DataItem.get_new(DataType.BUSINESS,0),
394
406
  DataItem.get_new(DataType.BUSINESS,0),
395
407
  DataItem.get_new(DataType.BUSINESS,0),{
396
- title:title,
408
+ title:"Business " + Number.get_id(),
397
409
  email:"",
398
410
  phone:"",
399
411
  address_1:"",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.0.28",
3
+ "version": "4.0.30",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -38,6 +38,7 @@ describe("connect", () => {
38
38
  /* --CONFIG--END */
39
39
 
40
40
  /* --PAGE--START */
41
+ //let page = Page.get_test("Home",{item_count:20,page_count:2,get_value:true,get_item:true})
41
42
  /*
42
43
  let page = Page.get_test({item_count:9,page_count:19,get_item:true,get_value:true})
43
44
  //let page = Page.get_test()
@@ -47,14 +48,26 @@ describe("connect", () => {
47
48
  */
48
49
  /* --PAGE--END */
49
50
 
51
+ /* --BLOG_POST--START */
52
+ //let blog_post = Blog_Post.get_test({item_count:9,blog_post_count:19,get_item:true,get_value:true})
53
+ //let blog_post = Blog_Post.get_test()
54
+ //let blog_post_list=Blog_Post.get_test_list({category_count:5,blog_post_count:9,get_value:true,get_item:true});
55
+ //Log.w('blog_post_list',blog_post_list);
56
+ //Log.w("Blog_Post",blog_post);
57
+ //Log.w("BLog_Post_section_1",blog_post.section_1);
58
+ //Log.w("BLog_Post_section_1_section_1_section_1",blog_post.section_1.section_1.section_1);
59
+ /* --BLOG_POST--END */
60
+
61
+
50
62
  /* --PRODUCT--START */
51
- //let product = Product.get_test({item_count:9,product_count:19,get_item:true,get_value:true})
52
- /*
53
- let product = Product.get_test()
54
- Log.w("Product",product);
63
+ //let [category_list,product_list]=Product.get_test_list_by_category({category_count:5,product_count:9});
64
+ let product = Product.get_test({item_count:9,product_count:19,get_item:true,get_value:true})
65
+ //let product = Product.get_test()
66
+ //Log.w('product_list',product_list);
67
+ //Log.w('category_list',category_list);
68
+ //Log.w("Product",product);
55
69
  Log.w("Product_section_1",product.section_1);
56
70
  Log.w("Product_section_1_section_1_section_1",product.section_1.section_1.section_1);
57
- */
58
71
  /* --PRODUCT--END */
59
72
 
60
73
  /* --SERVICE--START */