biz9-logic 4.0.34 → 4.0.36

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.3.4'
1
+ VERSION='4.3.6'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -37,7 +37,7 @@ class Template{
37
37
  class Page{
38
38
  static get_test = (option) =>{
39
39
  if(!option){
40
- option = {item_count:9,page_count:9,get_value:false,get_item:false};
40
+ option = {item_count:9,page_count:9,get_value:false,get_item:false,value_count:20};
41
41
  }
42
42
  if(!option.item_count){
43
43
  option.item_count=10;
@@ -59,7 +59,7 @@ class Page{
59
59
  class Product{
60
60
  static get_test = (option) =>{
61
61
  if(!option){
62
- option = {item_count:9,product_count:9,get_value:false,get_item:false};
62
+ option = {item_count:9,product_count:9,get_value:false,get_item:false,value_count:20};
63
63
  }
64
64
  let product = DataItem.get_new_full_item(
65
65
  DataItem.get_new(DataType.PRODUCT,Number.get_id()),
@@ -101,7 +101,7 @@ class Product{
101
101
  for(let a=0;a<category_list.length;a++){
102
102
  for(let b=0;b<product_count;b++){
103
103
  item_count++;
104
- let product = Product.get_test({item_count:0,product_count:product_count,get_value:false,get_item:false});
104
+ let product = Product.get_test({item_count:0,product_count:product_count,get_value:false,get_item:false,value_count:20});
105
105
  product.category = category_list[Number.get_id(category_list.length-1)].title;
106
106
  product_list.push(product);
107
107
  }
@@ -112,7 +112,7 @@ class Product{
112
112
  class Service{
113
113
  static get_test = (option) =>{
114
114
  if(!option){
115
- option = {item_count:10,get_value:false,get_item:false};
115
+ option = {item_count:10,get_value:false,get_item:false,value_count:20};
116
116
  }
117
117
  if(!option.item_count){
118
118
  option.item_count=10;
@@ -139,11 +139,11 @@ class Service{
139
139
  };
140
140
  static get_test_list=(option)=>{
141
141
  if(!option){
142
- option={service_count:19};
142
+ option={service_count:10};
143
143
  }
144
144
  let item_list=[];
145
145
  for(let a=0;a<option.service_count;a++){
146
- item_list.push(Service.get_test());
146
+ item_list.push(Service.get_test(option));
147
147
  }
148
148
  return item_list;
149
149
  };
@@ -178,7 +178,7 @@ class Service{
178
178
  class Event{
179
179
  static get_test = (option) =>{
180
180
  if(!option){
181
- option = {item_count:9,get_value:false,get_item:false};
181
+ option = {item_count:9,get_value:false,get_item:false,value_count:20};
182
182
  }
183
183
  if(!option.item_count){
184
184
  option.item_count=10;
@@ -208,11 +208,11 @@ class Event{
208
208
  };
209
209
  static get_test_list=(option)=>{
210
210
  if(!option){
211
- option={event_count:19};
211
+ option={service_count:10};
212
212
  }
213
213
  let item_list=[];
214
214
  for(let a=0;a<option.event_count;a++){
215
- item_list.push(Event.get_test());
215
+ item_list.push(Event.get_test(option));
216
216
  }
217
217
  return item_list;
218
218
  };
@@ -236,7 +236,7 @@ class Event{
236
236
  for(let a=0;a<category_list.length;a++){
237
237
  for(let b=0;b<event_count;b++){
238
238
  item_count++;
239
- let event = Event.get_test({item_count:0,event_count:event_count,get_value:false,get_item:false});
239
+ let event = Event.get_test({item_count:0,event_count:event_count,get_value:false,get_item:false,value_count:20});
240
240
  event.category = category_list[Number.get_id(category_list.length-1)].title;
241
241
  event_list.push(event);
242
242
  }
@@ -250,7 +250,7 @@ class Field{
250
250
  title="";
251
251
  }
252
252
  if(!option){
253
- option={get_value:true};
253
+ option={get_value:true,value_count:20};
254
254
  }
255
255
  let item = {
256
256
  date_create:new moment().toISOString(),
@@ -263,7 +263,10 @@ class Field{
263
263
  note : "Note "+String(Number.get_id())
264
264
  }
265
265
  if(option.get_value){
266
- for(let b = 1;b<20;b++){
266
+ if(!option.value_count){
267
+ option.value_count = 20;
268
+ }
269
+ for(let b = 1;b<parseInt(option.value_count);b++){
267
270
  item['value_'+String(b)] = 'value ' + String(b);
268
271
  }
269
272
  }
@@ -396,7 +399,7 @@ class DataType {
396
399
  class Blog_Post{
397
400
  static get_test = (option) =>{
398
401
  if(!option){
399
- option = {item_count:10,get_value:false,get_item:false};
402
+ option = {item_count:10,get_value:false,get_item:false,value_count:20};
400
403
  }
401
404
  if(!option.item_count){
402
405
  option.item_count=10;
@@ -417,6 +420,16 @@ class Blog_Post{
417
420
  }
418
421
  return blog_post;
419
422
  };
423
+ static get_test_list=(option)=>{
424
+ if(!option){
425
+ option = {blog_post_count:10,get_value:false,get_item:false,value_count:20};
426
+ }
427
+ let item_list=[];
428
+ for(let a=0;a<option.blog_post_count;a++){
429
+ item_list.push(Blog_Post.get_test(option));
430
+ }
431
+ return item_list;
432
+ };
420
433
  static get_test_list_by_category = (option) =>{
421
434
  let blog_post_list = [];
422
435
  let category_count = 9;
@@ -437,7 +450,7 @@ class Blog_Post{
437
450
  for(let a=0;a<category_list.length;a++){
438
451
  for(let b=0;b<blog_post_count;b++){
439
452
  item_count++;
440
- let blog_post = Blog_Post.get_test({item_count:0,blog_post_count:blog_post_count,get_value:false,get_item:false});
453
+ let blog_post = Blog_Post.get_test({item_count:0,blog_post_count:blog_post_count,get_value:false,get_item:false,value_count:20});
441
454
  blog_post.category = category_list[Number.get_id(category_list.length-1)].title;
442
455
  blog_post_list.push(blog_post);
443
456
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.0.34",
3
+ "version": "4.0.36",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -49,13 +49,13 @@ describe("connect", () => {
49
49
  /* --PAGE--END */
50
50
 
51
51
  /* --BLOG_POST--START */
52
- let [category_list,blog_post_list]=Blog_Post.get_test_list_by_category({category_count:5,blog_post_count:9});
53
- Log.w('blog_post_list',blog_post_list);
52
+ //let blog_post_list=Blog_Post.get_test_list({category_count:5,blog_post_count:9,get_value:false,get_item:false});
53
+ //let [category_list,blog_post_list]=Blog_Post.get_test_list_by_category({category_count:5,blog_post_count:9});
54
+ //Log.w('blog_post_list',blog_post_list);
54
55
  //Log.w('category_list',category_list);
55
56
 
56
57
  //let blog_post = Blog_Post.get_test({item_count:9,blog_post_count:19,get_item:true,get_value:true})
57
58
  //let blog_post = Blog_Post.get_test()
58
- //let blog_post_list=Blog_Post.get_test_list({category_count:5,blog_post_count:9,get_value:true,get_item:true});
59
59
  //Log.w('blog_post_list',blog_post_list);
60
60
  //Log.w("Blog_Post",blog_post);
61
61
  //Log.w("BLog_Post_section_1",blog_post.section_1);
@@ -75,12 +75,14 @@ describe("connect", () => {
75
75
  /* --PRODUCT--END */
76
76
 
77
77
  /* --EVENT--START */
78
+ let event_list=Event.get_test_list({category_count:5,event_count:9,get_value:false,get_item:false});
78
79
  //let [category_list,event_list]=Event.get_test_list_by_category({category_count:5,event_count:9});
79
- //Log.w('event_list',event_list);
80
+ Log.w('event_list',event_list);
80
81
  //Log.w('category_list',category_list);
81
82
  /* --EVENT--END */
82
83
 
83
84
  /* --SERVICE--START */
85
+ //let service_list=Service.get_test_list({category_count:5,service_count:9,get_value:false,get_item:false});
84
86
  //let [category_list,service_list]=Service.get_test_list_by_category({category_count:5,service_count:9});
85
87
  //Log.w('service_list',service_list);
86
88
  //Log.w('category_list',category_list);