biz9-logic 4.0.5 → 4.0.6

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 CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='4.0.5'
1
+ VERSION='4.0.6'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -167,8 +167,8 @@ class Business {
167
167
 
168
168
  class DataItem {
169
169
 
170
- static get_new = (data_type,id) => {
171
- return get_new_item_main(data_type,id);
170
+ static get_new = (data_type,id,options) => {
171
+ return get_new_item_main(data_type,id,options);
172
172
  };
173
173
 
174
174
  static get_biz = (biz9_config,item,options)=>{
package/main.js CHANGED
@@ -11,11 +11,20 @@ const biz9_config_local=__dirname+"/../../"+"biz9_config";
11
11
  const get_cloud_filter_obj_main = (data_type,filter,sort_by,page_current,page_size) => {
12
12
  return {data_type:data_type,filter:filter,sort_by:sort_by,page_current:page_current,page_size:page_size};
13
13
  }
14
- const get_new_item_main = (data_type,id) => {
14
+ const get_new_item_main = (data_type,id,options) => {
15
15
  if(!id){
16
16
  id=0;
17
17
  }
18
- return {data_type:data_type,id:id};
18
+ let item = {data_type:data_type,id:id};
19
+ if(!options){
20
+ options = {};
21
+ }
22
+ if(options){
23
+ for (const key in options) {
24
+ item[key] = options[key];
25
+ }
26
+ }
27
+ return item;
19
28
  }
20
29
  const get_cloud_url_main = (app_id,domain_url,action_url,params) =>{
21
30
  if(!params){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -32,14 +32,14 @@ describe("connect", () => {
32
32
  function(call) {
33
33
  console.log('GET-BiZ-Url-Item-Get-Item-START');
34
34
  let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
35
- let item = DataItem.get_new(DataType.BLANK,0);
36
- Log.w('item',item);
35
+ //let item = DataItem.get_new(DataType.BLANK,0,{title:'title',apple:'butter'});
36
+ //Log.w('item',item);
37
37
  //let cloud_url = BiZ_Url.get_item(biz9_config,item.data_type,item.id);
38
38
  let title_url = 'primary';
39
39
  //let cloud_url = BiZ_Url.get_template(biz9_config,title_url);
40
40
  //let cloud_url = BiZ_Url.get_page(biz9_config,title_url);
41
41
  let business = {address_1:"addrress 1", address_2:"address 2",city:"city",state:"Geogia",zip:30003};
42
- Log.w('kusiness',Business.get_full_address(business));
42
+ //Log.w('kusiness',Business.get_full_address(business));
43
43
  //Log.w('connect_url',cloud_url);
44
44
  console.log('GET-BiZ-Url-Item-Get-Item-SUCCESS');
45
45
  //call()