biz9-logic 4.8.182 → 4.8.184

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.
Files changed (3) hide show
  1. package/biz9_config +1 -1
  2. package/index.js +19 -87
  3. package/package.json +1 -1
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='6.6.2'
1
+ VERSION='6.6.4'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -149,47 +149,6 @@ class Template_Logic {
149
149
  return template;
150
150
  };
151
151
  }
152
- class Team_Logic {
153
- static get_test = (title,option) =>{
154
- [title,option] = Field_Logic.get_option_title(title,option);
155
- option = Field_Logic.get_option(DataType.TEAM,option?option:{});
156
- let team = DataItem.get_new(DataType.TEAM,0,Field_Logic.get_test(title,option));
157
- team.members = [];
158
- if(option.get_member){
159
- for(let a=0;a<option.member_count+1;a++){
160
- team.members.push(Team_Logic.get_test_member("Full Name " + String(parseInt(a+1)),team,option));
161
- }
162
- }
163
- return team;
164
- };
165
- static get_test_member = (team,title,option) =>{
166
- [title,option] = Field_Logic.get_option_title(title,option);
167
- option = Field_Logic.get_option(DataType.TEAM,option?option:{});
168
- let team_member = DataItem.get_new(DataType.TEAM,team.id,Field_Logic.get_test(title,option));
169
- team_member.first_name = "First Name "+ Num.get_id();
170
- team_member.last_name = "Last Name "+ Num.get_id();
171
- team_member.position = "Position "+ Num.get_id();
172
- team_member.city = "City "+ Num.get_id();
173
- team_member.state = "State "+ Num.get_id();
174
- return team_member;
175
- };
176
- static get_test_member_list = (team,option) =>{
177
- option = Field_Logic.get_option(DataType.TEAM,option?option:{});
178
- let item_list = [];
179
- for(let a=0;a<option.member_count+1;a++){
180
- item_list.push(Team_Logic.get_test_member(team,"Full Name " +parseInt(a+1),option));
181
- }
182
- return item_list;
183
- }
184
- static get_test_list = (option) =>{
185
- option = Field_Logic.get_option(DataType.TEAM,option?option:{});
186
- let item_list = [];
187
- for(let a=0;a<option.team_count+1;a++){
188
- item_list.push(Team_Logic.get_test("Team " +parseInt(a+1),option));
189
- }
190
- return item_list;
191
- }
192
- }
193
152
  class Page_Logic {
194
153
  static get_test = (title,option) =>{
195
154
  [title,option] = Field_Logic.get_option_title(title,option);
@@ -629,10 +588,6 @@ class Field_Logic {
629
588
  if(data_type==DataType.EVENT){
630
589
  option.event_count = option.event_count ? option.event_count : 9;
631
590
  }
632
- if(data_type==DataType.TEAM){
633
- option.get_member = option.get_member ? true : false;
634
- option.member_count = option.member_count ? option.member_count : 9;
635
- }
636
591
  if(data_type==DataType.FAQ){
637
592
  option.question_count = option.question_count ? option.question_count : 9;
638
593
  }
@@ -740,7 +695,6 @@ class Field_Logic {
740
695
  option.get_business = req.query.get_business ? req.query.get_business : false;
741
696
  option.get_template = req.query.get_template ? req.query.get_template : false;
742
697
  option.get_page = req.query.get_page ? req.query.get_page : false;
743
- option.get_team = req.query.get_team ? req.query.get_team : false;
744
698
 
745
699
  return option;
746
700
  }
@@ -771,6 +725,11 @@ class FieldType {
771
725
  static DATE_CREATE='date_create';
772
726
  static DATE_SAVE='date_save';
773
727
 
728
+ static USER_ROLE_ADMIN='admin';
729
+ static USER_ROLE_MANAGER='manager';
730
+ static USER_ROLE_USER='user';
731
+ static USER_ROLE_GUEST='guest';
732
+
774
733
  static STAT_VIEW_ADD_ID='1';
775
734
  static STAT_LIKE_ADD_ID='2';
776
735
  static STAT_FAVORITE_ADD_ID='3';
@@ -787,10 +746,6 @@ class FieldType {
787
746
  static KEY_ORDER="key_order";
788
747
  static KEY_USER="key_user";
789
748
 
790
- static USER_TYPE_ADMIN="user_admin";
791
- static USER_TYPE_MEMBER="user_member";
792
- static USER_TYPE_CUSTOMER="user_customer";
793
-
794
749
  static ORDER_NUMBER="OR-";
795
750
  static CART_NUMBER="CA-";
796
751
  static TRANSACTION_ID="TR-";
@@ -823,11 +778,6 @@ class Social {
823
778
  static YOUTUBE_URL="https://youtube.com/";
824
779
  static LINKEDIN_URL="https://linkedin.com/";
825
780
  }
826
- class UserType {
827
- static ADMIN="admin";
828
- static MEMBER="member";
829
- static GUEST="guest";
830
- }
831
781
  class PageType {
832
782
  static get_title = (data_type) => {
833
783
  if(!data_type){
@@ -836,19 +786,6 @@ class PageType {
836
786
  return String(Str.get_title(data_type.replaceAll('_',' '))).trim();
837
787
  }
838
788
  }
839
- static get_item_list = () =>{
840
- return [
841
- {title:DataType.get_title(PageType.ABOUT),type:DataType.ABOUT},
842
- {title:DataType.get_title(PageType.BLOG_POST),type:DataType.BLOG_POST},
843
- {title:DataType.get_title(PageType.CONTACT),type:DataType.CONTACT},
844
- {title:DataType.get_title(PageType.EVENT),type:DataType.EVENT},
845
- {title:DataType.get_title(PageType.GALLERY),type:DataType.GALLERY},
846
- {title:DataType.get_title(PageType.HOME),type:DataType.HOME},
847
- {title:DataType.get_title(PageType.TEAM),type:DataType.TEAM},
848
- {title:DataType.get_title(PageType.PRODUCT),type:DataType.PRODUCT},
849
- {title:DataType.get_title(PageType.SERVICE),type:DataType.SERVICE}
850
- ]
851
- };
852
789
  static HOME='home';
853
790
  static ABOUT='about';
854
791
  static CONTACT='contact';
@@ -975,9 +912,9 @@ class DataType {
975
912
  static get_item_list = () =>{
976
913
  return [
977
914
  { title:DataType.get_title(DataType.BLOG_POST),type:DataType.BLOG_POST},
978
- { title:DataType.get_title(DataType.GALLERY),type:DataType.GALLERY},
979
915
  { title:DataType.get_title(DataType.EVENT),type:DataType.EVENT},
980
- { title:DataType.get_title(DataType.TEAM),type:DataType.TEAM},
916
+ { title:DataType.get_title(DataType.GALLERY),type:DataType.GALLERY},
917
+ { title:DataType.get_title(DataType.USER),type:DataType.USER},
981
918
  { title:DataType.get_title(DataType.PRODUCT),type:DataType.PRODUCT},
982
919
  { title:DataType.get_title(DataType.SERVICE),type:DataType.SERVICE}
983
920
  ]
@@ -988,7 +925,6 @@ class DataType {
988
925
  static BLOG_POST='blog_post_biz';
989
926
  static CART_ITEM="cart_item_biz";
990
927
  static CATEGORY='category_biz';
991
- static CUSTOMER='customer_biz';
992
928
  static CUSTOM_FIELD='custom_field_biz';
993
929
  static CONTENT='content_biz';
994
930
  static EVENT='event_biz';
@@ -1015,7 +951,6 @@ class DataType {
1015
951
  static SERVICE='service_biz';
1016
952
  static STAT='stat_biz';
1017
953
  static TEMPLATE='template_biz';
1018
- static TEAM='team_biz';
1019
954
  static USER='user_biz';
1020
955
  static VIDEO='video_biz';
1021
956
 
@@ -1529,16 +1464,6 @@ class Page_Url {
1529
1464
  return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1530
1465
  };
1531
1466
  }
1532
- class Team_Url {
1533
- static get = (biz9_config,key,params) => {
1534
- let action_url="team/"+key;
1535
- return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1536
- };
1537
- static member = (biz9_config,title_url,params) => {
1538
- let action_url="team/member/"+title_url;
1539
- return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
1540
- };
1541
- }
1542
1467
  class Url{
1543
1468
  static copy = (biz9_config,data_type,id,params) => {
1544
1469
  let action_url = "main/crud/copy/"+data_type + "/" + id;
@@ -1626,11 +1551,10 @@ class Category_Logic {
1626
1551
  {data_type:DataType.CUSTOMER,value:DataType.CUSTOMER,label:"Customer"},
1627
1552
  {data_type:DataType.CONTENT,value:DataType.CONTENT,label:"Content"},
1628
1553
  {data_type:DataType.EVENT,value:DataType.EVENT,label:"Events"},
1629
- {data_type:DataType.GALLERY,value:DataType.GALLERY,label:"Galleries"},
1554
+ {data_type:DataType.GALLERY,value:DataType.GALLERY,label:"Gallery"},
1630
1555
  {data_type:DataType.SERVICE,value:DataType.SERVICE,label:"Services"},
1631
1556
  {data_type:DataType.PRODUCT,value:DataType.PRODUCT,label:"Product"},
1632
1557
  {data_type:DataType.TEMPLATE,value:DataType.TEMPLATE,label:"Template"},
1633
- {data_type:DataType.TEAM,value:DataType.TEAM,label:"Team"}
1634
1558
  ];
1635
1559
  };
1636
1560
  static get_title_by_type = (data_type) => {
@@ -1653,6 +1577,9 @@ class Category_Logic {
1653
1577
  case DataType.GALLERY:
1654
1578
  return "Gallery";
1655
1579
  break;
1580
+ case DataType.USER:
1581
+ return "User";
1582
+ break;
1656
1583
  case DataType.PAGE:
1657
1584
  return "Page";
1658
1585
  break;
@@ -1668,9 +1595,6 @@ class Category_Logic {
1668
1595
  case DataType.TEMPLATE:
1669
1596
  return "Template";
1670
1597
  break;
1671
- case DataType.TEAM:
1672
- return "Team";
1673
- break;
1674
1598
  default:
1675
1599
  return "Blank";
1676
1600
  }
@@ -1917,6 +1841,14 @@ class Storage {
1917
1841
  }
1918
1842
  }
1919
1843
  class User_Logic {
1844
+ static get_user_role_list = () => {
1845
+ return [
1846
+ {value:'admin',label:"Admin"},
1847
+ {value:'manager',label:"Manager"},
1848
+ {value:'user',label:"User"},
1849
+ {value:'guest',label:"Guest"},
1850
+ ];
1851
+ };
1920
1852
  static get_country_state_city(item){
1921
1853
  let country_state_city = "";
1922
1854
  if(item.country == "United States"){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.182",
3
+ "version": "4.8.184",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"