biz9-logic 4.9.39 → 4.9.41

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='9.0.9'
1
+ VERSION='9.1.1'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -117,11 +117,17 @@ class Title {
117
117
  static SOCIAL_URL_INSTAGRAM="https://instagram.com/";
118
118
  static SOCIAL_URL_YOUTUBE="https://youtube.com/";
119
119
  static SOCIAL_URL_LINKEDIN="https://linkedin.com/";
120
+ //str
121
+ static CATEGORY='Category';
122
+ static DESCRIPTION='Description';
123
+ static TYPE='Type';
120
124
  }
121
125
  class Demo_Logic {
122
126
  static get_new_type = (title,option) => {
127
+ title = !Str.check_is_null(title)?title:Title.TYPE+" " +Num.get_id(999);
123
128
  option = option ? option : {get_category:false,category_count:6,categorys:'',category_data_type:DataType.BLANK,get_item:false,items:'',item_data_type:DataType.BLANK,item_count:6};
124
129
  const item = Item_Logic.get_new(title,DataType.TYPE);
130
+ //category
125
131
  if(option.get_category){
126
132
  item.categorys = [];
127
133
  let category_title_list = [];
@@ -133,13 +139,14 @@ class Demo_Logic {
133
139
  option.category_count = 1;
134
140
  }
135
141
  for(let a = 1;a<parseInt(option.category_count)+1;a++){
136
- category_title_list.push(title + " Category " +a);
142
+ category_title_list.push(Title.CATEGORY+" "+a);
137
143
  }
138
144
  }
139
145
  category_title_list.forEach(cat_item => {
140
146
  item.categorys.push(Category_Logic.get_new(cat_item,item.title,option.category_data_type));
141
147
  });
142
148
  }
149
+ //item
143
150
  if(option.get_item){
144
151
  let full_item_list = [];
145
152
 
@@ -165,7 +172,7 @@ class Demo_Logic {
165
172
  child_item.type = cat_item.type;
166
173
  child_item.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
167
174
  child_item.category = cat_item.title;
168
- child_item.description = "Description "+String(Num.get_id());
175
+ child_item.description =Title.DESCRIPTION+" "+ String(Num.get_id());
169
176
  child_item.note = Field_Logic.get_test_note(),
170
177
  cat_item.items.push(child_item);
171
178
  full_item_list.push(child_item);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.9.39",
3
+ "version": "4.9.41",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -29,14 +29,21 @@ const biz9_config ={
29
29
  describe("connect", () => {
30
30
  it("_connect", () => {
31
31
  series([
32
+
33
+ /* --- TEST LOGIC - CONNECT - START --- */
32
34
  function(call) {
33
35
  console.log('CONNECT-CMS-DEMO-START');
34
-
35
36
  let category_type = DataType.PRODUCT;
36
37
  let category_count = 12;
37
38
  let item_count = 500;
38
- let category_type_title_list = ['Add On','Admin Panel','Hosting','Landing Page','Mobile','Website'];
39
- let category_title_list = ['Beauty','Church','Fashion','Food Trucks','Health Care','Music','Pets','Services','Service Repair','Sports','Trucking'];
39
+
40
+ //let category_type_title_list = ['Add On','Admin Panel','Hosting','Landing Page','Mobile','Website'];
41
+ //let category_title_list = ['Beauty','Church','Fashion','Food Trucks','Health Care','Music','Pets','Services','Service Repair','Sports','Trucking'];
42
+
43
+ let category_type_title_list = '';
44
+ let category_title_list = '';
45
+
46
+
40
47
  let item_title_list = [];
41
48
  let post_type_list = [];
42
49
  let val_category_title = '';
@@ -44,6 +51,8 @@ describe("connect", () => {
44
51
  let option = {get_category:true,category_count:category_count,category_data_type:category_type,categorys:val_category_title?val_category_title:null,
45
52
  get_item:true,item_count:item_count,item_data_type:category_type,items:null}
46
53
 
54
+ console.log(Demo_Logic.get_new_type('',option));
55
+ /*
47
56
  for(const item of category_type_title_list){
48
57
  post_type_list.push(
49
58
  Demo_Logic.get_new_type(item,option));
@@ -57,8 +66,10 @@ describe("connect", () => {
57
66
  Log.w('55-post_type_list-b',post_type_list[0].categorys[3].items.length);
58
67
  Log.w('55-post_type_list-b',post_type_list[0].categorys[4].items.length);
59
68
  console.log('CONNECT-CMS-DEMO-SUCCESS');
69
+ */
60
70
 
61
71
  },
72
+ /*
62
73
  function(call) {
63
74
  //console.log('CONNECT-START');
64
75
  //let post_cart = Cart_Logic.get_new(DataType.PRODUCT,0,);
@@ -77,9 +88,14 @@ describe("connect", () => {
77
88
  //console.log('CONNECT-END');
78
89
  //call();
79
90
  },
91
+ /* --- TEST LOGIC - CONNECT - END --- */
92
+
93
+ /*
80
94
  function(call) {
81
- console.log('GET_START_DATE_TIME_BY_LIST-START');
95
+ console.log('BLANK-START');
96
+ console.log('BLANK-END');
82
97
  },
98
+ */
83
99
  ], function(err) {
84
100
  console.log(err.message) // "another thing"
85
101
  })