danielfloresd / team-profile-generator

Found the usage of undeclared variables JS-0125
Bug risk
Critical
43 occurrences in this check
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 14    const iconName = employee.getRole() === "Manager" ? "users" :
 15        employee.getRole() === "Engineer" ? "laptop" :
 16            "graduation cap";
 17    const item = $("<div>").addClass("item"); 18    const logo = $("<i>").addClass(iconName + " big icon");
 19    const content = $("<div>").addClass("content")
 20    const header = $("<div>").addClass("header").text(employee.getRole());
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 15        employee.getRole() === "Engineer" ? "laptop" :
 16            "graduation cap";
 17    const item = $("<div>").addClass("item");
 18    const logo = $("<i>").addClass(iconName + " big icon"); 19    const content = $("<div>").addClass("content")
 20    const header = $("<div>").addClass("header").text(employee.getRole());
 21    const description = $("<div>").addClass("description").text(employee.getName());
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 16            "graduation cap";
 17    const item = $("<div>").addClass("item");
 18    const logo = $("<i>").addClass(iconName + " big icon");
 19    const content = $("<div>").addClass("content") 20    const header = $("<div>").addClass("header").text(employee.getRole());
 21    const description = $("<div>").addClass("description").text(employee.getName());
 22    item.append(logo);
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 17    const item = $("<div>").addClass("item");
 18    const logo = $("<i>").addClass(iconName + " big icon");
 19    const content = $("<div>").addClass("content")
 20    const header = $("<div>").addClass("header").text(employee.getRole()); 21    const description = $("<div>").addClass("description").text(employee.getName());
 22    item.append(logo);
 23    item.append(content);
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 18    const logo = $("<i>").addClass(iconName + " big icon");
 19    const content = $("<div>").addClass("content")
 20    const header = $("<div>").addClass("header").text(employee.getRole());
 21    const description = $("<div>").addClass("description").text(employee.getName()); 22    item.append(logo);
 23    item.append(content);
 24    content.append(header);
'generateHTML' is not defined
 29
 30function generateDocument(data) {
 31
 32    var html = generateHTML(data); 33
 34    $("#html-preview").html(html);
 35    $("#preview-modal").modal("show");
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 31
 32    var html = generateHTML(data);
 33
 34    $("#html-preview").html(html); 35    $("#preview-modal").modal("show");
 36}
 37
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 32    var html = generateHTML(data);
 33
 34    $("#html-preview").html(html);
 35    $("#preview-modal").modal("show"); 36}
 37
 38
'generateHTML' is not defined
131    $("#download").on("click", function () {
132        // Add download markdown as a file
133        var element = document.createElement("a");
134        let html = generateHTML(team);135        // Download generated html as a file
136        // Open window to download file to local machine
137        var file = new Blob([html], { type: 'text/html' });
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 40$(document).ready(function () {
 41
 42    // Add manager-add button listener
 43    $('#manager-add').on('click', function () { 44        // Get values from form
 45        console.log("Manager button clicked");
 46        const name = $('#manager').val();
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 43    $('#manager-add').on('click', function () {
 44        // Get values from form
 45        console.log("Manager button clicked");
 46        const name = $('#manager').val(); 47        const id = parseInt($('#manager-id').val());
 48        const email = $('#manager-email').val();
 49        const officeNumber = parseInt($('#manager-office').val());
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 44        // Get values from form
 45        console.log("Manager button clicked");
 46        const name = $('#manager').val();
 47        const id = parseInt($('#manager-id').val()); 48        const email = $('#manager-email').val();
 49        const officeNumber = parseInt($('#manager-office').val());
 50
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 45        console.log("Manager button clicked");
 46        const name = $('#manager').val();
 47        const id = parseInt($('#manager-id').val());
 48        const email = $('#manager-email').val(); 49        const officeNumber = parseInt($('#manager-office').val());
 50
 51        console.log("Manager", name, id, email, officeNumber);
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 46        const name = $('#manager').val();
 47        const id = parseInt($('#manager-id').val());
 48        const email = $('#manager-email').val();
 49        const officeNumber = parseInt($('#manager-office').val()); 50
 51        console.log("Manager", name, id, email, officeNumber);
 52        // Create new manager object
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 55            // Add manager to team array
 56            team.push(manager);
 57            // Clear form
 58            $('#manager').val(''); 59            $('#manager-id').val('');
 60            $('#manager-email').val('');
 61            $('#manager-office').val('');
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 56            team.push(manager);
 57            // Clear form
 58            $('#manager').val('');
 59            $('#manager-id').val(''); 60            $('#manager-email').val('');
 61            $('#manager-office').val('');
 62            // Add manager to team list
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 57            // Clear form
 58            $('#manager').val('');
 59            $('#manager-id').val('');
 60            $('#manager-email').val(''); 61            $('#manager-office').val('');
 62            // Add manager to team list
 63            $('#team-list').append(creteListItem(manager));
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 58            $('#manager').val('');
 59            $('#manager-id').val('');
 60            $('#manager-email').val('');
 61            $('#manager-office').val(''); 62            // Add manager to team list
 63            $('#team-list').append(creteListItem(manager));
 64        } catch (err) {
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 60            $('#manager-email').val('');
 61            $('#manager-office').val('');
 62            // Add manager to team list
 63            $('#team-list').append(creteListItem(manager)); 64        } catch (err) {
 65            alert(err);
 66        }
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 66        }
 67    });
 68
 69    $('#engineer-add').on('click', function () { 70        // Get values from form
 71        const name = $('#engineer').val();
 72        const id = parseInt($('#engineer-id').val());
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 68
 69    $('#engineer-add').on('click', function () {
 70        // Get values from form
 71        const name = $('#engineer').val(); 72        const id = parseInt($('#engineer-id').val());
 73        const email = $('#engineer-email').val();
 74        const github = $('#engineer-github').val();
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 69    $('#engineer-add').on('click', function () {
 70        // Get values from form
 71        const name = $('#engineer').val();
 72        const id = parseInt($('#engineer-id').val()); 73        const email = $('#engineer-email').val();
 74        const github = $('#engineer-github').val();
 75
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 70        // Get values from form
 71        const name = $('#engineer').val();
 72        const id = parseInt($('#engineer-id').val());
 73        const email = $('#engineer-email').val(); 74        const github = $('#engineer-github').val();
 75
 76        console.log("Engineer", name, id, email, github);
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 71        const name = $('#engineer').val();
 72        const id = parseInt($('#engineer-id').val());
 73        const email = $('#engineer-email').val();
 74        const github = $('#engineer-github').val(); 75
 76        console.log("Engineer", name, id, email, github);
 77        // Create new manager object
'$' is not defined To fix this, add jquery in environment array of .deepsource.toml. Read more in our documentation https://deepsource.io/docs/analyzer/javascript
 81            team.push(engineer);
 82            // Clear form
 83            $('#engineer').val('');
 84            $('#engineer-id').val(''); 85            $('#engineer-email').val('');
 86            $('#engineer-github').val('');
 87            // Add manager to team list