biz9-logic 4.8.158 → 4.8.160
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 +87 -79
- package/main.js +1 -1
- package/main_test.js +33 -33
- package/package.json +1 -1
- package/test.js +25 -24
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ License GNU General Public License v3.0
|
|
|
5
5
|
Description: BiZ9 Framework: Logic-JS
|
|
6
6
|
*/
|
|
7
7
|
const moment = require('moment'); const { get_new_item_main,get_data_config_main,get_cloud_url_main,get_biz_item_main,get_cloud_filter_obj_main,get_new_full_item_main } = require('./main');
|
|
8
|
-
const { Log,Str,DateTime,
|
|
8
|
+
const { Log,Str,DateTime,Num,Obj } = require('/home/think2/www/doqbox/biz9-framework/biz9-utility/code');
|
|
9
9
|
class Message {
|
|
10
10
|
static SUCCESS="Update Success";
|
|
11
11
|
static LOGIN_GOOD="Login Success";
|
|
@@ -130,7 +130,7 @@ class Template_Logic {
|
|
|
130
130
|
static get_test = (title,option) =>{
|
|
131
131
|
if(!Str.check_is_null(title) && Obj.check_is_empty(option)){
|
|
132
132
|
option = title;
|
|
133
|
-
title = "Test " +
|
|
133
|
+
title = "Test " + Num.get_id();
|
|
134
134
|
}
|
|
135
135
|
option = Field_Logic.get_option(DataType.TEMPLATE,option?option:{});
|
|
136
136
|
let template = DataItem.get_new_full_item(
|
|
@@ -181,11 +181,11 @@ class Team_Logic {
|
|
|
181
181
|
DataItem.get_new(DataType.TEAM,team.id),
|
|
182
182
|
DataItem.get_new(DataType.TEAM,team.id),
|
|
183
183
|
Field_Logic.get_test(title,option));
|
|
184
|
-
team_member.first_name = "First Name "+
|
|
185
|
-
team_member.last_name = "Last Name "+
|
|
186
|
-
team_member.position = "Position "+
|
|
187
|
-
team_member.city = "City "+
|
|
188
|
-
team_member.state = "State "+
|
|
184
|
+
team_member.first_name = "First Name "+ Num.get_id();
|
|
185
|
+
team_member.last_name = "Last Name "+ Num.get_id();
|
|
186
|
+
team_member.position = "Position "+ Num.get_id();
|
|
187
|
+
team_member.city = "City "+ Num.get_id();
|
|
188
|
+
team_member.state = "State "+ Num.get_id();
|
|
189
189
|
return team_member;
|
|
190
190
|
};
|
|
191
191
|
static get_test_member_list = (team,option) =>{
|
|
@@ -231,15 +231,15 @@ class Page_Logic {
|
|
|
231
231
|
}
|
|
232
232
|
class Order_Logic {
|
|
233
233
|
static get_order_number = () => {
|
|
234
|
-
return FieldType.ORDER_NUMBER +
|
|
234
|
+
return FieldType.ORDER_NUMBER + Num.get_id(99999);
|
|
235
235
|
};
|
|
236
236
|
static get_transaction_id = () => {
|
|
237
|
-
return FieldType.TRANSACTION_ID +
|
|
237
|
+
return FieldType.TRANSACTION_ID + Num.get_id(99999);
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
240
|
class Cart_Logic {
|
|
241
241
|
static get_cart_number = () => {
|
|
242
|
-
return FieldType.CART_NUMBER +
|
|
242
|
+
return FieldType.CART_NUMBER + Num.get_id(99999);
|
|
243
243
|
};
|
|
244
244
|
static get_cart = (user_id) => {
|
|
245
245
|
return DataItem.get_new(DataType.CART,0,{user_id:user_id,cart_number:Cart_Logic.get_cart_number(),quanity:1,grand_total:0,cart_item_list:[]});
|
|
@@ -249,7 +249,7 @@ class Cart_Logic {
|
|
|
249
249
|
};
|
|
250
250
|
static get_test_item = (cart_item_id,cart_number,user_id,parent_data_type,parent_id,option) =>{
|
|
251
251
|
option = Field_Logic.get_option(DataType.CART_ITEM,option?option:{generate_id:Str.check_is_null(cart_item_id)? true : false });
|
|
252
|
-
let cart_item = DataItem.get_new(DataType.CART_ITEM,
|
|
252
|
+
let cart_item = DataItem.get_new(DataType.CART_ITEM,Num.get_guid(),Field_Logic.get_test("Cart Item "+Num.get_id(),option));
|
|
253
253
|
cart_item.cart_item_id = cart_item_id;
|
|
254
254
|
cart_item.cart_number = cart_number;
|
|
255
255
|
cart_item.user_id = user_id;
|
|
@@ -266,8 +266,8 @@ class Cart_Logic {
|
|
|
266
266
|
};
|
|
267
267
|
static get_test_sub_item = (cart_number,user_id,cart_item_id,parent_data_type,parent_id,option) =>{
|
|
268
268
|
option = Field_Logic.get_option(DataType.CART_SUB_ITEM,option?option:{});
|
|
269
|
-
let item_blank = Item_Logic.get_test('Sub Item '+
|
|
270
|
-
let cart_sub_item = DataItem.get_new(DataType.CART_SUB_ITEM,
|
|
269
|
+
let item_blank = Item_Logic.get_test('Sub Item '+Num.get_id(),DataType.ITEM,0,{generate_id:true});
|
|
270
|
+
let cart_sub_item = DataItem.get_new(DataType.CART_SUB_ITEM,Num.get_guid(),Field_Logic.get_test("Cart Sub Item "+Num.get_id(),option));
|
|
271
271
|
cart_sub_item.cart_number = cart_number;
|
|
272
272
|
cart_sub_item.user_id = user_id;
|
|
273
273
|
cart_sub_item.cart_item_id = cart_item_id;
|
|
@@ -294,7 +294,7 @@ static get_test_list = (option) =>{
|
|
|
294
294
|
for(let b=0;b<option.product_count;b++){
|
|
295
295
|
item_count++;
|
|
296
296
|
let product = Product_Logic.get_test("Product "+String(parseInt(b+1)),option);
|
|
297
|
-
product.category = category_list[
|
|
297
|
+
product.category = category_list[Num.get_id(category_list.length+1)].title;
|
|
298
298
|
product_list.push(product);
|
|
299
299
|
}
|
|
300
300
|
}
|
|
@@ -311,10 +311,10 @@ class Product_Logic {
|
|
|
311
311
|
product.old_cost = Field_Logic.get_test_cost();
|
|
312
312
|
product.cart_count = 0;
|
|
313
313
|
product.order_count = 0;
|
|
314
|
-
product.type = "Type "+String(
|
|
315
|
-
product.sub_type = "Sub Type "+String(
|
|
316
|
-
product.stock = String(
|
|
317
|
-
product.tag = "Tag "+
|
|
314
|
+
product.type = "Type "+String(Num.get_id());
|
|
315
|
+
product.sub_type = "Sub Type "+String(Num.get_id());
|
|
316
|
+
product.stock = String(Num.get_id(3-1));
|
|
317
|
+
product.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
318
318
|
}else{
|
|
319
319
|
product.cost = "";
|
|
320
320
|
product.old_cost = "";
|
|
@@ -331,7 +331,7 @@ class Product_Logic {
|
|
|
331
331
|
static get_test_cart = (cart_number,user_id,option) =>{
|
|
332
332
|
[cart_number,option] = Field_Logic.get_option_title(cart_number,option);
|
|
333
333
|
option = Field_Logic.get_option(DataType.CART,option?option:{});
|
|
334
|
-
let cart = DataItem.get_new(DataType.CART,
|
|
334
|
+
let cart = DataItem.get_new(DataType.CART,Num.get_guid(),Field_Logic.get_test(cart_number,option));
|
|
335
335
|
cart.user_id = user_id;
|
|
336
336
|
cart.cart_number = cart_number;
|
|
337
337
|
if(option.get_cart_item){
|
|
@@ -363,7 +363,7 @@ static get_test_list = (option) =>{
|
|
|
363
363
|
for(let b=0;b<option.product_count;b++){
|
|
364
364
|
item_count++;
|
|
365
365
|
let product = Product_Logic.get_test("Product "+String(parseInt(b+1)),option);
|
|
366
|
-
product.category = category_list[
|
|
366
|
+
product.category = category_list[Num.get_id(category_list.length+1)].title;
|
|
367
367
|
product_list.push(product);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
@@ -377,10 +377,10 @@ class Service_Logic {
|
|
|
377
377
|
let service = DataItem.get_new(DataType.SERVICE,0,Field_Logic.get_test(title,option));
|
|
378
378
|
service.cost = Field_Logic.get_test_cost();
|
|
379
379
|
service.old_cost = Field_Logic.get_test_cost();
|
|
380
|
-
service.type = "Type "+String(
|
|
381
|
-
service.sub_type = "Sub Type "+String(
|
|
382
|
-
service.stock = String(
|
|
383
|
-
service.tag = "Tag "+
|
|
380
|
+
service.type = "Type "+String(Num.get_id());
|
|
381
|
+
service.sub_type = "Sub Type "+String(Num.get_id());
|
|
382
|
+
service.stock = String(Num.get_id(3-1));
|
|
383
|
+
service.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
384
384
|
if(option.get_item){
|
|
385
385
|
service.items = Sub_Item_Logic.get_test_list(service,service,option);
|
|
386
386
|
}
|
|
@@ -403,7 +403,7 @@ class Service_Logic {
|
|
|
403
403
|
for(let b=0;b<option.service_count;b++){
|
|
404
404
|
item_count++;
|
|
405
405
|
let service = Service_Logic.get_test("Service "+String(parseInt(b+1)),option);
|
|
406
|
-
service.category = category_list[
|
|
406
|
+
service.category = category_list[Num.get_id(category_list.length+1)].title;
|
|
407
407
|
service_list.push(service);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
@@ -444,7 +444,7 @@ class Content_Logic {
|
|
|
444
444
|
for(let b=0;b<option.content_count;b++){
|
|
445
445
|
item_count++;
|
|
446
446
|
let content = Content_Logic.get_test("Content "+String(parseInt(b+1)),option);
|
|
447
|
-
content.category = category_list[
|
|
447
|
+
content.category = category_list[Num.get_id(category_list.length+1)].title;
|
|
448
448
|
content_list.push(content);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
@@ -458,8 +458,8 @@ class Blog_Post_Logic {
|
|
|
458
458
|
let blog_post = DataItem.get_new(DataType.BLOG_POST,0,Field_Logic.get_test(title,option));
|
|
459
459
|
|
|
460
460
|
if(!option.get_blank){
|
|
461
|
-
blog_post.author="First Name "+
|
|
462
|
-
blog_post.tag = "Tag "+
|
|
461
|
+
blog_post.author="First Name "+ Num.get_id();
|
|
462
|
+
blog_post.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
463
463
|
}else{
|
|
464
464
|
blog_post.author="";
|
|
465
465
|
blog_post.tag = "";
|
|
@@ -486,7 +486,7 @@ class Blog_Post_Logic {
|
|
|
486
486
|
for(let b=0;b<option.blog_post_count;b++){
|
|
487
487
|
item_count++;
|
|
488
488
|
let blog_post = Blog_Post_Logic.get_test("Blog Post "+String(parseInt(b+1)),option);
|
|
489
|
-
blog_post.category = category_list[
|
|
489
|
+
blog_post.category = category_list[Num.get_id(category_list.length+1)].title;
|
|
490
490
|
blog_post_list.push(blog_post);
|
|
491
491
|
}
|
|
492
492
|
}
|
|
@@ -501,14 +501,14 @@ class Event_Logic {
|
|
|
501
501
|
if(!option.get_blank){
|
|
502
502
|
event.cost = Field_Logic.get_test_cost();
|
|
503
503
|
event.old_cost = Field_Logic.get_test_cost();
|
|
504
|
-
event.date = String(String(
|
|
505
|
-
event.time = String(
|
|
506
|
-
event.website = "Website "+String(
|
|
507
|
-
event.location = "Location "+String(
|
|
508
|
-
event.meeting_link = "Meeting Link "+String(
|
|
509
|
-
event.stock = String(
|
|
510
|
-
event.category ="Category " + String(
|
|
511
|
-
event.tag = "Tag "+
|
|
504
|
+
event.date = String(String(Num.get_id(2030)) + "-" + String(Num.get_id(13)) + "-" + String(Num.get_id(30))).trim();
|
|
505
|
+
event.time = String(Num.get_id(24)) + ":" + String(Num.get_id(59));
|
|
506
|
+
event.website = "Website "+String(Num.get_id());
|
|
507
|
+
event.location = "Location "+String(Num.get_id());
|
|
508
|
+
event.meeting_link = "Meeting Link "+String(Num.get_id());
|
|
509
|
+
event.stock = String(Num.get_id(3-1));
|
|
510
|
+
event.category ="Category " + String(Num.get_id());
|
|
511
|
+
event.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
512
512
|
}else{
|
|
513
513
|
event.cost = "";
|
|
514
514
|
event.old_cost = "";
|
|
@@ -543,7 +543,7 @@ class Event_Logic {
|
|
|
543
543
|
for(let b=0;b<option.event_count;b++){
|
|
544
544
|
item_count++;
|
|
545
545
|
let event = Event_Logic.get_test("Event "+String(parseInt(b+1)),option);
|
|
546
|
-
event.category = category_list[
|
|
546
|
+
event.category = category_list[Num.get_id(category_list.length+1)].title;
|
|
547
547
|
event_list.push(event);
|
|
548
548
|
}
|
|
549
549
|
}
|
|
@@ -552,10 +552,10 @@ class Event_Logic {
|
|
|
552
552
|
}
|
|
553
553
|
class Field_Logic {
|
|
554
554
|
static get_test_cost(){
|
|
555
|
-
return String(
|
|
555
|
+
return String(Num.get_id(999)) + "." + String(Num.get_id(99));
|
|
556
556
|
}
|
|
557
557
|
static get_test_note = () => {
|
|
558
|
-
return "Note "+String(
|
|
558
|
+
return "Note "+String(Num.get_id()) + " Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";
|
|
559
559
|
}
|
|
560
560
|
static get_test = (title,option) =>{
|
|
561
561
|
option = !Obj.check_is_empty(option) ? option : {};
|
|
@@ -575,7 +575,7 @@ class Field_Logic {
|
|
|
575
575
|
title:title,
|
|
576
576
|
setting_visible:"1",
|
|
577
577
|
title_url:Str.get_title_url(title),
|
|
578
|
-
sub_note:"Sub Note "+String(
|
|
578
|
+
sub_note:"Sub Note "+String(Num.get_id()),
|
|
579
579
|
note:Field_Logic.get_test_note(),
|
|
580
580
|
view_count:0,
|
|
581
581
|
id:0,
|
|
@@ -584,10 +584,10 @@ class Field_Logic {
|
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
if(!Str.check_is_null(option.category_title)){
|
|
587
|
-
item.category = 'Category ' +
|
|
587
|
+
item.category = 'Category ' + Num.get_id();
|
|
588
588
|
}
|
|
589
589
|
if(option.generate_id){
|
|
590
|
-
item.id=
|
|
590
|
+
item.id=Num.get_guid();
|
|
591
591
|
}
|
|
592
592
|
if(option.get_value){
|
|
593
593
|
item = Field_Logic.get_value_list(item,option);
|
|
@@ -601,7 +601,7 @@ class Field_Logic {
|
|
|
601
601
|
}
|
|
602
602
|
}else{
|
|
603
603
|
if(!Str.check_is_null(field_list[a])){
|
|
604
|
-
item[Str.get_title_url(field_list[a])] = Str.get_title(field_list[a]) +"_" +
|
|
604
|
+
item[Str.get_title_url(field_list[a])] = Str.get_title(field_list[a]) +"_" + Num.get_id();
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
}
|
|
@@ -659,7 +659,6 @@ class Field_Logic {
|
|
|
659
659
|
option.member_count = option.member_count ? option.member_count : 9;
|
|
660
660
|
}
|
|
661
661
|
if(data_type==DataType.FAQ){
|
|
662
|
-
option.get_question = option.get_question ? true : false;
|
|
663
662
|
option.question_count = option.question_count ? option.question_count : 9;
|
|
664
663
|
}
|
|
665
664
|
if(data_type==DataType.CONTENT){
|
|
@@ -715,13 +714,13 @@ class Field_Logic {
|
|
|
715
714
|
option = {};
|
|
716
715
|
}else{
|
|
717
716
|
option = title;
|
|
718
|
-
title = "Test " +
|
|
717
|
+
title = "Test " + Num.get_id();
|
|
719
718
|
}
|
|
720
719
|
}
|
|
721
720
|
}
|
|
722
721
|
}else{
|
|
723
722
|
if(Str.check_is_null(title) && Obj.check_is_empty(option)){
|
|
724
|
-
title = "Test " +
|
|
723
|
+
title = "Test " + Num.get_id();
|
|
725
724
|
option = {};
|
|
726
725
|
}
|
|
727
726
|
}
|
|
@@ -731,6 +730,8 @@ class Field_Logic {
|
|
|
731
730
|
let option = {};
|
|
732
731
|
option.value_count = req.query.value_count ? req.query.value_count : 9;
|
|
733
732
|
option.section_count = req.query.section_count ? req.query.section_count : 9;
|
|
733
|
+
|
|
734
|
+
option.get_faq = req.query.get_faq ? req.query.get_faq : false;
|
|
734
735
|
option.question_count = req.query.question_count ? req.query.question_count : 9;
|
|
735
736
|
|
|
736
737
|
option.get_blog_post = req.query.get_blog_post ? req.query.get_blog_post : false;
|
|
@@ -756,15 +757,16 @@ class Field_Logic {
|
|
|
756
757
|
option.get_product_review = req.query.get_product_review ? req.query.get_product_review : false;
|
|
757
758
|
option.product_review_count = req.query.product_review_count ? req.query.product_review_count : 19;
|
|
758
759
|
|
|
760
|
+
option.get_business_review = req.query.get_business_review ? req.query.get_business_review : false;
|
|
761
|
+
option.business_review_count = req.query.business_review_count ? req.query.business_review_count : 19;
|
|
762
|
+
|
|
759
763
|
option.user_count = req.query.user_count ? req.query.user_count : 9;
|
|
760
764
|
option.get_admin = req.query.get_admin ? req.query.get_admin : false;
|
|
761
765
|
option.get_business = req.query.get_business ? req.query.get_business : false;
|
|
762
|
-
option.get_faq = req.query.get_faq ? req.query.get_faq : false;
|
|
763
766
|
option.get_template = req.query.get_template ? req.query.get_template : false;
|
|
764
767
|
option.get_page = req.query.get_page ? req.query.get_page : false;
|
|
765
768
|
option.get_team = req.query.get_team ? req.query.get_team : false;
|
|
766
769
|
|
|
767
|
-
|
|
768
770
|
return option;
|
|
769
771
|
}
|
|
770
772
|
|
|
@@ -814,7 +816,6 @@ class FieldType {
|
|
|
814
816
|
static CART_NUMBER="CA-";
|
|
815
817
|
static TRANSACTION_ID="TR-";
|
|
816
818
|
|
|
817
|
-
static PAYMENT_PLAN_PENDING="Pending";
|
|
818
819
|
static PAYMENT_PLAN_1="1 Payment";
|
|
819
820
|
static PAYMENT_PLAN_2="2 Payments";
|
|
820
821
|
static PAYMENT_PLAN_3="3 Payments";
|
|
@@ -825,7 +826,7 @@ class FieldType {
|
|
|
825
826
|
static ORDER_STATUS_PAYMENT="Payment Plan";
|
|
826
827
|
static ORDER_STATUS_COMPLETE="Complete";
|
|
827
828
|
|
|
828
|
-
static
|
|
829
|
+
static PAYMENT_PLAN="Open";
|
|
829
830
|
|
|
830
831
|
static ORDER_PAYMENT_TYPE_STRIPE="Stripe";
|
|
831
832
|
static ORDER_PAYMENT_TYPE_CASH="Cash";
|
|
@@ -1019,7 +1020,7 @@ class Blank_Logic {
|
|
|
1019
1020
|
for(let b=0;b<option.blank_count;b++){
|
|
1020
1021
|
item_count++;
|
|
1021
1022
|
let blank = Blank_Logic.get_test("Blank "+String(parseInt(b+1)),option);
|
|
1022
|
-
blank.category = category_list[
|
|
1023
|
+
blank.category = category_list[Num.get_id(category_list.length+1)].title;
|
|
1023
1024
|
blank_list.push(blank);
|
|
1024
1025
|
}
|
|
1025
1026
|
}
|
|
@@ -1032,10 +1033,10 @@ class Faq_Logic {
|
|
|
1032
1033
|
option = Field_Logic.get_option(DataType.FAQ,option?option:{});
|
|
1033
1034
|
option.get_value = false;
|
|
1034
1035
|
let faq = DataItem.get_new(DataType.FAQ,0,Field_Logic.get_test(title,option));
|
|
1035
|
-
for(let a=0;a<option.question_count+1;a++){
|
|
1036
|
+
for(let a=0;a<parseInt(option.question_count)+1;a++){
|
|
1036
1037
|
if(!option.get_blank){
|
|
1037
1038
|
let question_title = "FAQ Question " + String(parseInt(a+1));
|
|
1038
|
-
let answer = "My answer "+
|
|
1039
|
+
let answer = "My answer "+ Num.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.";
|
|
1039
1040
|
faq[Str.get_title_url(question_title).toLowerCase()] = answer;
|
|
1040
1041
|
faq['field_'+parseInt(a+1)] =question_title;
|
|
1041
1042
|
}else{
|
|
@@ -1055,12 +1056,12 @@ class Faq_Logic {
|
|
|
1055
1056
|
}
|
|
1056
1057
|
return item_list;
|
|
1057
1058
|
}
|
|
1058
|
-
static
|
|
1059
|
+
static get_faq_question_list_old(faq){
|
|
1059
1060
|
let item_list = [];
|
|
1060
1061
|
for(let a=0;a<19;a++){
|
|
1061
1062
|
let row = a + 1;
|
|
1062
1063
|
if(!Str.check_is_null(faq['field_'+a])) {
|
|
1063
|
-
item_list.push({ id:
|
|
1064
|
+
item_list.push({ id: Num.get_id(333), question:faq['field_'+a], answer: String(faq[Str.get_title_url(faq['field_'+a]).toLowerCase() ]) });
|
|
1064
1065
|
}
|
|
1065
1066
|
}
|
|
1066
1067
|
return item_list;
|
|
@@ -1115,10 +1116,10 @@ class Review_Logic {
|
|
|
1115
1116
|
option = Field_Logic.get_option(DataType.REVIEW,option?option:{});
|
|
1116
1117
|
let review = DataItem.get_new(DataType.REVIEW,0);
|
|
1117
1118
|
if(!option.get_blank){
|
|
1118
|
-
review.title = 'Title ' +
|
|
1119
|
+
review.title = 'Title ' + Num.get_id();
|
|
1119
1120
|
review.parent_data_type = parent_data_type;
|
|
1120
1121
|
review.parent_id = parent_id;
|
|
1121
|
-
review.rating =
|
|
1122
|
+
review.rating = Num.get_id(6);
|
|
1122
1123
|
review.user_id = user_id;
|
|
1123
1124
|
review.comment = "My comment "+ Field_Logic.get_test_note();
|
|
1124
1125
|
}else{
|
|
@@ -1157,7 +1158,7 @@ class Admin_Logic {
|
|
|
1157
1158
|
let item = DataItem.get_new(DataType.ADMIN,0);
|
|
1158
1159
|
let admin = DataItem.get_new(DataType.ADMIN,0,Field_Logic.get_test(title,option));
|
|
1159
1160
|
if(!option.get_blank){
|
|
1160
|
-
admin.email="ceo@admin"+
|
|
1161
|
+
admin.email="ceo@admin"+Num.get_id()+".com";
|
|
1161
1162
|
admin.password="1234567";
|
|
1162
1163
|
}else{
|
|
1163
1164
|
admin.email="";
|
|
@@ -1204,18 +1205,18 @@ class Business_Logic {
|
|
|
1204
1205
|
let state_list = ["Georgia","New York","Illinois","Washington","Flordia"];
|
|
1205
1206
|
let business = DataItem.get_new(DataType.BUSINESS,0,Field_Logic.get_test(title,option));
|
|
1206
1207
|
if(!option.get_blank){
|
|
1207
|
-
business.email="ceo@business"+
|
|
1208
|
-
business.phone=
|
|
1209
|
-
business.address_1=
|
|
1210
|
-
business.address_2="PO "+
|
|
1211
|
-
business.city=city_list[
|
|
1212
|
-
business.state=state_list[
|
|
1213
|
-
business.zip=
|
|
1214
|
-
business.website="website_" +
|
|
1215
|
-
business.youtube="youtube_"+
|
|
1216
|
-
business.instagram="instagram_"+
|
|
1217
|
-
business.facebook="facebook_"+
|
|
1218
|
-
business.twitter="twitter_"+
|
|
1208
|
+
business.email="ceo@business"+Num.get_id()+".com";
|
|
1209
|
+
business.phone=Num.get_id(parseInt(777+100)) + "-" + Num.get_id(parseInt(777+100)) + "-"+Num.get_id(parseInt(7777+1000));
|
|
1210
|
+
business.address_1=Num.get_id(99)+" Main St.";
|
|
1211
|
+
business.address_2="PO "+Num.get_id(99);
|
|
1212
|
+
business.city=city_list[Num.get_id(city_list.length-1)];
|
|
1213
|
+
business.state=state_list[Num.get_id(state_list.length-1)];
|
|
1214
|
+
business.zip=Num.get_id(parseInt(77777+1000));
|
|
1215
|
+
business.website="website_" + Num.get_id(9999);
|
|
1216
|
+
business.youtube="youtube_"+Num.get_id(9999);
|
|
1217
|
+
business.instagram="instagram_"+Num.get_id(9999);
|
|
1218
|
+
business.facebook="facebook_"+Num.get_id(9999);
|
|
1219
|
+
business.twitter="twitter_"+Num.get_id(9999);
|
|
1219
1220
|
}else{
|
|
1220
1221
|
business.email="";
|
|
1221
1222
|
business.phone="";
|
|
@@ -1455,6 +1456,12 @@ class Favorite_Url {
|
|
|
1455
1456
|
return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
|
|
1456
1457
|
};
|
|
1457
1458
|
}
|
|
1459
|
+
class Faq_Url {
|
|
1460
|
+
static get = (biz9_config,key,params) => {
|
|
1461
|
+
let action_url="faq/get/"+key;
|
|
1462
|
+
return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1458
1465
|
class Category_Url {
|
|
1459
1466
|
static get = (biz9_config,key,params) => {
|
|
1460
1467
|
let action_url="category/get/"+key;
|
|
@@ -1899,11 +1906,11 @@ class User_Logic {
|
|
|
1899
1906
|
return country_state_city;
|
|
1900
1907
|
}
|
|
1901
1908
|
static get_guest(){
|
|
1902
|
-
return DataItem.get_new(DataType.USER,
|
|
1909
|
+
return DataItem.get_new(DataType.USER,Num.get_id(999),{is_guest:true,title:"Guest",country:"United States"});
|
|
1903
1910
|
}
|
|
1904
1911
|
static get_request_user(req){
|
|
1905
1912
|
if(!req || !req.session.user){
|
|
1906
|
-
let user=DataItem.get_new(DataType.USER,
|
|
1913
|
+
let user=DataItem.get_new(DataType.USER,Num.get_id(9999999),{is_guest:true});
|
|
1907
1914
|
req.session.user=user;
|
|
1908
1915
|
}
|
|
1909
1916
|
return req.session.user;
|
|
@@ -1944,11 +1951,11 @@ class User_Logic {
|
|
|
1944
1951
|
user.password="";
|
|
1945
1952
|
user.country="";
|
|
1946
1953
|
}else{
|
|
1947
|
-
user.first_name="First Name "+
|
|
1948
|
-
user.last_name="First Name "+
|
|
1949
|
-
user.email="email"+
|
|
1950
|
-
user.city="City"+
|
|
1951
|
-
user.state="State"+
|
|
1954
|
+
user.first_name="First Name "+ Num.get_id();
|
|
1955
|
+
user.last_name="First Name "+ Num.get_id();
|
|
1956
|
+
user.email="email"+ Num.get_id() + "@email.com";
|
|
1957
|
+
user.city="City"+ Num.get_id();
|
|
1958
|
+
user.state="State"+ Num.get_id();
|
|
1952
1959
|
user.password="1234567";
|
|
1953
1960
|
user.country="United States";
|
|
1954
1961
|
}
|
|
@@ -1975,7 +1982,7 @@ class Sub_Item_Logic {
|
|
|
1975
1982
|
parent_data_type:parent_item.data_type,
|
|
1976
1983
|
title:item_title,
|
|
1977
1984
|
title_url:Str.get_title_url(item_title),
|
|
1978
|
-
sub_note:"Sub Note "+String(
|
|
1985
|
+
sub_note:"Sub Note "+String(Num.get_id()),
|
|
1979
1986
|
note:Field_Logic.get_test_note()
|
|
1980
1987
|
}
|
|
1981
1988
|
);
|
|
@@ -2040,6 +2047,7 @@ module.exports = {
|
|
|
2040
2047
|
Field_Logic,
|
|
2041
2048
|
FieldType,
|
|
2042
2049
|
Faq_Logic,
|
|
2050
|
+
Faq_Url,
|
|
2043
2051
|
Favorite_Logic,
|
|
2044
2052
|
Favorite_Url,
|
|
2045
2053
|
Gallery_Url,
|
package/main.js
CHANGED
|
@@ -4,7 +4,7 @@ Author: certifiedcoderz@gmail.com (Certified CoderZ)
|
|
|
4
4
|
License GNU General Public License v3.0
|
|
5
5
|
Description: BiZ9 Framework: Logic - Main
|
|
6
6
|
*/
|
|
7
|
-
const { DateTime,
|
|
7
|
+
const { DateTime,Num } = require('biz9-utility');
|
|
8
8
|
const biz9_config_local=__dirname+"/../../"+"biz9_config";
|
|
9
9
|
const get_cloud_param_obj_main = (data_type,filter,sort_by,page_current,page_size) => {
|
|
10
10
|
return {data_type:data_type,filter:filter,sort_by:sort_by,page_current:page_current,page_size:page_size};
|
package/main_test.js
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
1
|
const { DataItem,DataType } = require('biz9-logic');
|
|
2
2
|
const get_template_test = () =>{
|
|
3
3
|
let template = DataItem.get_new_full_item(
|
|
4
|
-
DataItem.get_new(DataType.TEMPLATE,
|
|
4
|
+
DataItem.get_new(DataType.TEMPLATE,Num.get_id()),
|
|
5
5
|
DataItem.get_new(DataType.TEMPLATE,0),
|
|
6
6
|
DataItem.get_new(DataType.TEMPLATE,0),
|
|
7
7
|
Field.get_test("Primary"));
|
|
8
8
|
let template_sub_title_list = ["Header","Navigation","Body","Footer"];
|
|
9
9
|
for(let a=0;a<template_sub_title_list.length;a++){
|
|
10
|
-
template = Sub_Item.get_test_bind_new_child(
|
|
10
|
+
template = Sub_Item.get_test_bind_new_child(Num.get_id(),template_sub_title_list[a],template,template,template);
|
|
11
11
|
}
|
|
12
12
|
template = Sub_Item.get_test_bind_item_sub_item(template);
|
|
13
13
|
return template;
|
|
14
14
|
};
|
|
15
15
|
const get_page_test = (title) =>{
|
|
16
16
|
let page = DataItem.get_new_full_item(
|
|
17
|
-
DataItem.get_new(DataType.PAGE,
|
|
17
|
+
DataItem.get_new(DataType.PAGE,Num.get_id()),
|
|
18
18
|
DataItem.get_new(DataType.PAGE,0),
|
|
19
19
|
DataItem.get_new(DataType.PAGE,0),
|
|
20
20
|
Field.get_test(title));
|
|
21
21
|
for(let a=0;a<20;a++){
|
|
22
|
-
page=Sub_Item.get_test_bind_new_child(
|
|
22
|
+
page=Sub_Item.get_test_bind_new_child(Num.get_id(),"Section "+a,page,page,page);
|
|
23
23
|
}
|
|
24
24
|
page = Sub_Item.get_test_bind_item_sub_item(page);
|
|
25
25
|
return page;
|
|
26
26
|
}
|
|
27
27
|
const get_product_test = (title) =>{
|
|
28
28
|
let product = DataItem.get_new_full_item(
|
|
29
|
-
DataItem.get_new(DataType.PRODUCT,
|
|
29
|
+
DataItem.get_new(DataType.PRODUCT,Num.get_id()),
|
|
30
30
|
DataItem.get_new(DataType.PRODUCT,0),
|
|
31
31
|
DataItem.get_new(DataType.PRODUCT,0),
|
|
32
32
|
Field.get_test(title));
|
|
33
|
-
product = Sub_Item.get_test_bind_new_child(
|
|
34
|
-
product.cost = String(
|
|
35
|
-
product.old_cost = String(
|
|
36
|
-
product.type = "Type "+String(
|
|
37
|
-
product.sub_type = "Sub Type "+String(
|
|
38
|
-
product.stock = String(
|
|
33
|
+
product = Sub_Item.get_test_bind_new_child(Num.get_id(),title,product,product,product);
|
|
34
|
+
product.cost = String(Num.get_id()) + "." + String(Num.get_id());
|
|
35
|
+
product.old_cost = String(Num.get_id()) + "." + String(Num.get_id());
|
|
36
|
+
product.type = "Type "+String(Num.get_id());
|
|
37
|
+
product.sub_type = "Sub Type "+String(Num.get_id());
|
|
38
|
+
product.stock = String(Num.get_id(3-1));
|
|
39
39
|
for(let a=0;a<10;a++){
|
|
40
|
-
product=Sub_Item.get_test_bind_new_child(
|
|
40
|
+
product=Sub_Item.get_test_bind_new_child(Num.get_id(),"Section " + String(a),product,product,product);
|
|
41
41
|
}
|
|
42
42
|
product = Sub_Item.get_test_bind_item_sub_item(product);
|
|
43
43
|
return product;
|
|
44
44
|
};
|
|
45
45
|
const get_service_test = (title) =>{
|
|
46
46
|
let service = DataItem.get_new_full_item(
|
|
47
|
-
DataItem.get_new(DataType.SERVICE,
|
|
47
|
+
DataItem.get_new(DataType.SERVICE,Num.get_id()),
|
|
48
48
|
DataItem.get_new(DataType.SERVICE,0),
|
|
49
49
|
DataItem.get_new(DataType.SERVICE,0),
|
|
50
50
|
Field.get_test(title));
|
|
51
|
-
service = Sub_Item.get_test_bind_new_child(
|
|
52
|
-
service.cost = String(
|
|
53
|
-
service.old_cost = String(
|
|
54
|
-
service.type = "Type "+String(
|
|
55
|
-
service.sub_type = "Sub Type "+String(
|
|
56
|
-
service.stock = String(
|
|
51
|
+
service = Sub_Item.get_test_bind_new_child(Num.get_id(),title,service,service,service);
|
|
52
|
+
service.cost = String(Num.get_id()) + "." + String(Num.get_id());
|
|
53
|
+
service.old_cost = String(Num.get_id()) + "." + String(Num.get_id());
|
|
54
|
+
service.type = "Type "+String(Num.get_id());
|
|
55
|
+
service.sub_type = "Sub Type "+String(Num.get_id());
|
|
56
|
+
service.stock = String(Num.get_id(3-1));
|
|
57
57
|
for(let a=0;a<10;a++){
|
|
58
|
-
service=Sub_Item.get_test_bind_new_child(
|
|
58
|
+
service=Sub_Item.get_test_bind_new_child(Num.get_id(),"Section " + String(a),service,service,service);
|
|
59
59
|
}
|
|
60
60
|
service = Sub_Item.get_test_bind_item_sub_item(service);
|
|
61
61
|
return service;
|
|
62
62
|
};
|
|
63
63
|
const get_event_test = (title) =>{
|
|
64
64
|
let event = DataItem.get_new_full_item(
|
|
65
|
-
DataItem.get_new(DataType.EVENT,
|
|
65
|
+
DataItem.get_new(DataType.EVENT,Num.get_id()),
|
|
66
66
|
DataItem.get_new(DataType.EVENT,0),
|
|
67
67
|
DataItem.get_new(DataType.EVENT,0),
|
|
68
68
|
Field.get_test(title));
|
|
69
|
-
event = Sub_Item.get_test_bind_new_child(
|
|
70
|
-
event.cost = String(
|
|
71
|
-
event.old_cost = String(
|
|
72
|
-
event.date = String(String(
|
|
73
|
-
event.time = String(
|
|
74
|
-
event.website = "Website "+String(
|
|
75
|
-
event.location = "Location "+String(
|
|
76
|
-
event.meeting_link = "Meeting Link "+String(
|
|
77
|
-
event.stock = String(
|
|
69
|
+
event = Sub_Item.get_test_bind_new_child(Num.get_id(),title,event,event,event);
|
|
70
|
+
event.cost = String(Num.get_id()) + "." + String(Num.get_id());
|
|
71
|
+
event.old_cost = String(Num.get_id()) + "." + String(Num.get_id());
|
|
72
|
+
event.date = String(String(Num.get_id(2030)) + "-" + String(Num.get_id(13)) + "-" + String(Num.get_id(30))).trim();
|
|
73
|
+
event.time = String(Num.get_id(24)) + ":" + String(Num.get_id(59));
|
|
74
|
+
event.website = "Website "+String(Num.get_id());
|
|
75
|
+
event.location = "Location "+String(Num.get_id());
|
|
76
|
+
event.meeting_link = "Meeting Link "+String(Num.get_id());
|
|
77
|
+
event.stock = String(Num.get_id(3-1));
|
|
78
78
|
for(let a=0;a<10;a++){
|
|
79
|
-
event=Sub_Item.get_test_bind_new_child(
|
|
79
|
+
event=Sub_Item.get_test_bind_new_child(Num.get_id(),"Section " + String(a),event,event,event);
|
|
80
80
|
}
|
|
81
81
|
event = Sub_Item.get_test_bind_item_sub_item(event);
|
|
82
82
|
return event;
|
|
@@ -90,8 +90,8 @@ const get_field_test = (title) =>{
|
|
|
90
90
|
setting_visible:"1",
|
|
91
91
|
photo_data:"/images/no_img.jpg",
|
|
92
92
|
title_url:Str.get_title_url(title),
|
|
93
|
-
sub_note : "Sub Note "+String(
|
|
94
|
-
note : "Note "+String(
|
|
93
|
+
sub_note : "Sub Note "+String(Num.get_id()),
|
|
94
|
+
note : "Note "+String(Num.get_id())
|
|
95
95
|
}
|
|
96
96
|
for(let b = 1;b<20;b++){
|
|
97
97
|
item['value_'+String(b)] = 'value ' + String(b);
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const series = require('async-series');
|
|
3
|
-
const {DataItem,DataType,Url,Obj,BiZ_Url,Cat,Stock,Schedule,Storage,Business,Product,Service,Event,Template,Page,Category,Review,Blog_Post,Faq_Logic,Category_Url,Blank_Url,Blank_Logic,Item_Logic,Service_Logic,Template_Logic,Page_Logic,Product_Logic,Event_Logic,Blog_Post_Logic,Content_Logic,Category_Logic,Team_Logic,Business_Logic,PageType,Sub_Item_Logic,Page_Url,Review_Logic,User_Logic,Field_Logic,Order_Logic,Cart_Logic} = require('./index');
|
|
4
|
-
const {Log,
|
|
3
|
+
const {DataItem,DataType,Url,Obj,BiZ_Url,Cat,Stock,Schedule,Storage,Business,Product,Service,Event,Template,Page,Category,Review,Blog_Post,Faq_Logic,Category_Url,Blank_Url,Blank_Logic,Item_Logic,Service_Logic,Template_Logic,Page_Logic,Product_Logic,Event_Logic,Blog_Post_Logic,Content_Logic,Category_Logic,Team_Logic,Business_Logic,PageType,Sub_Item_Logic,Page_Url,Review_Logic,User_Logic,Field_Logic,Order_Logic,Cart_Logic,Faq_Url} = require('./index');
|
|
4
|
+
const {Log,Num} = require('biz9-utility');
|
|
5
5
|
const {Scriptz}= require('biz9-scriptz');
|
|
6
6
|
|
|
7
7
|
/* --- TEST CONFIG START --- */
|
|
@@ -49,12 +49,12 @@ describe("connect", () => {
|
|
|
49
49
|
function(call) {
|
|
50
50
|
//console.log('STORAGE-START');
|
|
51
51
|
//console.log(Storage.get({},'apples'));
|
|
52
|
-
//Log.w('storage-start',Storage.set(
|
|
52
|
+
//Log.w('storage-start',Storage.set(Num.get_id()));
|
|
53
53
|
//console.log('STORAGE-END');
|
|
54
54
|
/* --PAGE--START */
|
|
55
55
|
//let page = Page_Logic.get_test()
|
|
56
|
-
//let page = Page_Logic.get_test("Page "+
|
|
57
|
-
//let page = Page_Logic.get_test("Page "+
|
|
56
|
+
//let page = Page_Logic.get_test("Page "+Num.get_id())
|
|
57
|
+
//let page = Page_Logic.get_test("Page "+Num.get_id(),{get_value:true,value_count:5,get_section:false,section_count:2,get_photo:true,get_blank:true})
|
|
58
58
|
//Log.w("page",page);
|
|
59
59
|
//Log.w("page_section_1",page.section_1);
|
|
60
60
|
//Log.w("page_section_6",page.section_6.items);
|
|
@@ -153,8 +153,8 @@ describe("connect", () => {
|
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
/* --CONTENT--START */
|
|
156
|
-
let item_list = Content_Logic.get_test_list({content_count:6,get_item:false,get_value:false,get_blank:true});
|
|
157
|
-
Log.w('content_list',item_list);
|
|
156
|
+
//let item_list = Content_Logic.get_test_list({content_count:6,get_item:false,get_value:false,get_blank:true});
|
|
157
|
+
//Log.w('content_list',item_list);
|
|
158
158
|
//let content = Content_Logic.get_test("cool 1");
|
|
159
159
|
//let content = Content_Logic.get_test("Content 1",{get_value:true,get_item:true})
|
|
160
160
|
//Log.w("content",content);
|
|
@@ -222,7 +222,7 @@ describe("connect", () => {
|
|
|
222
222
|
Log.w('product_cart_sub_item_list',product_cart.cart_item_list[0].cart_sub_item_list);
|
|
223
223
|
//cart.cart_number = cart_number;
|
|
224
224
|
//Log.w('cart',cart);
|
|
225
|
-
//let product = Product_Logic.get_test("Product "+
|
|
225
|
+
//let product = Product_Logic.get_test("Product "+Num.get_id(),{get_value:false,get_item:false})
|
|
226
226
|
//cart_item_id,cart_number,user_id,parent_data_type,parent_id
|
|
227
227
|
//let cart_item = Cart_Logic.get_test_cart_item(0,Order_Logic.get_cart_number(),user.id,product.data_type,product.id);
|
|
228
228
|
//Log.w('user',user);
|
|
@@ -240,7 +240,7 @@ describe("connect", () => {
|
|
|
240
240
|
|
|
241
241
|
/*
|
|
242
242
|
console.log('PRODUCT-ORDER-START');
|
|
243
|
-
let order_id = "OR"+
|
|
243
|
+
let order_id = "OR"+Num.get_id();
|
|
244
244
|
let user = User_Logic.get_test({generate_id:true});
|
|
245
245
|
let product_order = Product_Logic.get_test_order(order_id,user.id,{get_order_item:true,order_item_count:1,get_order_sub_item:true,order_sub_item_count:2 });
|
|
246
246
|
Log.w('product_order',product_order);
|
|
@@ -271,7 +271,7 @@ describe("connect", () => {
|
|
|
271
271
|
|
|
272
272
|
|
|
273
273
|
/* --ITEM-TEST--START */
|
|
274
|
-
//let item = Item_Logic.get_test("Item_" +
|
|
274
|
+
//let item = Item_Logic.get_test("Item_" +Num.get_id(),DataType.BLOG_POST,0,{get_blank:false});
|
|
275
275
|
//Log.w('item',item);
|
|
276
276
|
/*
|
|
277
277
|
let item_list = Item_Logic.get_test_list(DataType.BLANK,{item_count:10,get_value:true});
|
|
@@ -345,9 +345,10 @@ describe("connect", () => {
|
|
|
345
345
|
|
|
346
346
|
|
|
347
347
|
/* --FAQ--START */
|
|
348
|
+
Log.w('faq',Faq_Url.get(biz9_config,'primary'));
|
|
348
349
|
//Log.w("FAQ",Faq_Logic.get_test());
|
|
349
|
-
//Log.w("FAQ List",Faq_Logic.get_test_list(Faq_Logic.get_test()));
|
|
350
|
-
//let faq = Faq_Logic.get_test();
|
|
350
|
+
//Log.w("FAQ List",Faq_Logic.get_test_list(Faq_Logic.get_test({question_count:3})));
|
|
351
|
+
//let faq = Faq_Logic.get_test('Cool Quest',{question_count:2});
|
|
351
352
|
//let faq = Faq_Logic.get_test('cool 1');
|
|
352
353
|
//let faq = Faq_Logic.get_test('cool 1',{count:33});
|
|
353
354
|
//let faq = Business_Logic.get_test('ser 1',{question_count:33});
|
|
@@ -365,7 +366,7 @@ describe("connect", () => {
|
|
|
365
366
|
/* --REVIEW--START */
|
|
366
367
|
/*
|
|
367
368
|
let parent_data_type = DataType.PRODUCT;
|
|
368
|
-
let parent_id =
|
|
369
|
+
let parent_id = Num.get_id();
|
|
369
370
|
let user = User_Logic.get_test({generate_id:false});
|
|
370
371
|
let product_review = Review_Logic.get_test(parent_data_type,parent_id,user.id);
|
|
371
372
|
let review = Review_Logic.get_new(parent_data_type,parent_id,user,product_review);
|
|
@@ -381,7 +382,7 @@ describe("connect", () => {
|
|
|
381
382
|
/* --REVIEW--END */
|
|
382
383
|
|
|
383
384
|
/* --BUSINESS--START */
|
|
384
|
-
//Log.w("Business",Business_Logic.get_test("Business " +
|
|
385
|
+
//Log.w("Business",Business_Logic.get_test("Business " + Num.get_id()));
|
|
385
386
|
//Log.w("Business",Business_Logic.get_test());
|
|
386
387
|
/* --BUSINESS--END */
|
|
387
388
|
|
|
@@ -421,7 +422,7 @@ describe("connect", () => {
|
|
|
421
422
|
|
|
422
423
|
function(call) {
|
|
423
424
|
console.log('GET_START_STORAGE-START');
|
|
424
|
-
Log.w('storage-start',Storage.set(
|
|
425
|
+
Log.w('storage-start',Storage.set(Num.get_id()));
|
|
425
426
|
console.log('GET_START_STORAGE-END');
|
|
426
427
|
//call();
|
|
427
428
|
},
|
|
@@ -457,16 +458,16 @@ describe("connect", () => {
|
|
|
457
458
|
console.log('SET-ITEM-BIZ-BY-LIST-START');
|
|
458
459
|
let item_test_list = [];
|
|
459
460
|
let item_test = Item_Logic.get_test_item('dt_blank',0);
|
|
460
|
-
item_test.cost = String(
|
|
461
|
-
item_test.old_cost = String(
|
|
462
|
-
item_test.title ='_title_'+
|
|
461
|
+
item_test.cost = String(Num.get_id())+'.55';
|
|
462
|
+
item_test.old_cost = String(Num.get_id())+'.20';
|
|
463
|
+
item_test.title ='_title_'+Num.get_id();
|
|
463
464
|
|
|
464
465
|
item_test_list.push(item_test);
|
|
465
466
|
|
|
466
467
|
let item_test_1 = Item_Logic.get_test_item('dt_blank',0);
|
|
467
468
|
item_test_1.cost = '5.55';
|
|
468
469
|
item_test_1.old_cost = '9.55';
|
|
469
|
-
item_test_1.title ='_title_'+
|
|
470
|
+
item_test_1.title ='_title_'+Num.get_id();
|
|
470
471
|
|
|
471
472
|
item_test_list.push(item_test_1);
|
|
472
473
|
|
|
@@ -498,9 +499,9 @@ describe("connect", () => {
|
|
|
498
499
|
console.log('SET_CATEGORY_DROP_DOWN_LIST-START');
|
|
499
500
|
let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
|
|
500
501
|
let category_list = [];
|
|
501
|
-
category_list.push({data_type:DataType.BLANK,id:0,title:
|
|
502
|
-
category_list.push({data_type:DataType.BLANK,id:0,title:
|
|
503
|
-
category_list.push({data_type:DataType.BLANK,id:0,title:
|
|
502
|
+
category_list.push({data_type:DataType.BLANK,id:0,title:Num.get_id()});
|
|
503
|
+
category_list.push({data_type:DataType.BLANK,id:0,title:Num.get_id()});
|
|
504
|
+
category_list.push({data_type:DataType.BLANK,id:0,title:Num.get_id()});
|
|
504
505
|
Log.w('cat',Cat.set_category_drop_down_list(category_list));
|
|
505
506
|
//let cloud_url = CMS.get_new_query_item_by_item(item);
|
|
506
507
|
//Log.w('connect_url',cloud_url);
|
|
@@ -515,9 +516,9 @@ describe("connect", () => {
|
|
|
515
516
|
console.log('GET-NEW-QUERY-ITEM-BY-ITEM-START');
|
|
516
517
|
let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
|
|
517
518
|
let item = DataItem.get_new(DataType.BLANK,0);
|
|
518
|
-
item.parent_id =
|
|
519
|
+
item.parent_id = Num.get_id();
|
|
519
520
|
item.parent_data_type = DataType.BLANK;
|
|
520
|
-
item.top_id =
|
|
521
|
+
item.top_id = Num.get_id();
|
|
521
522
|
item.top_data_type = DataType.BLANK;
|
|
522
523
|
Log.w('item',item);
|
|
523
524
|
//let cloud_url = CMS.get_new_query_item_by_item(item);
|