biz9-logic 3.9.7 → 3.9.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 +59 -1
- package/package.json +3 -3
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Author: certifiedcoderz@gmail.com (Certified CoderZ)
|
|
|
4
4
|
License GNU General Public License v3.0
|
|
5
5
|
Description: BiZ9 Framework: Logic-JS
|
|
6
6
|
*/
|
|
7
|
-
const { get_new_item_main,get_data_config_main,get_cloud_url_main,get_biz_item_main,get_cloud_filter_obj_main
|
|
7
|
+
const { get_new_item_main,get_data_config_main,get_cloud_url_main,get_biz_item_main,get_cloud_filter_obj_main } = require('./main');
|
|
8
8
|
const { Log,Test,Str,DateTime } = require('biz9-utility');
|
|
9
9
|
|
|
10
10
|
class Message {
|
|
@@ -23,6 +23,45 @@ class TemplateType {
|
|
|
23
23
|
static FOOTER='footer';
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
class FieldType {
|
|
27
|
+
|
|
28
|
+
static APP_TITLE_ID='app_title_id';
|
|
29
|
+
static ID='id';
|
|
30
|
+
static DATA_TYPE='data_type';
|
|
31
|
+
|
|
32
|
+
static PARENT_ID='parent_id';
|
|
33
|
+
static PARENT_DATA_TYPE='parent_data_type';
|
|
34
|
+
|
|
35
|
+
static PHOTO_DATA='photo_data';
|
|
36
|
+
|
|
37
|
+
static TOP_ID='top_id';
|
|
38
|
+
static TOP_DATA_TYPE='top_data_type';
|
|
39
|
+
|
|
40
|
+
static DATE_CREATE='date_create';
|
|
41
|
+
static DATE_SAVE='date_save';
|
|
42
|
+
|
|
43
|
+
static TITLE='title';
|
|
44
|
+
static TITLE_URL='title_url';
|
|
45
|
+
|
|
46
|
+
static SETTING_DELETE_PROTECTION='setting_delete_protection';
|
|
47
|
+
static SETTING_VISIBLE='setting_visible';
|
|
48
|
+
static SETTING_ORDER='setting_order';
|
|
49
|
+
|
|
50
|
+
static SOURCE='source';
|
|
51
|
+
|
|
52
|
+
static SOURCE_ID='source_id';
|
|
53
|
+
static SOURCE_DATA_TYPE='source_data_type';
|
|
54
|
+
|
|
55
|
+
static SOURCE_PARENT_ID='source_parent_id';
|
|
56
|
+
static SOURCE_PARENT_DATA_TYPE='source_parent_data_type';
|
|
57
|
+
|
|
58
|
+
static SOURCE_TOP_ID='source_top_id';
|
|
59
|
+
static SOURCE_TOP_DATA_TYPE='source_top_data_type';
|
|
60
|
+
|
|
61
|
+
static DATE_CREATE='date_create';
|
|
62
|
+
static DATE_SAVE='date_save';
|
|
63
|
+
}
|
|
64
|
+
|
|
26
65
|
class PageType {
|
|
27
66
|
|
|
28
67
|
static HOME='home';
|
|
@@ -109,6 +148,19 @@ class DataType {
|
|
|
109
148
|
class Business {
|
|
110
149
|
|
|
111
150
|
static get_full_address(business){
|
|
151
|
+
if(!business.address_1){
|
|
152
|
+
business.address_1 = "";
|
|
153
|
+
}
|
|
154
|
+
if(!business.address_2){
|
|
155
|
+
business.address_2 = "";
|
|
156
|
+
}
|
|
157
|
+
if(!business.city){
|
|
158
|
+
business.city = "";
|
|
159
|
+
}
|
|
160
|
+
if(!business.state){
|
|
161
|
+
business.state = "";
|
|
162
|
+
}
|
|
163
|
+
|
|
112
164
|
return business.address_1 + " "+ business.address_2 + " " + business.city + " " + business.state + " " + business.zip;
|
|
113
165
|
}
|
|
114
166
|
}
|
|
@@ -197,6 +249,11 @@ class Url {
|
|
|
197
249
|
return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
|
|
198
250
|
};
|
|
199
251
|
|
|
252
|
+
static copy_item = (biz9_config,data_type,id) => {
|
|
253
|
+
let action_url= "main/biz_item/copy/"+data_type + "/" + id;
|
|
254
|
+
return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
|
|
255
|
+
};
|
|
256
|
+
|
|
200
257
|
static get_list = (biz9_config,data_type) => {
|
|
201
258
|
let action_url= "main/crud/get_list/"+data_type;
|
|
202
259
|
return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
|
|
@@ -564,6 +621,7 @@ module.exports = {
|
|
|
564
621
|
CMS,
|
|
565
622
|
DataItem,
|
|
566
623
|
DataType,
|
|
624
|
+
FieldType,
|
|
567
625
|
Message,
|
|
568
626
|
Obj,
|
|
569
627
|
PageType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "biz9-logic",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.10",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"async-series": "^0.0.1",
|
|
12
|
-
"biz9-scriptz": "^5.
|
|
13
|
-
"biz9-utility": "^3.5.
|
|
12
|
+
"biz9-scriptz": "^5.6.6",
|
|
13
|
+
"biz9-utility": "^3.5.9",
|
|
14
14
|
"jest": "^29.7.0"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|