biz9-logic 10.0.76 → 10.0.83
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 +127 -65
- package/notez +17 -0
- package/package.json +1 -1
- package/test.js +29 -3
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -67,6 +67,7 @@ class Type {
|
|
|
67
67
|
static DATA_PAGE='page_biz';
|
|
68
68
|
static DATA_REVIEW='review_biz';
|
|
69
69
|
static DATA_SERVICE='service_biz';
|
|
70
|
+
static DATA_SUB_VALUE='sub_value_biz';
|
|
70
71
|
static DATA_SECURITY='security_biz';
|
|
71
72
|
static DATA_STAT='stat_biz';
|
|
72
73
|
static DATA_TEMPLATE='template_biz';
|
|
@@ -164,18 +165,13 @@ class Type {
|
|
|
164
165
|
static TITLE_CART_SUB_ITEMS='Cart Sub Items';
|
|
165
166
|
static TITLE_CART_ITEMS='Cart Items';
|
|
166
167
|
static TITLE_CART_SUB_ITEMS='Cart Sub Items';
|
|
167
|
-
static
|
|
168
|
+
static TITLE_IMAGES='Images';
|
|
168
169
|
static TITLE_GROUP='Group';
|
|
169
170
|
static TITLE_N_A='N/A';
|
|
170
|
-
static TITLE_IMAGES='Images';
|
|
171
|
-
static TITLE_ITEMS='Items';
|
|
172
|
-
static TITLE_ONE='One';
|
|
173
171
|
static TITLE_ORDER_ITEMS='Order Items';
|
|
174
172
|
static TITLE_ORDER_SUB_ITEMS='order Sub Items';
|
|
175
173
|
static TITLE_PARENT_ITEM='Parent Item';
|
|
176
174
|
static TITLE_USER='User';
|
|
177
|
-
static TITLE_SORT_BY_ASC='asc';
|
|
178
|
-
static TITLE_SORT_BY_DESC='desc';
|
|
179
175
|
static TITLE_STAT_ITEMS='Stat Items';
|
|
180
176
|
static TITLE_STAT_SUB_ITEMS='Stat Sub Items';
|
|
181
177
|
static TITLE_ORDER_STATUS_NEW="New";
|
|
@@ -238,6 +234,17 @@ class Type {
|
|
|
238
234
|
static PAGE_SERVICE='service';
|
|
239
235
|
static PAGE_SERVICE_HOME='service_home';
|
|
240
236
|
static PAGE_SERVICE_SEARCH='service_search';
|
|
237
|
+
//search
|
|
238
|
+
static SEARCH_ITEMS='items';
|
|
239
|
+
static SEARCH_ONE='one';
|
|
240
|
+
static SEARCH_COUNT='count';
|
|
241
|
+
static SEARCH_SORT_BY_ASC='asc';
|
|
242
|
+
static SEARCH_SORT_BY_DESC='desc';
|
|
243
|
+
//sub_value
|
|
244
|
+
static SUB_VALUE_TYPE_TEXT = 'text';
|
|
245
|
+
static SUB_VALUE_TYPE_NOTE = 'note';
|
|
246
|
+
static SUB_VALUE_TYPE_IMAGE = 'image';
|
|
247
|
+
static SUB_VALUE_TYPE_ITEMS = 'items';
|
|
241
248
|
//stat
|
|
242
249
|
static STAT_CART='cart_post';
|
|
243
250
|
static STAT_CART_ITEM='cart_item_post';
|
|
@@ -602,15 +609,15 @@ class Content_Logic {
|
|
|
602
609
|
};
|
|
603
610
|
|
|
604
611
|
class Blank_Logic {
|
|
605
|
-
static get_test = () =>{
|
|
612
|
+
static get_test = (option) =>{
|
|
606
613
|
let data = Data_Logic.get(Type.DATA_BLANK,0);
|
|
607
614
|
data.field_1="Field 1 "+ Num.get_id();
|
|
608
615
|
data.field_2="Field 2 "+ Num.get_id();
|
|
609
|
-
|
|
616
|
+
return data;
|
|
610
617
|
};
|
|
611
618
|
};
|
|
612
619
|
class Blog_Post_Logic {
|
|
613
|
-
static get_test = () =>{
|
|
620
|
+
static get_test = (option) =>{
|
|
614
621
|
let data = Data_Logic.get(Type.DATA_BLOG_POST,0);
|
|
615
622
|
data.author="Full Name "+ Num.get_id();
|
|
616
623
|
data.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id(), " Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
@@ -623,11 +630,13 @@ class Blog_Post_Logic {
|
|
|
623
630
|
};
|
|
624
631
|
}
|
|
625
632
|
class Gallery_Logic {
|
|
626
|
-
static get_test = () =>{
|
|
633
|
+
static get_test = (option) =>{
|
|
634
|
+
|
|
627
635
|
let data = Data_Logic.get(Type.DATA_GALLERY,0);
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
636
|
+
|
|
637
|
+
data.date = String(String(Num.get_id(2030)) + "-" + String(Num.get_id(13)) + "-" + String(Num.get_id(30))).trim();
|
|
638
|
+
data.time = String(Num.get_id(24)) + ":" + String(Num.get_id(59));
|
|
639
|
+
data.website = "Website "+String(Num.get_id());
|
|
631
640
|
return data;
|
|
632
641
|
};
|
|
633
642
|
};
|
|
@@ -676,14 +685,14 @@ class Event_Logic {
|
|
|
676
685
|
}
|
|
677
686
|
class Field_Logic {
|
|
678
687
|
static get_base_option = (data,option) => {
|
|
679
|
-
|
|
680
|
-
data[Type.FIELD_TITLE] = option.title;
|
|
681
|
-
data[Type.FIELD_TITLE_URL] = Str.get_title_url(option.title);
|
|
682
|
-
}
|
|
683
|
-
if(option.generate_title || option.test){
|
|
688
|
+
if(option.test && !option.title){
|
|
684
689
|
data[Type.FIELD_TITLE] = Data_Logic.get_data_type_by_type(data.data_type) + " " +Num.get_id(999);
|
|
685
690
|
data[Type.FIELD_TITLE_URL] = Str.get_title_url(data[Type.FIELD_TITLE]);
|
|
686
691
|
}
|
|
692
|
+
if(option.title){
|
|
693
|
+
data[Type.FIELD_TITLE] = option.title;
|
|
694
|
+
data[Type.FIELD_TITLE_URL] = Str.get_title_url(option.title);
|
|
695
|
+
}
|
|
687
696
|
if(option.parent){
|
|
688
697
|
data[Type.FIELD_PARENT_DATA_TYPE] = option.parent[Type.FIELD_DATA_TYPE] ? option.parent[Type.FIELD_DATA_TYPE] : Type.DATA_BLANK;
|
|
689
698
|
data[Type.FIELD_PARENT_ID] = option.parent[Type.FIELD_ID] ? option.parent[Type.FIELD_ID] : 0;
|
|
@@ -693,7 +702,7 @@ class Field_Logic {
|
|
|
693
702
|
}
|
|
694
703
|
return data;
|
|
695
704
|
};
|
|
696
|
-
static
|
|
705
|
+
static get_item_max_group_id_old = (value_id,item) => {
|
|
697
706
|
let max_group_id = 0;
|
|
698
707
|
let full_prop_str = "";
|
|
699
708
|
for(const prop in item){
|
|
@@ -709,7 +718,7 @@ class Field_Logic {
|
|
|
709
718
|
}
|
|
710
719
|
return max_group_id;
|
|
711
720
|
}
|
|
712
|
-
static
|
|
721
|
+
static get_item_field_values_old = (data) => {
|
|
713
722
|
let max_value_id = 1;
|
|
714
723
|
let max_group_id = 1;
|
|
715
724
|
let full_prop_str = "";
|
|
@@ -753,7 +762,7 @@ class Field_Logic {
|
|
|
753
762
|
}
|
|
754
763
|
return data;
|
|
755
764
|
}
|
|
756
|
-
static
|
|
765
|
+
static get_item_field_value_types_old = () => {
|
|
757
766
|
return [
|
|
758
767
|
{value:'text',label:'Text'},
|
|
759
768
|
{value:'note',label:'Note'},
|
|
@@ -761,14 +770,14 @@ class Field_Logic {
|
|
|
761
770
|
{value:'items',label:'List'},
|
|
762
771
|
];
|
|
763
772
|
};
|
|
764
|
-
static
|
|
773
|
+
static get_field_value_value_old = (value_type,item,value_id) =>{
|
|
765
774
|
if(value_type!=Type.FIELD_VALUE_ITEMS){
|
|
766
775
|
return !Str.check_is_null(item[Field_Logic.get_field_value_title(value_type,value_id)]) ? item[Field_Logic.get_field_value_title(value_type,value_id)] : ""
|
|
767
776
|
}else{
|
|
768
777
|
return item[Field_Logic.get_field_value_items_title(value_id)] ? item[Field_Logic.get_field_value_items_title(value_id)] : [];
|
|
769
778
|
}
|
|
770
779
|
};
|
|
771
|
-
static
|
|
780
|
+
static get_field_value_title_old = (value_type,value_id,group_id,sub_field_title) =>{
|
|
772
781
|
switch(value_type){
|
|
773
782
|
case Type.FIELD_VALUE_TEXT:
|
|
774
783
|
return 'text'+'_value_'+value_id;
|
|
@@ -799,15 +808,6 @@ class Field_Logic {
|
|
|
799
808
|
static get_test = (title,option) =>{
|
|
800
809
|
option = !Obj.check_is_empty(option) ? option : {};
|
|
801
810
|
let item = {};
|
|
802
|
-
if(option.blank == true){
|
|
803
|
-
option.category_title = "";
|
|
804
|
-
item = {
|
|
805
|
-
title:title,
|
|
806
|
-
title_url:title,
|
|
807
|
-
title_url:Str.get_title_url(title),
|
|
808
|
-
setting_visible:"1",
|
|
809
|
-
}
|
|
810
|
-
}else{
|
|
811
811
|
item = {
|
|
812
812
|
title:title,
|
|
813
813
|
setting_visible:"1",
|
|
@@ -818,13 +818,10 @@ class Field_Logic {
|
|
|
818
818
|
date_create:new moment().toISOString(),
|
|
819
819
|
date_save:new moment().toISOString()
|
|
820
820
|
}
|
|
821
|
-
}
|
|
822
821
|
if(!Str.check_is_null(option.category_title)){
|
|
823
822
|
item.category = 'Category ' + Num.get_id();
|
|
824
823
|
}
|
|
825
|
-
|
|
826
|
-
item.id=Num.get_guid();
|
|
827
|
-
}
|
|
824
|
+
/*-old
|
|
828
825
|
if(option.get_value){
|
|
829
826
|
item = Field_Logic.get_values(item,option);
|
|
830
827
|
}
|
|
@@ -842,6 +839,7 @@ class Field_Logic {
|
|
|
842
839
|
}
|
|
843
840
|
}
|
|
844
841
|
}
|
|
842
|
+
*/
|
|
845
843
|
return item;
|
|
846
844
|
}
|
|
847
845
|
static get_field_value_items_title(value_id){
|
|
@@ -861,6 +859,7 @@ class Field_Logic {
|
|
|
861
859
|
}
|
|
862
860
|
return items;
|
|
863
861
|
}
|
|
862
|
+
/*--old
|
|
864
863
|
static get_values(item,option){
|
|
865
864
|
for(let b=0;b<parseInt(option.value_count);b++){
|
|
866
865
|
if(option.blank == false){
|
|
@@ -875,6 +874,7 @@ class Field_Logic {
|
|
|
875
874
|
}
|
|
876
875
|
return item;
|
|
877
876
|
};
|
|
877
|
+
*/
|
|
878
878
|
}
|
|
879
879
|
class Favorite_Logic {
|
|
880
880
|
static get = (parent_data_type,parent_id,user_id) =>{
|
|
@@ -985,7 +985,13 @@ class Storage {
|
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
987
|
class Page_Logic {
|
|
988
|
-
static
|
|
988
|
+
static get_test = () =>{
|
|
989
|
+
let data = Data_Logic.get(Type.DATA_PAGE,0);
|
|
990
|
+
data.title="Title "+ Num.get_id();
|
|
991
|
+
data.value="Value "+ Num.get_id();
|
|
992
|
+
return data;
|
|
993
|
+
};
|
|
994
|
+
static get_pages(){
|
|
989
995
|
return [
|
|
990
996
|
{value:Type.PAGE_ABOUT,title:Type.TITLE_PAGE_ABOUT,label:Type.TITLE_PAGE_ABOUT,url:Url.PAGE_ABOUT},
|
|
991
997
|
{value:Type.PAGE_BLOG_POST,title:Type.TITLE_PAGE_BLOG_POST,label:Type.TITLE_PAGE_BLOG_POST,url:Url.PAGE_BLOG_POST},
|
|
@@ -2147,48 +2153,70 @@ class Data_Logic {
|
|
|
2147
2153
|
static get_new = (data_type,id,option) => {
|
|
2148
2154
|
return Data_Logic.get(data_type,id,option);
|
|
2149
2155
|
};
|
|
2150
|
-
|
|
2156
|
+
static get_sub_value = (parent_data_type,parent_id,title,option) => {
|
|
2157
|
+
option = option ? option : {};
|
|
2158
|
+
let value = option.value ? option.value : '';
|
|
2159
|
+
let type = option.type ? option.type : Type.SUB_VALUE_TYPE_TEXT; // SUB_VALUE_TYPE_TEXT,NOTE,IMAGE,ITEMS
|
|
2160
|
+
return Data_Logic.get(Type.DATA_SUB_VALUE,0,{title:title,data:{parent_data_type:parent_data_type,parent_id:parent_id,value:value,type:type}});
|
|
2161
|
+
};
|
|
2162
|
+
// --> option = / test / blank / title / sub_value_count / count / data
|
|
2151
2163
|
static get = (data_type,id,option) => {
|
|
2152
2164
|
option = option ? option : {};
|
|
2165
|
+
function get_blank_field(data){
|
|
2166
|
+
for(const field in data){
|
|
2167
|
+
if(
|
|
2168
|
+
field != Type.FIELD_ID &&
|
|
2169
|
+
field != Type.FIELD_DATA_TYPE &&
|
|
2170
|
+
field != Type.FIELD_TITLE &&
|
|
2171
|
+
field != Type.FIELD_TITLE_URL
|
|
2172
|
+
){
|
|
2173
|
+
data[field] = '';
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
return data;
|
|
2177
|
+
};
|
|
2153
2178
|
function get_test_data(data_type){
|
|
2154
2179
|
switch(data_type)
|
|
2155
2180
|
{
|
|
2156
2181
|
case Type.DATA_BLOG_POST:
|
|
2157
|
-
return Blog_Post_Logic.get_test();
|
|
2182
|
+
return Blog_Post_Logic.get_test(option);
|
|
2158
2183
|
break;
|
|
2159
2184
|
case Type.DATA_SERVICE:
|
|
2160
|
-
return Service_Logic.get_test();
|
|
2185
|
+
return Service_Logic.get_test(option);
|
|
2161
2186
|
break;
|
|
2162
2187
|
case Type.DATA_EVENT:
|
|
2163
|
-
return Event_Logic.get_test();
|
|
2164
|
-
|
|
2188
|
+
return Event_Logic.get_test(option);
|
|
2189
|
+
break;
|
|
2190
|
+
case Type.DATA_PAGE:
|
|
2191
|
+
return Page_Logic.get_test(option);
|
|
2192
|
+
break;
|
|
2165
2193
|
case Type.DATA_PRODUCT:
|
|
2166
|
-
return Product_Logic.get_test();
|
|
2194
|
+
return Product_Logic.get_test(option);
|
|
2167
2195
|
break;
|
|
2168
2196
|
case Type.DATA_REVIEW:
|
|
2169
|
-
return Review_Logic.get_test();
|
|
2197
|
+
return Review_Logic.get_test(option);
|
|
2170
2198
|
break;
|
|
2171
2199
|
case Type.DATA_CONTENT:
|
|
2172
2200
|
case Type.DATA_CATEGORY:
|
|
2173
2201
|
case Type.DATA_BLANK:
|
|
2174
|
-
return Blank_Logic.get_test();
|
|
2202
|
+
return Blank_Logic.get_test(option);
|
|
2175
2203
|
break;
|
|
2176
2204
|
case Type.DATA_USER:
|
|
2177
|
-
return User_Logic.get_test();
|
|
2205
|
+
return User_Logic.get_test(option);
|
|
2178
2206
|
break;
|
|
2179
2207
|
default:
|
|
2180
|
-
return Blank_Logic.get_test();
|
|
2208
|
+
return Blank_Logic.get_test(option);
|
|
2181
2209
|
break;
|
|
2182
2210
|
}
|
|
2183
2211
|
}
|
|
2184
2212
|
let data = null;
|
|
2185
|
-
if(option.count>
|
|
2213
|
+
if(option.count>0){
|
|
2186
2214
|
data = [];
|
|
2187
2215
|
}else{
|
|
2188
2216
|
data = {data_type:data_type,id:id};
|
|
2189
2217
|
}
|
|
2190
2218
|
option = option ? option : {count:0};
|
|
2191
|
-
|
|
2219
|
+
data = Field_Logic.get_base_option(data,option);
|
|
2192
2220
|
if(option.test){
|
|
2193
2221
|
data = Obj.merge(get_test_data(data_type),data);
|
|
2194
2222
|
}
|
|
@@ -2197,26 +2225,58 @@ class Data_Logic {
|
|
|
2197
2225
|
data[Type.FIELD_TITLE_URL] = Str.get_title_url(option.title);
|
|
2198
2226
|
}
|
|
2199
2227
|
if(option.blank){
|
|
2200
|
-
|
|
2201
|
-
if(field != Type.FIELD_ID && field != Type.FIELD_DATA_TYPE){
|
|
2202
|
-
data[field] = '';
|
|
2203
|
-
}
|
|
2204
|
-
}
|
|
2228
|
+
data = get_blank_field(data);
|
|
2205
2229
|
}
|
|
2206
|
-
if(option.count>
|
|
2230
|
+
if(option.count>0){
|
|
2207
2231
|
let items = [];
|
|
2208
|
-
for(let a =
|
|
2232
|
+
for(let a = 1;a<option.count+1;a++){
|
|
2233
|
+
let test_data = Field_Logic.get_base_option(data,option);
|
|
2209
2234
|
let my_title = Data_Logic.get_data_type_by_type(data_type) + " " +Num.get_id(999);
|
|
2210
|
-
|
|
2235
|
+
if(option.test){
|
|
2236
|
+
test_data = Obj.merge(data,get_test_data(data_type));
|
|
2237
|
+
}
|
|
2211
2238
|
test_data[Type.FIELD_TITLE] = my_title;
|
|
2212
2239
|
test_data[Type.FIELD_TITLE_URL] = Str.get_title_url(my_title);
|
|
2213
2240
|
if(option.data){
|
|
2214
2241
|
test_data = Obj.merge(test_data,option.data);
|
|
2242
|
+
}
|
|
2243
|
+
if(option.title){
|
|
2244
|
+
data[Type.FIELD_TITLE] = option.title;
|
|
2245
|
+
data[Type.FIELD_TITLE_URL] = Str.get_title_url(option.title);
|
|
2246
|
+
}
|
|
2247
|
+
if(option.blank){
|
|
2248
|
+
test_data = get_blank_field(test_data);
|
|
2215
2249
|
}
|
|
2216
2250
|
items.push(test_data);
|
|
2217
2251
|
}
|
|
2218
2252
|
data = items;
|
|
2219
2253
|
}
|
|
2254
|
+
if(option.sub_value_count>0){
|
|
2255
|
+
if(Obj.check_is_array(data)){
|
|
2256
|
+
for(let a = 0;a<data.length;a++){
|
|
2257
|
+
data[a].sub_values = [];
|
|
2258
|
+
for(let b = 1;b<option.sub_value_count+1;b++){
|
|
2259
|
+
let sub_title = 'title '+(parseInt(a)+1);
|
|
2260
|
+
let sub_value = '';
|
|
2261
|
+
if(!option.blank){
|
|
2262
|
+
sub_value = 'value '+Num.get_id();
|
|
2263
|
+
}
|
|
2264
|
+
data[a].sub_values.push(Data_Logic.get_sub_value(data[a].data_type,data[a].id,sub_title,{value:sub_value}));
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
}else{
|
|
2268
|
+
data.sub_values = [];
|
|
2269
|
+
for(let b = 1;b<option.sub_value_count+1;b++){
|
|
2270
|
+
let title = '';
|
|
2271
|
+
let value = '';
|
|
2272
|
+
if(!option.blank){
|
|
2273
|
+
title = 'title '+Num.get_id();
|
|
2274
|
+
value = 'value '+Num.get_id();
|
|
2275
|
+
}
|
|
2276
|
+
data.sub_values.push(Data_Logic.get_sub_value(data.data_type,data.id,title,{value:value}));
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2220
2280
|
return data;
|
|
2221
2281
|
};
|
|
2222
2282
|
static get_data_type_by_type = (data_type,option) =>{
|
|
@@ -2288,9 +2348,9 @@ class Data_Logic {
|
|
|
2288
2348
|
}
|
|
2289
2349
|
static get_search_group = (option) => {
|
|
2290
2350
|
option = option ? option : {};
|
|
2291
|
-
let type = option.type ? option.type : Type.
|
|
2351
|
+
let type = option.type ? option.type : Type.SEARCH_ITEMS;
|
|
2292
2352
|
let field = option.field ? option.field : {};
|
|
2293
|
-
let title = option.title ? option.title : {};
|
|
2353
|
+
let title = option.title ? Str.get_title_url(option.title) : {};
|
|
2294
2354
|
let image_show = option.image_show ? option.image_show : {};
|
|
2295
2355
|
let image = option.image ? option.image : {show:false};
|
|
2296
2356
|
let page_current = option.page_current ? option.page_current : 1;
|
|
@@ -2299,25 +2359,27 @@ class Data_Logic {
|
|
|
2299
2359
|
}
|
|
2300
2360
|
static get_search_foreign = (type,foreign_data_type,foreign_field,parent_field,option) => {
|
|
2301
2361
|
option = option ? option : {};
|
|
2302
|
-
type = type ? type : Type.
|
|
2362
|
+
type = type ? type : Type.SEARCH_ITEMS;
|
|
2303
2363
|
foreign_data_type = foreign_data_type ? foreign_data_type : Str.get_title_url(Data_Logic.get_data_type_by_type(foreign_data_type,{plural:true}));
|
|
2304
2364
|
foreign_field = foreign_field ? foreign_field : Type.FIELD_PARENT_ID;
|
|
2305
2365
|
parent_field = parent_field ? parent_field : parent_field;
|
|
2306
2366
|
let field = option.field ? option.field : null;
|
|
2307
|
-
let title = option.title ? option.title : Str.get_title_url(Data_Logic.get_data_type_by_type(foreign_data_type,{plural:true}));
|
|
2367
|
+
let title = option.title ? Str.get_title_url(option.title) : Str.get_title_url(Data_Logic.get_data_type_by_type(foreign_data_type,{plural:true}));
|
|
2308
2368
|
let page_current = option.page_current ? option.page_current : 1;
|
|
2309
2369
|
let page_size = option.page_size ? option.page_size : 0;
|
|
2310
2370
|
return {type:type,foreign_data_type:foreign_data_type,foreign_field:foreign_field,parent_field:parent_field,type:type,field:field,title:title,page_current:page_current,page_size:page_size};
|
|
2311
2371
|
}
|
|
2312
2372
|
static get_search_join = (type,search,option) => {
|
|
2313
2373
|
option = option ? option : {};
|
|
2314
|
-
type = type ? type : Type.
|
|
2374
|
+
type = type ? type : Type.SEARCH_ITEMS;
|
|
2315
2375
|
search = search ? search : Data_Logic.get_search(Type.DATA_BLANK,{},{},1,0);
|
|
2316
2376
|
let field = option.field ? option.field : {};
|
|
2317
|
-
let
|
|
2318
|
-
let
|
|
2377
|
+
let distinct = option.distinct ? option.distinct : null; //distinct:{field:'title',sort_by:Type.SEARCH_SORT_BY_DESC}
|
|
2378
|
+
let title = option.title ? Str.get_title_url(option.title) : Str.get_title_url(Data_Logic.get_data_type_by_type(search.data_type,{plural:true}));
|
|
2379
|
+
let foreigns = option.foreigns ? option.foreigns : [];
|
|
2380
|
+
let page_current = option.page_current ? option.page_current : 1;
|
|
2319
2381
|
let page_size = option.page_size ? option.page_size : 0;
|
|
2320
|
-
return {type:type,search:search,field:field,title:title,page_current:page_current,page_size:page_size};
|
|
2382
|
+
return {type:type,search:search,field:field,title:title,distinct:distinct,foreigns:foreigns,page_current:page_current,page_size:page_size};
|
|
2321
2383
|
}
|
|
2322
2384
|
static copy = (data_type,item)=>{
|
|
2323
2385
|
let copy_item = Data_Logic.get_new(data_type,0);
|
package/notez
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-------------------------------- BiZ9 START - 1-9-2026 -----------------------------------------------------------
|
|
2
|
+
-- Blank
|
|
3
|
+
----------------------------------------------
|
|
4
|
+
--- blank
|
|
5
|
+
---- blank_
|
|
6
|
+
----------------------------------------------
|
|
7
|
+
-------------------------------- BiZ9 START - 1-24-2026 -----------------------------------------------------------
|
|
8
|
+
-- TO DO
|
|
9
|
+
----------------------------------------------
|
|
10
|
+
--- Page Edit
|
|
11
|
+
---- edit_linkz - done
|
|
12
|
+
---- edit_linkz_text - open
|
|
13
|
+
---- edit_linkz_image - open
|
|
14
|
+
---- edit_linkz_list - open
|
|
15
|
+
---- edit_linkz - open
|
|
16
|
+
----------------------------------------------
|
|
17
|
+
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -30,9 +30,28 @@ describe("connect", () => {
|
|
|
30
30
|
it("_connect", () => {
|
|
31
31
|
series([
|
|
32
32
|
function(call) {
|
|
33
|
+
console.log('CONNECT-BASE-START');
|
|
34
|
+
// -- PAGE START -- //
|
|
35
|
+
// -->
|
|
36
|
+
// - SubValue
|
|
37
|
+
// -- parent_data_type
|
|
38
|
+
// -- parent_id
|
|
39
|
+
// -- title
|
|
40
|
+
// -- value
|
|
41
|
+
// -- title_url
|
|
42
|
+
//let page = Data_Logic.get(Type.DATA_PAGE,3,{blank:false,test:false,sub_value_count:1});
|
|
43
|
+
let page = Data_Logic.get(Type.DATA_PRODUCT,0,{blank:false,test:true,count:3,sub_value_count:1,title:'cool'});
|
|
44
|
+
//let page = Data_Logic.get(Type.DATA_PRODUCT,3,{blank:true,test:true,count:2});
|
|
45
|
+
//let sub_value = Data_Logic.get_sub_value(page.data_type,page.id,'new_title','my_value');
|
|
46
|
+
//Log.w('33_page',page);
|
|
47
|
+
//Log.w('33_page',page[0]);
|
|
48
|
+
//Log.w('44_page',page[0].sub_values);
|
|
49
|
+
// -- PAGE END -- //
|
|
50
|
+
// --
|
|
33
51
|
console.log('CONNECT-BASE-START');
|
|
34
52
|
// -->
|
|
35
53
|
// -- CART START -- //
|
|
54
|
+
/*
|
|
36
55
|
let user = Data_Logic.get(Type.USER,Num.get_id(),{test:true});
|
|
37
56
|
let cart_product_1 = Data_Logic.get(Type.DATA_PRODUCT,Num.get_id(),{test:true});
|
|
38
57
|
let cart_sub_item_product_1 = Data_Logic.get(Type.DATA_PRODUCT,Num.get_id(),{test:true});
|
|
@@ -51,18 +70,25 @@ describe("connect", () => {
|
|
|
51
70
|
cart.cart_items.push(cart_item_1);
|
|
52
71
|
cart = Cart_Logic.get_total(cart);
|
|
53
72
|
// -- bind end //
|
|
73
|
+
*/
|
|
54
74
|
// -- CART END -- //
|
|
55
75
|
// -- ORDER START -- //
|
|
56
76
|
// -- order start //
|
|
57
|
-
let order = Order_Logic.get(cart,{order_code:'OR'});
|
|
58
|
-
Log.w('order',order);
|
|
59
|
-
Log.w('order_items',order.order_items[0]);
|
|
77
|
+
//let order = Order_Logic.get(cart,{order_code:'OR'});
|
|
78
|
+
//Log.w('order',order);
|
|
79
|
+
//Log.w('order_items',order.order_items[0]);
|
|
60
80
|
// -- order end //
|
|
61
81
|
// -- order item start //
|
|
62
82
|
// -- order item end //
|
|
63
83
|
|
|
64
84
|
// -- ORDER END -- //
|
|
65
85
|
|
|
86
|
+
// -- LIST START -- //
|
|
87
|
+
//let data_type = Data_Logic.get_data_type_by_type(Type.DATA_PRODUCT,{plural:true});
|
|
88
|
+
//Log.w('my_data_type',data_type);
|
|
89
|
+
|
|
90
|
+
// -- LIST END -- //
|
|
91
|
+
|
|
66
92
|
// -->
|
|
67
93
|
//let parent = Data_Logic.get_new(Type.DATA_PRODUCT,0);
|
|
68
94
|
//let parent = Data_Logic.get_new(Type.DATA_PRODUCT,0,{test:true,count:3,blank:false,data:{field_1:'apple'}});
|