biz9-logic 4.8.43 → 4.8.46

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 +115 -60
  3. package/package.json +1 -1
  4. package/test.js +14 -2
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='5.2.3'
1
+ VERSION='5.2.6'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -30,7 +30,7 @@ class Item_Logic {
30
30
  DataItem.get_new(data_type,0),
31
31
  Field_Logic.get_test(title,option));
32
32
  if(option.get_item){
33
- item.items = Sub_Item_Logic.get_test_item_list(item,item,option);
33
+ item.items = Sub_Item_Logic.get_test_list(item,item,option);
34
34
  item = Sub_Item_Logic.bind_parent_child_list(item,item.items);
35
35
  }
36
36
  return item;
@@ -38,8 +38,8 @@ class Item_Logic {
38
38
  static get_test_list = (data_type,option) =>{
39
39
  option = Field_Logic.get_option(data_type,option?option:{});
40
40
  let item_list = [];
41
- for(let a=0;a<option.item_count;a++){
42
- item_list.push(Item_Logic.get_test("Item " +a,data_type,option));
41
+ for(let a=0;a<option.item_count+1;a++){
42
+ item_list.push(Item_Logic.get_test("Item " +String(parseInt(a+1)),data_type,option));
43
43
  }
44
44
  return item_list;
45
45
  }
@@ -49,6 +49,10 @@ class Item_Logic {
49
49
  }
50
50
  class Template_Logic {
51
51
  static get_test = (title,option) =>{
52
+ if(!Str.check_is_null(title) && Obj.check_is_empty(option)){
53
+ option = title;
54
+ title = "Test " + Number.get_id();
55
+ }
52
56
  option = Field_Logic.get_option(DataType.TEMPLATE,option?option:{});
53
57
  let template = DataItem.get_new_full_item(
54
58
  DataItem.get_new(DataType.TEMPLATE,0),
@@ -56,14 +60,17 @@ class Template_Logic {
56
60
  DataItem.get_new(DataType.TEMPLATE,0),
57
61
  Field_Logic.get_test(title,option));
58
62
  if(option.get_item){
59
- template.items = Sub_Item_Logic.get_test_item_list(template,template,option);
63
+ template.items = Sub_Item_Logic.get_test_list(template,template,option);
64
+ if(option.get_item_bind){
60
65
  template = Sub_Item_Logic.bind_parent_child_list(template,template.items);
66
+ }
61
67
  }
62
68
  return template;
63
69
  };
64
70
  }
65
71
  class Team_Logic {
66
72
  static get_test = (title,option) =>{
73
+ [title,option] = Field_Logic.get_option_title(title,option);
67
74
  option = Field_Logic.get_option(DataType.TEAM,option?option:{});
68
75
  let team = DataItem.get_new_full_item(
69
76
  DataItem.get_new(DataType.TEAM,0),
@@ -72,8 +79,8 @@ class Team_Logic {
72
79
  Field_Logic.get_test(title,option));
73
80
  team.members = [];
74
81
  if(option.get_member){
75
- for(let a=0;a<option.member_count;a++){
76
- team.members.push(Team_Logic.get_test_member("Full Name " + Number.get_id(),team,option));
82
+ for(let a=0;a<option.member_count+1;a++){
83
+ team.members.push(Team_Logic.get_test_member("Full Name " + String(parseInt(a+1)),team,option));
77
84
  }
78
85
  }
79
86
  return team;
@@ -95,7 +102,7 @@ class Team_Logic {
95
102
  static get_test_member_list = (team,option) =>{
96
103
  option = Field_Logic.get_option(DataType.TEAM,option?option:{});
97
104
  let item_list = [];
98
- for(let a=0;a<option.member_count;a++){
105
+ for(let a=0;a<option.member_count+1;a++){
99
106
  item_list.push(Team_Logic.get_test_member("Full Name " +parseInt(a+1),team,option));
100
107
  }
101
108
  return item_list;
@@ -103,7 +110,7 @@ class Team_Logic {
103
110
  static get_test_list = (option) =>{
104
111
  option = Field_Logic.get_option(DataType.TEAM,option?option:{});
105
112
  let item_list = [];
106
- for(let a=0;a<option.team_count;a++){
113
+ for(let a=0;a<option.team_count+1;a++){
107
114
  item_list.push(Team_Logic.get_test("Team " +parseInt(a+1),option));
108
115
  }
109
116
  return item_list;
@@ -111,6 +118,7 @@ class Team_Logic {
111
118
  }
112
119
  class Page_Logic {
113
120
  static get_test = (title,option) =>{
121
+ [title,option] = Field_Logic.get_option_title(title,option);
114
122
  option = Field_Logic.get_option(DataType.PAGE,option?option:{});
115
123
  let page = DataItem.get_new_full_item(
116
124
  DataItem.get_new(DataType.PAGE,0),
@@ -126,7 +134,7 @@ class Page_Logic {
126
134
  static get_test_list = (option) =>{
127
135
  option = Field_Logic.get_option(DataType.PAGE,option?option:{});
128
136
  let item_list = [];
129
- for(let a=0;a<option.page_count;a++){
137
+ for(let a=0;a<option.page_count+1;a++){
130
138
  item_list.push(Page_Logic.get_test( "Page " +parseInt(a+1)? !option.get_blank : "",option));
131
139
  }
132
140
  return item_list;
@@ -134,13 +142,13 @@ class Page_Logic {
134
142
  }
135
143
  class Product_Logic {
136
144
  static get_test = (title,option) =>{
145
+ [title,option] = Field_Logic.get_option_title(title,option);
137
146
  option = Field_Logic.get_option(DataType.PRODUCT,option?option:{});
138
147
  let product = DataItem.get_new_full_item(
139
148
  DataItem.get_new(DataType.PRODUCT,0),
140
149
  DataItem.get_new(DataType.PRODUCT,0),
141
150
  DataItem.get_new(DataType.PRODUCT,0),
142
151
  Field_Logic.get_test(title,option));
143
-
144
152
  if(option.get_blank ==false){
145
153
  product.cost = String(Number.get_id(999)) + "." + String(Number.get_id(99));
146
154
  product.old_cost = String(Number.get_id(999)) + "." + String(Number.get_id(99));
@@ -154,16 +162,15 @@ class Product_Logic {
154
162
  product.sub_type = "";
155
163
  product.stock = "";
156
164
  }
157
-
158
165
  if(option.get_item){
159
- product.items = Sub_Item_Logic.get_test_item_list(product,product,option);
166
+ product.items = Sub_Item_Logic.get_test_list(product,product,option);
160
167
  }
161
168
  return product;
162
169
  };
163
170
  static get_test_list = (option) =>{
164
171
  option = Field_Logic.get_option(DataType.PRODUCT,option?option:{});
165
172
  let item_list = [];
166
- for(let a=0;a<option.product_count;a++){
173
+ for(let a=0;a<option.product_count+1;a++){
167
174
  item_list.push(Product_Logic.get_test("Product "+String(parseInt(a+1)),option));
168
175
  }
169
176
  return item_list;
@@ -186,6 +193,7 @@ class Product_Logic {
186
193
  }
187
194
  class Service_Logic {
188
195
  static get_test = (title,option) =>{
196
+ [title,option] = Field_Logic.get_option_title(title,option);
189
197
  option = Field_Logic.get_option(DataType.SERVICE,option?option:{});
190
198
  let service = DataItem.get_new_full_item(
191
199
  DataItem.get_new(DataType.SERVICE,0),
@@ -198,14 +206,14 @@ class Service_Logic {
198
206
  service.sub_type = "Sub Type "+String(Number.get_id());
199
207
  service.stock = String(Number.get_id(3-1));
200
208
  if(option.get_item){
201
- service.items = Sub_Item_Logic.get_test_item_list(service,service,option);
209
+ service.items = Sub_Item_Logic.get_test_list(service,service,option);
202
210
  }
203
211
  return service;
204
212
  };
205
213
  static get_test_list = (option) =>{
206
214
  option = Field_Logic.get_option(DataType.SERVICE,option?option:{});
207
215
  let item_list = [];
208
- for(let a=0;a<option.service_count;a++){
216
+ for(let a=0;a<option.service_count+1;a++){
209
217
  item_list.push(Service_Logic.get_test("Service "+String(parseInt(a+1))),option);
210
218
  }
211
219
  return item_list;
@@ -228,6 +236,7 @@ class Service_Logic {
228
236
  }
229
237
  class Content_Logic {
230
238
  static get_test = (title,option) =>{
239
+ [title,option] = Field_Logic.get_option_title(title,option);
231
240
  option = Field_Logic.get_option(DataType.CONTENT,option?option:{});
232
241
  let content = DataItem.get_new_full_item(
233
242
  DataItem.get_new(DataType.CONTENT,0),
@@ -236,14 +245,16 @@ class Content_Logic {
236
245
  Field_Logic.get_test(title,option));
237
246
  if(option.get_item){
238
247
  content.items = Sub_Item_Logic.get_test_section_list(content,content,option);
239
- content = Sub_Item_Logic.bind_parent_child_list(content,content.items);
248
+ if(option.get_item_bind){
249
+ content = Sub_Item_Logic.bind_parent_child_list(content,content.items);
250
+ }
240
251
  }
241
252
  return content;
242
253
  };
243
254
  static get_test_list = (option) =>{
244
255
  option = Field_Logic.get_option(DataType.CONTENT,option?option:{});
245
256
  let item_list = [];
246
- for(let a=0;a<option.content_count;a++){
257
+ for(let a=0;a<option.content_count+1;a++){
247
258
  item_list.push(Content_Logic.get_test("Content " +String(parseInt(a+1)),option));
248
259
  }
249
260
  return item_list;
@@ -266,6 +277,7 @@ class Content_Logic {
266
277
  }
267
278
  class Blog_Post_Logic {
268
279
  static get_test = (title,option) =>{
280
+ [title,option] = Field_Logic.get_option_title(title,option);
269
281
  option = Field_Logic.get_option(DataType.BLOG_POST,option?option:{});
270
282
  let blog_post = DataItem.get_new_full_item(
271
283
  DataItem.get_new(DataType.BLOG_POST,0),
@@ -275,14 +287,14 @@ class Blog_Post_Logic {
275
287
  blog_post.author="First Name "+ Number.get_id();
276
288
  blog_post.tag="tag 1,tag 2,tag 3";
277
289
  if(option.get_item){
278
- blog_post.items = Sub_Item_Logic.get_test_item_list(blog_post,blog_post,option);
290
+ blog_post.items = Sub_Item_Logic.get_test_list(blog_post,blog_post,option);
279
291
  }
280
292
  return blog_post;
281
293
  };
282
294
  static get_test_list = (option) =>{
283
295
  option = Field_Logic.get_option(DataType.BLOG_POST,option?option:{});
284
296
  let item_list = [];
285
- for(let a=0;a<option.blog_post_count;a++){
297
+ for(let a=0;a<option.blog_post_count+1;a++){
286
298
  item_list.push(Blog_Post_Logic.get_test("Blog Post " +String(parseInt(a+1)),option));
287
299
  }
288
300
  return item_list;
@@ -305,6 +317,7 @@ class Blog_Post_Logic {
305
317
  }
306
318
  class Event_Logic {
307
319
  static get_test = (title,option) =>{
320
+ [title,option] = Field_Logic.get_option_title(title,option);
308
321
  option = Field_Logic.get_option(DataType.EVENT,option?option:{});
309
322
  let event = DataItem.get_new_full_item(
310
323
  DataItem.get_new(DataType.EVENT,0),
@@ -321,14 +334,14 @@ class Event_Logic {
321
334
  event.stock = String(Number.get_id(3-1));
322
335
  event.category ="Category " + String(Number.get_id());
323
336
  if(option.get_item){
324
- event.items = Sub_Item_Logic.get_test_item_list(event,event,option);
337
+ event.items = Sub_Item_Logic.get_test_list(event,event,option);
325
338
  }
326
339
  return event;
327
340
  };
328
341
  static get_test_list = (option) =>{
329
342
  option = Field_Logic.get_option(DataType.EVENT,option?option:{});
330
343
  let item_list = [];
331
- for(let a=0;a<option.event_count;a++){
344
+ for(let a=0;a<option.event_count+1;a++){
332
345
  item_list.push(Event_Logic.get_test("Event "+String(parseInt(a+1)),option));
333
346
  }
334
347
  return item_list;
@@ -351,9 +364,9 @@ class Event_Logic {
351
364
  }
352
365
  class Field_Logic {
353
366
  static get_test = (title,option) =>{
367
+ option = !Obj.check_is_empty(option) ? option : {};
354
368
  let sub_note = "Sub Note "+String(Number.get_id());
355
369
  let note = "Note "+String(Number.get_id());
356
- option = option ? option : {};
357
370
  option.category_title = !Str.check_is_null(option.category_title) ? option.category_title : 'Category '+String(Number.get_id());
358
371
  if(option.get_blank == true){
359
372
  title = "";
@@ -390,9 +403,9 @@ class Field_Logic {
390
403
  };
391
404
  static get_option_admin(req){
392
405
  let option = {};
393
- option.value_count = req.query.value_count ? req.query.value_count : 19;
394
- option.section_count = req.query.section_count ? req.query.section_count : 19;
395
- option.question_count = req.query.question_count ? req.query.question_count : 19;
406
+ option.value_count = req.query.value_count ? req.query.value_count : 9;
407
+ option.section_count = req.query.section_count ? req.query.section_count : 9;
408
+ option.question_count = req.query.question_count ? req.query.question_count : 9;
396
409
 
397
410
  option.get_blog_post = req.query.get_blog_post ? req.query.get_blog_post : false;
398
411
  option.get_category_blog_post = req.query.get_category_blog_post ? req.query.get_category_blog_post : false;
@@ -403,17 +416,17 @@ class Field_Logic {
403
416
  option.get_product = req.query.get_product ? req.query.get_product : false;
404
417
  option.get_category_product = req.query.get_category_product ? req.query.get_category_product : false;
405
418
  option.category_product_count = req.query.category_product_count ? req.query.category_product_count : 9;
406
- option.product_count = req.query.product_count ? req.query.product_count : 19;
419
+ option.product_count = req.query.product_count ? req.query.product_count : 9;
407
420
 
408
421
  option.get_service = req.query.get_service ? req.query.get_service : false;
409
422
  option.get_category_service = req.query.get_category_service ? req.query.get_category_service : false;
410
423
  option.category_service_count = req.query.category_service_count ? req.query.category_service_count : 9;
411
- option.service_count = req.query.service_count ? req.query.service_count : 19;
424
+ option.service_count = req.query.service_count ? req.query.service_count : 9;
412
425
 
413
426
  option.get_event = req.query.get_event ? req.query.get_event : false;
414
427
  option.get_category_event = req.query.get_category_event ? req.query.get_category_event : false;
415
428
  option.category_event_count = req.query.category_event_count ? req.query.category_event_count : 9;
416
- option.event_count = req.query.event_count ? req.query.event_count : 19;
429
+ option.event_count = req.query.event_count ? req.query.event_count : 9;
417
430
 
418
431
  option.get_admin = req.query.get_admin ? req.query.get_admin : false;
419
432
  option.get_business = req.query.get_business ? req.query.get_business : false;
@@ -431,8 +444,8 @@ class Field_Logic {
431
444
  option.get_value = option.get_value ? true : false;
432
445
  option.get_item = option.get_item ? true : false;
433
446
  option.get_blank = option.get_blank ? true : false;
434
- option.value_count = option.value_count ? option.value_count : 19;
435
- option.section_count = option.section_count ? option.section_count : 19;
447
+ option.value_count = option.value_count ? option.value_count : 9;
448
+ option.section_count = option.section_count ? option.section_count : 9;
436
449
  option.item_count = option.item_count ? option.item_count : 9;
437
450
  option.category_count = option.category_count ? option.category_count : 9;
438
451
  option.category_title = option.category_title ? option.category_title : "";
@@ -469,6 +482,33 @@ class Field_Logic {
469
482
  }
470
483
  return option;
471
484
  }
485
+ static get_option_title = (title,option) =>{
486
+ if(!title){
487
+ let title = '';
488
+ }
489
+ if(!option){
490
+ let option = {};
491
+ }
492
+ if(!Str.check_is_null(title) && Obj.check_is_empty(option)){
493
+ if(Obj.check_is_empty(option)){
494
+ if(!Str.check_is_null(title) && Obj.check_is_empty(option)){
495
+ if(typeof title === 'string'){
496
+ option = {};
497
+ }else{
498
+ option = title;
499
+ title = "Test " + Number.get_id();
500
+ }
501
+ }
502
+ }
503
+ }else{
504
+ if(Str.check_is_null(title) && Obj.check_is_empty(option)){
505
+ title = "Test " + Number.get_id();
506
+ option = {};
507
+ }
508
+ }
509
+ return [title,option];
510
+ }
511
+
472
512
  }
473
513
  class FieldType {
474
514
  static APP_ID='app_id';
@@ -634,6 +674,7 @@ class DataType {
634
674
  }
635
675
  class Blank_Logic {
636
676
  static get_test = (title,option) =>{
677
+ [title,option] = Field_Logic.get_option_title(title,option);
637
678
  option = Field_Logic.get_option(DataType.BLANK,option?option:{});
638
679
  let blank = DataItem.get_new_full_item(
639
680
  DataItem.get_new(DataType.BLANK,0),
@@ -641,7 +682,7 @@ class Blank_Logic {
641
682
  DataItem.get_new(DataType.BLANK,0),
642
683
  Field_Logic.get_test(title,option));
643
684
  if(option.get_item){
644
- blank.items = Sub_Item_Logic.get_test_item_list(blank,blank,option);
685
+ blank.items = Sub_Item_Logic.get_test_list(blank,blank,option);
645
686
  blank = Sub_Item_Logic.bind_parent_child_list(blank,blank.items);
646
687
  }
647
688
  return blank;
@@ -649,7 +690,7 @@ class Blank_Logic {
649
690
  static get_test_list = (option) =>{
650
691
  option = Field_Logic.get_option(DataType.BLANK,option?option:{});
651
692
  let item_list = [];
652
- for(let a=0;a<option.blank_count;a++){
693
+ for(let a=0;a<option.blank_count+1;a++){
653
694
  item_list.push(Blank_Logic.get_test("Blank " +String(parseInt(a+1)),option));
654
695
  }
655
696
  return item_list;
@@ -671,7 +712,8 @@ class Blank_Logic {
671
712
  };
672
713
  }
673
714
  class Faq_Logic {
674
- static get_test = (title,option) =>{
715
+ static get_test = (title,option) =>{
716
+ [title,option] = Field_Logic.get_option_title(title,option);
675
717
  option = Field_Logic.get_option(DataType.FAQ,option?option:{});
676
718
  option.get_value = false;
677
719
  let faq = DataItem.get_new_full_item(
@@ -679,22 +721,32 @@ class Faq_Logic {
679
721
  DataItem.get_new(DataType.FAQ,0),
680
722
  DataItem.get_new(DataType.FAQ,0),
681
723
  Field_Logic.get_test(title,option));
682
- for(let b=0;b<option.question_count;b++){
683
- faq['question_'+String(b+1)] = 'question ' + String(b+1);
684
- faq['field_'+String(b+1)] = Str.get_title_url(faq['question_'+String(b+1)]);
685
- faq[Str.get_title_url('question ' + String(b+1))] = 'Answer ' + String(b+1);
686
- }
687
-
724
+ for(let a=0;a<option.question_count+1;a++){
725
+ let question_title = "FAQ Question " + String(parseInt(a+1));
726
+ let answer = "My answer "+ Number.get_id() + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
727
+ faq[Str.get_title_url(question_title).toLowerCase()] = answer;
728
+ faq['field_'+parseInt(a+1)] =question_title;
729
+ }
688
730
  return faq;
689
731
  };
690
- static get_test_list=(option)=>{
732
+ static get_test_list = (option) =>{
691
733
  option = Field_Logic.get_option(DataType.FAQ,option?option:{});
692
734
  let item_list = [];
693
- for(let a=0;a<option.question_count;a++){
694
- item_list.push(Faq_Logic.get_test("FAQ Questions " +parseInt(a+1),option));
735
+ for(let a=0;a<option.question_count+1;a++){
736
+ item_list.push(Faq_Logic.get_test("FAQ " +String(parseInt(a+1)),option));
695
737
  }
696
738
  return item_list;
697
- };
739
+ }
740
+ static get_faq_question_list(faq){
741
+ let item_list = [];
742
+ for(let a=0;a<19;a++){
743
+ let row = a + 1;
744
+ if(!Str.check_is_null(faq['field_'+a])) {
745
+ item_list.push({ id: Number.get_id(333), title:faq['field_'+a], value: String(faq[Str.get_title_url(faq['field_'+a]).toLowerCase() ]) });
746
+ }
747
+ }
748
+ return item_list;
749
+ }
698
750
  }
699
751
  class Review_Logic {
700
752
  static get_test = () =>{
@@ -724,8 +776,8 @@ class Review_Logic {
724
776
  };
725
777
  }
726
778
  class Business_Logic {
727
- static get_new = (title) =>{
728
- title=(title) ? title : "Business "+Number.get_id();
779
+ static get_new = (title,option) =>{
780
+ [title,option] = Field_Logic.get_option_title(title,option);
729
781
  return DataItem.get_new_full_item(
730
782
  DataItem.get_new(DataType.BUSINESS,0),
731
783
  DataItem.get_new(DataType.BUSINESS,0),
@@ -746,6 +798,7 @@ class Business_Logic {
746
798
  });
747
799
  };
748
800
  static get_test = (title,option) =>{
801
+ [title,option] = Field_Logic.get_option_title(title,option);
749
802
  option = Field_Logic.get_option(DataType.BUSINESS,option?option:{});
750
803
  let item = DataItem.get_new(DataType.BUSINESS,0);
751
804
  let city_list = ["Miami","Atlanta","Chicago","Seattle","New York City"];
@@ -754,20 +807,20 @@ class Business_Logic {
754
807
  DataItem.get_new(DataType.BUSINESS,Number.get_id()),
755
808
  DataItem.get_new(DataType.BUSINESS,0),
756
809
  DataItem.get_new(DataType.BUSINESS,0),
757
- Field_Logic.get_test("Title "+Number.get_id()));
758
- item.email="ceo@business.com";
759
- item.phone="123-456-"+Number.get_id(3333);
760
- item.address_1=Number.get_id(99)+" Apple St.";
761
- item.address_2="PO "+Number.get_id(99);
762
- item.city=city_list[Number.get_id(city_list.length-1)];
763
- item.state=state_list[Number.get_id(state_list.length-1)];
764
- item.zip=Number.get_id(9999);
765
- item.website="website_" + Number.get_id(9999);
766
- item.youtube="youtube_"+Number.get_id(9999);
767
- item.instagram="instagram_"+Number.get_id(9999);
768
- item.facebook="facebook_"+Number.get_id(9999);
769
- item.twitter="twitter_"+Number.get_id(9999);
770
- return item;
810
+ Field_Logic.get_test(title,option));
811
+ business.email="ceo@business.com";
812
+ business.phone=Number.get_id(parseInt(777+100)) + "-" + Number.get_id(parseInt(777+100)) + "-"+Number.get_id(parseInt(7777+1000));
813
+ business.address_1=Number.get_id(99)+" Main St.";
814
+ business.address_2="PO "+Number.get_id(99);
815
+ business.city=city_list[Number.get_id(city_list.length-1)];
816
+ business.state=state_list[Number.get_id(state_list.length-1)];
817
+ business.zip=Number.get_id(parseInt(77777+1000));
818
+ business.website="website_" + Number.get_id(9999);
819
+ business.youtube="youtube_"+Number.get_id(9999);
820
+ business.instagram="instagram_"+Number.get_id(9999);
821
+ business.facebook="facebook_"+Number.get_id(9999);
822
+ business.twitter="twitter_"+Number.get_id(9999);
823
+ return business;
771
824
  };
772
825
  static get_full_address(business){
773
826
  business.address_1 = (business.address_1) ? business.address_1 : "";
@@ -1027,7 +1080,7 @@ class Category_Logic {
1027
1080
  DataItem.get_new(DataType.CATEGORY,0),
1028
1081
  Field_Logic.get_test(title,option));
1029
1082
  if(option.get_item){
1030
- category.items = Sub_Item_Logic.get_test_item_list(category,category,option);
1083
+ category.items = Sub_Item_Logic.get_test_list(category,category,option);
1031
1084
  }
1032
1085
  return category;
1033
1086
  };
@@ -1376,6 +1429,7 @@ class Sub_Item_Logic {
1376
1429
  for(let a=0;a<option.section_count;a++){
1377
1430
  let item_title ="Section " + String(parseInt(a+1));
1378
1431
  let item = Sub_Item_Logic.get_test(item_title,parent_item,top_item,option);
1432
+ /*
1379
1433
  item.items = [];
1380
1434
  let new_sub_list = [];
1381
1435
  for(let b=0;b<option.section_count;b++){
@@ -1384,6 +1438,7 @@ class Sub_Item_Logic {
1384
1438
  item.items.push(sub_item);
1385
1439
  }
1386
1440
  item = Sub_Item_Logic.bind_parent_child_list(item,new_sub_list);
1441
+ */
1387
1442
  new_list.push(item);
1388
1443
  }
1389
1444
  return new_list;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.43",
3
+ "version": "4.8.46",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -92,6 +92,7 @@ describe("connect", () => {
92
92
  /* --CATEGORY--END */
93
93
 
94
94
  /* --SUB_ITEM--START */
95
+ /*
95
96
  console.log('TEST-SUB_ITEM-START');
96
97
  let item = DataItem.get_new(DataType.BLANK,0);
97
98
  let parent_item = DataItem.get_new(DataType.BLANK,0);
@@ -103,6 +104,7 @@ describe("connect", () => {
103
104
  Log.w('sub_item_list',sub_item_list);
104
105
  Log.w('sub_item_list_len',sub_item_list.length);
105
106
  console.log('TEST-SUB_ITEM-END');
107
+ */
106
108
  /* --SUB_ITEM--END */
107
109
 
108
110
 
@@ -170,7 +172,8 @@ describe("connect", () => {
170
172
  //let [category_list,product_list]=Product.get_test_list_by_category({category_count:5,product_count:9});
171
173
  //Log.w('category_list',category_list);
172
174
 
173
- //let product = Product.get_test()
175
+ let product = Template_Logic.get_test({get_value:true,value_count:3,get_item:true})
176
+ Log.w("product",product);
174
177
  //Log.w("Product_section_1",product.section_1);
175
178
  //Log.w("Product_section_1_section_1_section_1",product.section_1.section_1.section_1);
176
179
  /* --PRODUCT--END */
@@ -251,7 +254,15 @@ describe("connect", () => {
251
254
 
252
255
  /* --FAQ--START */
253
256
  //Log.w("FAQ",Faq_Logic.get_test());
254
- //Log.w("FAQ List",Faq.get_test_list());
257
+ //Log.w("FAQ List",Faq_Logic.get_test_list(Faq_Logic.get_test()));
258
+ //let faq = Faq_Logic.get_test();
259
+ //let faq = Faq_Logic.get_test('cool 1');
260
+ //let faq = Faq_Logic.get_test('cool 1',{count:33});
261
+ //let faq = Business_Logic.get_test('ser 1',{question_count:33});
262
+ //let faq_list = Faq_Logic.get_faq_question_list(faq);
263
+ //let faq_list = Faq_Logic.get_question_list();
264
+ //Log.w('faq_list',faq_list);
265
+ //Log.w('faq',faq);
255
266
  /*
256
267
  let review_list = Review.get_test_list({review_count:3,get_item:true})
257
268
  Log.w("Review List",review_list);
@@ -274,6 +285,7 @@ describe("connect", () => {
274
285
 
275
286
  /* --BUSINESS--START */
276
287
  //Log.w("Business",Business_Logic.get_test("Business " + Number.get_id()));
288
+ //Log.w("Business",Business_Logic.get_test());
277
289
  /* --BUSINESS--END */
278
290
 
279
291