biz9-logic 4.8.77 → 4.8.79
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 +27 -2
- package/package.json +1 -1
- package/test.js +12 -9
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -489,7 +489,6 @@ class Field_Logic {
|
|
|
489
489
|
option.category_blog_post_count = req.query.category_blog_post_count ? req.query.category_blog_post_count : 9;
|
|
490
490
|
option.blog_post_count = req.query.blog_post_count ? req.query.blog_post_count : 9;
|
|
491
491
|
|
|
492
|
-
|
|
493
492
|
option.get_product = req.query.get_product ? req.query.get_product : false;
|
|
494
493
|
option.get_category_product = req.query.get_category_product ? req.query.get_category_product : false;
|
|
495
494
|
option.category_product_count = req.query.category_product_count ? req.query.category_product_count : 9;
|
|
@@ -505,6 +504,7 @@ class Field_Logic {
|
|
|
505
504
|
option.category_event_count = req.query.category_event_count ? req.query.category_event_count : 9;
|
|
506
505
|
option.event_count = req.query.event_count ? req.query.event_count : 9;
|
|
507
506
|
|
|
507
|
+
option.user_count = req.query.user_count ? req.query.user_count : 9;
|
|
508
508
|
option.get_admin = req.query.get_admin ? req.query.get_admin : false;
|
|
509
509
|
option.get_business = req.query.get_business ? req.query.get_business : false;
|
|
510
510
|
option.get_faq = req.query.get_faq ? req.query.get_faq : false;
|
|
@@ -559,6 +559,10 @@ class Field_Logic {
|
|
|
559
559
|
if(data_type==DataType.SUB_ITEM){
|
|
560
560
|
option.item_count = option.item_count ? option.item_count : 9;
|
|
561
561
|
}
|
|
562
|
+
if(data_type==DataType.USER){
|
|
563
|
+
option.user_count = option.user_count ? option.user_count : 9;
|
|
564
|
+
}
|
|
565
|
+
|
|
562
566
|
return option;
|
|
563
567
|
}
|
|
564
568
|
static get_option_title = (title,option) =>{
|
|
@@ -1469,7 +1473,7 @@ class Schedule {
|
|
|
1469
1473
|
class Storage {
|
|
1470
1474
|
static get = (window,key) => {
|
|
1471
1475
|
if(window){
|
|
1472
|
-
return JSON.parse(window.localStorage.getItem(key));
|
|
1476
|
+
return JSON.parse(window.localStorage.getItem(key)) ? window.localStorage.getItem(key) : null;
|
|
1473
1477
|
}else{
|
|
1474
1478
|
return null;
|
|
1475
1479
|
}
|
|
@@ -1511,6 +1515,27 @@ class User_Logic {
|
|
|
1511
1515
|
req.session.user=null;
|
|
1512
1516
|
delete req.session.user;
|
|
1513
1517
|
}
|
|
1518
|
+
static get_test = (title,option) =>{
|
|
1519
|
+
[title,option] = Field_Logic.get_option_title(title,option);
|
|
1520
|
+
option = Field_Logic.get_option(DataType.USER,option?option:{});
|
|
1521
|
+
let user = DataItem.get_new_full_item(
|
|
1522
|
+
DataItem.get_new(DataType.USER,0),
|
|
1523
|
+
DataItem.get_new(DataType.USER,0),
|
|
1524
|
+
DataItem.get_new(DataType.USER,0),
|
|
1525
|
+
Field_Logic.get_test(title,option));
|
|
1526
|
+
user.first_name="First Name "+ Number.get_id();
|
|
1527
|
+
user.last_name="First Name "+ Number.get_id();
|
|
1528
|
+
user.email="email"+ Number.get_id() + "@email.com";
|
|
1529
|
+
return user;
|
|
1530
|
+
};
|
|
1531
|
+
static get_test_list = (option) =>{
|
|
1532
|
+
option = Field_Logic.get_option(DataType.USER,option?option:{});
|
|
1533
|
+
let item_list = [];
|
|
1534
|
+
for(let a=0;a<option.user_count+1;a++){
|
|
1535
|
+
item_list.push(User_Logic.get_test("User " +String(parseInt(a+1)),option));
|
|
1536
|
+
}
|
|
1537
|
+
return item_list;
|
|
1538
|
+
}
|
|
1514
1539
|
}
|
|
1515
1540
|
class Sub_Item_Logic {
|
|
1516
1541
|
static get_test(title,parent_item,top_item,option){
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -84,8 +84,11 @@ describe("connect", () => {
|
|
|
84
84
|
/* --TEAM--END */
|
|
85
85
|
|
|
86
86
|
/* --USER--START */
|
|
87
|
-
|
|
87
|
+
//let user = User_Logic.get_test();
|
|
88
|
+
//let user = User_Logic.get_test();
|
|
89
|
+
//let user_list = User_Logic.get_test_list();
|
|
88
90
|
//Log.w('user',user);
|
|
91
|
+
//Log.w('user_list',user_list);
|
|
89
92
|
|
|
90
93
|
/* --USER--END */
|
|
91
94
|
|
|
@@ -196,9 +199,9 @@ describe("connect", () => {
|
|
|
196
199
|
//let product = Product_Logic.get_test({fields:["cool_beanj]})
|
|
197
200
|
//Log.w("product",product);
|
|
198
201
|
//let product_list = Product_Logic.get_test_list({product_count:10,get_blank:true});
|
|
199
|
-
let product_list = Product_Logic.get_test_list({product_count:2,get_blank:false,fields:'delivery_time,apple,basnnah'})
|
|
202
|
+
//let product_list = Product_Logic.get_test_list({product_count:2,get_blank:false,fields:'delivery_time,apple,basnnah'})
|
|
200
203
|
//let product_list = Product_Logic.get_test_list();
|
|
201
|
-
Log.w('product_list',product_list);
|
|
204
|
+
//Log.w('product_list',product_list);
|
|
202
205
|
//let [category_list,product_list]=Product.get_test_list_by_category({category_count:5,product_count:9});
|
|
203
206
|
//Log.w('category_list',category_list);
|
|
204
207
|
|
|
@@ -269,14 +272,14 @@ describe("connect", () => {
|
|
|
269
272
|
/* --CONFIG--END */
|
|
270
273
|
|
|
271
274
|
/* --PAGE--START */
|
|
272
|
-
|
|
273
|
-
let
|
|
275
|
+
let page = Page_Logic.get_test({item_count:2,page_count:2,get_value:true,get_item:true,value_count:5})
|
|
276
|
+
let page_row_item = Sub_Item_Logic.get_test_section_list(page,page,{get_value:true,value_count:9,section_count:9});
|
|
274
277
|
Log.w("Page",page);
|
|
275
|
-
|
|
278
|
+
Log.w("Page_Row_Item",page_row_item);
|
|
279
|
+
//let page = Page.get_test({item_count:9,page_count:19,get_item:true,get_value:true})
|
|
276
280
|
//let page = Page.get_test()
|
|
277
|
-
Log.w("Page_section_1",page.section_1);
|
|
278
|
-
Log.w("Page_section_1_section_1_section_1",page.section_1.section_1.section_1);
|
|
279
|
-
*/
|
|
281
|
+
//Log.w("Page_section_1",page.section_1);
|
|
282
|
+
//Log.w("Page_section_1_section_1_section_1",page.section_1.section_1.section_1);
|
|
280
283
|
/* --PAGE--END */
|
|
281
284
|
|
|
282
285
|
|