I'm freeze in my app. I want to create my own reports.js file using variables like a functions but I can not initialize it. I'm copying other ones already done in the template but I can't understand why mine is not working.
Here is the part where I call it into the head section.
$(document).ready(function(){
"use strict";
App.init(); // Init layout and core plugins
Plugins.init(); // Init all plugins
FormComponents.init(); // Init all form-specific plugins
Reports.init();
$('#StartDate').pickadate({
formatSubmit: 'yyyy/mm/dd',
hiddenName: true
});
});
When I run the site, the console shows TypeError: Reports.init is not a function
Now I'm going to share the report.js file:
var Reports = function () {
"use strict";
var form = $('form').attr('id');
alert(form);
/* * * * * * * * * * * * * * *
* Employee Clock-In Clock-Out
* * * * * * * * * * * * * * */
var EmployeeClocks = function(form) {
// will do something
}
return {
// main function to initiate reports
init: function () {
// EmployeeClocks();
},
};
}