biz9-logic 4.8.192 → 4.8.194
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 +15 -0
- package/package.json +1 -1
- package/test.js +7 -3
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -13,6 +13,10 @@ class Message {
|
|
|
13
13
|
static ERROR_TITLE="Please Enter A Valid Title";
|
|
14
14
|
static ERROR_EMAIL="Please Enter A Valid E-mail";
|
|
15
15
|
static DATA_NOT_FOUND="Data Not Found";
|
|
16
|
+
static FAVORITE_ADD_SUCCESS="Favorite Add Success";
|
|
17
|
+
static FAVORITE_REMOVE_SUCCESS="Favorite Remove Success";
|
|
18
|
+
static REVIEW_ADD_SUCCESS="Review Add Success";
|
|
19
|
+
static REVIEW_REMOVE_SUCCESS="Review Remove Success";
|
|
16
20
|
}
|
|
17
21
|
class TemplateType {
|
|
18
22
|
static PRIMARY='primary';
|
|
@@ -1074,6 +1078,13 @@ class Review_Logic {
|
|
|
1074
1078
|
rating:rating ? rating : ""
|
|
1075
1079
|
});
|
|
1076
1080
|
}
|
|
1081
|
+
static get_user_search_filter = (parent_data_type,user_id) =>{
|
|
1082
|
+
return {
|
|
1083
|
+
$and: [
|
|
1084
|
+
{ parent_data_type: { $regex:String(parent_data_type), $options: "i" } },
|
|
1085
|
+
{ user_id: { $regex:String(user_id), $options: "i" } }
|
|
1086
|
+
] };
|
|
1087
|
+
}
|
|
1077
1088
|
static get_search_filter = (parent_data_type,parent_id) =>{
|
|
1078
1089
|
return {
|
|
1079
1090
|
$and: [
|
|
@@ -1318,6 +1329,10 @@ class Product_Url {
|
|
|
1318
1329
|
};
|
|
1319
1330
|
}
|
|
1320
1331
|
class Review_Url {
|
|
1332
|
+
static get = (app_id,url,parent_data_type,user_id,page_current,page_size,params) => {
|
|
1333
|
+
let action_url="review/get/"+parent_data_type+"/"+user_id+"/"+page_current+"/"+page_size;
|
|
1334
|
+
return get_cloud_url_main(app_id,url,action_url,params);
|
|
1335
|
+
};
|
|
1321
1336
|
static update = (app_id,url,parent_data_type,parent_id,user_id,params) => {
|
|
1322
1337
|
let action_url="review/update/"+parent_data_type+"/"+parent_id+"/"+user_id;
|
|
1323
1338
|
return get_cloud_url_main(app_id,url,action_url,params);
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const series = require('async-series');
|
|
3
|
-
const {DataItem,DataType,Url,Obj,BiZ_Url,Cat,Stock,Schedule,Storage,Business,Product,Service,Event,Template,Page,Category,Review,Blog_Post,Faq_Logic,Category_Url,Blank_Url,Blank_Logic,Item_Logic,Service_Logic,Template_Logic,Page_Logic,Product_Logic,Event_Logic,Blog_Post_Logic,Content_Logic,Category_Logic,Team_Logic,Business_Logic,PageType,Sub_Item_Logic,Page_Url,Review_Logic,User_Logic,Field_Logic,Order_Logic,Cart_Logic,Faq_Url,App_Logic,FieldType} = require('./index');
|
|
3
|
+
const {DataItem,DataType,Url,Obj,BiZ_Url,Cat,Stock,Schedule,Storage,Business,Product,Service,Event,Template,Page,Category,Review,Blog_Post,Faq_Logic,Category_Url,Blank_Url,Blank_Logic,Item_Logic,Service_Logic,Template_Logic,Page_Logic,Product_Logic,Event_Logic,Blog_Post_Logic,Content_Logic,Category_Logic,Team_Logic,Business_Logic,PageType,Sub_Item_Logic,Page_Url,Review_Logic,User_Logic,Field_Logic,Order_Logic,Cart_Logic,Faq_Url,App_Logic,FieldType,Product_Url} = require('./index');
|
|
4
4
|
const {Log,Num} = require('biz9-utility');
|
|
5
5
|
const {Scriptz}= require('biz9-scriptz');
|
|
6
6
|
|
|
@@ -31,7 +31,9 @@ describe("connect", () => {
|
|
|
31
31
|
series([
|
|
32
32
|
|
|
33
33
|
function(call) {
|
|
34
|
-
|
|
34
|
+
console.log('PRODUCT-URL-START');
|
|
35
|
+
console.log(Product_Url.search('cool','google.com'));
|
|
36
|
+
console.log('PRODUCT-URL-END');
|
|
35
37
|
//let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
|
|
36
38
|
//let action_url = 'test_get_url';
|
|
37
39
|
//let params = '&myparam1=p1&myparam2=p2'
|
|
@@ -43,17 +45,19 @@ describe("connect", () => {
|
|
|
43
45
|
//let cloud_url = Category_Url.get_page(biz9_config,'cool');
|
|
44
46
|
//Log.w('cloud_url',cloud_url);
|
|
45
47
|
//console.log('GET-URL-SUCCESS');
|
|
46
|
-
call();
|
|
48
|
+
//call();
|
|
47
49
|
},
|
|
48
50
|
|
|
49
51
|
function(call) {
|
|
50
52
|
|
|
51
53
|
/* --APP--START */
|
|
54
|
+
/*
|
|
52
55
|
let title = "Food Truck " + Num.get_id();
|
|
53
56
|
let user_id = Num.get_id();
|
|
54
57
|
let type = FieldType.APP_TYPE_MOBILE;
|
|
55
58
|
let app = App_Logic.get_new(title,user_id,type);
|
|
56
59
|
Log.w('app',app);
|
|
60
|
+
*/
|
|
57
61
|
/* --APP--ENDI */
|
|
58
62
|
|
|
59
63
|
//console.log('STORAGE-START');
|