biz9-logic 4.8.243 → 4.8.245
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 +24 -74
- package/package.json +1 -1
- package/test.js +5 -5
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -451,7 +451,7 @@ class Content_Logic {
|
|
|
451
451
|
class Template_Logic {
|
|
452
452
|
static get_test = (title,option) =>{
|
|
453
453
|
[title,option] = Field_Logic.get_option_title(title,option);
|
|
454
|
-
option = Field_Logic.get_option(DataType.
|
|
454
|
+
option = Field_Logic.get_option(DataType.TEMPLATE,option?option:{});
|
|
455
455
|
let template = DataItem.get_new(DataType.TEMPLATE,0,Field_Logic.get_test(title,option));
|
|
456
456
|
return template;
|
|
457
457
|
};
|
|
@@ -497,6 +497,25 @@ class Blog_Post_Logic {
|
|
|
497
497
|
return [category_list,blog_post_list]
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
|
+
class Gallery_Logic {
|
|
501
|
+
static get_test = (title,option) =>{
|
|
502
|
+
[title,option] = Field_Logic.get_option_title(title,option);
|
|
503
|
+
option = Field_Logic.get_option(DataType.GALLERY,option?option:{});
|
|
504
|
+
let gallery = DataItem.get_new(DataType.GALLERY,0,Field_Logic.get_test(title,option));
|
|
505
|
+
if(!option.get_blank){
|
|
506
|
+
gallery.date = String(String(Num.get_id(2030)) + "-" + String(Num.get_id(13)) + "-" + String(Num.get_id(30))).trim();
|
|
507
|
+
gallery.time = String(Num.get_id(24)) + ":" + String(Num.get_id(59));
|
|
508
|
+
gallery.website = "Website "+String(Num.get_id());
|
|
509
|
+
}else{
|
|
510
|
+
gallery.website = "";
|
|
511
|
+
}
|
|
512
|
+
if(option.get_item){
|
|
513
|
+
gallery.items = Sub_Item_Logic.get_test_list(gallery,gallery,option);
|
|
514
|
+
}
|
|
515
|
+
return gallery;
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
|
|
500
519
|
class Event_Logic {
|
|
501
520
|
static get_test = (title,option) =>{
|
|
502
521
|
[title,option] = Field_Logic.get_option_title(title,option);
|
|
@@ -759,7 +778,6 @@ class Field_Logic {
|
|
|
759
778
|
|
|
760
779
|
option.user_count = req.query.user_count ? req.query.user_count : 9;
|
|
761
780
|
option.get_admin = req.query.get_admin ? req.query.get_admin : false;
|
|
762
|
-
option.get_business = req.query.get_business ? req.query.get_business : false;
|
|
763
781
|
option.get_template = req.query.get_template ? req.query.get_template : false;
|
|
764
782
|
option.get_page = req.query.get_page ? req.query.get_page : false;
|
|
765
783
|
|
|
@@ -807,7 +825,6 @@ class FieldType {
|
|
|
807
825
|
/*
|
|
808
826
|
static KEY_ADMIN="key_admin";
|
|
809
827
|
static KEY_APP_ID="key_app_id";
|
|
810
|
-
static KEY_BUSINESS="key_business";
|
|
811
828
|
static KEY_TEMPLATE="key_template";
|
|
812
829
|
static KEY_CART="key_cart";
|
|
813
830
|
static KEY_ORDER="key_order";
|
|
@@ -867,10 +884,13 @@ class PageType {
|
|
|
867
884
|
static HOME='home';
|
|
868
885
|
static ABOUT='about';
|
|
869
886
|
static CONTACT='contact';
|
|
887
|
+
static FAQ='faq';
|
|
888
|
+
static SEARCH='search';
|
|
870
889
|
|
|
871
890
|
static BLOG_POST='blog_post';
|
|
872
891
|
static BLOG_POST_DETAIL='blog_post_detail';
|
|
873
892
|
|
|
893
|
+
|
|
874
894
|
static CATEGORY='category';
|
|
875
895
|
static CATEGORY_DETAIL='category_detail';
|
|
876
896
|
|
|
@@ -944,7 +964,6 @@ class DataType {
|
|
|
944
964
|
static ACTIVITY='activity_biz';
|
|
945
965
|
static APP='app_biz';
|
|
946
966
|
static BLANK='blank_biz';
|
|
947
|
-
static BUSINESS='business_biz';
|
|
948
967
|
static BLOG_POST='blog_post_biz';
|
|
949
968
|
static CART_ITEM="cart_item_biz";
|
|
950
969
|
static CATEGORY='category_biz';
|
|
@@ -1028,8 +1047,6 @@ class DataType {
|
|
|
1028
1047
|
return 'content';
|
|
1029
1048
|
case DataType.ITEM:
|
|
1030
1049
|
return 'item';
|
|
1031
|
-
case DataType.BUSINESS:
|
|
1032
|
-
return 'business';
|
|
1033
1050
|
case DataType.CUSTOM_FIELD:
|
|
1034
1051
|
return 'custom_field';
|
|
1035
1052
|
}
|
|
@@ -1244,73 +1261,6 @@ class Admin_Logic {
|
|
|
1244
1261
|
return admin.address_1 + " "+ admin.address_2 + " " + admin.city + " " + admin.state + " " + admin.zip;
|
|
1245
1262
|
}
|
|
1246
1263
|
}
|
|
1247
|
-
class Business_Logic {
|
|
1248
|
-
static get_new = (title,option) =>{
|
|
1249
|
-
[title,option] = Field_Logic.get_option_title(title,option);
|
|
1250
|
-
return DataItem.get_new_full_item(
|
|
1251
|
-
DataItem.get_new(DataType.BUSINESS,0),
|
|
1252
|
-
DataItem.get_new(DataType.BUSINESS,0),
|
|
1253
|
-
DataItem.get_new(DataType.BUSINESS,0),{
|
|
1254
|
-
title:title,
|
|
1255
|
-
email:"",
|
|
1256
|
-
phone:"",
|
|
1257
|
-
address_1:"",
|
|
1258
|
-
address_2:"",
|
|
1259
|
-
city:"",
|
|
1260
|
-
state:"",
|
|
1261
|
-
zip:"",
|
|
1262
|
-
website:"",
|
|
1263
|
-
youtube:"",
|
|
1264
|
-
instagram:"",
|
|
1265
|
-
facebook:"",
|
|
1266
|
-
twitter:""
|
|
1267
|
-
});
|
|
1268
|
-
};
|
|
1269
|
-
static get_test = (title,option) =>{
|
|
1270
|
-
[title,option] = Field_Logic.get_option_title(title,option);
|
|
1271
|
-
option = Field_Logic.get_option(DataType.BUSINESS,option?option:{});
|
|
1272
|
-
let item = DataItem.get_new(DataType.BUSINESS,0);
|
|
1273
|
-
let city_list = ["Miami","Atlanta","Chicago","Seattle","New York City"];
|
|
1274
|
-
let state_list = ["Georgia","New York","Illinois","Washington","Flordia"];
|
|
1275
|
-
let business = DataItem.get_new(DataType.BUSINESS,0,Field_Logic.get_test(title,option));
|
|
1276
|
-
if(!option.get_blank){
|
|
1277
|
-
business.email="ceo@business"+Num.get_id()+".com";
|
|
1278
|
-
business.phone=Num.get_id(parseInt(777+100)) + "-" + Num.get_id(parseInt(777+100)) + "-"+Num.get_id(parseInt(7777+1000));
|
|
1279
|
-
business.address_1=Num.get_id(99)+" Main St.";
|
|
1280
|
-
business.address_2="PO "+Num.get_id(99);
|
|
1281
|
-
business.city=city_list[Num.get_id(city_list.length-1)];
|
|
1282
|
-
business.state=state_list[Num.get_id(state_list.length-1)];
|
|
1283
|
-
business.zip=Num.get_id(parseInt(77777+1000));
|
|
1284
|
-
business.website="website_" + Num.get_id(9999);
|
|
1285
|
-
business.youtube="youtube_"+Num.get_id(9999);
|
|
1286
|
-
business.instagram="instagram_"+Num.get_id(9999);
|
|
1287
|
-
business.facebook="facebook_"+Num.get_id(9999);
|
|
1288
|
-
business.twitter="twitter_"+Num.get_id(9999);
|
|
1289
|
-
}else{
|
|
1290
|
-
business.email="";
|
|
1291
|
-
business.phone="";
|
|
1292
|
-
business.address_1="";
|
|
1293
|
-
business.address_2="";
|
|
1294
|
-
business.city="";
|
|
1295
|
-
business.state="";
|
|
1296
|
-
business.zip="";
|
|
1297
|
-
business.website="";
|
|
1298
|
-
business.youtube="";
|
|
1299
|
-
business.instagram="";
|
|
1300
|
-
business.facebook="";
|
|
1301
|
-
business.twitter="";
|
|
1302
|
-
}
|
|
1303
|
-
return business;
|
|
1304
|
-
};
|
|
1305
|
-
static get_full_address(business){
|
|
1306
|
-
business.address_1 = (business.address_1) ? business.address_1 : "";
|
|
1307
|
-
business.address_2 = (business.address_2) ? business.address_2 : "";
|
|
1308
|
-
business.city = (business.city) ? business.city : "";
|
|
1309
|
-
business.state = (business.state) ? business.state : "";
|
|
1310
|
-
business.zip = (business.zip) ? business.zip : "";
|
|
1311
|
-
return business.address_1 + " "+ business.address_2 + " " + business.city + " " + business.state + " " + business.zip;
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
1264
|
class DataItem {
|
|
1315
1265
|
static get_new = (data_type,id,option) => {
|
|
1316
1266
|
return get_new_item_main(data_type,id,option?option:{});
|
|
@@ -2036,7 +1986,6 @@ class App_Logic {
|
|
|
2036
1986
|
module.exports = {
|
|
2037
1987
|
App_Logic,
|
|
2038
1988
|
Admin_Logic,
|
|
2039
|
-
Business_Logic,
|
|
2040
1989
|
Blank_Logic,
|
|
2041
1990
|
Blog_Post_Logic,
|
|
2042
1991
|
Blog_Post_Url,
|
|
@@ -2054,6 +2003,7 @@ module.exports = {
|
|
|
2054
2003
|
FieldType,
|
|
2055
2004
|
Faq_Logic,
|
|
2056
2005
|
Favorite_Logic,
|
|
2006
|
+
Gallery_Logic,
|
|
2057
2007
|
Gallery_Url,
|
|
2058
2008
|
Item_Logic,
|
|
2059
2009
|
Item_Url,
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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,Faq_Url,App_Logic,FieldType,Product_Url} = require('./index');
|
|
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,App_Logic,FieldType,Product_Url,Gallery_Logic} = require('./index');
|
|
4
4
|
const {Log,Num} = require('biz9-utility');
|
|
5
5
|
const {Scriptz}= require('biz9-scriptz');
|
|
6
6
|
|
|
@@ -31,10 +31,10 @@ describe("connect", () => {
|
|
|
31
31
|
series([
|
|
32
32
|
|
|
33
33
|
function(call) {
|
|
34
|
-
console.log('
|
|
35
|
-
let
|
|
36
|
-
console.log(
|
|
37
|
-
console.log('
|
|
34
|
+
console.log('ITEM-START');
|
|
35
|
+
let gallery = Gallery_Logic.get_test('Gallery 1',{get_blank:true});
|
|
36
|
+
console.log(gallery);
|
|
37
|
+
console.log('ITEM-END');
|
|
38
38
|
//let page = Page_Logic.get_test();
|
|
39
39
|
//page[Page_Logic.get_page_value_field_title(FieldType.PAGE_VALUE_FIELD_TYPE_TEXT,1)] = 'apple';
|
|
40
40
|
//page[Page_Logic.get_page_value_field_title('list',1,1)] = 'cool';
|