biz9-logic 4.8.135 → 4.8.136

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='6.1.5'
1
+ VERSION='6.1.6'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -599,26 +599,31 @@ class Event_Logic {
599
599
  class Field_Logic {
600
600
  static get_test = (title,option) =>{
601
601
  option = !Obj.check_is_empty(option) ? option : {};
602
- let sub_note = "Sub Note "+String(Number.get_id());
602
+ Log.w('rrrr',option);
603
+ let item = {};
603
604
  if(option.get_blank == true){
604
- date_create:"";
605
- date_save:"";
606
- title = "";
607
- sub_note = "";
608
- note = "";
609
- option.category_title = "";
610
- }
611
- let item = {
605
+ option.category_title = "";
606
+ item = {
607
+ title:"",
608
+ title_url:"",
609
+ sub_note:"",
610
+ note:"",
611
+ date_create:"",
612
+ date_save:""
613
+ }
614
+ }else{
615
+ item = {
612
616
  title:title,
613
617
  setting_visible:"1",
614
618
  title_url:Str.get_title_url(title),
615
- sub_note:sub_note,
619
+ sub_note:"Sub Note "+String(Number.get_id()),
616
620
  note:Item_Logic.get_note(),
617
621
  view_count:0,
618
622
  id:0,
619
623
  date_create:new moment().toISOString(),
620
624
  date_save:new moment().toISOString()
621
625
  }
626
+ }
622
627
  if(!Str.check_is_null(option.category_title)){
623
628
  item.category = 'Category ' + Number.get_id();
624
629
  }
@@ -632,7 +637,9 @@ class Field_Logic {
632
637
  let field_list = String(option.fields).split(',');
633
638
  for(let a = 0; a<field_list.length;a++){
634
639
  if(option.get_blank == true){
640
+ if(item[field_list[a]]){
635
641
  item[field_list[a]] = "";
642
+ }
636
643
  }else{
637
644
  if(!Str.check_is_null(field_list[a])){
638
645
  item[Str.get_title_url(field_list[a])] = Str.get_title(field_list[a]) +"_" + Number.get_id();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.135",
3
+ "version": "4.8.136",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -268,8 +268,8 @@ describe("connect", () => {
268
268
 
269
269
 
270
270
  /* --ITEM-TEST--START */
271
- //let item = Item_Logic.get_test("Item_" +Number.get_id(),DataType.BLOG_POST,0);
272
- //Log.w('item',item);
271
+ let item = Item_Logic.get_test("Item_" +Number.get_id(),DataType.BLOG_POST,0,{get_blank:false});
272
+ Log.w('item',item);
273
273
  /*
274
274
  let item_list = Item_Logic.get_test_list(DataType.BLANK,{item_count:10,get_value:true});
275
275
  Log.w('item_list',item_list);