biz9-logic 10.0.35 → 10.0.45
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 +2 -2
- package/index.js +383 -1030
- package/package.json +1 -1
- package/test.js +15 -8
- package/main.js +0 -74
- package/main_test.js +0 -107
package/index.js
CHANGED
|
@@ -5,8 +5,7 @@ License GNU General Public License v3.0
|
|
|
5
5
|
Description: BiZ9 Framework: Logic-JS
|
|
6
6
|
*/
|
|
7
7
|
const moment = require('moment');
|
|
8
|
-
const {
|
|
9
|
-
const { Log,Str,DateTime,Num,Obj } = require('biz9-utility');
|
|
8
|
+
const {Str,Num,Obj} = require('biz9-utility');
|
|
10
9
|
class Message {
|
|
11
10
|
static SUCCESS="Success";
|
|
12
11
|
static CONFIRM="Are You Sure?";
|
|
@@ -32,117 +31,6 @@ class Message {
|
|
|
32
31
|
static REVIEW_REMOVE_SUCCESS="Review Remove Success.";
|
|
33
32
|
static REVIEW_USER_LOGIN="Please Login To Add Review.";
|
|
34
33
|
}
|
|
35
|
-
class Item_Logic {
|
|
36
|
-
static get_new = (title,data_type,option)=>{
|
|
37
|
-
option = option ? option : {};
|
|
38
|
-
const item = Data_Logic.get_new(data_type,0,{title:title,title_url:Str.get_title_url(title),setting_visible:"1"});
|
|
39
|
-
return item;
|
|
40
|
-
};
|
|
41
|
-
static copy = (data_type,item)=>{
|
|
42
|
-
let copy_item = Data_Logic.get_new(data_type,0);
|
|
43
|
-
const keys = Object.keys(item);
|
|
44
|
-
keys.forEach(key => {
|
|
45
|
-
if(
|
|
46
|
-
key!=Type.FIELD_ID&&
|
|
47
|
-
key!=Type.FIELD_SOURCE&&
|
|
48
|
-
key!=Type.FIELD_TITLE&&
|
|
49
|
-
key!=Type.FIELD_TITLE_URL&&
|
|
50
|
-
key!=Type.FIELD_DATE_CREATE&&
|
|
51
|
-
key!=Type.FIELD_DATE_SAVE&&
|
|
52
|
-
key!=Type.TITLE_OBJ&&
|
|
53
|
-
key!=Type.TITLE_USER&&
|
|
54
|
-
key!=Type.TITLE_GROUP&&
|
|
55
|
-
key!=Type.TITLE_ITEM&&
|
|
56
|
-
!Obj.check_is_array(item[key])&&
|
|
57
|
-
Obj.check_is_value(item[key])
|
|
58
|
-
){
|
|
59
|
-
copy_item[key]=item[key];
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
return copy_item;
|
|
63
|
-
};
|
|
64
|
-
static bind_child_parent_obj = (child_obj,parent_obj)=>{
|
|
65
|
-
for(const prop in parent_obj) {
|
|
66
|
-
child_obj['parent_'+prop] = parent_obj[prop];
|
|
67
|
-
}
|
|
68
|
-
return child_obj;
|
|
69
|
-
};
|
|
70
|
-
static get_test = (title,data_type,id,option)=>{
|
|
71
|
-
data_type = data_type ? data_type : Type.DATA_BLANK;
|
|
72
|
-
id = id ? id : 0;
|
|
73
|
-
option = Field_Logic.get_option(data_type,option?option:{});
|
|
74
|
-
let item = Data_Logic.get_new(data_type,0,Field_Logic.get_test(title,option));
|
|
75
|
-
return item;
|
|
76
|
-
}
|
|
77
|
-
static get_test_items = (data_type,option) =>{
|
|
78
|
-
option = Field_Logic.get_option(data_type,option?option:{});
|
|
79
|
-
let items = [];
|
|
80
|
-
for(let a=0;a<parseInt(option.item_count)+1;a++){
|
|
81
|
-
items.push(Item_Logic.get_test("Item " +String(parseInt(a+1)),data_type,option));
|
|
82
|
-
}
|
|
83
|
-
return items;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
class Title {
|
|
87
|
-
//page
|
|
88
|
-
static PAGE_ABOUT='About';
|
|
89
|
-
static PAGE_BLOG_POST='Blog Post';
|
|
90
|
-
static PAGE_BLOG_POST_HOME='Blog Post Home';
|
|
91
|
-
static PAGE_CONTACT='Contact';
|
|
92
|
-
static PAGE_EVENT='Event';
|
|
93
|
-
static PAGE_EVENT_HOME='Event Home';
|
|
94
|
-
static PAGE_FAQ='FAQs';
|
|
95
|
-
static PAGE_GALLERY='Gallery';
|
|
96
|
-
static PAGE_GALLERY_HOME='Gallery Home';
|
|
97
|
-
static PAGE_HOME='Home';
|
|
98
|
-
static PAGE_LOGIN='Login';
|
|
99
|
-
static PAGE_PRODUCT='Product';
|
|
100
|
-
static PAGE_PRODUCT_HOME='Product Home';
|
|
101
|
-
static PAGE_SERVICE='Service';
|
|
102
|
-
static PAGE_SERVICE_HOME='Service Home';
|
|
103
|
-
static PAGE_REGISTER='Register';
|
|
104
|
-
static PAGE_REVIEW_HOME='Review Home';
|
|
105
|
-
//order
|
|
106
|
-
static ORDER_NUMBER="OR-";
|
|
107
|
-
static ORDER_TRANSACTION_ID="TR-";
|
|
108
|
-
static ORDER_STATUS_CANCELLED="Cancelled";
|
|
109
|
-
static ORDER_STATUS_COMPLETE="Complete";
|
|
110
|
-
static ORDER_STATUS_NEW="New";
|
|
111
|
-
static ORDER_STATUS_OPEN="Open";
|
|
112
|
-
static ORDER_STATUS_ON_HOLD="On Hold";
|
|
113
|
-
static ORDER_STATUS_RETURNED="Returned";
|
|
114
|
-
static ORDER_PAYMENT_PLAN_NEW="New";
|
|
115
|
-
static ORDER_PAYMENT_PLAN_1="1 Payment";
|
|
116
|
-
static ORDER_PAYMENT_PLAN_2="2 Payments";
|
|
117
|
-
static ORDER_PAYMENT_PLAN_3="3 Payments";
|
|
118
|
-
static ORDER_PAYMENT_PLAN_4="4 Payments";
|
|
119
|
-
static ORDER_PAYMENT_METHOD_STRIPE="Stripe";
|
|
120
|
-
static ORDER_PAYMENT_METHOD_CASH="Cash";
|
|
121
|
-
static ORDER_PAYMENT_METHOD_OTHER="Other";
|
|
122
|
-
static ORDER_PAYMENT_METHOD_TEST="Test";
|
|
123
|
-
//cart
|
|
124
|
-
static CART_NUMBER="CA-";
|
|
125
|
-
//role
|
|
126
|
-
static USER_ROLE_SUPER_ADMIN='Super Admin';
|
|
127
|
-
static USER_ROLE_ADMIN='Admin';
|
|
128
|
-
static USER_ROLE_MANAGER='Manager';
|
|
129
|
-
static USER_ROLE_USER='User';
|
|
130
|
-
static USER_ROLE_GUEST='Guest';
|
|
131
|
-
//app
|
|
132
|
-
static APP_MOBILE="Mobile";
|
|
133
|
-
static APP_WEBSITE="Website";
|
|
134
|
-
static APP_LANDING="Landing";
|
|
135
|
-
//social
|
|
136
|
-
static SOCIAL_URL_FACEBOOK="https://facebook.com/";
|
|
137
|
-
static SOCIAL_URL_TWITTER="https://twitter.com/";
|
|
138
|
-
static SOCIAL_URL_INSTAGRAM="https://instagram.com/";
|
|
139
|
-
static SOCIAL_URL_YOUTUBE="https://youtube.com/";
|
|
140
|
-
static SOCIAL_URL_LINKEDIN="https://linkedin.com/";
|
|
141
|
-
//str
|
|
142
|
-
static CATEGORY='Category';
|
|
143
|
-
static DESCRIPTION='Description';
|
|
144
|
-
static TYPE='Type';
|
|
145
|
-
}
|
|
146
34
|
class Type {
|
|
147
35
|
//app_status
|
|
148
36
|
static APP_ENV_TEST='test';
|
|
@@ -152,7 +40,6 @@ class Type {
|
|
|
152
40
|
static APP_LINK_TYPE_GOOGLE_PLAY='google_play';
|
|
153
41
|
static APP_LINK_TYPE_APPLE_STORE='apple_store';
|
|
154
42
|
static APP_LINK_TYPE_CMS='cms';
|
|
155
|
-
|
|
156
43
|
//data
|
|
157
44
|
static DATA_APP='app_biz';
|
|
158
45
|
static DATA_BLANK='blank_biz';
|
|
@@ -186,7 +73,6 @@ class Type {
|
|
|
186
73
|
static DATA_TYPE='type_biz';
|
|
187
74
|
static DATA_USER='user_biz';
|
|
188
75
|
static DATA_VIDEO='video_biz';
|
|
189
|
-
|
|
190
76
|
//field
|
|
191
77
|
static FIELD_AUTHOR = 'author';
|
|
192
78
|
static FIELD_CATEGORY = 'category';
|
|
@@ -235,26 +121,92 @@ class Type {
|
|
|
235
121
|
static FIELD_USER_STATE = 'state';
|
|
236
122
|
static FIELD_VALUE = 'value';
|
|
237
123
|
static FIELD_WEBSITE = 'website';
|
|
124
|
+
static FIELD_RESULT_OK = 'resultOK';
|
|
125
|
+
static FIELD_RESULT_OK_DELETE = 'delete_resultOK';
|
|
126
|
+
static FIELD_RESULT_OK_DELETE_CACHE = 'delete_cache_resultOK';
|
|
127
|
+
static FIELD_RESULT_OK_DELETE_DATABASE = 'delete_database_resultOK';
|
|
128
|
+
static FIELD_RESULT_OK_EMAIL = 'email_resultOK';
|
|
129
|
+
static FIELD_RESULT_OK_USER = 'user_resultOK';
|
|
130
|
+
static FIELD_RESULT_OK_UNIQUE = 'unique_resultOK';
|
|
131
|
+
static FIELD_RESULT_OK_FAVORITE_ADD = 'favorite_resultOK';
|
|
132
|
+
static FIELD_RESULT_OK_GROUP_DELETE = 'group_delete_resultOK';
|
|
133
|
+
static FIELD_RESULT_OK_IMAGE_DELETE = 'image_delete_resultOK';
|
|
238
134
|
//title
|
|
239
|
-
static
|
|
240
|
-
static
|
|
241
|
-
static
|
|
242
|
-
static
|
|
243
|
-
static
|
|
244
|
-
static
|
|
245
|
-
static
|
|
246
|
-
static
|
|
247
|
-
static
|
|
248
|
-
static
|
|
249
|
-
|
|
250
|
-
static
|
|
251
|
-
static
|
|
252
|
-
static
|
|
253
|
-
static
|
|
254
|
-
static
|
|
255
|
-
static
|
|
256
|
-
static
|
|
257
|
-
|
|
135
|
+
static TITLE_DATA_BLOG_POST = 'Blog Post';
|
|
136
|
+
static TITLE_DATA_CATEGORY = 'Category';
|
|
137
|
+
static TITLE_DATA_CONTENT = 'Content';
|
|
138
|
+
static TITLE_DATA_EVENT = 'Event';
|
|
139
|
+
static TITLE_DATA_FAQ = 'Faq';
|
|
140
|
+
static TITLE_DATA_GALLERY = 'Gallery';
|
|
141
|
+
static TITLE_DATA_USER = 'User';
|
|
142
|
+
static TITLE_DATA_PAGE = 'Page';
|
|
143
|
+
static TITLE_DATA_PRODUCT = 'Product';
|
|
144
|
+
static TITLE_DATA_SERVICE = 'Service';
|
|
145
|
+
//
|
|
146
|
+
static TITLE_APP_ENV_TEST='Test';
|
|
147
|
+
static TITLE_APP_ENV_STAGE='Stage';
|
|
148
|
+
static TITLE_APP_ENV_PROD='Production';
|
|
149
|
+
static TITLE_APP_LINK_TYPE_WEBSITE='Website';
|
|
150
|
+
static TITLE_APP_LINK_TYPE_GOOGLE_PLAY='Google Play';
|
|
151
|
+
static TITLE_APP_LINK_TYPE_APPLE_STORE='Apple Store';
|
|
152
|
+
static TITLE_APP_LINK_TYPE_CMS='CMS';
|
|
153
|
+
//
|
|
154
|
+
static TITLE_BLANK='Blank';
|
|
155
|
+
static TITLE_CART_ITEMS='Cart Items';
|
|
156
|
+
static TITLE_CART_SUB_ITEMS='Cart Sub Items';
|
|
157
|
+
static TITLE_CART_ITEMS='Cart Items';
|
|
158
|
+
static TITLE_CART_SUB_ITEMS='Cart Sub Items';
|
|
159
|
+
static TITLE_COUNT='Count';
|
|
160
|
+
static TITLE_GROUP='Group';
|
|
161
|
+
static TITLE_N_A='N/A';
|
|
162
|
+
static TITLE_IMAGES='Images';
|
|
163
|
+
static TITLE_ITEMS='Items';
|
|
164
|
+
static TITLE_ONE='One';
|
|
165
|
+
static TITLE_ORDER_ITEMS='Order Items';
|
|
166
|
+
static TITLE_ORDER_SUB_ITEMS='order Sub Items';
|
|
167
|
+
static TITLE_PARENT_ITEM='Parent Item';
|
|
168
|
+
static TITLE_USER='User';
|
|
169
|
+
static TITLE_SORT_BY_ASC='ASC';
|
|
170
|
+
static TITLE_SORT_BY_DESC='DESC';
|
|
171
|
+
static TITLE_STAT_ITEMS='Stat Items';
|
|
172
|
+
static TITLE_STAT_SUB_ITEMS='Stat Sub Items';
|
|
173
|
+
static TITLE_ORDER_STATUS_NEW="New";
|
|
174
|
+
static TITLE_ORDER_STATUS_OPEN="Open";
|
|
175
|
+
static TITLE_ORDER_STATUS_COMPLETE="Complete";
|
|
176
|
+
static TITLE_ORDER_STATUS_RETURNED="Returned";
|
|
177
|
+
static TITLE_ORDER_STATUS_ON_HOLD="On Hold";
|
|
178
|
+
static TITLE_ORDER_STATUS_CANCELLED="Cancelled";
|
|
179
|
+
static TITLE_USER_ROLE_SUPER_ADMIN='Super Admin';
|
|
180
|
+
static TITLE_USER_ROLE_ADMIN='Admin';
|
|
181
|
+
static TITLE_USER_ROLE_MANAGER='Manager';
|
|
182
|
+
static TITLE_USER_ROLE_USER='User';
|
|
183
|
+
static TITLE_USER_ROLE_GUEST='Guest';
|
|
184
|
+
static TITLE_PAGE_ABOUT='About';
|
|
185
|
+
static TITLE_PAGE_CONTACT='Contact';
|
|
186
|
+
static TITLE_PAGE_HOME='Home';
|
|
187
|
+
static TITLE_PAGE_FAQ='Faq';
|
|
188
|
+
static TITLE_PAGE_BLOG_POST='Blog Post';
|
|
189
|
+
static TITLE_PAGE_BLOG_POST_HOME='Blog Post Home';
|
|
190
|
+
static TITLE_PAGE_BLOG_POST_SEARCH='Blog Post Search';
|
|
191
|
+
static TITLE_PAGE_EVENT='Event';
|
|
192
|
+
static TITLE_PAGE_EVENT_HOME='Event Home';
|
|
193
|
+
static TITLE_PAGE_EVENT_SEARCH='Event Search';
|
|
194
|
+
static TITLE_PAGE_GALLERY='Gallery';
|
|
195
|
+
static TITLE_PAGE_GALLERY_HOME='Gallery Home';
|
|
196
|
+
static TITLE_PAGE_GALLERY_SEARCH='Gallery Search';
|
|
197
|
+
static TITLE_PAGE_LOGIN='Login';
|
|
198
|
+
static TITLE_PAGE_PRODUCT='Product';
|
|
199
|
+
static TITLE_PAGE_PRODUCT_HOME='Product Home';
|
|
200
|
+
static TITLE_PAGE_PRODUCT_SEARCH='Product Search';
|
|
201
|
+
static TITLE_PAGE_REGISTER='Register';
|
|
202
|
+
static TITLE_PAGE_REVIEW_HOME='Review Home';
|
|
203
|
+
static TITLE_PAGE_SERVICE='Service';
|
|
204
|
+
static TITLE_PAGE_SERVICE_HOME='Service Home';
|
|
205
|
+
static TITLE_PAGE_SERVICE_SEARCH='Service Search';
|
|
206
|
+
static TITLE_SOURCE_DATABASE='Database';
|
|
207
|
+
static TITLE_SOURCE_CACHE='Cache';
|
|
208
|
+
static TITLE_SOURCE_NOT_FOUND='Not-Found';
|
|
209
|
+
|
|
258
210
|
//page
|
|
259
211
|
static PAGE_ABOUT='about';
|
|
260
212
|
static PAGE_CONTACT='contact';
|
|
@@ -339,215 +291,95 @@ class Type {
|
|
|
339
291
|
static ORDER_STATUS_RETURNED="returned";
|
|
340
292
|
static ORDER_STATUS_ON_HOLD="on_hold";
|
|
341
293
|
static ORDER_STATUS_CANCELLED="cancelled";
|
|
294
|
+
//app
|
|
295
|
+
static APP_MOBILE="Mobile";
|
|
296
|
+
static APP_WEBSITE="Website";
|
|
297
|
+
static APP_LANDING="Landing";
|
|
298
|
+
//social
|
|
299
|
+
static SOCIAL_URL_FACEBOOK="https://facebook.com/";
|
|
300
|
+
static SOCIAL_URL_TWITTER="https://twitter.com/";
|
|
301
|
+
static SOCIAL_URL_INSTAGRAM="https://instagram.com/";
|
|
302
|
+
static SOCIAL_URL_YOUTUBE="https://youtube.com/";
|
|
303
|
+
static SOCIAL_URL_LINKEDIN="https://linkedin.com/";
|
|
304
|
+
//str
|
|
305
|
+
static CATEGORY='Category';
|
|
306
|
+
static DESCRIPTION='Description';
|
|
307
|
+
static TYPE='Type';
|
|
342
308
|
static get_order_statuses(){
|
|
343
309
|
return [
|
|
344
|
-
{value:Type.ORDER_STATUS_NEW,label:
|
|
345
|
-
{value:Type.ORDER_STATUS_OPEN,label:
|
|
346
|
-
{value:Type.ORDER_STATUS_COMPLETE,label:
|
|
347
|
-
{value:Type.ORDER_STATUS_RETURNED,label:
|
|
348
|
-
{value:Type.ORDER_STATUS_ON_HOLD,label:
|
|
349
|
-
{value:Type.ORDER_STATUS_CANCELLED,label:
|
|
310
|
+
{value:Type.ORDER_STATUS_NEW,label:Type.TITLE_ORDER_STATUS_NEW,title:Type.TITLE_ORDER_STATUS_NEW},
|
|
311
|
+
{value:Type.ORDER_STATUS_OPEN,label:Type.TITLE_ORDER_STATUS_OPEN,title:Type.TITLE_ORDER_STATUS_OPEN},
|
|
312
|
+
{value:Type.ORDER_STATUS_COMPLETE,label:Type.TITLE_ORDER_STATUS_COMPLETE,title:Type.TITLE_ORDER_STATUS_COMPLETE},
|
|
313
|
+
{value:Type.ORDER_STATUS_RETURNED,label:Type.TITLE_ORDER_STATUS_RETURNED,title:Type.TITLE_ORDER_STATUS_RETURNED},
|
|
314
|
+
{value:Type.ORDER_STATUS_ON_HOLD,label:Type.TITLE_ORDER_STATUS_ON_HOLD,title:Type.TITLE_ORDER_STATUS_ON_HOLD},
|
|
315
|
+
{value:Type.ORDER_STATUS_CANCELLED,label:Type.TITLE_ORDER_STATUS_CANCELLED,title:Type.TITLE_ORDER_STATUS_CANCELLED},
|
|
350
316
|
];
|
|
351
317
|
};
|
|
352
318
|
static get_user_roles(){
|
|
353
319
|
return [
|
|
354
|
-
{value:Type.USER_ROLE_ADMIN,label:
|
|
355
|
-
{value:Type.USER_ROLE_MANAGER,label:
|
|
356
|
-
{value:Type.USER_ROLE_USER,label:
|
|
357
|
-
{value:Type.USER_ROLE_GUEST,label:
|
|
320
|
+
{value:Type.USER_ROLE_ADMIN,label:Type.TITLE_USER_ROLE_ADMIN,title:Type.TITLE_USER_ROLE_ADMIN},
|
|
321
|
+
{value:Type.USER_ROLE_MANAGER,label:Type.TITLE_USER_ROLE_MANAGER,title:Type.TITLE_USER_ROLE_MANAGER},
|
|
322
|
+
{value:Type.USER_ROLE_USER,label:Type.TITLE_USER_ROLE_USER,title:Type.TITLE_USER_ROLE_USER},
|
|
323
|
+
{value:Type.USER_ROLE_GUEST,label:Type.TITLE_USER_ROLE_GUEST,title:Type.TITLE_USER_ROLE_GUEST},
|
|
358
324
|
];
|
|
359
325
|
};
|
|
360
326
|
static get_pages(){
|
|
361
327
|
return [
|
|
362
|
-
{value:Type.PAGE_ABOUT,label:
|
|
363
|
-
{value:Type.PAGE_BLOG_POST,label:
|
|
364
|
-
{value:Type.PAGE_BLOG_POST_HOME,label:
|
|
365
|
-
{value:Type.PAGE_CONTACT,
|
|
366
|
-
{value:Type.PAGE_EVENT,label:
|
|
367
|
-
{value:Type.PAGE_EVENT_HOME,label:
|
|
368
|
-
{value:Type.PAGE_FAQ,label:
|
|
369
|
-
{value:Type.PAGE_HOME,label:
|
|
370
|
-
{value:Type.PAGE_GALLERY,label:
|
|
371
|
-
{value:Type.PAGE_GALLERY_HOME,label:
|
|
372
|
-
{value:Type.PAGE_LOGIN,label:
|
|
373
|
-
{value:Type.PAGE_PRODUCT,label:
|
|
374
|
-
{value:Type.PAGE_PRODUCT_HOME,label:
|
|
375
|
-
{value:Type.PAGE_REGISTER,label:
|
|
376
|
-
{value:Type.PAGE_REVIEW_HOME,label:
|
|
377
|
-
{value:Type.PAGE_SERVICE,label:
|
|
378
|
-
{value:Type.PAGE_SERVICE_HOME,label:
|
|
328
|
+
{value:Type.PAGE_ABOUT,title:Type.TITLE_PAGE_ABOUT,label:Type.TITLE_PAGE_ABOUT,url:Url.PAGE_ABOUT},
|
|
329
|
+
{value:Type.PAGE_BLOG_POST,title:Type.TITLE_PAGE_BLOG_POST,label:Type.TITLE_PAGE_BLOG_POST,url:Url.PAGE_BLOG_POST},
|
|
330
|
+
{value:Type.PAGE_BLOG_POST_HOME,title:Type.TITLE_PAGE_BLOG_POST_HOME,label:Type.TITLE_PAGE_BLOG_POST_HOME,url:Url.PAGE_BLOG_POST_HOME},
|
|
331
|
+
{value:Type.PAGE_CONTACT,title:Type.TITLE_PAGE_CONTACT,label:Type.TITLE_PAGE_CONTACT,url:Url.PAGE_CONTACT},
|
|
332
|
+
{value:Type.PAGE_EVENT,title:Type.TITLE_PAGE_EVENT,label:Type.TITLE_PAGE_EVENT,url:Url.PAGE_EVENT},
|
|
333
|
+
{value:Type.PAGE_EVENT_HOME,title:Type.TITLE_PAGE_EVENT_HOME,label:Type.TITLE_PAGE_EVENT_HOME,url:Url.PAGE_EVENT_HOME},
|
|
334
|
+
{value:Type.PAGE_FAQ,title:Type.TITLE_PAGE_FAQ,label:Type.TITLE_PAGE_FAQ,url:Url.PAGE_FAQ},
|
|
335
|
+
{value:Type.PAGE_HOME,title:Type.TITLE_PAGE_HOME,label:Type.TITLE_PAGE_HOME,url:Url.PAGE_HOME},
|
|
336
|
+
{value:Type.PAGE_GALLERY,title:Type.TITLE_PAGE_GALLERY,label:Type.TITLE_PAGE_GALLERY,url:Url.PAGE_GALLERY},
|
|
337
|
+
{value:Type.PAGE_GALLERY_HOME,title:Type.TITLE_PAGE_GALLERY_HOME,label:Type.TITLE_PAGE_GALLERY_HOME,url:Url.PAGE_GALLERY_HOME},
|
|
338
|
+
{value:Type.PAGE_LOGIN,title:Type.TITLE_PAGE_LOGIN,label:Type.TITLE_PAGE_LOGIN,url:Url.PAGE_LOGIN},
|
|
339
|
+
{value:Type.PAGE_PRODUCT,title:Type.TITLE_PAGE_PRODUCT,label:Type.TITLE_PAGE_PRODUCT,url:Url.PAGE_PRODUCT},
|
|
340
|
+
{value:Type.PAGE_PRODUCT_HOME,title:Type.TITLE_PAGE_PRODUCT_HOME,label:Type.TITLE_PAGE_PRODUCT_HOME,url:Url.PAGE_PRODUCT_HOME},
|
|
341
|
+
{value:Type.PAGE_REGISTER,title:Type.TITLE_PAGE_REGISTER,label:Type.TITLE_PAGE_REGISTER,url:Url.REGISTER},
|
|
342
|
+
{value:Type.PAGE_REVIEW_HOME,title:Type.TITLE_PAGE_REVIEW_HOME,label:Type.TITLE_PAGE_REVIEW_HOME,url:Url.PAGE_REVIEW_HOME},
|
|
343
|
+
{value:Type.PAGE_SERVICE,title:Type.TITLE_PAGE_SERVICE,label:Type.TITLE_PAGE_SERVICE,url:Url.PAGE_SERVICE},
|
|
344
|
+
{value:Type.PAGE_SERVICE_HOME,title:Type.TITLE_PAGE_SERVICE_HOME,label:Type.TITLE_PAGE_SERVICE_HOME,url:Url.PAGE_SERVICE_HOME},
|
|
379
345
|
];
|
|
380
346
|
};
|
|
381
347
|
static get_stat_types = () =>{
|
|
382
348
|
return [
|
|
383
|
-
{title:Type.
|
|
384
|
-
{title:Type.
|
|
385
|
-
{title:Type.
|
|
386
|
-
{title:Type.
|
|
387
|
-
{title:Type.
|
|
388
|
-
{title:Type.
|
|
389
|
-
{title:Type.
|
|
390
|
-
{title:Type.
|
|
391
|
-
{title:Type.
|
|
392
|
-
{title:Type.
|
|
393
|
-
{title:Type.
|
|
394
|
-
{title:Type.
|
|
395
|
-
{title:Type.
|
|
349
|
+
{title:Type.get_data_type_by_type(Type.STAT_CART),type:Type.STAT_CART,label:Type.get_data_type_by_type(Type.STAT_CART),value:Type.STAT_CART},
|
|
350
|
+
{title:Type.get_data_type_by_type(Type.STAT_CART_ITEM),type:Type.STAT_CART_ITEM,label:Type.get_data_type_by_type(Type.STAT_CART_ITEM),value:Type.STAT_CART_ITEM},
|
|
351
|
+
{title:Type.get_data_type_by_type(Type.STAT_CART_SUB_ITEM),type:Type.STAT_CART_SUB_ITEM,label:Type.get_data_type_by_type(Type.STAT_CART_SUB_ITEM),value:Type.STAT_CART_SUB_ITEM},
|
|
352
|
+
{title:Type.get_data_type_by_type(Type.STAT_FAVORITE),type:Type.STAT_FAVORITE,label:Type.get_data_type_by_type(Type.STAT_FAVORITE),value:Type.STAT_FAVORITE},
|
|
353
|
+
{title:Type.get_data_type_by_type(Type.STAT_LIKE),type:Type.STAT_LIKE,label:Type.get_data_type_by_type(Type.STAT_LIKE),value:Type.STAT_LIKE},
|
|
354
|
+
{title:Type.get_data_type_by_type(Type.STAT_LOGIN),type:Type.STAT_LOGIN,label:Type.get_data_type_by_type(Type.STAT_LOGIN),value:Type.STAT_LOGIN},
|
|
355
|
+
{title:Type.get_data_type_by_type(Type.STAT_ORDER),type:Type.STAT_ORDER,label:Type.get_data_type_by_type(Type.STAT_ORDER),value:Type.STAT_ORDER},
|
|
356
|
+
{title:Type.get_data_type_by_type(Type.STAT_ORDER_ITEM),type:Type.STAT_ORDER_ITEM,label:Type.get_data_type_by_type(Type.STAT_ORDER_ITEM),value:Type.STAT_ORDER_ITEM},
|
|
357
|
+
{title:Type.get_data_type_by_type(Type.STAT_ORDER_SUB_ITEM),type:Type.STAT_ORDER_SUB_ITEM,label:Type.get_data_type_by_type(Type.STAT_ORDER_SUB_ITEM),value:Type.STAT_ORDER_ITEM},
|
|
358
|
+
{title:Type.get_data_type_by_type(Type.STAT_ORDER_PAYMENT),type:Type.STAT_ORDER_PAYMENT,label:Type.get_data_type_by_type(Type.STAT_ORDER_PAYMENT),value:Type.STAT_ORDER_PAYMENT},
|
|
359
|
+
{title:Type.get_data_type_by_type(Type.STAT_REGISTER),type:Type.STAT_REGISTER,label:Type.get_data_type_by_type(Type.STAT_REGISTER),value:Type.STAT_REGISTER},
|
|
360
|
+
{title:Type.get_data_type_by_type(Type.STAT_REVIEW),type:Type.STAT_REVIEW,label:Type.get_data_type_by_type(Type.STAT_REVIEW),value:Type.STAT_REVIEW},
|
|
361
|
+
{title:Type.get_data_type_by_type(Type.STAT_VIEW),type:Type.STAT_VIEW,label:Type.get_data_type_by_type(Type.STAT_VIEW),value:Type.STAT_VIEW},
|
|
396
362
|
]
|
|
397
363
|
};
|
|
398
364
|
static get_data_types = () =>{
|
|
399
365
|
return [
|
|
400
|
-
{title:Type.
|
|
401
|
-
{title:Type.
|
|
402
|
-
{title:Type.
|
|
403
|
-
{title:Type.
|
|
404
|
-
{title:Type.
|
|
405
|
-
{title:Type.
|
|
406
|
-
{title:Type.
|
|
407
|
-
{title:Type.
|
|
408
|
-
{title:Type.
|
|
409
|
-
{title:Type.
|
|
410
|
-
]
|
|
411
|
-
};
|
|
412
|
-
static get_types = () =>{
|
|
413
|
-
return [
|
|
414
|
-
{title:Type.get_title(Type.DATA_BLOG_POST),type:Type.DATA_BLOG_POST,label:Type.get_title(Type.DATA_BLOG_POST),value:Type.DATA_BLOG_POST},
|
|
415
|
-
{title:Type.get_title(Type.DATA_CATEGORY),type:Type.DATA_CATEGORY,label:Type.get_title(Type.DATA_CATEGORY),value:Type.DATA_CATEGORY},
|
|
416
|
-
{title:Type.get_title(Type.DATA_CONTENT),type:Type.DATA_CONTENT,label:Type.get_title(Type.DATA_CONTENT),value:Type.DATA_CONTENT},
|
|
417
|
-
{title:Type.get_title(Type.DATA_EVENT),type:Type.DATA_EVENT,label:Type.get_title(Type.DATA_EVENT),value:Type.DATA_EVENT},
|
|
418
|
-
{title:Type.get_title(Type.DATA_GALLERY),type:Type.DATA_GALLERY,label:Type.get_title(Type.DATA_GALLERY),value:Type.DATA_GALLERY},
|
|
419
|
-
{title:Type.get_title(Type.DATA_USER),type:Type.DATA_USER,label:Type.get_title(Type.DATA_USER),value:Type.DATA_USER},
|
|
420
|
-
{title:Type.get_title(Type.DATA_PAGE),type:Type.DATA_PAGE,label:Type.get_title(Type.DATA_PAGE),value:Type.DATA_PAGE},
|
|
421
|
-
{title:Type.get_title(Type.DATA_PRODUCT),type:Type.DATA_PRODUCT,label:Type.get_title(Type.DATA_PRODUCT),value:Type.DATA_PRODUCT},
|
|
422
|
-
{title:Type.get_title(Type.DATA_SERVICE),type:Type.DATA_SERVICE,label:Type.get_title(Type.DATA_SERVICE),value:Type.DATA_SERVICE},
|
|
423
|
-
{title:Type.get_title(Type.DATA_TYPE),type:Type.DATA_TYPE,label:Type.get_title(Type.DATA_TYPE),value:Type.DATA_TYPE}
|
|
424
|
-
]
|
|
425
|
-
};
|
|
426
|
-
static get_app_environments = () =>{
|
|
427
|
-
return [
|
|
428
|
-
{title:Type.get_title(Type.APP_ENV_TEST),type:Type.APP_ENV_TEST,label:Type.get_title(Type.APP_ENV_TEST),value:Type.APP_ENV_TEST},
|
|
429
|
-
{title:Type.get_title(Type.APP_ENV_STAGE),type:Type.APP_ENV_STAGE,label:Type.get_title(Type.APP_ENV_STAGE),value:Type.APP_ENV_STAGE},
|
|
430
|
-
{title:Type.get_title(Type.APP_ENV_PROD),type:Type.APP_ENV_PROD,label:Type.get_title(Type.APP_ENV_PROD),value:Type.APP_ENV_PROD},
|
|
366
|
+
{title:Type.TITLE_DATA_BLOG_POST,label:Type.TITLE_DATA_BLOG_POST,type:Type.DATA_BLOG_POST,value:Type.DATA_BLOG_POST},
|
|
367
|
+
{title:Type.TITLE_DATA_CATEGORY,label:Type.TITLE_DATA_CATEGORY,type:Type.DATA_CATEGORY,value:Type.DATA_CATEGORY},
|
|
368
|
+
{title:Type.TITLE_DATA_CONTENT,label:Type.TITLE_DATA_CONTENT,type:Type.DATA_CONTENT,value:Type.DATA_CONTENT},
|
|
369
|
+
{title:Type.TITLE_DATA_EVENT,type:Type.DATA_EVENT,value:Type.DATA_EVENT},
|
|
370
|
+
{title:Type.TITLE_DATA_FAQ,label:Type.TITLE_DATA_EVENT,type:Type.DATA_FAQ,value:Type.DATA_FAQ},
|
|
371
|
+
{title:Type.TITLE_DATA_GALLERY,label:Type.TITLE_DATA_GALLERY,type:Type.DATA_GALLERY,label:Type.get_data_type_by_type(Type.DATA_GALLERY),value:Type.DATA_GALLERY},
|
|
372
|
+
{title:Type.TITLE_DATA_USER,label:Type.TITLE_DATA_USER,type:Type.DATA_USER,value:Type.DATA_USER},
|
|
373
|
+
{title:Type.TITLE_DATA_PAGE,label:Type.TITLE_DATA_PAGE,type:Type.DATA_PAGE,value:Type.DATA_PAGE},
|
|
374
|
+
{title:Type.TITLE_DATA_PRODUCT,label:Type.TITLE_DATA_PAGE,type:Type.DATA_PRODUCT,value:Type.DATA_PRODUCT},
|
|
375
|
+
{title:Type.TITLE_DATA_SERVICE,label:Type.TITLE_DATA_PRODUCT,type:Type.DATA_SERVICE,value:Type.DATA_SERVICE}
|
|
431
376
|
]
|
|
432
377
|
};
|
|
433
|
-
static
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
{
|
|
437
|
-
|
|
438
|
-
]
|
|
439
|
-
};
|
|
440
|
-
//9_get_title
|
|
441
|
-
static get_title = (type,option)=>{
|
|
442
|
-
/* option
|
|
443
|
-
* lowercase = ex. true,false / def. false
|
|
444
|
-
* plural = ex. true,false / def. false
|
|
445
|
-
* url = ex. true,false / def. false
|
|
446
|
-
*/
|
|
447
|
-
type = type?type:"";
|
|
448
|
-
let r_type = "";
|
|
449
|
-
option = option ? option : {lowercase:false,plural:false,url:false};
|
|
450
|
-
switch(type){
|
|
451
|
-
case Type.STAT_CART:
|
|
452
|
-
r_type = "Cart";
|
|
453
|
-
break;
|
|
454
|
-
case Type.STAT_CART_ITEM:
|
|
455
|
-
r_type = "Cart Item";
|
|
456
|
-
break;
|
|
457
|
-
case Type.STAT_CART_SUB_ITEM:
|
|
458
|
-
r_type = "Cart Sub Item";
|
|
459
|
-
break;
|
|
460
|
-
case Type.STAT_FAVORITE:
|
|
461
|
-
r_type = "Favorite";
|
|
462
|
-
break;
|
|
463
|
-
case Type.STAT_LIKE:
|
|
464
|
-
r_type = "Like";
|
|
465
|
-
break;
|
|
466
|
-
case Type.STAT_LOGIN:
|
|
467
|
-
r_type = "Login";
|
|
468
|
-
break;
|
|
469
|
-
case Type.STAT_ORDER:
|
|
470
|
-
r_type = "Order";
|
|
471
|
-
break;
|
|
472
|
-
case Type.STAT_ORDER_ITEM:
|
|
473
|
-
r_type = "Order Item";
|
|
474
|
-
break;
|
|
475
|
-
case Type.STAT_ORDER_SUB_ITEM:
|
|
476
|
-
r_type = "Order Sub Item";
|
|
477
|
-
break;
|
|
478
|
-
case Type.STAT_ORDER_PAYMENT:
|
|
479
|
-
r_type = "Order Payment";
|
|
480
|
-
break;
|
|
481
|
-
case Type.STAT_REGISTER:
|
|
482
|
-
r_type = "Register";
|
|
483
|
-
break;
|
|
484
|
-
case Type.STAT_REVIEW:
|
|
485
|
-
r_type = "Review";
|
|
486
|
-
break;
|
|
487
|
-
case Type.STAT_VIEW:
|
|
488
|
-
r_type = "View";
|
|
489
|
-
break;
|
|
490
|
-
case Type.APP_ENV_TEST:
|
|
491
|
-
r_type = "Testing";
|
|
492
|
-
break;
|
|
493
|
-
case Type.APP_ENV_STAGE:
|
|
494
|
-
r_type = "Staging";
|
|
495
|
-
break;
|
|
496
|
-
case Type.APP_ENV_PROD:
|
|
497
|
-
r_type = "Production";
|
|
498
|
-
break;
|
|
499
|
-
case Type.APP_LINK_TYPE_WEBSITE:
|
|
500
|
-
r_type = "Website";
|
|
501
|
-
break;
|
|
502
|
-
case Type.APP_LINK_TYPE_GOOGLE_PLAY:
|
|
503
|
-
r_type = "Google Play";
|
|
504
|
-
break;
|
|
505
|
-
case Type.APP_LINK_TYPE_APPLE_STORE:
|
|
506
|
-
r_type = "Apple Store";
|
|
507
|
-
break;
|
|
508
|
-
case Type.APP_LINK_TYPE_CMS:
|
|
509
|
-
r_type = "Content Management System";
|
|
510
|
-
break;
|
|
511
|
-
case Type.ID:
|
|
512
|
-
r_type = "ID";
|
|
513
|
-
case Type.N_A:
|
|
514
|
-
r_type = "N/A";
|
|
515
|
-
case Type.PAGE_ABOUT:
|
|
516
|
-
case Type.PAGE_BLOG_POST:
|
|
517
|
-
case Type.PAGE_BLOG_POST_HOME:
|
|
518
|
-
case Type.PAGE_CONTACT:
|
|
519
|
-
case Type.PAGE_EVENT:
|
|
520
|
-
case Type.PAGE_EVENT_HOME:
|
|
521
|
-
case Type.PAGE_FAQ:
|
|
522
|
-
case Type.PAGE_GALLERY:
|
|
523
|
-
case Type.PAGE_GALLERY_HOME:
|
|
524
|
-
case Type.PAGE_HOME:
|
|
525
|
-
case Type.PAGE_LOGIN:
|
|
526
|
-
case Type.PAGE_PRODUCT:
|
|
527
|
-
case Type.PAGE_PRODUCT_HOME:
|
|
528
|
-
case Type.PAGE_SERVICE:
|
|
529
|
-
case Type.PAGE_SERVICE_HOME:
|
|
530
|
-
case Type.PAGE_REVIEW_HOME:
|
|
531
|
-
case Type.USER_ROLE_SUPER_ADMIN:
|
|
532
|
-
case Type.USER_ROLE_ADMIN:
|
|
533
|
-
case Type.USER_ROLE_MANAGER:
|
|
534
|
-
case Type.USER_ROLE_USER:
|
|
535
|
-
case Type.USER_ROLE_GUEST:
|
|
536
|
-
case Type.ORDER_STATUS_NEW:
|
|
537
|
-
case Type.ORDER_STATUS_OPEN:
|
|
538
|
-
case Type.ORDER_STATUS_COMPLETE:
|
|
539
|
-
case Type.ORDER_STATUS_RETURNED:
|
|
540
|
-
case Type.ORDER_STATUS_ON_HOLD:
|
|
541
|
-
case Type.ORDER_STATUS_CANCELLED:
|
|
542
|
-
case Type.ORDER_PAYMENT_PLAN_NEW:
|
|
543
|
-
case Type.ORDER_PAYMENT_PLAN_1:
|
|
544
|
-
case Type.ORDER_PAYMENT_PLAN_2:
|
|
545
|
-
case Type.ORDER_PAYMENT_PLAN_3:
|
|
546
|
-
case Type.ORDER_PAYMENT_PLAN_4:
|
|
547
|
-
case Type.ORDER_PAYMENT_METHOD_STRIPE:
|
|
548
|
-
case Type.ORDER_PAYMENT_METHOD_CASH:
|
|
549
|
-
case Type.ORDER_PAYMENT_METHOD_OTHER:
|
|
550
|
-
case Type.ORDER_PAYMENT_METHOD_TEST:
|
|
378
|
+
static get_data_type_by_type = (data_type,option) =>{
|
|
379
|
+
data_type = data_type?data_type:"";
|
|
380
|
+
let r_type = "";
|
|
381
|
+
option = option ? option : {lowercase:false,plural:false,url:false};
|
|
382
|
+
switch(data_type){
|
|
551
383
|
case Type.DATA_APP:
|
|
552
384
|
case Type.DATA_BLANK:
|
|
553
385
|
case Type.DATA_BLOG_POST:
|
|
@@ -579,12 +411,9 @@ class Type {
|
|
|
579
411
|
case Type.DATA_TYPE:
|
|
580
412
|
case Type.DATA_USER:
|
|
581
413
|
case Type.DATA_VIDEO:
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
r_type = "N/A";
|
|
586
|
-
break;
|
|
587
|
-
}
|
|
414
|
+
r_type = String(Str.get_title(data_type.replaceAll('_',' ').replaceAll('dt','').replace('biz',''))).trim();
|
|
415
|
+
break;
|
|
416
|
+
};
|
|
588
417
|
if(option.plural){
|
|
589
418
|
r_type = r_type + 's';
|
|
590
419
|
}
|
|
@@ -596,19 +425,46 @@ class Type {
|
|
|
596
425
|
}
|
|
597
426
|
return r_type;
|
|
598
427
|
};
|
|
599
|
-
|
|
600
|
-
|
|
428
|
+
|
|
429
|
+
static get_data_types = () =>{
|
|
430
|
+
return [
|
|
431
|
+
{title:Type.get_data_type_by_type(Type.DATA_BLOG_POST),type:Type.DATA_BLOG_POST,label:Type.get_data_type_by_type(Type.DATA_BLOG_POST),value:Type.DATA_BLOG_POST},
|
|
432
|
+
{title:Type.get_data_type_by_type(Type.DATA_CATEGORY),type:Type.DATA_CATEGORY,label:Type.get_data_type_by_type(Type.DATA_CATEGORY),value:Type.DATA_CATEGORY},
|
|
433
|
+
{title:Type.get_data_type_by_type(Type.DATA_CONTENT),type:Type.DATA_CONTENT,label:Type.get_data_type_by_type(Type.DATA_CONTENT),value:Type.DATA_CONTENT},
|
|
434
|
+
{title:Type.get_data_type_by_type(Type.DATA_EVENT),type:Type.DATA_EVENT,label:Type.get_data_type_by_type(Type.DATA_EVENT),value:Type.DATA_EVENT},
|
|
435
|
+
{title:Type.get_data_type_by_type(Type.DATA_GALLERY),type:Type.DATA_GALLERY,label:Type.get_data_type_by_type(Type.DATA_GALLERY),value:Type.DATA_GALLERY},
|
|
436
|
+
{title:Type.get_data_type_by_type(Type.DATA_USER),type:Type.DATA_USER,label:Type.get_data_type_by_type(Type.DATA_USER),value:Type.DATA_USER},
|
|
437
|
+
{title:Type.get_data_type_by_type(Type.DATA_PAGE),type:Type.DATA_PAGE,label:Type.get_data_type_by_type(Type.DATA_PAGE),value:Type.DATA_PAGE},
|
|
438
|
+
{title:Type.get_data_type_by_type(Type.DATA_PRODUCT),type:Type.DATA_PRODUCT,label:Type.get_data_type_by_type(Type.DATA_PRODUCT),value:Type.DATA_PRODUCT},
|
|
439
|
+
{title:Type.get_data_type_by_type(Type.DATA_SERVICE),type:Type.DATA_SERVICE,label:Type.get_data_type_by_type(Type.DATA_SERVICE),value:Type.DATA_SERVICE},
|
|
440
|
+
{title:Type.get_data_type_by_type(Type.DATA_TYPE),type:Type.DATA_TYPE,label:Type.get_data_type_by_type(Type.DATA_TYPE),value:Type.DATA_TYPE}
|
|
441
|
+
]
|
|
442
|
+
};
|
|
443
|
+
static get_app_environments = () =>{
|
|
444
|
+
return [
|
|
445
|
+
{label:Type.TITLE_APP_ENV_STAGE,title:Type.TITLE_APP_ENV_TEST,type:Type.APP_ENV_TEST,value:Type.APP_ENV_TEST},
|
|
446
|
+
{label:Type.TITLE_APP_ENV_STAGE,title:Type.TITLE_APP_ENV_STAGE,type:Type.APP_ENV_STAGE,value:Type.APP_ENV_STAGE},
|
|
447
|
+
{label:Type.TITLE_APP_ENV_PROD,title:Type.TITLE_APP_ENV_PROD,type:Type.APP_ENV_PROD,value:Type.APP_ENV_PROD},
|
|
448
|
+
]
|
|
449
|
+
};
|
|
450
|
+
static get_app_links = () =>{
|
|
451
|
+
return [
|
|
452
|
+
{title:Type.TITLE_APP_LINK_TYPE_WEBSITE,label:Type.TITLE_APP_LINK_TYPE_WEBSITE,type:Type.APP_LINK_TYPE_WEBSITE,value:Type.APP_LINK_TYPE_WEBSITE},
|
|
453
|
+
{title:Type.TITLE_APP_LINK_TYPE_GOOGLE_PLAY,label:Type.TITLE_APP_LINK_TYPE_GOOGLE_PLAY,type:Type.APP_LINK_TYPE_GOOGLE_PLAY,value:Type.APP_LINK_TYPE_GOOGLE_PLAY},
|
|
454
|
+
{title:Type.TITLE_APP_LINK_TYPE_APPLE_STORE,label:Type.TITLE_APP_LINK_TYPE_APPLE_STORE,type:Type.APP_LINK_TYPE_APPLE_STORE,value:Type.APP_LINK_TYPE_APPLE_STORE},
|
|
455
|
+
{title:Type.TITLE_APP_LINK_TYPE_CMS,label:Type.TITLE_APP_LINK_TYPE_CMS,type:Type.APP_LINK_TYPE_CMS,value:Type.APP_LINK_TYPE_CMS},
|
|
456
|
+
]
|
|
601
457
|
};
|
|
602
458
|
}
|
|
603
459
|
class Stat_Logic {
|
|
604
|
-
static
|
|
605
|
-
let new_stat = Data_Logic.get_new(Type.DATA_STAT,0,
|
|
460
|
+
static get = (parent_data_type,parent_id,type,user_id,post_data) => {
|
|
461
|
+
let new_stat = Data_Logic.get_new(Type.DATA_STAT,0,{option:
|
|
606
462
|
{
|
|
607
463
|
user_id:user_id,
|
|
608
464
|
type:type,
|
|
609
465
|
parent_data_type:parent_data_type,
|
|
610
466
|
parent_id:parent_id
|
|
611
|
-
});
|
|
467
|
+
}});
|
|
612
468
|
if(!Obj.check_is_empty(post_data)){
|
|
613
469
|
new_stat = Obj.merge(new_stat,Stat_Logic.filter_stat(post_data));
|
|
614
470
|
}
|
|
@@ -636,26 +492,10 @@ class Stat_Logic {
|
|
|
636
492
|
return filter_stat;
|
|
637
493
|
}
|
|
638
494
|
}
|
|
639
|
-
class Page_Logic {
|
|
640
|
-
static get_test = (title,option) =>{
|
|
641
|
-
[title,option] = Field_Logic.get_option_title(title,option);
|
|
642
|
-
option = Field_Logic.get_option(Type.DATA_PAGE,option?option:{});
|
|
643
|
-
let page = Data_Logic.get_new(Type.DATA_PAGE,0,Field_Logic.get_test(title,option));
|
|
644
|
-
return page;
|
|
645
|
-
};
|
|
646
|
-
static get_test_items = (option) =>{
|
|
647
|
-
option = Field_Logic.get_option(Type.DATA_PAGE,option?option:{});
|
|
648
|
-
let items = [];
|
|
649
|
-
for(let a=0;a<parseInt(option.page_count)+1;a++){
|
|
650
|
-
items.push(Page_Logic.get_test( "Page " +parseInt(a+1)? !option.get_blank : "",option));
|
|
651
|
-
}
|
|
652
|
-
return items;
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
495
|
class Order_Logic {
|
|
656
|
-
static
|
|
496
|
+
static get = (cart,option) => {
|
|
657
497
|
option = option?option:{get_payment_plan:false,payment_plan:Title.ORDER_PAYMENT_PLAN_1};
|
|
658
|
-
let order = Data_Logic.get_new(Type.DATA_ORDER,0,{
|
|
498
|
+
let order = Data_Logic.get_new(Type.DATA_ORDER,0,{data:{
|
|
659
499
|
order_number:Title.ORDER_NUMBER + Num.get_id(99999),
|
|
660
500
|
parent_data_type:cart.parent_data_type,
|
|
661
501
|
user_id:cart.user_id,
|
|
@@ -663,7 +503,7 @@ class Order_Logic {
|
|
|
663
503
|
grand_total:cart.grand_total,
|
|
664
504
|
status:Type.ORDER_STATUS_NEW,
|
|
665
505
|
order_items:[]
|
|
666
|
-
});
|
|
506
|
+
}});
|
|
667
507
|
for(const key in cart) {
|
|
668
508
|
if(!Str.check_is_null(cart[key])
|
|
669
509
|
&& key != Type.FIELD_ID && key != Type.FIELD_DATA_TYPE
|
|
@@ -678,8 +518,9 @@ class Order_Logic {
|
|
|
678
518
|
if(option.get_payment_plan){
|
|
679
519
|
order.payment_plan = option.payment_plan;
|
|
680
520
|
}
|
|
521
|
+
/*
|
|
681
522
|
cart.cart_items.forEach(cart_item => {
|
|
682
|
-
let order_item = Data_Logic.get_new(Type.DATA_ORDER_ITEM,0,{
|
|
523
|
+
let order_item = Data_Logic.get_new(Type.DATA_ORDER_ITEM,0,{data:{
|
|
683
524
|
order_number:order.order_number,
|
|
684
525
|
parent_data_type:cart_item.parent_data_type,
|
|
685
526
|
parent_id:cart_item.parent_id,
|
|
@@ -687,36 +528,31 @@ class Order_Logic {
|
|
|
687
528
|
quanity:cart_item.quanity?cart_item.quanity:0,
|
|
688
529
|
cost:cart_item.cost?cart_item.cost:0,
|
|
689
530
|
order_sub_items:[]
|
|
690
|
-
});
|
|
531
|
+
}});
|
|
532
|
+
});
|
|
691
533
|
for(const key in cart_item){
|
|
692
|
-
if(!Str.check_is_null(cart_item[key])
|
|
534
|
+
if(!Str.check_is_null(cart_item[key]){
|
|
693
535
|
&& key != Type.FIELD_ID && key != Type.FIELD_DATA_TYPE
|
|
694
536
|
&& key != Type.TITLE_PARENT_ITEM && key != Type.TITLE_USER
|
|
695
537
|
&& key != Type.TITLE_CART_ITEMS && key != Type.TITLE_CART_SUB_ITEMS
|
|
696
538
|
&& key != Type.TITLE_ORDER_ITEMS && key != Type.TITLE_ORDER_SUB_ITEMS
|
|
697
539
|
&& key != Type.FIELD_SOURCE && key != Type.FIELD_SOURCE_ID
|
|
698
|
-
&& key != Type.FIELD_DATE_CREATE && key != Type.FIELD_DATE_SAVE
|
|
699
|
-
order_item[key] = cart_item[key]
|
|
540
|
+
&& key != Type.FIELD_DATE_CREATE && key != Type.FIELD_DATE_SAVE
|
|
541
|
+
order_item[key] = cart_item[key]
|
|
700
542
|
}
|
|
701
543
|
}
|
|
702
544
|
cart_item.cart_sub_items.forEach(cart_sub_item => {
|
|
703
|
-
let order_sub_item = Data_Logic.get_new(Type.DATA_ORDER_SUB_ITEM,0,
|
|
704
|
-
order_number:order.order_number,
|
|
705
|
-
parent_data_type:cart_sub_item.parent_data_type,
|
|
706
|
-
parent_id:cart_sub_item.parent_id,
|
|
707
|
-
user_id:order.user_id,
|
|
708
|
-
quanity:cart_sub_item.quanity?cart_sub_item.quanity:0,
|
|
709
|
-
cost:cart_sub_item.cost?cart_sub_item.cost:0
|
|
710
|
-
})
|
|
545
|
+
let order_sub_item = Data_Logic.get_new(Type.DATA_ORDER_SUB_ITEM,0,
|
|
546
|
+
{data:{order_number:order.order_number,parent_data_type:cart_sub_item.parent_data_type,parent_id:cart_sub_item.parent_id,user_id:order.user_id,quanity:cart_sub_item.quanity?cart_sub_item.quanity:0,cost:cart_sub_item.cost?cart_sub_item.cost:0}};
|
|
711
547
|
for(const key in cart_sub_item){
|
|
712
|
-
if(!Str.check_is_null(cart_sub_item[key])
|
|
548
|
+
if(!Str.check_is_null(cart_sub_item[key])){
|
|
713
549
|
&& key != Type.FIELD_ID && key != Type.DATA_TYPE
|
|
714
550
|
&& key != Type.TITLE_PARENT_ITEM && key != Type.TITLE_USER
|
|
715
551
|
&& key != Type.TITLE_CART_ITEMS && key != Type.TITLE_CART_SUB_ITEMS
|
|
716
552
|
&& key != Type.TITLE_ORDER_ITEMS && key != Type.TITLE_ORDER_SUB_ITEMS
|
|
717
553
|
&& key != Type.FIELD_SOURCE && key != Type.FIELD_SOURCE_ID
|
|
718
|
-
&& key != Type.FIELD_DATE_CREATE && key != Type.FIELD_DATE_SAVE
|
|
719
|
-
order_sub_item[key] = cart_sub_item[key]
|
|
554
|
+
&& key != Type.FIELD_DATE_CREATE && key != Type.FIELD_DATE_SAVE{
|
|
555
|
+
order_sub_item[key] = cart_sub_item[key]{
|
|
720
556
|
}
|
|
721
557
|
}
|
|
722
558
|
order_item.order_sub_items.push(order_sub_item);
|
|
@@ -724,15 +560,17 @@ class Order_Logic {
|
|
|
724
560
|
order.order_items.push(order_item);
|
|
725
561
|
});
|
|
726
562
|
return order;
|
|
563
|
+
*/
|
|
727
564
|
};
|
|
728
|
-
|
|
729
|
-
|
|
565
|
+
/*
|
|
566
|
+
static get_order_payment = (order_number,payment_method_type,payment_amount) => {
|
|
567
|
+
return Data_Logic.get_new(Type.DATA_ORDER_PAYMENT,0,{data:
|
|
730
568
|
{
|
|
731
569
|
order_number:order_number,
|
|
732
570
|
payment_method_type:payment_method_type,
|
|
733
571
|
payment_amount:payment_amount,
|
|
734
572
|
transaction_id:Title.ORDER_TRANSACTION_ID + Num.get_id(99999)
|
|
735
|
-
});
|
|
573
|
+
}});
|
|
736
574
|
};
|
|
737
575
|
static get_total = (order) => {
|
|
738
576
|
let grand_total = 0;
|
|
@@ -753,16 +591,17 @@ class Order_Logic {
|
|
|
753
591
|
order.grand_total = grand_total;
|
|
754
592
|
return order;
|
|
755
593
|
};
|
|
594
|
+
*/
|
|
756
595
|
}
|
|
757
596
|
class Cart_Logic {
|
|
758
|
-
static
|
|
759
|
-
return Data_Logic.get_new(Type.DATA_CART,0,{user_id:user_id,cart_number:Title.CART_NUMBER + Num.get_id(99999),parent_data_type:parent_data_type,grand_total:0,cart_items:[]});
|
|
597
|
+
static get = (parent_data_type,user_id) => {
|
|
598
|
+
return Data_Logic.get_new(Type.DATA_CART,0,{data:{user_id:user_id,cart_number:Title.CART_NUMBER + Num.get_id(99999),parent_data_type:parent_data_type,grand_total:0,cart_items:[]}});
|
|
760
599
|
};
|
|
761
|
-
static
|
|
762
|
-
return Data_Logic.get_new(Type.DATA_CART_ITEM,0,{parent_data_type:parent_data_type,parent_id:parent_id,cart_number:cart_number,quanity:quanity?quanity:0,cost:cost?cost:0,cart_sub_items:[]});
|
|
600
|
+
static get_cart_item = (parent_data_type,parent_id,cart_number,quanity,cost) =>{
|
|
601
|
+
return Data_Logic.get_new(Type.DATA_CART_ITEM,0,{data:{parent_data_type:parent_data_type,parent_id:parent_id,cart_number:cart_number,quanity:quanity?quanity:0,cost:cost?cost:0,cart_sub_items:[]}});
|
|
763
602
|
};
|
|
764
|
-
static
|
|
765
|
-
return Data_Logic.get_new(Type.DATA_CART_SUB_ITEM,0,{parent_data_type:parent_data_type,parent_id:parent_id,cart_number:cart_number,quanity:quanity?quanity:0,cost:cost?cost:0});
|
|
603
|
+
static get_cart_sub_item = (parent_data_type,parent_id,cart_number,quanity,cost) =>{
|
|
604
|
+
return Data_Logic.get_new(Type.DATA_CART_SUB_ITEM,0,{data:{parent_data_type:parent_data_type,parent_id:parent_id,cart_number:cart_number,quanity:quanity?quanity:0,cost:cost?cost:0}});
|
|
766
605
|
};
|
|
767
606
|
static get_total = (cart) => {
|
|
768
607
|
let grand_total = 0;
|
|
@@ -785,13 +624,6 @@ class Cart_Logic {
|
|
|
785
624
|
};
|
|
786
625
|
}
|
|
787
626
|
class Product_Logic {
|
|
788
|
-
static get_new = (title,type,category,option) => {
|
|
789
|
-
option = option ? option : {};
|
|
790
|
-
const item = Item_Logic.get_new(title,Type.DATA_PRODUCT);
|
|
791
|
-
item.type = type;
|
|
792
|
-
item.category = category = category?category:"";
|
|
793
|
-
return item;
|
|
794
|
-
};
|
|
795
627
|
static get_stocks = () => {
|
|
796
628
|
const stocks=
|
|
797
629
|
[
|
|
@@ -822,67 +654,16 @@ class Product_Logic {
|
|
|
822
654
|
break;
|
|
823
655
|
}
|
|
824
656
|
};
|
|
825
|
-
static get_test = (
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
product.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
836
|
-
}else{
|
|
837
|
-
product.cost = "";
|
|
838
|
-
product.old_cost = "";
|
|
839
|
-
product.type = "";
|
|
840
|
-
product.sub_type = "";
|
|
841
|
-
product.stock = "";
|
|
842
|
-
product.tag = "";
|
|
843
|
-
}
|
|
844
|
-
return product;
|
|
845
|
-
};
|
|
846
|
-
static get_test_cart = (cart_number,user_id,option) =>{
|
|
847
|
-
[cart_number,option] = ield_Logic.get_option_title(cart_number,option);
|
|
848
|
-
option = Field_Logic.get_option(Type.DATA_CART,option?option:{});
|
|
849
|
-
let cart = Data_Logic.get_new(Type.DATA_CART,Num.get_guid(),Field_Logic.get_test(cart_number,option));
|
|
850
|
-
cart.user_id = user_id;
|
|
851
|
-
cart.cart_number = cart_number;
|
|
852
|
-
if(option.get_cart_item){
|
|
853
|
-
let product_option = {product_count:option.cart_item_count,generate_id:true};
|
|
854
|
-
let products = Product_Logic.get_test_items(product_option);
|
|
855
|
-
cart.cart_items = [];
|
|
856
|
-
for(let a = 0;a<products.length;a++){
|
|
857
|
-
let product_cart_item =Cart_Logic.get_test_item(cart_number,cart.id,user_id,products[a].data_type,products[a].id,{get_value:false,get_cart_sub_item:option.get_cart_sub_item,cart_sub_item_count:option.cart_sub_item_count,generate_id:true});
|
|
858
|
-
product_cart_item.item_item = products[a];
|
|
859
|
-
cart.cart_items.push(product_cart_item);
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
return cart;
|
|
863
|
-
};
|
|
864
|
-
static get_test_items = (option) =>{
|
|
865
|
-
option = Field_Logic.get_option(Type.DATA_PRODUCT,option?option:{});
|
|
866
|
-
let items = [];
|
|
867
|
-
for(let a=0;a<option.product_count+1;a++){
|
|
868
|
-
items.push(Product_Logic.get_test("Product "+String(parseInt(a+1)),option));
|
|
869
|
-
}
|
|
870
|
-
return items;
|
|
871
|
-
}
|
|
872
|
-
static get_test_items_by_category = (option) =>{
|
|
873
|
-
option = Field_Logic.get_option(Type.DATA_PRODUCT,option?option:{});
|
|
874
|
-
let products = [];
|
|
875
|
-
let categorys = Category_Logic.get_type_categorys(Type.DATA_PRODUCT,option.category_count);
|
|
876
|
-
let item_count = 0;
|
|
877
|
-
for(let a=0;a<categorys.length;a++){
|
|
878
|
-
for(let b=0;b<option.product_count;b++){
|
|
879
|
-
item_count++;
|
|
880
|
-
let product = Product_Logic.get_test("Product "+String(parseInt(b+1)),option);
|
|
881
|
-
product.category = categorys[Num.get_id(categorys.length+1)].title;
|
|
882
|
-
products.push(product);
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
return [categorys,products]
|
|
657
|
+
static get_test = (option) =>{
|
|
658
|
+
let data = {};
|
|
659
|
+
data.cost = Field_Logic.get_test_cost();
|
|
660
|
+
data.old_cost = Field_Logic.get_test_cost();
|
|
661
|
+
data.category = "Category "+String(Num.get_id());
|
|
662
|
+
data.type = "Type "+String(Num.get_id());
|
|
663
|
+
data.sub_type = "Sub Type "+String(Num.get_id());
|
|
664
|
+
data.stock = String(Num.get_id(3-1));
|
|
665
|
+
data.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
666
|
+
return data;
|
|
886
667
|
};
|
|
887
668
|
}
|
|
888
669
|
class Service_Logic {
|
|
@@ -909,147 +690,44 @@ class Service_Logic {
|
|
|
909
690
|
break;
|
|
910
691
|
}
|
|
911
692
|
};
|
|
912
|
-
static get_test = (
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
service.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
922
|
-
return service;
|
|
923
|
-
};
|
|
924
|
-
static get_test_items = (option) =>{
|
|
925
|
-
option = Field_Logic.get_option(Type.DATA_SERVICE,option?option:{});
|
|
926
|
-
let items = [];
|
|
927
|
-
for(let a=0;a<parseInt(option.service_count)+1;a++){
|
|
928
|
-
items.push(Service_Logic.get_test("Service "+String(parseInt(a+1)),option));
|
|
929
|
-
}
|
|
930
|
-
return items;
|
|
931
|
-
}
|
|
932
|
-
static get_test_items_by_category = (option) =>{
|
|
933
|
-
option = Field_Logic.get_option(Type.DATA_SERVICE,option?option:{});
|
|
934
|
-
let services = [];
|
|
935
|
-
let categorys = Category_Logic.get_type_categorys(Type.DATA_SERVICE,option.category_count);
|
|
936
|
-
let item_count = 0;
|
|
937
|
-
for(let a=0;a<categorys.length;a++){
|
|
938
|
-
for(let b=0;b<parseInt(option.service_count);b++){
|
|
939
|
-
item_count++;
|
|
940
|
-
let service = Service_Logic.get_test("Service "+String(parseInt(b+1)),option);
|
|
941
|
-
service.category = categorys[Num.get_id(categorys.length+1)].title;
|
|
942
|
-
services.push(service);
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
return [categorys,services]
|
|
946
|
-
};
|
|
947
|
-
}
|
|
948
|
-
class Content_Logic {
|
|
949
|
-
static get_test = (title,option) =>{
|
|
950
|
-
[title,option] = Field_Logic.get_option_title(title,option);
|
|
951
|
-
option = Field_Logic.get_option(Type.DATA_CONTENT,option?option:{});
|
|
952
|
-
let content = Data_Logic.get_new(Type.DATA_CONTENT,0,Field_Logic.get_test(title,option));
|
|
953
|
-
return content;
|
|
954
|
-
};
|
|
955
|
-
static get_test_items = (option) =>{
|
|
956
|
-
option = Field_Logic.get_option(Type.DATA_CONTENT,option?option:{});
|
|
957
|
-
let items = [];
|
|
958
|
-
for(let a=0;a<parseInt(option.content_count)+1;a++){
|
|
959
|
-
items.push(Content_Logic.get_test("Content " +String(parseInt(a+1)),option));
|
|
960
|
-
}
|
|
961
|
-
return items;
|
|
962
|
-
}
|
|
963
|
-
static get_test_items_by_category = (option) =>{
|
|
964
|
-
option = Field_Logic.get_option(Type.DATA_CONTENT,option?option:{});
|
|
965
|
-
let contents = [];
|
|
966
|
-
let categorys = Category_Logic.get_type_categorys(Type.DATA_CONTENT,option.category_count);
|
|
967
|
-
let item_count = 0;
|
|
968
|
-
for(let a=0;a<categorys.length;a++){
|
|
969
|
-
for(let b=0;b<parseInt(option.content_count);b++){
|
|
970
|
-
item_count++;
|
|
971
|
-
let content = Content_Logic.get_test("Content "+String(parseInt(b+1)),option);
|
|
972
|
-
content.category = categorys[Num.get_id(categorys.length+1)].title;
|
|
973
|
-
contents.push(content);
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
return [categorys,contents]
|
|
977
|
-
};
|
|
978
|
-
}
|
|
979
|
-
class Template_Logic {
|
|
980
|
-
static get_test = (title,option) =>{
|
|
981
|
-
[title,option] = Field_Logic.get_option_title(title,option);
|
|
982
|
-
option = Field_Logic.get_option(Type.DATA_TEMPLATE,option?option:{});
|
|
983
|
-
let template = Data_Logic.get_new(Type.DATA_TEMPLATE,0,Field_Logic.get_test(title,option));
|
|
984
|
-
return template;
|
|
693
|
+
static get_test = () =>{
|
|
694
|
+
let data = {};
|
|
695
|
+
data.cost = Field_Logic.get_test_cost();
|
|
696
|
+
data.old_cost = Field_Logic.get_test_cost();
|
|
697
|
+
data.type = "Type "+String(Num.get_id());
|
|
698
|
+
data.sub_type = "Sub Type "+String(Num.get_id());
|
|
699
|
+
data.stock = String(Num.get_id(3-1));
|
|
700
|
+
data.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
701
|
+
return data;
|
|
985
702
|
};
|
|
986
703
|
}
|
|
987
704
|
class Blank_Logic {
|
|
988
|
-
static get_test = (
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
blog_post.field_1="Field 1 "+ Num.get_id();
|
|
994
|
-
blog_post.field_2="Field 2 "+ Num.get_id();
|
|
995
|
-
}else{
|
|
996
|
-
blog_post.field_1="";
|
|
997
|
-
blog_post.field_2 = "";
|
|
998
|
-
}
|
|
999
|
-
return blog_post;
|
|
705
|
+
static get_test = (option) =>{
|
|
706
|
+
let data = {};
|
|
707
|
+
data.field_1="Field 1 "+ Num.get_id();
|
|
708
|
+
data.field_2="Field 2 "+ Num.get_id();
|
|
709
|
+
return data;
|
|
1000
710
|
};
|
|
1001
711
|
};
|
|
1002
712
|
class Blog_Post_Logic {
|
|
1003
|
-
static get_test = (
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
blog_post.tag = "";
|
|
1013
|
-
}
|
|
1014
|
-
return blog_post;
|
|
1015
|
-
};
|
|
1016
|
-
static get_test_items = (option) =>{
|
|
1017
|
-
option = Field_Logic.get_option(Type.DATA_BLOG_POST,option?option:{});
|
|
1018
|
-
let items = [];
|
|
1019
|
-
for(let a=0;a<parseInt(option.blog_post_count)+1;a++){
|
|
1020
|
-
items.push(Blog_Post_Logic.get_test("Blog Post " +String(parseInt(a+1)),option));
|
|
1021
|
-
}
|
|
1022
|
-
return items;
|
|
1023
|
-
}
|
|
1024
|
-
static get_test_items_by_category = (option) =>{
|
|
1025
|
-
option = Field_Logic.get_option(Type.DATA_BLOG_POST,option?option:{});
|
|
1026
|
-
let blog_posts = [];
|
|
1027
|
-
let categorys = Category_Logic.get_type_categorys(Type.DATA_BLOG_POST,option.category_count);
|
|
1028
|
-
let item_count = 0;
|
|
1029
|
-
for(let a=0;a<categorys.length;a++){
|
|
1030
|
-
for(let b=0;b<parseInt(option.blog_post_count);b++){
|
|
1031
|
-
item_count++;
|
|
1032
|
-
let blog_post = Blog_Post_Logic.get_test("Blog Post "+String(parseInt(b+1)),option);
|
|
1033
|
-
blog_post.category = categorys[Num.get_id(categorys.length+1)].title;
|
|
1034
|
-
blog_posts.push(blog_post);
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
return [categorys,blog_posts]
|
|
713
|
+
static get_test = (option) =>{
|
|
714
|
+
let data = {};
|
|
715
|
+
data.author="First Name "+ Num.get_id();
|
|
716
|
+
data.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id(), " Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
717
|
+
data.category = "Category "+String(Num.get_id());
|
|
718
|
+
data.type = "Type "+String(Num.get_id());
|
|
719
|
+
data.sub_type = "Sub Type "+String(Num.get_id());
|
|
720
|
+
|
|
721
|
+
return data;
|
|
1038
722
|
};
|
|
1039
723
|
}
|
|
1040
724
|
class Gallery_Logic {
|
|
1041
|
-
static get_test = (
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
gallery.time = String(Num.get_id(24)) + ":" + String(Num.get_id(59));
|
|
1048
|
-
gallery.website = "Website "+String(Num.get_id());
|
|
1049
|
-
}else{
|
|
1050
|
-
gallery.website = "";
|
|
1051
|
-
}
|
|
1052
|
-
return gallery;
|
|
725
|
+
static get_test = () =>{
|
|
726
|
+
let data = {};
|
|
727
|
+
data.date = String(String(Num.get_id(2030)) + "-" + String(Num.get_id(13)) + "-" + String(Num.get_id(30))).trim();
|
|
728
|
+
data.time = String(Num.get_id(24)) + ":" + String(Num.get_id(59));
|
|
729
|
+
data.website = "Website "+String(Num.get_id());
|
|
730
|
+
return data;
|
|
1053
731
|
};
|
|
1054
732
|
};
|
|
1055
733
|
class Event_Logic {
|
|
@@ -1080,60 +758,44 @@ class Event_Logic {
|
|
|
1080
758
|
break;
|
|
1081
759
|
}
|
|
1082
760
|
};
|
|
1083
|
-
static get_test = (
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
event.category ="Category " + String(Num.get_id());
|
|
1097
|
-
event.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
1098
|
-
}else{
|
|
1099
|
-
event.cost = "";
|
|
1100
|
-
event.old_cost = "";
|
|
1101
|
-
event.date = "";
|
|
1102
|
-
event.time = "";
|
|
1103
|
-
event.website = "";
|
|
1104
|
-
event.location = "";
|
|
1105
|
-
event.meeting_link = "";
|
|
1106
|
-
event.stock = "";
|
|
1107
|
-
event.category ="";
|
|
1108
|
-
event.tag = "";
|
|
1109
|
-
}
|
|
1110
|
-
return event;
|
|
761
|
+
static get_test = () =>{
|
|
762
|
+
let data = {};
|
|
763
|
+
data.cost = Field_Logic.get_test_cost();
|
|
764
|
+
data.old_cost = Field_Logic.get_test_cost();
|
|
765
|
+
data.date = String(String(Num.get_id(2030)) + "-" + String(Num.get_id(13)) + "-" + String(Num.get_id(30))).trim();
|
|
766
|
+
data.time = String(Num.get_id(24)) + ":" + String(Num.get_id(59));
|
|
767
|
+
data.website = "Website "+String(Num.get_id());
|
|
768
|
+
data.location = "Location "+String(Num.get_id());
|
|
769
|
+
data.meeting_link = "Meeting Link "+String(Num.get_id());
|
|
770
|
+
data.stock = String(Num.get_id(3-1));
|
|
771
|
+
data.category ="Category " + String(Num.get_id());
|
|
772
|
+
data.tag = "Tag "+ Num.get_id() + ", Tag "+Num.get_id() + ", Tag "+ Num.get_id();
|
|
773
|
+
return data;
|
|
1111
774
|
};
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
775
|
+
}
|
|
776
|
+
class Field_Logic {
|
|
777
|
+
static get_base_option = (data,option) => {
|
|
778
|
+
if(option.title){
|
|
779
|
+
data[Type.FIELD_TITLE] = option.title;
|
|
780
|
+
data[Type.FIELD_TITLE_URL] = Str.get_title_url(option.title);
|
|
1117
781
|
}
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
782
|
+
if(option.title){
|
|
783
|
+
data[Type.FIELD_TITLE] = Type.get_data_type_by_type(data.data_type);
|
|
784
|
+
data[Type.FIELD_TITLE_URL] = Str.get_title_url(data[Type.FIELD_TITLE]);
|
|
785
|
+
}
|
|
786
|
+
if(option.generate_title || option.test){
|
|
787
|
+
data[Type.FIELD_TITLE] = Type.get_data_type_by_type(data.data_type) + " " +Num.get_id(999);
|
|
788
|
+
data[Type.FIELD_TITLE_URL] = Str.get_title_url(data[Type.FIELD_TITLE]);
|
|
789
|
+
}
|
|
790
|
+
if(option.parent){
|
|
791
|
+
data[Type.FIELD_PARENT_DATA_TYPE] = option.parent[Type.FIELD_DATA_TYPE] ? option.parent[Type.FIELD_DATA_TYPE] : Type.DATA_BLANK;
|
|
792
|
+
data[Type.FIELD_PARENT_ID] = option.parent[Type.FIELD_ID] ? option.parent[Type.FIELD_ID] : 0;
|
|
793
|
+
}
|
|
794
|
+
if(option.data){
|
|
795
|
+
data = Obj.merge(data,option.data);
|
|
1132
796
|
}
|
|
1133
|
-
return
|
|
797
|
+
return data;
|
|
1134
798
|
};
|
|
1135
|
-
}
|
|
1136
|
-
class Field_Logic {
|
|
1137
799
|
static get_item_max_group_id = (value_id,item) => {
|
|
1138
800
|
let max_group_id = 0;
|
|
1139
801
|
let full_prop_str = "";
|
|
@@ -1240,7 +902,7 @@ class Field_Logic {
|
|
|
1240
902
|
static get_test = (title,option) =>{
|
|
1241
903
|
option = !Obj.check_is_empty(option) ? option : {};
|
|
1242
904
|
let item = {};
|
|
1243
|
-
if(option.
|
|
905
|
+
if(option.blank == true){
|
|
1244
906
|
option.category_title = "";
|
|
1245
907
|
item = {
|
|
1246
908
|
title:title,
|
|
@@ -1272,7 +934,7 @@ class Field_Logic {
|
|
|
1272
934
|
if(option.fields){
|
|
1273
935
|
let field_items = String(option.fields).split(',');
|
|
1274
936
|
for(let a = 0; a<field_items.length;a++){
|
|
1275
|
-
if(option.
|
|
937
|
+
if(option.blank == true){
|
|
1276
938
|
if(item[field_items[a]]){
|
|
1277
939
|
item[field_items[a]] = "";
|
|
1278
940
|
}
|
|
@@ -1291,7 +953,6 @@ class Field_Logic {
|
|
|
1291
953
|
static get_value_items_group(item,value_id,group_id){
|
|
1292
954
|
let full_str = 'items_value_'+value_id+"_group_"+group_id;
|
|
1293
955
|
let items = [];
|
|
1294
|
-
Log.w(full_str,full_str);
|
|
1295
956
|
let count = 0;
|
|
1296
957
|
for(const prop in item){
|
|
1297
958
|
let new_item = {};
|
|
@@ -1305,7 +966,7 @@ class Field_Logic {
|
|
|
1305
966
|
}
|
|
1306
967
|
static get_values(item,option){
|
|
1307
968
|
for(let b=0;b<parseInt(option.value_count);b++){
|
|
1308
|
-
if(option.
|
|
969
|
+
if(option.blank == false){
|
|
1309
970
|
item['value_'+String(b+1)] = 'value ' + String(b+1);
|
|
1310
971
|
item['field_'+String(b+1)] = Str.get_title_url(item['value_'+String(b+1)]);
|
|
1311
972
|
item[Str.get_title_url('value ' + String(b+1))] = item.title + ' value ' + String(b+1);
|
|
@@ -1317,152 +978,14 @@ class Field_Logic {
|
|
|
1317
978
|
}
|
|
1318
979
|
return item;
|
|
1319
980
|
};
|
|
1320
|
-
static get_option(data_type,option){
|
|
1321
|
-
data_type = data_type ? data_type : Type.DATA_BLANK;
|
|
1322
|
-
option = !Obj.check_is_empty(option) ? option : {get_value:false,item_count:9,value_count:9};
|
|
1323
|
-
option.generate_id = option.generate_id ? option.generate_id : false;
|
|
1324
|
-
option.get_value = option.get_value ? true : false;
|
|
1325
|
-
option.get_blank = option.get_blank ? true : false;
|
|
1326
|
-
option.value_count = option.value_count ? option.value_count : 9;
|
|
1327
|
-
option.section_count = option.section_count ? option.section_count : 9;
|
|
1328
|
-
option.item_count = option.item_count ? option.item_count : 9;
|
|
1329
|
-
option.category_count = option.category_count ? option.category_count : 9;
|
|
1330
|
-
option.category_title = option.category_title ? option.category_title : "";
|
|
1331
|
-
option.fields = option.fields ? option.fields : [];
|
|
1332
|
-
if(option.data_type==Type.DATA_PAGE){
|
|
1333
|
-
option.page_count = option.page_count ? option.page_count : 9;
|
|
1334
|
-
option.section_count = option.section_count ? option.section_count : 9;
|
|
1335
|
-
option.get_section = option.get_section ? true : false;
|
|
1336
|
-
}
|
|
1337
|
-
if(data_type==Type.DATA_PRODUCT){
|
|
1338
|
-
option.product_count = option.product_count ? option.product_count : 9;
|
|
1339
|
-
}
|
|
1340
|
-
if(data_type==Type.DATA_SERVICE){
|
|
1341
|
-
option.service_count = option.service_count ? option.service_count : 9;
|
|
1342
|
-
}
|
|
1343
|
-
if(data_type==Type.DATA_BLOG_POST){
|
|
1344
|
-
option.blog_post_count = option.blog_post_count ? option.blog_post_count : 9;
|
|
1345
|
-
}
|
|
1346
|
-
if(data_type==Type.DATA_EVENT){
|
|
1347
|
-
option.event_count = option.event_count ? option.event_count : 9;
|
|
1348
|
-
}
|
|
1349
|
-
if(data_type==Type.DATA_FAQ){
|
|
1350
|
-
option.question_count = option.question_count ? option.question_count : 9;
|
|
1351
|
-
}
|
|
1352
|
-
if(data_type==Type.DATA_CONTENT){
|
|
1353
|
-
option.content_count = option.content_count ? option.content_count : 9;
|
|
1354
|
-
}
|
|
1355
|
-
if(data_type==Type.DATA_SUB_ITEM){
|
|
1356
|
-
option.item_count = option.item_count ? option.item_count : 9;
|
|
1357
|
-
}
|
|
1358
|
-
if(data_type==Type.DATA_USER){
|
|
1359
|
-
option.user_count = option.user_count ? option.user_count : 9;
|
|
1360
|
-
}
|
|
1361
|
-
if(data_type==Type.DATA_CART){
|
|
1362
|
-
option.category_title = option.category_title ? option.category_title : "";
|
|
1363
|
-
option.value_count = option.value_count ? option.value_count : 9;
|
|
1364
|
-
option.get_cart_item = option.get_cart_item ? option.get_cart_item : false;
|
|
1365
|
-
option.cart_item_count = option.cart_item_count ? option.cart_item_count : 5;
|
|
1366
|
-
option.get_cart_sub_item = option.get_cart_sub_item ? option.get_cart_sub_item : false;
|
|
1367
|
-
option.cart_sub_item_count = option.cart_sub_item_count ? option.cart_sub_item_count : 3;
|
|
1368
|
-
}
|
|
1369
|
-
if(data_type==Type.DATA_CART_ITEM){
|
|
1370
|
-
option.category_title = option.category_title ? option.category_title : "";
|
|
1371
|
-
option.value_count = option.value_count ? option.value_count : 9;
|
|
1372
|
-
option.get_cart_sub_item = option.get_cart_sub_item ? option.get_cart_sub_item : false;
|
|
1373
|
-
option.cart_sub_item_count = option.cart_sub_item_count ? option.cart_sub_item_count : 1;
|
|
1374
|
-
}
|
|
1375
|
-
if(data_type==Type.DATA_ORDER){
|
|
1376
|
-
option.category_title = option.category_title ? option.category_title : "";
|
|
1377
|
-
option.value_count = option.value_count ? option.value_count : 9;
|
|
1378
|
-
option.get_order_item = option.get_order_item ? option.get_order_item : false;
|
|
1379
|
-
option.order_item_count = option.order_item_count ? option.order_item_count : 5;
|
|
1380
|
-
option.get_order_sub_item = option.get_order_sub_item ? option.get_order_sub_item : false;
|
|
1381
|
-
option.order_sub_item_count = option.order_sub_item_count ? option.order_sub_item_count : 3;
|
|
1382
|
-
}
|
|
1383
|
-
if(data_type==Type.DATA_ORDER_ITEM){
|
|
1384
|
-
option.category_title = option.category_title ? option.category_title : "";
|
|
1385
|
-
option.value_count = option.value_count ? option.value_count : 9;
|
|
1386
|
-
option.get_order_sub_item = option.get_order_sub_item ? option.get_order_sub_item : false;
|
|
1387
|
-
option.order_sub_item_count = option.order_sub_item_count ? option.order_sub_item_count : 1;
|
|
1388
|
-
}
|
|
1389
|
-
return option;
|
|
1390
|
-
}
|
|
1391
|
-
static get_option_title = (title,option) =>{
|
|
1392
|
-
if(!title){
|
|
1393
|
-
let title = '';
|
|
1394
|
-
}
|
|
1395
|
-
if(!option){
|
|
1396
|
-
let option = {};
|
|
1397
|
-
}
|
|
1398
|
-
if(!Str.check_is_null(title) && Obj.check_is_empty(option)){
|
|
1399
|
-
if(Obj.check_is_empty(option)){
|
|
1400
|
-
if(!Str.check_is_null(title) && Obj.check_is_empty(option)){
|
|
1401
|
-
if(typeof title === 'string'){
|
|
1402
|
-
option = {};
|
|
1403
|
-
}else{
|
|
1404
|
-
option = title;
|
|
1405
|
-
title = "Test " + Num.get_id();
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
}else{
|
|
1410
|
-
if(Str.check_is_null(title) && Obj.check_is_empty(option)){
|
|
1411
|
-
title = "Test " + Num.get_id();
|
|
1412
|
-
option = {};
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
return [title,option];
|
|
1416
|
-
}
|
|
1417
|
-
static get_option_admin(req){
|
|
1418
|
-
let option = {};
|
|
1419
|
-
option.value_count = req.query.value_count ? req.query.value_count : 9;
|
|
1420
|
-
option.section_count = req.query.section_count ? req.query.section_count : 9;
|
|
1421
|
-
|
|
1422
|
-
option.get_faq = req.query.get_faq ? req.query.get_faq : false;
|
|
1423
|
-
option.question_count = req.query.question_count ? req.query.question_count : 9;
|
|
1424
|
-
|
|
1425
|
-
option.get_blog_post = req.query.get_blog_post ? req.query.get_blog_post : false;
|
|
1426
|
-
option.get_category_blog_post = req.query.get_category_blog_post ? req.query.get_category_blog_post : false;
|
|
1427
|
-
option.category_blog_post_count = req.query.category_blog_post_count ? req.query.category_blog_post_count : 9;
|
|
1428
|
-
option.blog_post_count = req.query.blog_post_count ? req.query.blog_post_count : 9;
|
|
1429
|
-
|
|
1430
|
-
option.get_product = req.query.get_product ? req.query.get_product : false;
|
|
1431
|
-
option.get_category_product = req.query.get_category_product ? req.query.get_category_product : false;
|
|
1432
|
-
option.category_product_count = req.query.category_product_count ? req.query.category_product_count : 9;
|
|
1433
|
-
option.product_count = req.query.product_count ? req.query.product_count : 9;
|
|
1434
|
-
|
|
1435
|
-
option.get_service = req.query.get_service ? req.query.get_service : false;
|
|
1436
|
-
option.get_category_service = req.query.get_category_service ? req.query.get_category_service : false;
|
|
1437
|
-
option.category_service_count = req.query.category_service_count ? req.query.category_service_count : 9;
|
|
1438
|
-
option.service_count = req.query.service_count ? req.query.service_count : 9;
|
|
1439
|
-
|
|
1440
|
-
option.get_event = req.query.get_event ? req.query.get_event : false;
|
|
1441
|
-
option.get_category_event = req.query.get_category_event ? req.query.get_category_event : false;
|
|
1442
|
-
option.category_event_count = req.query.category_event_count ? req.query.category_event_count : 9;
|
|
1443
|
-
option.event_count = req.query.event_count ? req.query.event_count : 9;
|
|
1444
|
-
|
|
1445
|
-
option.get_product_review = req.query.get_product_review ? req.query.get_product_review : false;
|
|
1446
|
-
option.product_review_count = req.query.product_review_count ? req.query.product_review_count : 19;
|
|
1447
|
-
|
|
1448
|
-
option.get_business_review = req.query.get_business_review ? req.query.get_business_review : false;
|
|
1449
|
-
option.business_review_count = req.query.business_review_count ? req.query.business_review_count : 19;
|
|
1450
|
-
|
|
1451
|
-
option.user_count = req.query.user_count ? req.query.user_count : 9;
|
|
1452
|
-
option.get_admin = req.query.get_admin ? req.query.get_admin : false;
|
|
1453
|
-
option.get_template = req.query.get_template ? req.query.get_template : false;
|
|
1454
|
-
option.get_page = req.query.get_page ? req.query.get_page : false;
|
|
1455
|
-
|
|
1456
|
-
return option;
|
|
1457
|
-
}
|
|
1458
981
|
}
|
|
1459
982
|
class Favorite_Logic {
|
|
1460
|
-
static
|
|
1461
|
-
return Data_Logic.get_new(Type.DATA_FAVORITE,0,{
|
|
983
|
+
static get = (parent_data_type,parent_id,user_id) =>{
|
|
984
|
+
return Data_Logic.get_new(Type.DATA_FAVORITE,0,{data:{
|
|
1462
985
|
parent_data_type:parent_data_type,
|
|
1463
986
|
parent_id:parent_id,
|
|
1464
987
|
user_id:user_id
|
|
1465
|
-
});
|
|
988
|
+
}});
|
|
1466
989
|
}
|
|
1467
990
|
static get_user_search_filter = (item_data_type,user_id) =>{
|
|
1468
991
|
return {
|
|
@@ -1481,15 +1004,15 @@ class Favorite_Logic {
|
|
|
1481
1004
|
}
|
|
1482
1005
|
}
|
|
1483
1006
|
class Review_Logic {
|
|
1484
|
-
static
|
|
1485
|
-
return Data_Logic.get_new(Type.DATA_REVIEW,0,{
|
|
1007
|
+
static get = (parent_data_type,parent_id,user_id,title,comment,rating) =>{
|
|
1008
|
+
return Data_Logic.get_new(Type.DATA_REVIEW,0,{data:{
|
|
1486
1009
|
parent_data_type:parent_data_type,
|
|
1487
1010
|
parent_id:parent_id,
|
|
1488
1011
|
user_id:user_id,
|
|
1489
1012
|
title:title ? title : "",
|
|
1490
1013
|
comment:comment ? comment : "",
|
|
1491
1014
|
rating:rating ? rating : 5
|
|
1492
|
-
});
|
|
1015
|
+
}});
|
|
1493
1016
|
}
|
|
1494
1017
|
static get_user_search_filter = (item_data_type,user_id) =>{
|
|
1495
1018
|
return {
|
|
@@ -1505,101 +1028,17 @@ class Review_Logic {
|
|
|
1505
1028
|
{ parent_id: { $regex:String(parent_id), $options: "i" } },
|
|
1506
1029
|
] };
|
|
1507
1030
|
}
|
|
1508
|
-
static get_test = (
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
review.user_id = user_id;
|
|
1517
|
-
review.comment = "My comment "+ Field_Logic.get_test_note();
|
|
1518
|
-
}else{
|
|
1519
|
-
review.title = '';
|
|
1520
|
-
review.item_data_type = item_data_type;
|
|
1521
|
-
review.item_id = item_id;
|
|
1522
|
-
review.rating = 0;
|
|
1523
|
-
review.user_id = user_id;
|
|
1524
|
-
review.comment = "";
|
|
1525
|
-
}
|
|
1526
|
-
return review;
|
|
1527
|
-
};
|
|
1528
|
-
static get_test_items=(option)=>{
|
|
1529
|
-
option = !Obj.check_is_empty(option) ? option : {review_count:19};
|
|
1530
|
-
let items = [];
|
|
1531
|
-
for(let a=0;a<option.review_count;a++){
|
|
1532
|
-
items.push(Review_Logic.get_test(option));
|
|
1533
|
-
}
|
|
1534
|
-
return items;
|
|
1031
|
+
static get_test = () =>{
|
|
1032
|
+
let data = {};
|
|
1033
|
+
data.item_data_type = item_data_type;
|
|
1034
|
+
data.item_id = item_id;
|
|
1035
|
+
data.rating = Num.get_id(6);
|
|
1036
|
+
data.user_id = user_id;
|
|
1037
|
+
data.comment = "My comment "+ Field_Logic.get_test_note();
|
|
1038
|
+
return data;
|
|
1535
1039
|
};
|
|
1536
1040
|
}
|
|
1537
|
-
class Admin_Logic {
|
|
1538
|
-
static get_new = (title,option) =>{
|
|
1539
|
-
[title,option] = Field_Logic.get_option_title(title,option);
|
|
1540
|
-
return Data_Logic.get_new_full_item(
|
|
1541
|
-
Data_Logic.get_new(Type.DATA_ADMIN,0),
|
|
1542
|
-
Data_Logic.get_new(Type.DATA_ADMIN,0),
|
|
1543
|
-
Data_Logic.get_new(Type.DATA_ADMIN,0),{
|
|
1544
|
-
title:title,
|
|
1545
|
-
email:"",
|
|
1546
|
-
});
|
|
1547
|
-
};
|
|
1548
|
-
static get_test = (title,option) =>{
|
|
1549
|
-
[title,option] = Field_Logic.get_option_title(title,option);
|
|
1550
|
-
option = Field_Logic.get_option(Type.DATA_ADMIN,option?option:{});
|
|
1551
|
-
let item = Data_Logic.get_new(Type.DATA_ADMIN,0);
|
|
1552
|
-
let admin = Data_Logic.get_new(Type.DATA_ADMIN,0,Field_Logic.get_test(title,option));
|
|
1553
|
-
if(!option.get_blank){
|
|
1554
|
-
admin.email="ceo@admin"+Num.get_id()+".com";
|
|
1555
|
-
admin.password="1234567";
|
|
1556
|
-
}else{
|
|
1557
|
-
admin.email="";
|
|
1558
|
-
admin.password="";
|
|
1559
|
-
}
|
|
1560
|
-
return admin;
|
|
1561
|
-
};
|
|
1562
|
-
static get_full_address(admin){
|
|
1563
|
-
admin.address_1 = (admin.address_1) ? admin.address_1 : "";
|
|
1564
|
-
admin.address_2 = (admin.address_2) ? admin.address_2 : "";
|
|
1565
|
-
admin.city = (admin.city) ? admin.city : "";
|
|
1566
|
-
admin.state = (admin.state) ? admin.state : "";
|
|
1567
|
-
admin.zip = (admin.zip) ? admin.zip : "";
|
|
1568
|
-
return admin.address_1 + " "+ admin.address_2 + " " + admin.city + " " + admin.state + " " + admin.zip;
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
1041
|
class Category_Logic {
|
|
1572
|
-
static get_new = (title,type,category,option) => {
|
|
1573
|
-
option = option ? option : {};
|
|
1574
|
-
const item = Item_Logic.get_new(title,Type.DATA_CATEGORY);
|
|
1575
|
-
item.type = type;
|
|
1576
|
-
item.category = category = category?category:"";
|
|
1577
|
-
return item;
|
|
1578
|
-
};
|
|
1579
|
-
static get_test = (title,option) =>{
|
|
1580
|
-
title = (title) ? title : "Category 1";
|
|
1581
|
-
option = Field_Logic.get_option(Type.DATA_CATEGORY,option?option:{});
|
|
1582
|
-
let category = Data_Logic.get_new(Type.DATA_CATEGORY,0,Field_Logic.get_test(title,option));
|
|
1583
|
-
return category;
|
|
1584
|
-
};
|
|
1585
|
-
static get_test_items = (option) =>{
|
|
1586
|
-
option = Field_Logic.get_option(Type.DATA_CATEGORY,option);
|
|
1587
|
-
let items = [];
|
|
1588
|
-
for(let a=0;a<option.category_count;a++){
|
|
1589
|
-
items.push(Category_Logic.get_test("Category " +String(parseInt(a+1)),option));
|
|
1590
|
-
}
|
|
1591
|
-
return items;
|
|
1592
|
-
}
|
|
1593
|
-
static get_test_items_by_type = (type,option) =>{
|
|
1594
|
-
option = Field_Logic.get_option(Type.DATA_CATEGORY,option);
|
|
1595
|
-
let categorys = [];
|
|
1596
|
-
for(let a=0;a<option.category_count;a++){
|
|
1597
|
-
let category = Data_Logic.get_new(Type.DATA_CATEGORY,0,Field_Logic.get_test("Category " +String(parseInt(a+1)),option));
|
|
1598
|
-
category.type = type;
|
|
1599
|
-
categorys.push(category);
|
|
1600
|
-
}
|
|
1601
|
-
return categorys;
|
|
1602
|
-
};
|
|
1603
1042
|
static get_category_drop_down_by_items = (items) => {
|
|
1604
1043
|
let categorys = [];
|
|
1605
1044
|
for(let a=0;a<items.length;a++){
|
|
@@ -1643,18 +1082,6 @@ class Storage {
|
|
|
1643
1082
|
}
|
|
1644
1083
|
}
|
|
1645
1084
|
class User_Logic {
|
|
1646
|
-
static url_register = (app_id,url,param) => {
|
|
1647
|
-
let action_url="user/register";
|
|
1648
|
-
return get_cloud_url_main(app_id,url,action_url,param);
|
|
1649
|
-
};
|
|
1650
|
-
static url_login = (app_id,url,param) => {
|
|
1651
|
-
let action_url="user/login";
|
|
1652
|
-
return get_cloud_url_main(app_id,url,action_url,param);
|
|
1653
|
-
};
|
|
1654
|
-
static url_logout = (app_id,url,param) => {
|
|
1655
|
-
let action_url="user/logout";
|
|
1656
|
-
return get_cloud_url_main(app_id,url,action_url,param);
|
|
1657
|
-
};
|
|
1658
1085
|
static get_country_state_city(item){
|
|
1659
1086
|
let country_state_city = "";
|
|
1660
1087
|
if(item.country == "United States"){
|
|
@@ -1683,10 +1110,9 @@ class User_Logic {
|
|
|
1683
1110
|
let str_first_name = !Str.check_is_null(first_name) ? first_name : "";
|
|
1684
1111
|
let str_last_name = !Str.check_is_null(last_name) ? last_name : "";
|
|
1685
1112
|
return !Str.check_is_null(String(str_first_name + " " + str_last_name)) ? String(str_first_name + " " + str_last_name).trim() : "N/A";
|
|
1686
|
-
|
|
1687
1113
|
}
|
|
1688
1114
|
static get_guest(){
|
|
1689
|
-
return Data_Logic.get_new(Type.DATA_USER,0,{is_guest:true,title_url:'guest',first_name:'Guest',last_name:'User',email:'guest@email.com',title:"Guest",country:"United States"});
|
|
1115
|
+
return Data_Logic.get_new(Type.DATA_USER,0,{data:{guest:{is_guest:true,title_url:'guest',first_name:'Guest',last_name:'User',email:'guest@email.com',title:"Guest",country:"United States"}}});
|
|
1690
1116
|
}
|
|
1691
1117
|
static get_request_user(req){
|
|
1692
1118
|
if(!req || !req.session.user){
|
|
@@ -1702,88 +1128,62 @@ class User_Logic {
|
|
|
1702
1128
|
req.session.user=null;
|
|
1703
1129
|
delete req.session.user;
|
|
1704
1130
|
}
|
|
1705
|
-
static get_test = (
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
user.state="";
|
|
1716
|
-
user.password="";
|
|
1717
|
-
user.country="";
|
|
1718
|
-
}else{
|
|
1719
|
-
user.first_name="First Name "+ Num.get_id();
|
|
1720
|
-
user.last_name="First Name "+ Num.get_id();
|
|
1721
|
-
user.email="email"+ Num.get_id() + "@email.com";
|
|
1722
|
-
user.city="City"+ Num.get_id();
|
|
1723
|
-
user.state="State"+ Num.get_id();
|
|
1724
|
-
user.password="1234567";
|
|
1725
|
-
user.country="United States";
|
|
1726
|
-
}
|
|
1727
|
-
return user;
|
|
1131
|
+
static get_test = () =>{
|
|
1132
|
+
let data = {};
|
|
1133
|
+
data.first_name="First Name "+ Num.get_id();
|
|
1134
|
+
data.last_name="First Name "+ Num.get_id();
|
|
1135
|
+
data.email="email"+ Num.get_id() + "@email.com";
|
|
1136
|
+
data.city="City"+ Num.get_id();
|
|
1137
|
+
data.state="State"+ Num.get_id();
|
|
1138
|
+
data.password="1234567";
|
|
1139
|
+
data.country="United States";
|
|
1140
|
+
return data;
|
|
1728
1141
|
};
|
|
1729
|
-
static get_test_items = (option) =>{
|
|
1730
|
-
option = Field_Logic.get_option(Type.DATA_USER,option?option:{});
|
|
1731
|
-
let items = [];
|
|
1732
|
-
for(let a=0;a<option.user_count+1;a++){
|
|
1733
|
-
items.push(User_Logic.get_test("User " +String(parseInt(a+1)),option));
|
|
1734
|
-
}
|
|
1735
|
-
return items;
|
|
1736
|
-
}
|
|
1737
1142
|
}
|
|
1738
1143
|
class Data_Logic {
|
|
1739
|
-
static
|
|
1740
|
-
return
|
|
1144
|
+
static get = (data_type,id,option) => {
|
|
1145
|
+
return Data_Logic.get_new(data_type,id,option);
|
|
1741
1146
|
};
|
|
1742
|
-
static
|
|
1147
|
+
static get_new = (data_type,id,option) => {
|
|
1148
|
+
let data = {data_type:data_type,id:id};
|
|
1743
1149
|
option = option ? option : {};
|
|
1744
|
-
|
|
1150
|
+
data = Field_Logic.get_base_option(data,option);
|
|
1745
1151
|
if(option.test){
|
|
1746
1152
|
switch(data_type)
|
|
1747
1153
|
{
|
|
1748
|
-
case Type.DATA_CATEGORY:
|
|
1749
|
-
option.data = Obj.merge(Category_Logic.get_test(),option.data);
|
|
1750
|
-
break;
|
|
1751
1154
|
case Type.DATA_BLOG_POST:
|
|
1752
|
-
|
|
1155
|
+
data = Obj.merge(Blog_Post_Logic.get_test(),data);
|
|
1753
1156
|
break;
|
|
1754
1157
|
case Type.DATA_SERVICE:
|
|
1755
|
-
|
|
1158
|
+
data = Obj.merge(Service_Logic.get_test(),data);
|
|
1159
|
+
break;
|
|
1160
|
+
case Type.DATA_EVENT:
|
|
1161
|
+
data = Obj.merge(Event_Logic.get_test(),data);
|
|
1756
1162
|
break;
|
|
1757
1163
|
case Type.DATA_PRODUCT:
|
|
1758
|
-
|
|
1164
|
+
data = Obj.merge(Product_Logic.get_test(),data);
|
|
1759
1165
|
break;
|
|
1166
|
+
case Type.DATA_CONTENT:
|
|
1167
|
+
case Type.DATA_CATEGORY:
|
|
1760
1168
|
case Type.DATA_BLANK:
|
|
1761
|
-
|
|
1169
|
+
data = Obj.merge(Blank_Logic.get_test(),data);
|
|
1762
1170
|
break;
|
|
1763
1171
|
case Type.DATA_USER:
|
|
1764
|
-
|
|
1172
|
+
data = Obj.merge(User_Logic.get_test(),data);
|
|
1765
1173
|
break;
|
|
1766
1174
|
default:
|
|
1767
|
-
|
|
1768
|
-
|
|
1175
|
+
data = Obj.merge(Blank_Logic.get_test(),data);
|
|
1176
|
+
data.data_type = data_type;
|
|
1769
1177
|
break;
|
|
1770
1178
|
}
|
|
1771
1179
|
}
|
|
1772
|
-
if(option.
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
}
|
|
1779
|
-
if(option.title){
|
|
1780
|
-
option.data[Type.FIELD_TITLE] = option.title;
|
|
1781
|
-
option.data[Type.FIELD_TITLE_URL] = Str.get_title_url(option.title);
|
|
1782
|
-
}else{
|
|
1783
|
-
option.data[Type.FIELD_TITLE] = Type.get_title(data_type);
|
|
1784
|
-
option.data[Type.FIELD_TITLE_URL] = Str.get_title_url(Type.get_title(data_type));
|
|
1180
|
+
if(option.test_blank){
|
|
1181
|
+
for(const field in data){
|
|
1182
|
+
if(field != Type.FIELD_ID && field != Type.FIELD_DATA_TYPE){
|
|
1183
|
+
data[field] = '';
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1785
1186
|
}
|
|
1786
|
-
let data = Data_Logic.get_new(data_type,id,option.data?option.data:{});
|
|
1787
1187
|
return data;
|
|
1788
1188
|
};
|
|
1789
1189
|
static get_search = (data_type,filter,sort_by,page_current,page_size) => {
|
|
@@ -1802,11 +1202,11 @@ class Data_Logic {
|
|
|
1802
1202
|
static get_search_foreign = (type,foreign_data_type,foreign_field,parent_field,option) => {
|
|
1803
1203
|
option = option ? option : {};
|
|
1804
1204
|
type = type ? type : Type.TITLE_ITEMS;
|
|
1805
|
-
foreign_data_type = foreign_data_type ? foreign_data_type : Str.get_title_url(Type.
|
|
1205
|
+
foreign_data_type = foreign_data_type ? foreign_data_type : Str.get_title_url(Type.get_data_type_by_type(foreign_data_type,{plural:true}));
|
|
1806
1206
|
foreign_field = foreign_field ? foreign_field : Type.FIELD_PARENT_ID;
|
|
1807
1207
|
parent_field = parent_field ? parent_field : parent_field;
|
|
1808
1208
|
let field = option.field ? option.field : {};
|
|
1809
|
-
let title = option.title ? option.title : Str.get_title_url(Type.
|
|
1209
|
+
let title = option.title ? option.title : Str.get_title_url(Type.get_data_type_by_type(foreign_data_type,{plural:true}));
|
|
1810
1210
|
let page_current = option.page_current ? option.page_current : 0;
|
|
1811
1211
|
let page_size = option.page_size ? option.page_size : 0;
|
|
1812
1212
|
return {type:type,foreign_data_type:foreign_data_type,foreign_field:foreign_field,parent_field:parent_field,type:type,field:field,title:title,page_current:page_current,page_size:page_size};
|
|
@@ -1816,11 +1216,34 @@ class Data_Logic {
|
|
|
1816
1216
|
type = type ? type : Type.TITLE_ITEMS;
|
|
1817
1217
|
search = search ? search : Data_Logic.get_search(Type.DATA_BLANK,{},{},1,0);
|
|
1818
1218
|
let field = option.field ? option.field : {};
|
|
1819
|
-
let title = option.title ? option.title : Str.get_title_url(Type.
|
|
1219
|
+
let title = option.title ? option.title : Str.get_title_url(Type.get_data_type_by_type(search.data_type,{plural:true}));
|
|
1820
1220
|
let page_current = option.page_current ? option.page_current : 1;
|
|
1821
1221
|
let page_size = option.page_size ? option.page_size : 0;
|
|
1822
1222
|
return {type:type,search:search,field:field,title:title,page_current:page_current,page_size:page_size};
|
|
1823
1223
|
}
|
|
1224
|
+
static get_copy = (data_type,item)=>{
|
|
1225
|
+
let copy_item = Data_Logic.get_new(data_type,0);
|
|
1226
|
+
const keys = Object.keys(item);
|
|
1227
|
+
keys.forEach(key => {
|
|
1228
|
+
if(
|
|
1229
|
+
key!=Type.FIELD_ID&&
|
|
1230
|
+
key!=Type.FIELD_SOURCE&&
|
|
1231
|
+
key!=Type.FIELD_TITLE&&
|
|
1232
|
+
key!=Type.FIELD_TITLE_URL&&
|
|
1233
|
+
key!=Type.FIELD_DATE_CREATE&&
|
|
1234
|
+
key!=Type.FIELD_DATE_SAVE&&
|
|
1235
|
+
key!=Type.TITLE_OBJ&&
|
|
1236
|
+
key!=Type.TITLE_USER&&
|
|
1237
|
+
key!=Type.TITLE_GROUP&&
|
|
1238
|
+
key!=Type.TITLE_ITEM&&
|
|
1239
|
+
!Obj.check_is_array(item[key])&&
|
|
1240
|
+
Obj.check_is_value(item[key])
|
|
1241
|
+
){
|
|
1242
|
+
copy_item[key]=item[key];
|
|
1243
|
+
}
|
|
1244
|
+
});
|
|
1245
|
+
return copy_item;
|
|
1246
|
+
};
|
|
1824
1247
|
static get_not_found = (data_type,id,option) =>{
|
|
1825
1248
|
option=option?option:{};
|
|
1826
1249
|
if(!data_type){
|
|
@@ -1833,78 +1256,40 @@ class Data_Logic {
|
|
|
1833
1256
|
if(!id){
|
|
1834
1257
|
id=0;
|
|
1835
1258
|
}
|
|
1836
|
-
let item =
|
|
1259
|
+
let item = Data_Logic.get(data_type,id);
|
|
1837
1260
|
item.id = 0;
|
|
1838
1261
|
item.id_key = id;
|
|
1839
1262
|
item.title = "Item Not Found";
|
|
1840
1263
|
item.title_url = Str.get_title_url(item.title);
|
|
1841
|
-
item.
|
|
1842
|
-
item.items = [];
|
|
1264
|
+
item.source = Type.TITLE_SOURCE_NOT_FOUND;
|
|
1843
1265
|
return item;
|
|
1844
1266
|
}else{
|
|
1845
|
-
let user =
|
|
1267
|
+
let user = Data_Logic.get(data_type,id);
|
|
1846
1268
|
user.id = 0;
|
|
1847
1269
|
user.id_key = id;
|
|
1848
1270
|
user.title = "User Not Found";
|
|
1849
1271
|
user.first_name = "User Not Found";
|
|
1850
1272
|
user.title_url = Str.get_title_url(user.title);
|
|
1851
|
-
user.
|
|
1852
|
-
user.items = [];
|
|
1273
|
+
user.source = Type.TITLE_SOURCE_NOT_FOUND;
|
|
1853
1274
|
return user;
|
|
1854
1275
|
}
|
|
1855
1276
|
};
|
|
1856
|
-
|
|
1857
1277
|
}
|
|
1858
1278
|
class App_Logic {
|
|
1859
|
-
|
|
1860
|
-
return get_cloud_url_main(app_id,host,url,param);
|
|
1861
|
-
};
|
|
1862
|
-
static bind_item_parent_users = (item,parent_item,user)=>{
|
|
1863
|
-
for(const prop in parent_item) {
|
|
1864
|
-
item['parent_'+prop] = parent_item[prop];
|
|
1865
|
-
}
|
|
1866
|
-
for(const prop in user) {
|
|
1867
|
-
item['user_'+prop] = user[prop];
|
|
1868
|
-
}
|
|
1869
|
-
return item;
|
|
1870
|
-
};
|
|
1871
|
-
static bind_item_parent_users = (items)=>{
|
|
1872
|
-
for(let item of items) {
|
|
1873
|
-
item = App_Logic.bind_item_parent_user_obj(item);
|
|
1874
|
-
}
|
|
1875
|
-
return items;
|
|
1876
|
-
};
|
|
1877
|
-
static bind_item_parent_user_obj = (item)=>{
|
|
1878
|
-
if(!item.user){
|
|
1879
|
-
item.user = {};
|
|
1880
|
-
}
|
|
1881
|
-
if(!item.parent_item){
|
|
1882
|
-
item.parent_item = {};
|
|
1883
|
-
}
|
|
1884
|
-
for(const prop in item.parent_item) {
|
|
1885
|
-
item['parent_'+prop] = item.parent_item[prop];
|
|
1886
|
-
}
|
|
1887
|
-
for(const prop in item.user) {
|
|
1888
|
-
item['user_'+prop] = item.user[prop];
|
|
1889
|
-
}
|
|
1890
|
-
return item;
|
|
1891
|
-
};
|
|
1892
|
-
static url_dashboard_user_home = (app_id,url,param) => {
|
|
1893
|
-
let action_url="dashboard/user_home";
|
|
1894
|
-
return get_cloud_url_main(app_id,url,action_url,param);
|
|
1895
|
-
};
|
|
1896
|
-
static url_dashboard_app_home = (app_id,url,param) => {
|
|
1897
|
-
let action_url="dashboard/app_home";
|
|
1898
|
-
return get_cloud_url_main(app_id,url,action_url,param);
|
|
1899
|
-
};
|
|
1900
|
-
static get_new = (title,user_id,type,option) =>{
|
|
1901
|
-
option = Field_Logic.get_option(Type.DATA_APP,option?option:{});
|
|
1279
|
+
static get = (title,user_id,type) =>{
|
|
1902
1280
|
let app = Data_Logic.get_new(Type.DATA_APP,0);
|
|
1903
1281
|
app.title = title;
|
|
1904
1282
|
app.user_id = user_id;
|
|
1905
1283
|
app.type = type;
|
|
1906
1284
|
return app;
|
|
1907
1285
|
}
|
|
1286
|
+
static get_url = (app_id,host,url,param) => {
|
|
1287
|
+
if(!param){
|
|
1288
|
+
param='';
|
|
1289
|
+
}
|
|
1290
|
+
var app_id_url='?app_id='+app_id;
|
|
1291
|
+
return host+"/"+url+app_id_url + param;
|
|
1292
|
+
};
|
|
1908
1293
|
static get_search_query(search){
|
|
1909
1294
|
let url = "";
|
|
1910
1295
|
if(search.data_type){
|
|
@@ -1953,26 +1338,8 @@ class App_Logic {
|
|
|
1953
1338
|
}
|
|
1954
1339
|
return Data_Logic.get_search(query.data_type,filter,sort_by,query.page_current,query.page_size);
|
|
1955
1340
|
}
|
|
1956
|
-
static get_data_search_result = (app_id,data_type,item_count,page_count,filter,items,option) =>{
|
|
1957
|
-
return{
|
|
1958
|
-
option:option?option:{},
|
|
1959
|
-
data_type:data_type?data_type:Type.DATA_BLANK,
|
|
1960
|
-
item_count:item_count?item_count:0,
|
|
1961
|
-
page_count:page_count?page_count:1,
|
|
1962
|
-
filter:filter?filter:{},
|
|
1963
|
-
items:items?items:[]
|
|
1964
|
-
}
|
|
1965
|
-
}
|
|
1966
1341
|
}
|
|
1967
1342
|
class File_Logic {
|
|
1968
|
-
static url_post = (app_id,url,param) => {
|
|
1969
|
-
let action_url="main/file/post";
|
|
1970
|
-
return get_cloud_url_main(app_id,url,action_url,param);
|
|
1971
|
-
};
|
|
1972
|
-
static url_post_cdn = (app_id,url,param) => {
|
|
1973
|
-
let action_url="main/file/post_cdn";
|
|
1974
|
-
return get_cloud_url_main(app_id,url,action_url,param);
|
|
1975
|
-
};
|
|
1976
1343
|
static url = (host,file_filename,size,param) =>{
|
|
1977
1344
|
host = host ? host : "";
|
|
1978
1345
|
file_filename = file_filename ? file_filename : "";
|
|
@@ -1980,8 +1347,8 @@ class File_Logic {
|
|
|
1980
1347
|
param = param ? param : "";
|
|
1981
1348
|
return host+"/"+size + "_"+file_filename+param;
|
|
1982
1349
|
}
|
|
1983
|
-
static
|
|
1984
|
-
let item = Data_Logic.get_new(Type.DATA_FILE,0,item_file);
|
|
1350
|
+
static get_by_base64 = (item_file) =>{
|
|
1351
|
+
let item = Data_Logic.get_new(Type.DATA_FILE,0,{data:item_file});
|
|
1985
1352
|
item.extension = !Str.check_is_null(Str.get_file_type_from_base64(item.file_data)) ? Str.get_file_type_from_base64(item.file_data).extension : 'txt';
|
|
1986
1353
|
item.file_filename = !Str.check_is_null(Str.get_file_type_from_base64(item.file_data)) ? Str.get_guid()+ "." + item.extension : 'not_found.txt';
|
|
1987
1354
|
item.buffer = !Str.check_is_null(Str.get_file_type_from_base64(item_file.file_data)) ? Buffer.from(item_file.file_data.split(';base64,').pop(), 'base64') : null;
|
|
@@ -1989,14 +1356,6 @@ class File_Logic {
|
|
|
1989
1356
|
};
|
|
1990
1357
|
};
|
|
1991
1358
|
class Image_Logic {
|
|
1992
|
-
static url_post = (app_id,url,param) => {
|
|
1993
|
-
let action_url="main/image/post";
|
|
1994
|
-
return get_cloud_url_main(app_id,url,action_url,param);
|
|
1995
|
-
};
|
|
1996
|
-
static url_post_cdn = (app_id,url,param) => {
|
|
1997
|
-
let action_url="main/image/post_cdn";
|
|
1998
|
-
return get_cloud_url_main(app_id,url,action_url,param);
|
|
1999
|
-
};
|
|
2000
1359
|
static url = (host,image_filename,size,param) =>{
|
|
2001
1360
|
host = host ? host : "";
|
|
2002
1361
|
image_filename = image_filename ? image_filename : "";
|
|
@@ -2004,8 +1363,8 @@ class Image_Logic {
|
|
|
2004
1363
|
param = param ? param : "";
|
|
2005
1364
|
return host+"/"+size + "_"+image_filename+param;
|
|
2006
1365
|
}
|
|
2007
|
-
static
|
|
2008
|
-
let item = Data_Logic.get_new(Type.DATA_IMAGE,0,item_image);
|
|
1366
|
+
static get_by_base64 = (item_image) =>{
|
|
1367
|
+
let item = Data_Logic.get_new(Type.DATA_IMAGE,0,{data:item_image});
|
|
2009
1368
|
item.extension = !Str.check_is_null(Str.get_file_type_from_base64(item.image_data)) ? Str.get_file_type_from_base64(item.image_data).extension : 'jpeg';
|
|
2010
1369
|
item.image_filename = !Str.check_is_null(Str.get_file_type_from_base64(item.image_data)) ? Str.get_guid()+ "." + item.extension : 'not_found.jpeg';
|
|
2011
1370
|
item.buffer = !Str.check_is_null(Str.get_file_type_from_base64(item_image.image_data)) ? Buffer.from(item_image.image_data.split(';base64,').pop(), 'base64') : null;
|
|
@@ -2144,31 +1503,25 @@ class Url {
|
|
|
2144
1503
|
}
|
|
2145
1504
|
module.exports = {
|
|
2146
1505
|
App_Logic,
|
|
2147
|
-
Admin_Logic,
|
|
2148
1506
|
Blank_Logic,
|
|
2149
1507
|
Blog_Post_Logic,
|
|
2150
1508
|
Cart_Logic,
|
|
2151
1509
|
Category_Logic,
|
|
2152
|
-
Content_Logic,
|
|
2153
1510
|
Data_Logic,
|
|
2154
1511
|
Event_Logic,
|
|
2155
1512
|
File_Logic,
|
|
2156
1513
|
Field_Logic,
|
|
2157
1514
|
Favorite_Logic,
|
|
2158
1515
|
Gallery_Logic,
|
|
2159
|
-
Item_Logic,
|
|
2160
1516
|
Image_Logic,
|
|
2161
1517
|
Message,
|
|
2162
1518
|
Order_Logic,
|
|
2163
|
-
Page_Logic,
|
|
2164
1519
|
Product_Logic,
|
|
2165
1520
|
Review_Logic,
|
|
2166
1521
|
Service_Logic,
|
|
2167
1522
|
Stat_Logic,
|
|
2168
1523
|
Storage,
|
|
2169
|
-
Template_Logic,
|
|
2170
1524
|
Type,
|
|
2171
|
-
Title,
|
|
2172
1525
|
User_Logic,
|
|
2173
1526
|
Url
|
|
2174
1527
|
};
|