biz9-logic 4.8.358 → 4.8.361

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 +15 -19
  3. package/package.json +1 -1
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='8.3.8'
1
+ VERSION='8.4.1'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -56,6 +56,8 @@ class Item_Logic {
56
56
  item.id_key = id;
57
57
  item.title = "Item Not Found";
58
58
  item.title_url = Str.get_title_url(item.title);
59
+ item.images = [];
60
+ item.items = [];
59
61
  if(option.app_id){
60
62
  item.app_id = option.app_id;
61
63
  }
@@ -316,8 +318,6 @@ class Type {
316
318
  case Type.USER_ROLE_MANAGER:
317
319
  case Type.USER_ROLE_USER:
318
320
  case Type.USER_ROLE_GUEST:
319
- case DataType.SECTION:
320
- case DataType.SUB_SECTION:
321
321
  case DataType.APP:
322
322
  case DataType.BLANK:
323
323
  case DataType.BLOG_POST:
@@ -346,6 +346,7 @@ class Type {
346
346
  case DataType.SECURITY:
347
347
  case DataType.STAT:
348
348
  case DataType.TEMPLATE:
349
+ case DataType.TYPE:
349
350
  case DataType.USER:
350
351
  case DataType.VIDEO:
351
352
  r_type = String(Str.get_title(type.replaceAll('_',' ').replaceAll('dt','').replace('biz',''))).trim();
@@ -1114,13 +1115,13 @@ class Field_Logic {
1114
1115
  }
1115
1116
  class DataType {
1116
1117
 
1117
- static SECTION='section';
1118
- static SUB_SECTION='sub_section';
1119
-
1120
- static APP='app_biz';
1118
+ static APP='app_biz';
1121
1119
  static BLANK='blank_biz';
1122
1120
  static BLOG_POST='blog_post_biz';
1123
1121
  static CART_ITEM="cart_item_biz";
1122
+ static CART="cart_biz";
1123
+ static CART_ITEM="cart_item_biz";
1124
+ static CART_SUB_ITEM="cart_sub_item_biz";
1124
1125
  static CATEGORY='category_biz';
1125
1126
  static CUSTOM_FIELD='custom_field_biz';
1126
1127
  static CONTENT='content_biz';
@@ -1128,26 +1129,20 @@ class DataType {
1128
1129
  static FAQ='faq_biz';
1129
1130
  static FAVORITE='favorite_biz';
1130
1131
  static GALLERY='gallery_biz';
1131
- static ITEM_MAP='item_map_biz';
1132
+ static IMAGE='image_biz';
1132
1133
  static ITEM='item_biz';
1133
-
1134
- static CART="cart_biz";
1135
- static CART_ITEM="cart_item_biz";
1136
- static CART_SUB_ITEM="cart_sub_item_biz";
1137
-
1138
1134
  static ORDER="order_biz";
1139
1135
  static ORDER_ITEM="order_item_biz";
1140
1136
  static ORDER_SUB_ITEM="order_sub_item_biz";
1141
1137
  static ORDER_PAYMENT="order_payment_biz";
1142
-
1143
1138
  static PRODUCT='product_biz';
1144
- static IMAGE='image_biz';
1145
1139
  static PAGE='page_biz';
1146
1140
  static REVIEW='review_biz';
1147
1141
  static SERVICE='service_biz';
1148
1142
  static SECURITY='security_biz';
1149
1143
  static STAT='stat_biz';
1150
1144
  static TEMPLATE='template_biz';
1145
+ static TYPE='type_biz';
1151
1146
  static USER='user_biz';
1152
1147
  static VIDEO='video_biz';
1153
1148
  static get_list = () =>{
@@ -1466,6 +1461,8 @@ class User_Logic {
1466
1461
  user.title = "User Not Found";
1467
1462
  user.first_name = "User Not Found";
1468
1463
  user.title_url = Str.get_title_url(user.title);
1464
+ user.images = [];
1465
+ user.items = [];
1469
1466
  if(option.app_id){
1470
1467
  user.app_id = option.app_id;
1471
1468
  }
@@ -1510,10 +1507,10 @@ class Sub_Item_Logic {
1510
1507
  let item_title =title;
1511
1508
  let item = DataItem.get_new(
1512
1509
  DataType.ITEM,0, {
1513
- top_id:top_item.id,
1514
- top_data_type:top_item.data_type,
1515
- parent_id:parent_item.id,
1516
- parent_data_type:parent_item.data_type,
1510
+ top_id:top_item.id?top_item.id:0,
1511
+ top_data_type:top_item.data_type?top_item.data_type:DataType.BLANK,
1512
+ parent_id:parent_item.id?parent_item.id:0,
1513
+ parent_data_type:parent_item.data_type?parent_item.data_type:DataType.BLANK,
1517
1514
  title:item_title,
1518
1515
  title_url:Str.get_title_url(item_title),
1519
1516
  sub_note:"Sub Note "+String(Num.get_id()),
@@ -1673,7 +1670,6 @@ class Url {
1673
1670
  static EVENT_SEARCH="event/search";
1674
1671
  //favorite
1675
1672
  static FAVORITE_POST="item/favorite_post";
1676
- static FAVORITE_SEARCH="item/favorite_search";
1677
1673
  //field
1678
1674
  static CUSTOM_FIELD="item/custom_field";
1679
1675
  static FIELD_VALUE_POST="item/field_value_post";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.358",
3
+ "version": "4.8.361",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"