biz9-logic 3.0.8 → 3.0.10
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 +14 -5
- package/package.json +2 -2
- package/test.js +5 -0
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -5,8 +5,16 @@ License GNU General Public License v3.0
|
|
|
5
5
|
Description: BiZ9 Framework: Logic-JS
|
|
6
6
|
*/
|
|
7
7
|
const { get_new_item_main,get_data_config_main,get_cloud_url_main,get_biz_item_main,get_cloud_filter_obj_main,get_title_url_main } = require('./main');
|
|
8
|
+
const {Log,Test,Str} = require('biz9-utility');
|
|
8
9
|
|
|
9
10
|
class DataType {
|
|
11
|
+
static get_data_type_title = (data_type) => {
|
|
12
|
+
if(!data_type){
|
|
13
|
+
return "";
|
|
14
|
+
}else{
|
|
15
|
+
return String(Str.get_title(data_type.replaceAll('_',' ').replaceAll('dt','').replace('biz',''))).trim();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
10
18
|
static DT_ADMIN='admin_biz';
|
|
11
19
|
static DT_BLANK='blank_biz';
|
|
12
20
|
static DT_BLOG_POST='blog_post_biz';
|
|
@@ -16,15 +24,16 @@ class DataType {
|
|
|
16
24
|
static DT_GALLERY='gallery_biz';
|
|
17
25
|
static DT_ITEM_MAP='item_map_biz';
|
|
18
26
|
static DT_ITEM='item_biz';
|
|
27
|
+
static DT_ORDER="order_biz";
|
|
28
|
+
static DT_ORDER_ITEM="order_item_biz";
|
|
29
|
+
static DT_PROJECT='project_biz';
|
|
30
|
+
static DT_PRODUCT='product_biz';
|
|
19
31
|
static DT_PHOTO='photo_biz';
|
|
32
|
+
static DT_PAGE='page_biz';
|
|
20
33
|
static DT_REVIEW='review_biz';
|
|
21
34
|
static DT_SERVICE='service_biz';
|
|
22
35
|
static DT_USER='user_biz';
|
|
23
|
-
|
|
24
|
-
static DT_PRODUCT='product_biz';
|
|
25
|
-
static DT_ORDER="order_biz";
|
|
26
|
-
static DT_ORDER_ITEM="order_item_biz";
|
|
27
|
-
static DT_VIDEO='video_biz';
|
|
36
|
+
static DT_VIDEO='video_biz';
|
|
28
37
|
}
|
|
29
38
|
class Logic {
|
|
30
39
|
static get_new_item = (data_type,id) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "biz9-logic",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"async-series": "^0.0.1",
|
|
12
12
|
"biz9-scriptz": "^5.5.4",
|
|
13
|
-
"biz9-utility": "^2.0.
|
|
13
|
+
"biz9-utility": "^2.0.28",
|
|
14
14
|
"jest": "^29.7.0"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
package/test.js
CHANGED
|
@@ -28,6 +28,11 @@ const biz9_config ={
|
|
|
28
28
|
describe("connect", () => {
|
|
29
29
|
it("_connect", () => {
|
|
30
30
|
series([
|
|
31
|
+
function(call) {
|
|
32
|
+
console.log('GET-BIZ9-GET-DATA-TYPE-START');
|
|
33
|
+
console.log(DataType.get_data_type_title(DataType.DT_CART_ITEM));
|
|
34
|
+
console.log('GET-BIZ9-GET-DATA-TYPE-END');
|
|
35
|
+
},
|
|
31
36
|
function(call) {
|
|
32
37
|
console.log('GET-BIZ9-CONFIG-FILE-START');
|
|
33
38
|
let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
|