biz9-logic 4.8.49 → 4.8.54

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='5.2.9'
1
+ VERSION='5.3.4'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -370,6 +370,8 @@ class Field_Logic {
370
370
  let note = "Note "+String(Number.get_id());
371
371
  option.category_title = !Str.check_is_null(option.category_title) ? option.category_title : 'Category '+String(Number.get_id());
372
372
  if(option.get_blank == true){
373
+ date_create:"";
374
+ date_save:"";
373
375
  title = "";
374
376
  sub_note = "";
375
377
  note = "";
@@ -381,11 +383,25 @@ class Field_Logic {
381
383
  title_url:Str.get_title_url(title),
382
384
  category:option.category_title,
383
385
  sub_note:sub_note,
384
- note:note
386
+ note:note,
387
+ id:Number.get_guid(),
388
+ date_create:new moment().toISOString(),
389
+ date_save:new moment().toISOString()
385
390
  }
386
391
  if(option.get_value){
387
392
  item = Field_Logic.get_value_list(item,option);
388
393
  }
394
+ if(option.fields){
395
+ for(let a = 0; a<option.fields.length;a++){
396
+ if(!option.get_blank == true){
397
+ item[option.fields[a]] = Str.get_title(option.fields[a]) +"_" + Number.get_id();
398
+ }else{
399
+ item[option.fields[a]] = "";
400
+
401
+ }
402
+ }
403
+ }
404
+ Log.w('rrr',item);
389
405
  return item;
390
406
  }
391
407
  static get_value_list(item,option){
@@ -450,6 +466,7 @@ class Field_Logic {
450
466
  option.item_count = option.item_count ? option.item_count : 9;
451
467
  option.category_count = option.category_count ? option.category_count : 9;
452
468
  option.category_title = option.category_title ? option.category_title : "";
469
+ option.fields = option.fields ? option.fields : [];
453
470
  if(option.data_type==DataType.PAGE){
454
471
  option.page_count = option.page_count ? option.page_count : 9;
455
472
  option.section_count = option.section_count ? option.section_count : 9;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.49",
3
+ "version": "4.8.54",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -68,7 +68,9 @@ describe("connect", () => {
68
68
  /* --TEAM--START */
69
69
  //let team = Team_Logic.get_test()
70
70
  let team = Team_Logic.get_test({get_value:false,get_member:true})
71
- let team_member = Team_Logic.get_test_member(team,{get_value:true});
71
+ //let team_member = Team_Logic.get_test_member(team,{get_value:true,get_blank:false,fields:['hometown','member_since', 'speaks','last_project','avg_response_time']});
72
+ //let team_member = Blog_Post_Logic.get_test({get_value:true,get_blank:false,fields:['hometown','member_since', 'speaks','last_project','avg_response_time']});
73
+ let team_member = Team_Logic.get_test_member(Team_Logic.get_test(),{fields:["hometown_aa","member_since_bb"], get_value:true});
72
74
  //Log.w("team",team);
73
75
  Log.w("team_member",team_member);
74
76
  //let team_list = Team_Logic.get_test_list();