biz9-logic 4.8.218 → 4.8.221
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 +35 -0
- package/package.json +1 -1
- package/test.js +4 -3
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -191,6 +191,31 @@ class Page_Logic {
|
|
|
191
191
|
}
|
|
192
192
|
return item_list;
|
|
193
193
|
}
|
|
194
|
+
static get_section_property = (type,section_id,value_id,is_title) =>{
|
|
195
|
+
//page['section_1_value_1_type'] -- / text,note,photo,list
|
|
196
|
+
//page['section_1_value_1_text_value']
|
|
197
|
+
//page['section_1_value_1_note_value']
|
|
198
|
+
//page['section_1_value_1_photo_value']
|
|
199
|
+
//page['section_1_value_1_list_value_1']
|
|
200
|
+
//page['section_1_value_1_list_value_2']
|
|
201
|
+
//page['section_1_value_1_list_value_3']
|
|
202
|
+
let type_str = '';
|
|
203
|
+
switch(type){
|
|
204
|
+
case 'text':
|
|
205
|
+
type_str = 'text';
|
|
206
|
+
break;
|
|
207
|
+
case 'note':
|
|
208
|
+
type_str = 'note';
|
|
209
|
+
break;
|
|
210
|
+
case 'photo':
|
|
211
|
+
type_str = 'photo';
|
|
212
|
+
break;
|
|
213
|
+
case 'list':
|
|
214
|
+
type_str = 'list';
|
|
215
|
+
break;
|
|
216
|
+
};
|
|
217
|
+
return !is_title ? 'section_'+section_id + '_value_'+value_id + "_" + type_str + "_value" : 'Section '+section_id + ' Value '+value_id + " " + Str.get_title(type_str);
|
|
218
|
+
}
|
|
194
219
|
}
|
|
195
220
|
class Order_Logic {
|
|
196
221
|
static get_order_number = () => {
|
|
@@ -893,6 +918,10 @@ class PageType {
|
|
|
893
918
|
|
|
894
919
|
}
|
|
895
920
|
class DataType {
|
|
921
|
+
|
|
922
|
+
static SECTION='section';
|
|
923
|
+
static SUB_SECTION='sub_section';
|
|
924
|
+
|
|
896
925
|
static ACTIVITY='activity_biz';
|
|
897
926
|
static APP='app_biz';
|
|
898
927
|
static BLANK='blank_biz';
|
|
@@ -1930,6 +1959,12 @@ class User_Logic {
|
|
|
1930
1959
|
}
|
|
1931
1960
|
return country_state_city;
|
|
1932
1961
|
}
|
|
1962
|
+
static get_full_name(first_name,last_name){
|
|
1963
|
+
let str_first_name = !Str.check_is_null(first_name) ? first_name : "";
|
|
1964
|
+
let str_last_name = !Str.check_is_null(last_name) ? last_name : "";
|
|
1965
|
+
return !Str.check_is_null(String(str_first_name + " " + str_last_name)) ? String(str_first_name + " " + str_last_name).trim() : "N/A";
|
|
1966
|
+
|
|
1967
|
+
}
|
|
1933
1968
|
static get_guest(){
|
|
1934
1969
|
return DataItem.get_new(DataType.USER,0,{is_guest:true,title_url:'guest',first_name:'Guest',last_name:'User',email:'guest@email.com',title:"Guest",country:"United States"});
|
|
1935
1970
|
}
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -31,9 +31,10 @@ describe("connect", () => {
|
|
|
31
31
|
series([
|
|
32
32
|
|
|
33
33
|
function(call) {
|
|
34
|
-
console.log('
|
|
35
|
-
console.log(
|
|
36
|
-
console.log('
|
|
34
|
+
console.log('PAGE-SECTION-START');
|
|
35
|
+
console.log(Page_Logic.get_section_property('text',1,2,false));
|
|
36
|
+
console.log('PAGE-SECTION-END');
|
|
37
|
+
|
|
37
38
|
|
|
38
39
|
//console.log('PRODUCT-URL-START');
|
|
39
40
|
//console.log(Product_Url.search('cool','google.com'));
|