biz9-logic 4.8.103 → 4.8.106

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 CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='5.8.3'
1
+ VERSION='5.8.6'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -430,7 +430,7 @@ class Field_Logic {
430
430
  static get_test = (title,option) =>{
431
431
  option = !Obj.check_is_empty(option) ? option : {};
432
432
  let sub_note = "Sub Note "+String(Number.get_id());
433
- let note = "Note "+String(Number.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.";
433
+ let note = "Note "+String(Number.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.";
434
434
  option.category_title = !Str.check_is_null(option.category_title) ? option.category_title : 'Category '+String(Number.get_id());
435
435
  if(option.get_blank == true){
436
436
  date_create:"";
@@ -875,6 +875,40 @@ class Review_Logic {
875
875
  return item_list;
876
876
  };
877
877
  }
878
+ class Admin_Logic {
879
+ static get_new = (title,option) =>{
880
+ [title,option] = Field_Logic.get_option_title(title,option);
881
+ return DataItem.get_new_full_item(
882
+ DataItem.get_new(DataType.ADMIN,0),
883
+ DataItem.get_new(DataType.ADMIN,0),
884
+ DataItem.get_new(DataType.ADMIN,0),{
885
+ title:title,
886
+ email:"",
887
+ });
888
+ };
889
+ static get_test = (title,option) =>{
890
+ [title,option] = Field_Logic.get_option_title(title,option);
891
+ option = Field_Logic.get_option(DataType.ADMIN,option?option:{});
892
+ let item = DataItem.get_new(DataType.ADMIN,0);
893
+ let admin = DataItem.get_new_full_item(
894
+ DataItem.get_new(DataType.ADMIN,Number.get_id()),
895
+ DataItem.get_new(DataType.ADMIN,0),
896
+ DataItem.get_new(DataType.ADMIN,0),
897
+ Field_Logic.get_test(title,option));
898
+ admin.email="ceo@admin"+Number.get_id()+".com";
899
+ admin.password="1234567";
900
+ return admin;
901
+ };
902
+ static get_full_address(admin){
903
+ admin.address_1 = (admin.address_1) ? admin.address_1 : "";
904
+ admin.address_2 = (admin.address_2) ? admin.address_2 : "";
905
+ admin.city = (admin.city) ? admin.city : "";
906
+ admin.state = (admin.state) ? admin.state : "";
907
+ admin.zip = (admin.zip) ? admin.zip : "";
908
+ return admin.address_1 + " "+ admin.address_2 + " " + admin.city + " " + admin.state + " " + admin.zip;
909
+ }
910
+ }
911
+
878
912
  class Business_Logic {
879
913
  static get_new = (title,option) =>{
880
914
  [title,option] = Field_Logic.get_option_title(title,option);
@@ -908,7 +942,7 @@ class Business_Logic {
908
942
  DataItem.get_new(DataType.BUSINESS,0),
909
943
  DataItem.get_new(DataType.BUSINESS,0),
910
944
  Field_Logic.get_test(title,option));
911
- business.email="ceo@business.com";
945
+ business.email="ceo@business"+Number.get_id()+".com";
912
946
  business.phone=Number.get_id(parseInt(777+100)) + "-" + Number.get_id(parseInt(777+100)) + "-"+Number.get_id(parseInt(7777+1000));
913
947
  business.address_1=Number.get_id(99)+" Main St.";
914
948
  business.address_2="PO "+Number.get_id(99);
@@ -976,6 +1010,10 @@ class Blog_Post_Url {
976
1010
  let action_url="blog_post/category/"+category;
977
1011
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
978
1012
  };
1013
+ static search = (biz9_config,params) => {
1014
+ let action_url="blog_post/search";
1015
+ return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1016
+ };
979
1017
  }
980
1018
  class Custom_Field_Url {
981
1019
  static get = (biz9_config,data_type,key,params) => {
@@ -997,6 +1035,28 @@ class FAQ_Url {
997
1035
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
998
1036
  };
999
1037
  }
1038
+ class Order_Url {
1039
+ static single_stripe_checkout = (biz9_config,data_type,key,params) => {
1040
+ let action_url="order/single-stripe-checkout/"+data_type+"/"+key;
1041
+ return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1042
+ };
1043
+ static user_stripe_checkout = (biz9_config,user_id,params) => {
1044
+ let action_url="order/cart-stripe-checkout/"+user_id;
1045
+ return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1046
+ };
1047
+ static checkout_success = (biz9_config,order_id,params) => {
1048
+ let action_url="order/cart-stripe-checkout/"+order_id;
1049
+ return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1050
+ };
1051
+ static user_cart = (biz9_config,user_id,params) => {
1052
+ let action_url="order/user-cart/"+order_id;
1053
+ return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1054
+ };
1055
+ static cart_update = (biz9_config,user_id,data_type,id,params) => {
1056
+ let action_url="order/cart-update/"+user_id+"/"+data_type+"/"+id;
1057
+ return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1058
+ };
1059
+ }
1000
1060
  class Product_Url {
1001
1061
  static get = (biz9_config,key,params) => {
1002
1062
  let action_url="product/get/"+key;
@@ -1010,12 +1070,18 @@ class Product_Url {
1010
1070
  let action_url="product/category/"+category;
1011
1071
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1012
1072
  };
1013
- static cart = (biz9_config,params) => {
1014
- let action_url="product/cart";
1073
+ static search = (biz9_config,params) => {
1074
+ let action_url="product/search";
1015
1075
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1016
1076
  };
1017
- static checkout = (biz9_config,params) => {
1018
- let action_url="product/checkout";
1077
+ }
1078
+ class Review_Url {
1079
+ static update = (biz9_config,parent_data_type,parent_id,user_id,params) => {
1080
+ let action_url="review/"+parent_data_type+"/"+parent_id+"/"+user_id;
1081
+ return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1082
+ };
1083
+ static search = (biz9_config,parent_data_type,parent_id,params) => {
1084
+ let action_url="review/"+parent_data_type+"/"+parent_id;
1019
1085
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1020
1086
  };
1021
1087
  }
@@ -1032,12 +1098,8 @@ class Event_Url {
1032
1098
  let action_url="event/category/"+category;
1033
1099
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1034
1100
  };
1035
- static cart = (biz9_config,params) => {
1036
- let action_url="event/cart";
1037
- return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1038
- };
1039
- static checkout = (biz9_config,params) => {
1040
- let action_url="event/checkout";
1101
+ static search = (biz9_config,params) => {
1102
+ let action_url="event/search";
1041
1103
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1042
1104
  };
1043
1105
  }
@@ -1054,12 +1116,8 @@ class Service_Url {
1054
1116
  let action_url="service/category/"+category;
1055
1117
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1056
1118
  };
1057
- static cart = (biz9_config,params) => {
1058
- let action_url="service/cart";
1059
- return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1060
- };
1061
- static checkout = (biz9_config,params) => {
1062
- let action_url="service/checkout";
1119
+ static search = (biz9_config,params) => {
1120
+ let action_url="service/search";
1063
1121
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1064
1122
  };
1065
1123
  }
@@ -1076,6 +1134,10 @@ class Content_Url {
1076
1134
  let action_url="content/category/"+category;
1077
1135
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1078
1136
  };
1137
+ static search = (biz9_config,params) => {
1138
+ let action_url="content/search";
1139
+ return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1140
+ };
1079
1141
  }
1080
1142
  class Gallery_Url {
1081
1143
  static get = (biz9_config,key,params) => {
@@ -1090,6 +1152,10 @@ class Gallery_Url {
1090
1152
  let action_url="gallery/category/"+category;
1091
1153
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1092
1154
  };
1155
+ static search = (biz9_config,params) => {
1156
+ let action_url="gallery/search";
1157
+ return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1158
+ };
1093
1159
  }
1094
1160
  class Category_Url {
1095
1161
  static get = (biz9_config,key,params) => {
@@ -1100,6 +1166,10 @@ class Category_Url {
1100
1166
  let action_url="category/browse";
1101
1167
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1102
1168
  };
1169
+ static search = (biz9_config,params) => {
1170
+ let action_url="category/search";
1171
+ return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1172
+ };
1103
1173
  }
1104
1174
  class Page_Url {
1105
1175
  static get = (biz9_config,title_url,params) => {
@@ -1559,6 +1629,9 @@ class User_Logic {
1559
1629
  user.first_name="First Name "+ Number.get_id();
1560
1630
  user.last_name="First Name "+ Number.get_id();
1561
1631
  user.email="email"+ Number.get_id() + "@email.com";
1632
+ user.city="City"+ Number.get_id();
1633
+ user.state="State"+ Number.get_id();
1634
+ user.country="United States";
1562
1635
  return user;
1563
1636
  };
1564
1637
  static get_test_list = (option) =>{
@@ -1627,6 +1700,7 @@ class Sub_Item_Logic {
1627
1700
  }
1628
1701
  }
1629
1702
  module.exports = {
1703
+ Admin_Logic,
1630
1704
  Business_Logic,
1631
1705
  Blank_Logic,
1632
1706
  Blank_Url,
@@ -1654,6 +1728,8 @@ module.exports = {
1654
1728
  PageType,
1655
1729
  Product_Logic,
1656
1730
  Review_Logic,
1731
+ Review_Url,
1732
+ Order_Url,
1657
1733
  Service_Logic,
1658
1734
  Service_Url,
1659
1735
  Social,
package/main.js CHANGED
@@ -9,24 +9,24 @@ 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};
11
11
  }
12
- const get_new_item_main = (data_type,id,options) => {
12
+ const get_new_item_main = (data_type,id,option) => {
13
13
  if(!id){
14
14
  id='0';
15
15
  }
16
16
  let item = {data_type:data_type,id:id};
17
- if(!options){
18
- options = {};
17
+ if(!option){
18
+ option = {};
19
19
  }
20
- if(options){
21
- for (const key in options) {
22
- item[key] = options[key];
20
+ if(option){
21
+ for (const key in option) {
22
+ item[key] = option[key];
23
23
  }
24
24
  }
25
25
  return item;
26
26
  }
27
- const get_new_full_item_main = (org_item,parent_item,top_item,options) => {
28
- if(!options){
29
- options = {};
27
+ const get_new_full_item_main = (org_item,parent_item,top_item,option) => {
28
+ if(!option){
29
+ option = {};
30
30
  }
31
31
  let item = {
32
32
  data_type:org_item.data_type,
@@ -36,9 +36,9 @@ const get_new_full_item_main = (org_item,parent_item,top_item,options) => {
36
36
  top_id:top_item.id,
37
37
  top_data_type:top_item.data_type
38
38
  };
39
- if(options){
40
- for (const key in options) {
41
- item[key] = options[key];
39
+ if(option){
40
+ for (const key in option) {
41
+ item[key] = option[key];
42
42
  }
43
43
  }
44
44
  return item;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.103",
3
+ "version": "4.8.106",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -84,8 +84,8 @@ describe("connect", () => {
84
84
  /* --TEAM--END */
85
85
 
86
86
  /* --FIELD-LOGIC--START */
87
- let field_logic = Field_Logic.get_test();
88
- Log.w('field_logic',field_logic);
87
+ //let field_logic = Field_Logic.get_test();
88
+ //Log.w('field_logic',field_logic);
89
89
  //let country_state = User_Logic.get_user_country_state_city(user);
90
90
  //Log.w('country_state',country_state);
91
91
  //let user = User_Logic.get_test();
@@ -227,8 +227,8 @@ describe("connect", () => {
227
227
 
228
228
 
229
229
  /* --ITEM-TEST--START */
230
- //let item = Item_Logic.get_test("Item_" +Number.get_id(),DataType.SERVICE,0);
231
- //Log.w('item',item);
230
+ let item = Item_Logic.get_test("Item_" +Number.get_id(),DataType.BLOG_POST,0);
231
+ Log.w('item',item);
232
232
  /*
233
233
  let item_list = Item_Logic.get_test_list(DataType.BLANK,{item_count:10,get_value:true});
234
234
  Log.w('item_list',item_list);