zet-lib 1.5.29 → 2.0.0
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/Modal.js +85 -30
- package/lib/Model.js +118 -2
- package/lib/config_generator.js +24 -0
- package/lib/generatorApi.js +1328 -0
- package/lib/generatorApp.js +1342 -0
- package/lib/generatorModel.js +733 -0
- package/lib/lang_en.js +115 -0
- package/lib/routes/api.js +52 -0
- package/lib/routes/index.js +9 -0
- package/lib/views/error.ejs +3 -0
- package/lib/views/generatorjs.ejs +855 -852
- package/lib/views/zgenerator/bootstrap3/_form.ejs +24 -0
- package/lib/views/zgenerator/bootstrap3/create.ejs +9 -0
- package/lib/views/zgenerator/bootstrap3/createjs.ejs +3 -0
- package/lib/views/zgenerator/bootstrap3/import.ejs +52 -0
- package/lib/views/zgenerator/bootstrap3/importjs.ejs +3 -0
- package/lib/views/zgenerator/bootstrap3/index.ejs +29 -0
- package/lib/views/zgenerator/bootstrap3/indexcss.ejs +1 -0
- package/lib/views/zgenerator/bootstrap3/indexjs.ejs +307 -0
- package/lib/views/zgenerator/bootstrap3/update.ejs +8 -0
- package/lib/views/zgenerator/bootstrap3/updatejs.ejs +3 -0
- package/lib/views/zgenerator/bootstrap3/view.ejs +57 -0
- package/lib/views/zgenerator/head.ejs +12 -0
- package/lib/views/zgenerator/index.ejs +271 -0
- package/lib/views/zgenerator/indexcss.ejs +87 -0
- package/lib/views/zgenerator/indexjs.ejs +705 -0
- package/lib/views/zgenerator/layout.ejs +198 -0
- package/lib/views/zgenerator/manual_basic.ejs +2 -0
- package/lib/views/zgenerator/manual_dropdown.ejs +126 -0
- package/lib/views/zgenerator/manual_modules.ejs +192 -0
- package/lib/views/zgenerator/manual_virtual.ejs +143 -0
- package/lib/views/zgenerator/mini.ejs +341 -0
- package/lib/views/zgenerator/routerApp.ejs +359 -0
- package/lib/views/zgenerator/views/_form.ejs +25 -0
- package/lib/views/zgenerator/views/approval.ejs +42 -0
- package/lib/views/zgenerator/views/create.ejs +7 -0
- package/lib/views/zgenerator/views/createjs.ejs +16 -0
- package/lib/views/zgenerator/views/import.ejs +49 -0
- package/lib/views/zgenerator/views/importjs.ejs +4 -0
- package/lib/views/zgenerator/views/index.ejs +9 -0
- package/lib/views/zgenerator/views/indexcss.ejs +2 -0
- package/lib/views/zgenerator/views/indexjs.ejs +2 -0
- package/lib/views/zgenerator/views/preview.ejs +34 -0
- package/lib/views/zgenerator/views/update.ejs +7 -0
- package/lib/views/zgenerator/views/updatejs.ejs +16 -0
- package/lib/views/zgenerator/views/view.ejs +36 -0
- package/lib/zGeneratorRouter.js +177 -153
- package/lib/zRoute.js +14 -3
- package/package.json +1 -1
package/lib/lang_en.js
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
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 grid 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
|
+
|
|
43
|
+
langs['import_success'] = 'Import successfully, Please check your data with results!';
|
|
44
|
+
langs['import_no_file'] = 'No excel file is upload!';
|
|
45
|
+
langs['import_process'] = 'File being processed';
|
|
46
|
+
langs['import_results'] = 'Import Results';
|
|
47
|
+
langs['import_example'] = 'Example Format File';
|
|
48
|
+
langs.import = 'Import';
|
|
49
|
+
langs.import_info = 'Import data using excel file'
|
|
50
|
+
|
|
51
|
+
langs['noted'] = 'Noted';
|
|
52
|
+
langs['success'] = 'Success';
|
|
53
|
+
langs['failed'] = 'Failed!';
|
|
54
|
+
langs['reset'] = 'Reset';
|
|
55
|
+
langs['apply'] = 'Apply';
|
|
56
|
+
langs['submit'] = 'Submit';
|
|
57
|
+
langs['home'] = 'Home';
|
|
58
|
+
langs['create'] = 'Create';
|
|
59
|
+
langs.create_info = 'add a new data';
|
|
60
|
+
langs['update'] = 'Update';
|
|
61
|
+
langs['delete'] = 'Delete';
|
|
62
|
+
langs['view'] = 'View';
|
|
63
|
+
langs['upload'] = 'Upload';
|
|
64
|
+
langs['approval'] = 'Approval';
|
|
65
|
+
langs['approve'] = 'Approve';
|
|
66
|
+
langs['logout'] = 'Logout';
|
|
67
|
+
langs.download = 'Download';
|
|
68
|
+
langs.all = 'all';
|
|
69
|
+
langs.profile = 'Profile';
|
|
70
|
+
langs.help_center = 'Help Center';
|
|
71
|
+
langs.switch_company = 'Switch Company';
|
|
72
|
+
langs.notifications = 'Notifications';
|
|
73
|
+
langs.messages = 'Messages';
|
|
74
|
+
langs.upload_verify = 'Upload Verify Sign Approval'
|
|
75
|
+
langs.upload_cropping = 'Clik here to upload a image to start cropping';
|
|
76
|
+
langs.change_password = 'Change Your Password';
|
|
77
|
+
langs.password_equal = 'New Password & Password Repeat must equal';
|
|
78
|
+
langs.verify_info = '* Approval system purpose only';
|
|
79
|
+
langs.forget_password = 'Forget Password ?';
|
|
80
|
+
langs.password_wrong = 'Username or Password wrong';
|
|
81
|
+
langs.login_first = 'Your session is disconnected. Please re-login !!';
|
|
82
|
+
langs.no_access = 'You have no access this page. Setup in role menu';
|
|
83
|
+
langs.change_password_success = 'successfully change your password';
|
|
84
|
+
langs.link_expired = 'Your link has expired!!!';
|
|
85
|
+
langs.password_combine = 'password combine char and number, min 6 chars';
|
|
86
|
+
langs.user_access = "User Access";
|
|
87
|
+
|
|
88
|
+
langs['required_not_empty'] ='Required & can not empty ';
|
|
89
|
+
langs['delete_confirm'] = 'Do you really want to delete selected ?';
|
|
90
|
+
|
|
91
|
+
langs['module_program'] = 'Program';
|
|
92
|
+
langs['menu_home'] = 'Home';
|
|
93
|
+
langs['menu_language'] = 'Language';
|
|
94
|
+
langs['submenu_english'] = 'English';
|
|
95
|
+
langs['submenu_indonesian'] = 'Indonesian';
|
|
96
|
+
langs['submenu_japan'] = 'japan';
|
|
97
|
+
langs['submenu_france'] = 'France';
|
|
98
|
+
|
|
99
|
+
langs['menu_logout'] = 'Logout';
|
|
100
|
+
|
|
101
|
+
langs['module_master'] = 'Master';
|
|
102
|
+
langs['menu_organisation'] = 'Organisation';
|
|
103
|
+
langs['submenu_company'] = 'Company';
|
|
104
|
+
langs['submenu_branch'] = 'Branch';
|
|
105
|
+
langs['submenu_management'] = 'Management';
|
|
106
|
+
langs['submenu_division'] = 'Division';
|
|
107
|
+
langs['submenu_department'] = 'Department';
|
|
108
|
+
langs['submenu_section'] = 'Section';
|
|
109
|
+
langs['submenu_subsection'] = 'Subsection';
|
|
110
|
+
langs['submenu_position'] = 'Position';
|
|
111
|
+
langs['submenu_functional'] = 'Functional';
|
|
112
|
+
langs['submenu_grade'] = 'Grade';
|
|
113
|
+
langs['submenu_cost_center'] = 'Cost Center';
|
|
114
|
+
|
|
115
|
+
module.exports = langs;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const express = require('express');
|
|
2
|
+
const router = express.Router();
|
|
3
|
+
const Api = require('../generatorApi');
|
|
4
|
+
const Model = require('../Model');
|
|
5
|
+
|
|
6
|
+
//Home of Generator index
|
|
7
|
+
router.post('/generator/index', (req,res) => {
|
|
8
|
+
let json = {};
|
|
9
|
+
try {
|
|
10
|
+
let datas = {table: '', tabs: [], labels: {}, details: {}, hardcode_grid: ""};
|
|
11
|
+
let table = req.body.table || "", route = "";
|
|
12
|
+
json = {
|
|
13
|
+
datas: datas,
|
|
14
|
+
table: table,
|
|
15
|
+
route: table,
|
|
16
|
+
selects: Model.keys,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
} catch (e) {
|
|
20
|
+
console.log(e.toString());
|
|
21
|
+
res.status(400).json({message: e.toString()})
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
res.json(json)
|
|
25
|
+
});
|
|
26
|
+
router.post('/generator/modal', async(req,res) => {
|
|
27
|
+
let body = req.body;
|
|
28
|
+
let result = body.result;
|
|
29
|
+
let others = result.others || {};
|
|
30
|
+
let othersArr = Object.keys(others) || [];
|
|
31
|
+
let json = {}
|
|
32
|
+
if(othersArr.length) {
|
|
33
|
+
console.log('masuk ke container')
|
|
34
|
+
json = await Api.modalWithContainer(req,res);
|
|
35
|
+
} else {
|
|
36
|
+
json = await Api.modalClassic(req,res);
|
|
37
|
+
}
|
|
38
|
+
//console.log(JSON.stringify(json))
|
|
39
|
+
res.json(json)
|
|
40
|
+
});
|
|
41
|
+
router.post('/generator/create', (req,res) => {
|
|
42
|
+
res.json(Api.createTable(req.body))
|
|
43
|
+
});
|
|
44
|
+
router.post('/generator/create_field', Api.create_field);
|
|
45
|
+
router.post('/generator/modal_settings', Api.modal_settings);
|
|
46
|
+
|
|
47
|
+
//generate
|
|
48
|
+
router.post('/generator/properties', Api.properties);
|
|
49
|
+
router.post('/generator/generate', Api.generate);
|
|
50
|
+
router.post('/generator/reset', Api.reset);
|
|
51
|
+
|
|
52
|
+
module.exports = router;
|