biz9-logic 3.9.7 → 3.9.9

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 +49 -1
  3. package/package.json +1 -1
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='3.9.7'
1
+ VERSION='3.9.9'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
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,get_title_url_main } = require('./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,35 @@ 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
+ static PHOTO_DATA='photo_data';
35
+
36
+ static TOP_ID='top_id';
37
+ static TOP_DATA_TYPE='top_data_type';
38
+
39
+ static DATE_CREATE='date_create';
40
+ static DATE_SAVE='date_save';
41
+
42
+ static TITLE='title';
43
+ static TITLE_URL='title_url';
44
+
45
+ static SETTING_DELETE_PROTECTION='setting_delete_protection';
46
+ static SETTING_VISIBLE='setting_visible';
47
+ static SETTING_ORDER='setting_order';
48
+
49
+ static SOURCE='source';
50
+
51
+ static DATE_CREATE='date_create';
52
+ static DATE_SAVE='date_save';
53
+ }
54
+
26
55
  class PageType {
27
56
 
28
57
  static HOME='home';
@@ -109,6 +138,19 @@ class DataType {
109
138
  class Business {
110
139
 
111
140
  static get_full_address(business){
141
+ if(!business.address_1){
142
+ business.address_1 = "";
143
+ }
144
+ if(!business.address_2){
145
+ business.address_2 = "";
146
+ }
147
+ if(!business.city){
148
+ business.city = "";
149
+ }
150
+ if(!business.state){
151
+ business.state = "";
152
+ }
153
+
112
154
  return business.address_1 + " "+ business.address_2 + " " + business.city + " " + business.state + " " + business.zip;
113
155
  }
114
156
  }
@@ -197,6 +239,11 @@ class Url {
197
239
  return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
198
240
  };
199
241
 
242
+ static copy_item = (biz9_config,data_type,id) => {
243
+ let action_url= "main/biz_item/copy/"+data_type + "/" + id;
244
+ return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
245
+ };
246
+
200
247
  static get_list = (biz9_config,data_type) => {
201
248
  let action_url= "main/crud/get_list/"+data_type;
202
249
  return get_cloud_url_main(biz9_config.APP_TITLE_ID,biz9_config.URL,action_url,null);
@@ -564,6 +611,7 @@ module.exports = {
564
611
  CMS,
565
612
  DataItem,
566
613
  DataType,
614
+ FieldType,
567
615
  Message,
568
616
  Obj,
569
617
  PageType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "3.9.7",
3
+ "version": "3.9.9",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"