biz9-logic 4.8.10 → 4.8.19

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 (4) hide show
  1. package/biz9_config +1 -1
  2. package/index.js +418 -391
  3. package/package.json +1 -1
  4. package/test.js +139 -81
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.10",
3
+ "version": "4.8.19",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const path = require('path');
2
2
  const series = require('async-series');
3
- const {DataItem,DataType,Url,Obj,BiZ_Url,Cat,Stock,Schedule,Storage,Business,Product,Service,Event,Template,Page,Category,Review,Blog_Post,Faq,Category_Url,Blank_Url,Blank_Logic,Item_Logic} = require('./index');
3
+ const {DataItem,DataType,Url,Obj,BiZ_Url,Cat,Stock,Schedule,Storage,Business,Product,Service,Event,Template,Page,Category,Review,Blog_Post,Faq_Logic,Category_Url,Blank_Url,Blank_Logic,Item_Logic,Service_Logic,Template_Logic,Page_Logic,Product_Logic,Event_Logic,Blog_Post_Logic,Content_Logic,Category_Logic,Team_Logic,Business_Logic} = require('./index');
4
4
  const {Log,Number} = require('biz9-utility');
5
5
  const {Scriptz}= require('biz9-scriptz');
6
6
 
@@ -28,6 +28,7 @@ const biz9_config ={
28
28
  describe("connect", () => {
29
29
  it("_connect", () => {
30
30
  series([
31
+
31
32
  /*
32
33
  function(call) {
33
34
  console.log('GET-URL-START');
@@ -45,33 +46,152 @@ describe("connect", () => {
45
46
  */
46
47
 
47
48
  function(call) {
48
- /* --ITEM-PARENT-TOP-URL-TEST--START */
49
- let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
50
- let cloud_url = Url.get_item_parent_top(biz9_config,DataType.SERVICE,0,DataType.BLOG_POST,1,DataType.PRODUCT,2);
51
- console.log(cloud_url);
52
- //let item_test_list = Item_Logic.get_test_item_list(DataType.BLANK,{item_count:10,get_value:true});
53
- //Log.w('item_test_list',item_test_list);
54
- /* --ITEM-PARENT-TOP-TEST-URL-START */
49
+
50
+ /* --TEAM--START */
51
+ //let team = Team_Logic.get_test()
52
+ //let team = Team_Logic.get_test("Team 1",{get_value:true,get_member:true})
53
+ //Log.w("team",team);
54
+ //let team_list = Team_Logic.get_test_list();
55
+ //let [team_list,team_list]=Team_Logic.get_test_list_by_team();
56
+ //Log.w('team_list',team_list);
57
+ //Log.w('team_list',team_list);
58
+ /* --TEAM--END */
59
+
60
+
61
+ /* --SEARCH--START */
62
+ console.log(Url.get_search(DataType.BLOG_POST,{title:-1},{cool:-1},1,10));
63
+ /* --SEARCH--END */
64
+
65
+ /* --CATEGORY--START */
66
+ //let category = Category_Logic.get_test("Category 1")
67
+ //let category = Category_Logic.get_test("Category 1",{get_value:true,get_item:true})
68
+ //let category_list = Category_Logic.get_test_list({get_value:true,get_item:true})
69
+ //Log.w("category",category);
70
+ //let category_list = Category_Logic.get_test_list_by_type(DataType.PRODUCT,{get_value:true});
71
+ //let [category_list,category_list]=Category_Logic.get_test_list_by_category();
72
+ //Log.w('category_list',category_list);
73
+ //Log.w('category_list',category_list);
74
+ /* --CATEGORY--END */
75
+
76
+
77
+ /* --CONTENT--START */
78
+ //let content = Content_Logic.get_test()
79
+ //let content = Content_Logic.get_test("Content 1",{get_value:true,get_item:true})
80
+ //Log.w("content",content);
81
+ //let content_list = Content_Logic.get_test_list();
82
+ //let [category_list,content_list]=Content_Logic.get_test_list_by_category();
83
+ //Log.w('content_list',content_list);
84
+ //Log.w('category_list',category_list);
85
+ /*
86
+ */
87
+ /* --CONTENT--END */
88
+
89
+
90
+ /* --BLOG_POST--START */
91
+ //let blog_post = Blog_Post_Logic.get_test("Blog_Post 1")
92
+ //let blog_post = Blog_Post_Logic.get_test("Blog_Post 1",{get_value:true})
93
+ //let blog_post = Blog_Post_Logic.get_test("Blog_Post 1",{get_value:true})
94
+ //let blog_post = Blog_Post_Logic.get_test("Blog_Post 1",{get_value:true,get_item:true})
95
+ //let [category_list,blog_post_list]=Blog_Post_Logic.get_test_list_by_category();
96
+ //Log.w("blog_post",blog_post);
97
+ //let blog_post_list = Blog_Post_Logic.get_test_list({get_value:true,get_item:true});
98
+ //Log.w('blog_post_list',blog_post_list);
99
+ //Log.w('blog_post_list',blog_post_list[0].items);
100
+ //Log.w('category_list',category_list);
101
+ /*
102
+ */
103
+ /* --BLOG_POST--END */
104
+
105
+
106
+ /* --EVENT--START */
107
+ //let event = Event_Logic.get_test("Event 1");
108
+ //let event = Event_Logic.get_test("Event 1",{get_value:true,get_item:true})
109
+ //Log.w("event",event);
110
+ //let event_list = Event_Logic.get_test_list();
111
+ //let [category_list,event_list]=Event_Logic.get_test_list_by_category();
112
+ //Log.w('event_list',event_list);
113
+ //Log.w('category_list',category_list);
114
+ /*
115
+ */
116
+ /* --EVENT--END */
117
+
118
+
119
+ /* --SERVICE--START */
120
+ //let service = Service_Logic.get_test("Service 1",{get_value:true,get_item:true})
121
+ //Log.w("service",service);
122
+ //let service_list = Service_Logic.get_test_list();
123
+ //let [category_list,service_list]=Service_Logic.get_test_list_by_category();
124
+ //Log.w('service_list',service_list);
125
+ //Log.w('category_list',category_list);
126
+ /*
127
+ */
128
+ /* --SERVICE--END */
129
+
130
+
131
+ /* --PRODUCT--START */
132
+
133
+ //let product = Product_Logic.get_test("Product 1",{get_value:true,get_item:true})
134
+ //Log.w("product",product);
135
+ //let product_list = Product_Logic.get_test_list({product_count:10});
136
+ //let product_list = Product_Logic.get_test_list();
137
+ //Log.w('product_list',product_list);
138
+ //let [category_list,product_list]=Product.get_test_list_by_category({category_count:5,product_count:9});
139
+ //Log.w('category_list',category_list);
140
+
141
+ //let product = Product.get_test()
142
+ //Log.w("Product_section_1",product.section_1);
143
+ //Log.w("Product_section_1_section_1_section_1",product.section_1.section_1.section_1);
144
+ /* --PRODUCT--END */
55
145
 
56
146
 
57
147
  /* --PAGE--START */
148
+ //let page = Page_Logic.get_test()
149
+ //let page = Page_Logic.get_test("Page "+Number.get_id())
150
+ //let page = Page_Logic.get_test("Page "+Number.get_id(),{get_value:true,value_count:5,get_item:true})
151
+ //Log.w("page",page);
152
+ //let page_list = Page_Logic.get_test_list({page_count:10});
153
+ //Log.w("Page_list",page_list);
58
154
  /*
59
- let page = Page.get_test({item_count:2,page_count:2,get_value:true,get_item:true,value_count:50})
60
- Log.w("Page",page);
61
155
  let page = Page.get_test({item_count:9,page_count:19,get_item:true,get_value:true})
62
156
  //let page = Page.get_test()
63
- Log.w("Page_section_1",page.section_1);
64
157
  Log.w("Page_section_1_section_1_section_1",page.section_1.section_1.section_1);
65
158
  */
66
159
  /* --PAGE--END */
67
160
 
68
- /* --ITEM-TEST--START */
69
- //let item_test = Item_Logic.get_test_item(DataType.SERVICE,0);
161
+
162
+ /* --ITEM-TEST--START */
163
+ //let item = Item_Logic.get_test("Item_" +Number.get_id(),DataType.SERVICE,0);
164
+ //Log.w('item',item);
165
+ /*
166
+ let item_list = Item_Logic.get_test_list(DataType.BLANK,{item_count:10,get_value:true});
167
+ Log.w('item_list',item_list);
168
+ Log.w('item_list_len',item_list.length);
169
+ */
170
+ /* --ITEM-TEST--END */
171
+
172
+
173
+ /* --TEMPLATE--START */
174
+ //let template = Template_Logic.get_test("Primary",{});
175
+ //let template = Template_Logic.get_test("Primary",{get_value:true,get_item:true,item_count:2});
176
+ /*
177
+ let template_item_list = Template_Logic.get_test("Primary",template,template,{get_value:false,get_item:false,item_count:2});
178
+ */
179
+ //Log.w('template',template);
180
+ //Log.w('template_item_list',template_item_list);
181
+ /* --TEMPLATE--END */
182
+
183
+
184
+
185
+ /* --ITEM-PARENT-TOP-URL-TEST--START */
186
+ //let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
187
+ //let cloud_url = Url.get_item_parent_top(biz9_config,DataType.SERVICE,0,DataType.BLOG_POST,1,DataType.PRODUCT,2);
188
+ //console.log(cloud_url);
70
189
  //let item_test_list = Item_Logic.get_test_item_list(DataType.BLANK,{item_count:10,get_value:true});
71
190
  //Log.w('item_test_list',item_test_list);
72
- /* --ITEM-TEST--END */
191
+ /* --ITEM-PARENT-TOP-TEST-URL-START */
192
+
73
193
 
74
- //console.log('CONNECT-START');
194
+ //console.log('CONNECT-START');
75
195
  /* --BLANK--START */
76
196
  //let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
77
197
 
@@ -83,8 +203,8 @@ describe("connect", () => {
83
203
  //Log.w('blank_list',blank_list);
84
204
  //Log.w('category_list',category_list);
85
205
 
86
- //let blank = Blank_Logic.get_test({item_count:9,blank_count:19,get_item:true,get_value:true})
87
- //let blank = Blank.get_test()
206
+ //let blank = Blank_Logic.get_test("cool",{item_count:9,blank_count:19,get_item:true,get_value:true})
207
+ //let blank = Blank_Logic.get_test()
88
208
  //Log.w('blank_list',blank_list);
89
209
  //Log.w("Blank",blank);
90
210
  //Log.w("BLog_Post_section_1",blank.section_1);
@@ -108,73 +228,11 @@ describe("connect", () => {
108
228
  */
109
229
  /* --PAGE--END */
110
230
 
111
- /* --BLOG_POST--START */
112
- //let blog_post_list=Blog_Post.get_test_list({category_count:5,blog_post_count:9,get_value:false,get_item:false});
113
- //let [category_list,blog_post_list]=Blog_Post.get_test_list_by_category({category_count:5,blog_post_count:9});
114
- //Log.w('blog_post_list',blog_post_list);
115
- //Log.w('category_list',category_list);
116
-
117
- //let blog_post = Blog_Post.get_test({item_count:9,blog_post_count:19,get_item:true,get_value:true})
118
- //let blog_post = Blog_Post.get_test()
119
- //Log.w('blog_post_list',blog_post_list);
120
- //Log.w("Blog_Post",blog_post);
121
- //Log.w("BLog_Post_section_1",blog_post.section_1);
122
- //Log.w("BLog_Post_section_1_section_1_section_1",blog_post.section_1.section_1.section_1);
123
- /* --BLOG_POST--END */
124
-
125
- /* --CATEGORY--START */
126
- //let category_list=Category.get_test_list({category_count:5,product_count:9,get_value:false,get_item:false});
127
- //Log.w('category_list',category_list);
128
- /* --CATEGORY--END */
129
-
130
-
131
- /* --PRODUCT--START */
132
- //let product_list=Product.get_test_list({category_count:5,product_count:9,get_value:false,get_item:false});
133
- //Log.w('product_list',product_list);
134
- //let [category_list,product_list]=Product.get_test_list_by_category({category_count:5,product_count:9});
135
- //Log.w('category_list',category_list);
136
-
137
- //let product = Product.get_test({item_count:9,product_count:19,get_item:true,get_value:true})
138
- //let product = Product.get_test()
139
- //Log.w("Product",product);
140
- //Log.w("Product_section_1",product.section_1);
141
- //Log.w("Product_section_1_section_1_section_1",product.section_1.section_1.section_1);
142
- /* --PRODUCT--END */
143
-
144
- /* --EVENT--START */
145
- //let event_list=Event.get_test_list({category_count:5,event_count:9,get_value:false,get_item:false});
146
- //let [category_list,event_list]=Event.get_test_list_by_category({category_count:5,event_count:9});
147
- //Log.w('event_list',event_list);
148
- //Log.w('category_list',category_list);
149
- /* --EVENT--END */
150
-
151
- /* --SERVICE--START */
152
- //let service_list=Service.get_test_list({category_count:5,service_count:9,get_value:false,get_item:false});
153
- //let [category_list,service_list]=Service.get_test_list_by_category({category_count:5,service_count:9});
154
- //Log.w('service_list',service_list);
155
- //Log.w('category_list',category_list);
156
- /*
157
- let service = Service.get_test({item_count:9,service_count:19,get_item:true,get_value:true})
158
- //let service = Service.get_test()
159
- Log.w("Service",service);
160
- Log.w("Service_section_1",service.section_1);
161
- Log.w("Service_section_1_section_1_section_1",service.section_1.section_1.section_1);
162
- */
163
- /* --SERVICE--END */
164
231
 
165
- /* --SERVICE--START */
166
- /*
167
- let event = Event.get_test({item_count:9,event_count:19,get_item:true,get_value:true})
168
- //let service = Service.get_test()
169
- Log.w("Event",event);
170
- Log.w("Event_section_1",event.section_1);
171
- Log.w("Event_section_1_section_1_section_1",event.section_1.section_1.section_1);
172
- */
173
- /* --SERVICE--END */
174
232
 
175
233
 
176
234
  /* --FAQ--START */
177
- //Log.w("FAQ",Faq.get_test());
235
+ //Log.w("FAQ",Faq_Logic.get_test());
178
236
  //Log.w("FAQ List",Faq.get_test_list());
179
237
  /*
180
238
  let review_list = Review.get_test_list({review_count:3,get_item:true})
@@ -197,7 +255,7 @@ describe("connect", () => {
197
255
 
198
256
 
199
257
  /* --BUSINESS--START */
200
- //Log.w("Business",Business.get_new("Business " + Number.get_id()));
258
+ //Log.w("Business",Business_Logic.get_test("Business " + Number.get_id()));
201
259
  /* --BUSINESS--END */
202
260
 
203
261