biz9-logic 4.8.221 → 4.8.225

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='7.0.1'
1
+ VERSION='7.0.5'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -190,7 +190,15 @@ class Page_Logic {
190
190
  item_list.push(Page_Logic.get_test( "Page " +parseInt(a+1)? !option.get_blank : "",option));
191
191
  }
192
192
  return item_list;
193
- }
193
+ };
194
+ static get_page_section_type_list = () => {
195
+ return [
196
+ {value:'text',label:'Text'},
197
+ {value:'note',label:'Note'},
198
+ {value:'photo',label:'Photo'},
199
+ {value:'list',label:'List'},
200
+ ];
201
+ };
194
202
  static get_section_property = (type,section_id,value_id,is_title) =>{
195
203
  //page['section_1_value_1_type'] -- / text,note,photo,list
196
204
  //page['section_1_value_1_text_value']
@@ -216,6 +224,27 @@ class Page_Logic {
216
224
  };
217
225
  return !is_title ? 'section_'+section_id + '_value_'+value_id + "_" + type_str + "_value" : 'Section '+section_id + ' Value '+value_id + " " + Str.get_title(type_str);
218
226
  }
227
+
228
+ static get_section_property_list = (type,section_id,value_id,row_id) =>{
229
+ //page['section_1_value_1_type'] -- / list
230
+ //page['section_1_value_1_list_field_1']
231
+ //page['section_1_value_1_list_value_1']
232
+ //page['section_1_value_1_list_field_2']
233
+ //page['section_1_value_1_list_value_2']
234
+ //page['section_1_value_1_list_field_3']
235
+ //page['section_1_value_1_list_value_3']
236
+ //section_1_value_2_list_field_value_3
237
+ let type_str = '';
238
+ switch(type){
239
+ case 'field':
240
+ type_str = 'field';
241
+ break;
242
+ case 'value':
243
+ type_str = 'value';
244
+ break;
245
+ };
246
+ return 'section_'+section_id + '_value_'+value_id + "_list_" + type_str +"_" +row_id;
247
+ }
219
248
  }
220
249
  class Order_Logic {
221
250
  static get_order_number = () => {
@@ -829,6 +858,14 @@ class FieldType {
829
858
 
830
859
  static ACTIVITY_TYPE_LOGIN="login";
831
860
  static ACTIVITY_TYPE_REGISTER="register";
861
+
862
+ static SECTION_PROPERTY_TYPE_TEXT="text";
863
+ static SECTION_PROPERTY_TYPE_NOTE="note";
864
+ static SECTION_PROPERTY_TYPE_PHOTO="photo";
865
+ static SECTION_PROPERTY_TYPE_LIST="list";
866
+
867
+ static SECTION_PROPERTY_TYPE_LIST_FIELD="field";
868
+ static SECTION_PROPERTY_TYPE_LIST_VALUE="value";
832
869
  }
833
870
  class Social {
834
871
  static FACEBOOK_URL="https://facebook.com/";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.221",
3
+ "version": "4.8.225",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -32,7 +32,9 @@ describe("connect", () => {
32
32
 
33
33
  function(call) {
34
34
  console.log('PAGE-SECTION-START');
35
- console.log(Page_Logic.get_section_property('text',1,2,false));
35
+ //console.log(Page_Logic.get_section_property('text',1,2,false));
36
+ console.log(Page_Logic.get_section_property_list(FieldType.SECTION_PROPERTY_TYPE_LIST_VALUE,1,2,3));
37
+ console.log(Page_Logic.get_section_property_list(FieldType.SECTION_PROPERTY_TYPE_LIST_FIELD,1,2,3));
36
38
  console.log('PAGE-SECTION-END');
37
39
 
38
40