biz9-logic 4.8.183 → 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.
- package/biz9_config +1 -1
- package/index.js +10 -76
- package/package.json +1 -1
package/biz9_config
CHANGED
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';
|
|
@@ -827,19 +786,6 @@ class PageType {
|
|
|
827
786
|
return String(Str.get_title(data_type.replaceAll('_',' '))).trim();
|
|
828
787
|
}
|
|
829
788
|
}
|
|
830
|
-
static get_item_list = () =>{
|
|
831
|
-
return [
|
|
832
|
-
{title:DataType.get_title(PageType.ABOUT),type:DataType.ABOUT},
|
|
833
|
-
{title:DataType.get_title(PageType.BLOG_POST),type:DataType.BLOG_POST},
|
|
834
|
-
{title:DataType.get_title(PageType.CONTACT),type:DataType.CONTACT},
|
|
835
|
-
{title:DataType.get_title(PageType.EVENT),type:DataType.EVENT},
|
|
836
|
-
{title:DataType.get_title(PageType.GALLERY),type:DataType.GALLERY},
|
|
837
|
-
{title:DataType.get_title(PageType.HOME),type:DataType.HOME},
|
|
838
|
-
{title:DataType.get_title(PageType.TEAM),type:DataType.TEAM},
|
|
839
|
-
{title:DataType.get_title(PageType.PRODUCT),type:DataType.PRODUCT},
|
|
840
|
-
{title:DataType.get_title(PageType.SERVICE),type:DataType.SERVICE}
|
|
841
|
-
]
|
|
842
|
-
};
|
|
843
789
|
static HOME='home';
|
|
844
790
|
static ABOUT='about';
|
|
845
791
|
static CONTACT='contact';
|
|
@@ -966,9 +912,9 @@ class DataType {
|
|
|
966
912
|
static get_item_list = () =>{
|
|
967
913
|
return [
|
|
968
914
|
{ title:DataType.get_title(DataType.BLOG_POST),type:DataType.BLOG_POST},
|
|
969
|
-
{ title:DataType.get_title(DataType.GALLERY),type:DataType.GALLERY},
|
|
970
915
|
{ title:DataType.get_title(DataType.EVENT),type:DataType.EVENT},
|
|
971
|
-
{ title:DataType.get_title(DataType.
|
|
916
|
+
{ title:DataType.get_title(DataType.GALLERY),type:DataType.GALLERY},
|
|
917
|
+
{ title:DataType.get_title(DataType.USER),type:DataType.USER},
|
|
972
918
|
{ title:DataType.get_title(DataType.PRODUCT),type:DataType.PRODUCT},
|
|
973
919
|
{ title:DataType.get_title(DataType.SERVICE),type:DataType.SERVICE}
|
|
974
920
|
]
|
|
@@ -1005,7 +951,6 @@ class DataType {
|
|
|
1005
951
|
static SERVICE='service_biz';
|
|
1006
952
|
static STAT='stat_biz';
|
|
1007
953
|
static TEMPLATE='template_biz';
|
|
1008
|
-
static TEAM='team_biz';
|
|
1009
954
|
static USER='user_biz';
|
|
1010
955
|
static VIDEO='video_biz';
|
|
1011
956
|
|
|
@@ -1519,16 +1464,6 @@ class Page_Url {
|
|
|
1519
1464
|
return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
|
|
1520
1465
|
};
|
|
1521
1466
|
}
|
|
1522
|
-
class Team_Url {
|
|
1523
|
-
static get = (biz9_config,key,params) => {
|
|
1524
|
-
let action_url="team/"+key;
|
|
1525
|
-
return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
|
|
1526
|
-
};
|
|
1527
|
-
static member = (biz9_config,title_url,params) => {
|
|
1528
|
-
let action_url="team/member/"+title_url;
|
|
1529
|
-
return get_cloud_url_main(biz9_config.APP_ID,biz9_config.URL,action_url,params);
|
|
1530
|
-
};
|
|
1531
|
-
}
|
|
1532
1467
|
class Url{
|
|
1533
1468
|
static copy = (biz9_config,data_type,id,params) => {
|
|
1534
1469
|
let action_url = "main/crud/copy/"+data_type + "/" + id;
|
|
@@ -1620,7 +1555,6 @@ class Category_Logic {
|
|
|
1620
1555
|
{data_type:DataType.SERVICE,value:DataType.SERVICE,label:"Services"},
|
|
1621
1556
|
{data_type:DataType.PRODUCT,value:DataType.PRODUCT,label:"Product"},
|
|
1622
1557
|
{data_type:DataType.TEMPLATE,value:DataType.TEMPLATE,label:"Template"},
|
|
1623
|
-
{data_type:DataType.TEAM,value:DataType.TEAM,label:"Team"}
|
|
1624
1558
|
];
|
|
1625
1559
|
};
|
|
1626
1560
|
static get_title_by_type = (data_type) => {
|
|
@@ -1643,6 +1577,9 @@ class Category_Logic {
|
|
|
1643
1577
|
case DataType.GALLERY:
|
|
1644
1578
|
return "Gallery";
|
|
1645
1579
|
break;
|
|
1580
|
+
case DataType.USER:
|
|
1581
|
+
return "User";
|
|
1582
|
+
break;
|
|
1646
1583
|
case DataType.PAGE:
|
|
1647
1584
|
return "Page";
|
|
1648
1585
|
break;
|
|
@@ -1658,9 +1595,6 @@ class Category_Logic {
|
|
|
1658
1595
|
case DataType.TEMPLATE:
|
|
1659
1596
|
return "Template";
|
|
1660
1597
|
break;
|
|
1661
|
-
case DataType.TEAM:
|
|
1662
|
-
return "Team";
|
|
1663
|
-
break;
|
|
1664
1598
|
default:
|
|
1665
1599
|
return "Blank";
|
|
1666
1600
|
}
|