biz9-logic 4.0.28 → 4.0.31
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 +1 -1
- package/index.js +37 -7
- package/package.json +1 -1
- package/test.js +18 -5
package/biz9_config
CHANGED
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(
|
|
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),
|
|
@@ -233,6 +242,12 @@ class FieldType {
|
|
|
233
242
|
static DATE_CREATE='date_create';
|
|
234
243
|
static DATE_SAVE='date_save';
|
|
235
244
|
}
|
|
245
|
+
class Social {
|
|
246
|
+
static FACEBOOK_URL="https://facebook.com/";
|
|
247
|
+
static TWITTER_URL="https://twitter.com/";
|
|
248
|
+
static INSTAGRAM_URL="https://instagram.com/";
|
|
249
|
+
static YOUTUBE_URL="https://youtube.com/";
|
|
250
|
+
}
|
|
236
251
|
class PageType {
|
|
237
252
|
static HOME='home';
|
|
238
253
|
static ABOUT='about';
|
|
@@ -328,6 +343,9 @@ class Blog_Post{
|
|
|
328
343
|
if(!option){
|
|
329
344
|
option = {item_count:9,blog_post_count:9,get_value:false,get_item:false};
|
|
330
345
|
}
|
|
346
|
+
if(!option.item_count){
|
|
347
|
+
option.item_count=10;
|
|
348
|
+
}
|
|
331
349
|
let blog_post = DataItem.get_new_full_item(
|
|
332
350
|
DataItem.get_new(DataType.BLOG_POST,Number.get_id()),
|
|
333
351
|
DataItem.get_new(DataType.BLOG_POST,0),
|
|
@@ -385,7 +403,7 @@ class Review{
|
|
|
385
403
|
};
|
|
386
404
|
}
|
|
387
405
|
class Business {
|
|
388
|
-
static get_new = (
|
|
406
|
+
static get_new = () =>{
|
|
389
407
|
if(!title){
|
|
390
408
|
title="";
|
|
391
409
|
}
|
|
@@ -393,14 +411,20 @@ class Business {
|
|
|
393
411
|
DataItem.get_new(DataType.BUSINESS,0),
|
|
394
412
|
DataItem.get_new(DataType.BUSINESS,0),
|
|
395
413
|
DataItem.get_new(DataType.BUSINESS,0),{
|
|
396
|
-
title:
|
|
414
|
+
title:"Business " + Number.get_id(),
|
|
397
415
|
email:"",
|
|
398
416
|
phone:"",
|
|
399
417
|
address_1:"",
|
|
400
418
|
address_2:"",
|
|
401
419
|
city:"",
|
|
402
420
|
state:"",
|
|
403
|
-
zip:""
|
|
421
|
+
zip:"",
|
|
422
|
+
website:"",
|
|
423
|
+
youtube:"",
|
|
424
|
+
instagram:"",
|
|
425
|
+
facebook:"",
|
|
426
|
+
twitter:""
|
|
427
|
+
});
|
|
404
428
|
};
|
|
405
429
|
static get_test = () =>{
|
|
406
430
|
let item = DataItem.get_new(DataType.BUSINESS,Number.get_id());
|
|
@@ -412,12 +436,17 @@ class Business {
|
|
|
412
436
|
DataItem.get_new(DataType.BUSINESS,0),
|
|
413
437
|
Field.get_test("Title "+Number.get_id()));
|
|
414
438
|
item.email="ceo@business.com";
|
|
415
|
-
item.phone="123-456-"+Number.get_id();
|
|
416
|
-
item.address_1=Number.get_id()+" Apple St.";
|
|
417
|
-
item.address_2="PO
|
|
439
|
+
item.phone="123-456-"+Number.get_id(3333);
|
|
440
|
+
item.address_1=Number.get_id(99)+" Apple St.";
|
|
441
|
+
item.address_2="PO "+Number.get_id(99);
|
|
418
442
|
item.city=city_list[Number.get_id(city_list.length-1)];
|
|
419
443
|
item.state=state_list[Number.get_id(state_list.length-1)];
|
|
420
444
|
item.zip=Number.get_id(9999);
|
|
445
|
+
item.website="website_" + Number.get_id(9999);
|
|
446
|
+
item.youtube="youtube_"+Number.get_id(9999);
|
|
447
|
+
item.instagram="instagram_"+Number.get_id(9999);
|
|
448
|
+
item.facebook="facebook_"+Number.get_id(9999);
|
|
449
|
+
item.twitter="twitter_"+Number.get_id(9999);
|
|
421
450
|
return item;
|
|
422
451
|
};
|
|
423
452
|
static get_full_address(business){
|
|
@@ -927,6 +956,7 @@ module.exports = {
|
|
|
927
956
|
DataType,
|
|
928
957
|
Field,
|
|
929
958
|
FieldType,
|
|
959
|
+
Social,
|
|
930
960
|
Event,
|
|
931
961
|
Message,
|
|
932
962
|
Obj,
|
package/package.json
CHANGED
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
|
|
52
|
-
|
|
53
|
-
let product = Product.get_test()
|
|
54
|
-
Log.w(
|
|
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 */
|