zet-lib 1.3.39 → 1.3.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/debug.js CHANGED
@@ -1,22 +1,22 @@
1
- /**
2
- * For debug code
3
- */
4
- const io = require("./io");
5
- const connection = require("./connection");
6
-
7
- module.exports = (req, res, err) => {
8
- let post = {
9
- table: res.locals.routeName || "",
10
- company_id: res.locals.companyId || 1,
11
- route: res.locals.routeName || "",
12
- description : err.toString(),
13
- created_by : res.locals.userId || 1
14
- };
15
- connection.insert({
16
- table : "zerror",
17
- data : post
18
- });
19
- setTimeout(function () {
20
- io.to(res.locals.token).emit("error", err.toString());
21
- },1000);
22
- };
1
+ /**
2
+ * For debug code
3
+ */
4
+ const io = require("./io");
5
+ const connection = require("./connection");
6
+
7
+ module.exports = (req, res, err) => {
8
+ let post = {
9
+ table: res.locals.routeName || "",
10
+ company_id: res.locals.companyId || 1,
11
+ route: res.locals.routeName || "",
12
+ description : err.toString(),
13
+ created_by : res.locals.userId || 1
14
+ };
15
+ connection.insert({
16
+ table : "zerror",
17
+ data : post
18
+ });
19
+ setTimeout(function () {
20
+ io.to(res.locals.token).emit("error", err.toString());
21
+ },1000);
22
+ };
package/lib/index.js CHANGED
@@ -1,36 +1,36 @@
1
- 'use strict'
2
-
3
- module.exports = {
4
- access: require('./access'),
5
- Util: require('./Util'),
6
- myCache: require('./cache'),
7
- connection: require('./connection'),
8
- zDataTable: require('./zdataTable'),
9
- zDebug: require('./debug'),
10
- zForm: require('./Form'),
11
- io: require('./io'),
12
- zMail: require('./Mail'),
13
- moduleLib: require('./moduleLib'),
14
- zApp: require('./zapp'),
15
- zAppRouter: require('./zAppRouter'),
16
- zComponent: require('./zComponent'),
17
- zFn: require('./zFn'),
18
- zFunction: require('./zFunction'),
19
- zMenuRouter: require('./zMenuRouter'),
20
- zGeneratorRouter: require('./zGeneratorRouter'),
21
- zReport: require('./zReport'),
22
- zRoute: require('./zRoute'),
23
- zRole: require('./zRole'),
24
- zRoleRouter: require('./zRoleRouter'),
25
- zPage: require('./zPage'),
26
- zTester: require('./zTester'),
27
- zCache: require('./zCache'),
28
- puppeteer: require('puppeteer'),
29
- moment: require('moment'),
30
- ejs: require('ejs'),
31
- axios: require('axios'),
32
- Excel: require('exceljs'),
33
- pm2: require('pm2'),
34
- nodemailer: require('nodemailer'),
35
- readXlsxFile: require('read-excel-file/node')
36
- }
1
+ 'use strict'
2
+
3
+ module.exports = {
4
+ access: require('./access'),
5
+ Util: require('./Util'),
6
+ myCache: require('./cache'),
7
+ connection: require('./connection'),
8
+ zDataTable: require('./zdataTable'),
9
+ zDebug: require('./debug'),
10
+ zForm: require('./Form'),
11
+ io: require('./io'),
12
+ zMail: require('./Mail'),
13
+ moduleLib: require('./moduleLib'),
14
+ zApp: require('./zapp'),
15
+ zAppRouter: require('./zAppRouter'),
16
+ zComponent: require('./zComponent'),
17
+ zFn: require('./zFn'),
18
+ zFunction: require('./zFunction'),
19
+ zMenuRouter: require('./zMenuRouter'),
20
+ zGeneratorRouter: require('./zGeneratorRouter'),
21
+ zReport: require('./zReport'),
22
+ zRoute: require('./zRoute'),
23
+ zRole: require('./zRole'),
24
+ zRoleRouter: require('./zRoleRouter'),
25
+ zPage: require('./zPage'),
26
+ zTester: require('./zTester'),
27
+ zCache: require('./zCache'),
28
+ puppeteer: require('puppeteer'),
29
+ moment: require('moment'),
30
+ ejs: require('ejs'),
31
+ axios: require('axios'),
32
+ Excel: require('exceljs'),
33
+ pm2: require('pm2'),
34
+ nodemailer: require('nodemailer'),
35
+ readXlsxFile: require('read-excel-file/node')
36
+ }
package/lib/io.js CHANGED
@@ -1,44 +1,44 @@
1
- const io = require('socket.io')();
2
-
3
- //room = token
4
- let socketArray = [];
5
-
6
- io.on('connection', function (socket) {
7
- socket.emit('sessiondata', socket.handshake.session);
8
- // Set session data via socket
9
- socket.on('login', function() {
10
- //console.log('Received login message');
11
- socket.handshake.session.user = {
12
- username: 'OSK'
13
- };
14
- //console.log('socket.handshake session data is %j.', socket.handshake.session);
15
-
16
- // socket.handshake.session.save();
17
- //emit logged_in for debugging purposes of this example
18
- socket.emit('logged_in', socket.handshake.session);
19
- });
20
- // Unset session data via socket
21
- socket.on('checksession', function() {
22
- // console.log('Received checksession message');
23
- // console.log('socket.handshake session data is %j.', socket.handshake.session);
24
- socket.emit('checksession', socket.handshake.session);
25
- });
26
- // Unset session data via socket
27
- socket.on('logout', function() {
28
- console.log('Received logout message');
29
- delete socket.handshake.session.user;
30
- // socket.handshake.session.save();
31
- //emit logged_out for debugging purposes of this example
32
- //console.log('socket.handshake session data is %j.', socket.handshake.session);
33
-
34
- socket.emit('logged_out', socket.handshake.session);
35
- });
36
-
37
- socket.on('room', function(room) {
38
- socket.join(room);
39
- });
40
- });
41
-
42
- io.socketArray = socketArray;
43
-
44
- module.exports = io;
1
+ const io = require('socket.io')();
2
+
3
+ //room = token
4
+ let socketArray = [];
5
+
6
+ io.on('connection', function (socket) {
7
+ socket.emit('sessiondata', socket.handshake.session);
8
+ // Set session data via socket
9
+ socket.on('login', function() {
10
+ //console.log('Received login message');
11
+ socket.handshake.session.user = {
12
+ username: 'OSK'
13
+ };
14
+ //console.log('socket.handshake session data is %j.', socket.handshake.session);
15
+
16
+ // socket.handshake.session.save();
17
+ //emit logged_in for debugging purposes of this example
18
+ socket.emit('logged_in', socket.handshake.session);
19
+ });
20
+ // Unset session data via socket
21
+ socket.on('checksession', function() {
22
+ // console.log('Received checksession message');
23
+ // console.log('socket.handshake session data is %j.', socket.handshake.session);
24
+ socket.emit('checksession', socket.handshake.session);
25
+ });
26
+ // Unset session data via socket
27
+ socket.on('logout', function() {
28
+ console.log('Received logout message');
29
+ delete socket.handshake.session.user;
30
+ // socket.handshake.session.save();
31
+ //emit logged_out for debugging purposes of this example
32
+ //console.log('socket.handshake session data is %j.', socket.handshake.session);
33
+
34
+ socket.emit('logged_out', socket.handshake.session);
35
+ });
36
+
37
+ socket.on('room', function(room) {
38
+ socket.join(room);
39
+ });
40
+ });
41
+
42
+ io.socketArray = socketArray;
43
+
44
+ module.exports = io;
@@ -1,125 +1,125 @@
1
- var langs = {}
2
- langs['grid_no_session'] = 'You have no session! <br> Grid Can not be Saved'
3
- langs['grid_list'] = 'List'
4
- langs['grid_personal'] = '* Setup & Personal Grid'
5
- langs['grid_saved'] = 'Data grid saved'
6
- langs['grid_reset'] = 'Successfully to reset grid'
7
- langs['grid_labels_saved'] = 'Label saved!'
8
- langs['grid_configure'] = 'Configure Order and Display of Grid Columns'
9
- langs['grid_visible'] = 'Visible Columns'
10
- langs['grid_invisible'] = 'Hidden / Fixed Columns'
11
- langs['grid_export_data'] = 'Export Page Data'
12
- langs['grid_labeling'] = 'Labeling'
13
- langs['grid_configure_field_labeling'] = 'Configure Field Labeling'
14
- langs['grid_personalize_labeling'] = 'Personalize Labeling'
15
- langs['grid_personalize_setting'] = 'Personalize grid settings'
16
- langs['grid_refresh'] = 'Refresh / Reset Filter'
17
- langs.settings = 'Setting'
18
- langs.settings_info = 'Settings'
19
- langs.grid_settings = 'Settings Grid'
20
- langs['grid_fields'] = 'Fields'
21
- langs['grid_default'] = 'Default'
22
- langs['grid_custom'] = 'Custom'
23
- langs['grid_abort'] = 'Abort any changes and reset settings'
24
- langs['grid_save'] = 'Save grid settings'
25
-
26
- langs['data_saved'] = 'Data saved...'
27
- langs['data_delete'] = 'Success, Data deleted'
28
- langs['data_not_found'] = 'Data not found!'
29
- langs['data_add'] = 'Add Data'
30
- langs['download_excel'] = 'Download Excel'
31
- langs['data_import'] = 'Import Data'
32
-
33
- langs['form_import'] = 'Parsing / Import Form'
34
- langs['form_import_title'] = 'Import / Upload Data using excel file'
35
- langs['form_label_excel_file'] = 'Your Excel File *.xlsx'
36
- langs['form_create'] = 'Form Create'
37
- langs['form_update'] = 'Form Update'
38
- langs['form_add_data'] = 'Add Data'
39
- langs['form_add_data_select'] = 'Please select data'
40
- langs['form_not_empty'] = 'Tidak boleh kosong'
41
-
42
- langs['import_success'] = 'Import successfully, Please check your data with results!'
43
- langs['import_no_file'] = 'No excel file is upload!'
44
- langs['import_process'] = 'File being processed'
45
- langs['import_results'] = 'Import Results'
46
- langs['import_example'] = 'Example Format File'
47
- langs.import = 'Import'
48
- langs.import_info = 'Import data using excel file'
49
-
50
- langs['noted'] = 'Noted'
51
- langs['success'] = 'Success'
52
- langs['failed'] = 'Failed!'
53
- langs['reset'] = 'Reset'
54
- langs['apply'] = 'Apply'
55
- langs['submit'] = 'Submit'
56
- langs['home'] = 'Home'
57
- langs['create'] = 'Create'
58
- langs.create_info = 'add a new data'
59
- langs['update'] = 'Update'
60
- langs['delete'] = 'Delete'
61
- langs['view'] = 'View'
62
- langs['upload'] = 'Upload'
63
- langs['approval'] = 'Approval'
64
- langs['approve'] = 'Approve'
65
- langs['logout'] = 'Logout'
66
- langs.download = 'Download'
67
- langs.all = 'all'
68
- langs.profile = 'Profile'
69
- langs.help_center = 'Help Center'
70
- langs.switch_company = 'Switch Company'
71
- langs.notifications = 'Notifications'
72
- langs.messages = 'Messages'
73
- langs.upload_verify = 'Upload Verify Sign Approval'
74
- langs.upload_cropping = 'Clik here to upload a image to start cropping'
75
- langs.change_password = 'Change Your Password'
76
- langs.password_equal = 'New Password & Password Repeat must equal'
77
- langs.verify_info = '* Approval system purpose only'
78
- langs.forget_password = 'Forget Password ?'
79
- langs.password_wrong = 'Username or Password wrong'
80
- langs.login_first = 'Your session is disconnected. Please re-login !!'
81
- langs.no_access = 'You have no access this page. Setup in role menu'
82
- langs.change_password_success = 'successfully change your password'
83
- langs.link_expired = 'Your link has expired!!!'
84
- langs.password_combine = 'password combine char and number, min 6 chars'
85
- langs.user_access = 'User Access'
86
- langs.help_center = 'Help Center'
87
- langs.base_currency = 'Base Currency'
88
- langs.settings_and_privacy = 'Settings and Privacy'
89
- langs.users = 'Users'
90
- langs.company = 'Company'
91
- langs.access_role = 'Access Role'
92
- langs.logs_uploads = 'Upload Logs'
93
-
94
- langs.home = 'Home'
95
- langs.plans = 'Plans'
96
- langs.systems = 'Systems'
97
-
98
- langs['required_not_empty'] = 'Required & can not empty '
99
- langs['delete_confirm'] = 'Do you really want to delete selected ?'
100
-
101
- langs['module_program'] = 'Program'
102
- langs['menu_home'] = 'Home'
103
- langs['menu_language'] = 'Language'
104
- langs['submenu_english'] = 'English'
105
- langs['submenu_indonesian'] = 'Indonesian'
106
- langs['submenu_japan'] = 'japan'
107
- langs['submenu_france'] = 'France'
108
-
109
- langs['menu_logout'] = 'Logout'
110
-
111
- langs['module_master'] = 'Master'
112
- langs['menu_organisation'] = 'Organisation'
113
- langs['submenu_company'] = 'Company'
114
- langs['submenu_branch'] = 'Branch'
115
- langs['submenu_management'] = 'Management'
116
- langs['submenu_division'] = 'Division'
117
- langs['submenu_department'] = 'Department'
118
- langs['submenu_section'] = 'Section'
119
- langs['submenu_subsection'] = 'Subsection'
120
- langs['submenu_position'] = 'Position'
121
- langs['submenu_functional'] = 'Functional'
122
- langs['submenu_grade'] = 'Grade'
123
- langs['submenu_cost_center'] = 'Cost Center'
124
-
125
- module.exports = langs
1
+ var langs = {}
2
+ langs['grid_no_session'] = 'You have no session! <br> Grid Can not be Saved'
3
+ langs['grid_list'] = 'List'
4
+ langs['grid_personal'] = '* Setup & Personal Grid'
5
+ langs['grid_saved'] = 'Data grid saved'
6
+ langs['grid_reset'] = 'Successfully to reset grid'
7
+ langs['grid_labels_saved'] = 'Label saved!'
8
+ langs['grid_configure'] = 'Configure Order and Display of Grid Columns'
9
+ langs['grid_visible'] = 'Visible Columns'
10
+ langs['grid_invisible'] = 'Hidden / Fixed Columns'
11
+ langs['grid_export_data'] = 'Export Page Data'
12
+ langs['grid_labeling'] = 'Labeling'
13
+ langs['grid_configure_field_labeling'] = 'Configure Field Labeling'
14
+ langs['grid_personalize_labeling'] = 'Personalize Labeling'
15
+ langs['grid_personalize_setting'] = 'Personalize grid settings'
16
+ langs['grid_refresh'] = 'Refresh / Reset Filter'
17
+ langs.settings = 'Setting'
18
+ langs.settings_info = 'Settings'
19
+ langs.grid_settings = 'Settings Grid'
20
+ langs['grid_fields'] = 'Fields'
21
+ langs['grid_default'] = 'Default'
22
+ langs['grid_custom'] = 'Custom'
23
+ langs['grid_abort'] = 'Abort any changes and reset settings'
24
+ langs['grid_save'] = 'Save grid settings'
25
+
26
+ langs['data_saved'] = 'Data saved...'
27
+ langs['data_delete'] = 'Success, Data deleted'
28
+ langs['data_not_found'] = 'Data not found!'
29
+ langs['data_add'] = 'Add Data'
30
+ langs['download_excel'] = 'Download Excel'
31
+ langs['data_import'] = 'Import Data'
32
+
33
+ langs['form_import'] = 'Parsing / Import Form'
34
+ langs['form_import_title'] = 'Import / Upload Data using excel file'
35
+ langs['form_label_excel_file'] = 'Your Excel File *.xlsx'
36
+ langs['form_create'] = 'Form Create'
37
+ langs['form_update'] = 'Form Update'
38
+ langs['form_add_data'] = 'Add Data'
39
+ langs['form_add_data_select'] = 'Please select data'
40
+ langs['form_not_empty'] = 'Tidak boleh kosong'
41
+
42
+ langs['import_success'] = 'Import successfully, Please check your data with results!'
43
+ langs['import_no_file'] = 'No excel file is upload!'
44
+ langs['import_process'] = 'File being processed'
45
+ langs['import_results'] = 'Import Results'
46
+ langs['import_example'] = 'Example Format File'
47
+ langs.import = 'Import'
48
+ langs.import_info = 'Import data using excel file'
49
+
50
+ langs['noted'] = 'Noted'
51
+ langs['success'] = 'Success'
52
+ langs['failed'] = 'Failed!'
53
+ langs['reset'] = 'Reset'
54
+ langs['apply'] = 'Apply'
55
+ langs['submit'] = 'Submit'
56
+ langs['home'] = 'Home'
57
+ langs['create'] = 'Create'
58
+ langs.create_info = 'add a new data'
59
+ langs['update'] = 'Update'
60
+ langs['delete'] = 'Delete'
61
+ langs['view'] = 'View'
62
+ langs['upload'] = 'Upload'
63
+ langs['approval'] = 'Approval'
64
+ langs['approve'] = 'Approve'
65
+ langs['logout'] = 'Logout'
66
+ langs.download = 'Download'
67
+ langs.all = 'all'
68
+ langs.profile = 'Profile'
69
+ langs.help_center = 'Help Center'
70
+ langs.switch_company = 'Switch Company'
71
+ langs.notifications = 'Notifications'
72
+ langs.messages = 'Messages'
73
+ langs.upload_verify = 'Upload Verify Sign Approval'
74
+ langs.upload_cropping = 'Clik here to upload a image to start cropping'
75
+ langs.change_password = 'Change Your Password'
76
+ langs.password_equal = 'New Password & Password Repeat must equal'
77
+ langs.verify_info = '* Approval system purpose only'
78
+ langs.forget_password = 'Forget Password ?'
79
+ langs.password_wrong = 'Username or Password wrong'
80
+ langs.login_first = 'Your session is disconnected. Please re-login !!'
81
+ langs.no_access = 'You have no access this page. Setup in role menu'
82
+ langs.change_password_success = 'successfully change your password'
83
+ langs.link_expired = 'Your link has expired!!!'
84
+ langs.password_combine = 'password combine char and number, min 6 chars'
85
+ langs.user_access = 'User Access'
86
+ langs.help_center = 'Help Center'
87
+ langs.base_currency = 'Base Currency'
88
+ langs.settings_and_privacy = 'Settings and Privacy'
89
+ langs.users = 'Users'
90
+ langs.company = 'Company'
91
+ langs.access_role = 'Access Role'
92
+ langs.logs_uploads = 'Upload Logs'
93
+
94
+ langs.home = 'Home'
95
+ langs.plans = 'Plans'
96
+ langs.systems = 'Systems'
97
+
98
+ langs['required_not_empty'] = 'Required & can not empty '
99
+ langs['delete_confirm'] = 'Do you really want to delete selected ?'
100
+
101
+ langs['module_program'] = 'Program'
102
+ langs['menu_home'] = 'Home'
103
+ langs['menu_language'] = 'Language'
104
+ langs['submenu_english'] = 'English'
105
+ langs['submenu_indonesian'] = 'Indonesian'
106
+ langs['submenu_japan'] = 'japan'
107
+ langs['submenu_france'] = 'France'
108
+
109
+ langs['menu_logout'] = 'Logout'
110
+
111
+ langs['module_master'] = 'Master'
112
+ langs['menu_organisation'] = 'Organisation'
113
+ langs['submenu_company'] = 'Company'
114
+ langs['submenu_branch'] = 'Branch'
115
+ langs['submenu_management'] = 'Management'
116
+ langs['submenu_division'] = 'Division'
117
+ langs['submenu_department'] = 'Department'
118
+ langs['submenu_section'] = 'Section'
119
+ langs['submenu_subsection'] = 'Subsection'
120
+ langs['submenu_position'] = 'Position'
121
+ langs['submenu_functional'] = 'Functional'
122
+ langs['submenu_grade'] = 'Grade'
123
+ langs['submenu_cost_center'] = 'Cost Center'
124
+
125
+ module.exports = langs