Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions HRManagementApp/HRManagementApp/Admin/CandidateDetails.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,18 @@
Candidate Details
</h2>
</div>

<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="body">
<form id="frmCandidateDetails">
<%--<div class="col-md-12">
<div class="form-group" >
<div class="form-line">
<select name="tagsinput" id="drpSkills" data-live-search="true" class="form-control show-tick" multiple>
</select>
</div>
</div>
</div>--%>
<div class="col-sm-12">
<label for="skills">Skills</label>
</div>
<div class="col-md-12">
<div class="form-group" >
<div class="form-line">
<select name="tagsinput" data-live-search="true" class="form-control show-tick" multiple>
<select name="tagsinput" id="tagsinput" data-live-search="true" class="form-control show-tick">
<option>---Select Skill---</option>
<option>C#</option>
<option>.Net</option>
<option>ExtJs</option>
Expand All @@ -41,7 +33,7 @@
<label for="nofofpositions">Total Experience</label>
</div>
<div class="col-sm-12">
<input type="number" class="form-control" min="1" name="totalexperience" placeholder="Number of Positions" required autofocus>
<input type="number" class="form-control" min="1" id="totalexperience" name="totalexperience" placeholder="Number of Positions" required autofocus>
</div>
<div class="col-sm-12">
<label for="resume">Upload your Resume</label>
Expand Down
20 changes: 17 additions & 3 deletions HRManagementApp/HRManagementApp/Admin/Dashboard.Master
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,22 @@
<!-- #END# Tasks -->

<!-- User Setting -->
<li class="dropdown">
<%--<li class="dropdown">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button">
<i class="material-icons">person</i>
</a>
</li>
</li>--%>
<!-- #END# User Setting -->

<li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i class="material-icons">more_vert</i></a></li>
<li class="dropdown">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="material-icons">person</i>
</a>
<ul class="dropdown-menu pull-right">
<li><a href="javascript:void(0);">Account Setting</a></li>
<li><a href="Login.aspx">Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -331,6 +339,12 @@
<span>Employee Project Management</span>
</a>
</li>
<li>
<a href="UserSignup.aspx">
<i class="material-icons">person</i>
<span>User Management</span>
</a>
</li>
<li>
<a href="Tasks.aspx">
<i class="material-icons">description</i>
Expand Down
2 changes: 1 addition & 1 deletion HRManagementApp/HRManagementApp/Admin/Dashboard.Master.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace HRManagementApp.Admin
{
public partial class Dashboard : BaseAdminPage
public partial class Dashboard : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
Expand Down
50 changes: 37 additions & 13 deletions HRManagementApp/HRManagementApp/Admin/JobCreate.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<input type="hidden" id="hdRecordid" />
<div class="container-fluid">
<div class="card">
<div class="header">
Expand All @@ -13,11 +14,11 @@
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="body">
<form id="frmJobCreation">
<!--<form id="frmJobCreation">-->
<div class="col-md-12">
<div class="form-group form-float">
<div class="form-line">
<input name="jobtitle" class="form-control no-resize" required></input>
<input name="jobtitle" id="jobtitle" class="form-control no-resize" required></input>
<label class="form-label">Job Title*</label>
</div>
</div>
Expand All @@ -32,11 +33,11 @@
</div>--%>
<div class="col-sm-12">
<label for="skills">Skills</label>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<div class="form-line">
<select name="skills" data-live-search="true" class="form-control show-tick" multiple>
<select name="skills" id="skills" data-live-search="true" class="form-control show-tick" multiple>
<option>C#</option>
<option>.Net</option>
<option>ExtJs</option>
Expand All @@ -47,34 +48,57 @@
</div>
<div class="col-sm-12">
<label for="noofpostions">No. of Positions</label>
</div>
</div>
<div class="col-sm-12">
<input type="number" class="form-control" min="1" name="noofpositions" placeholder="Number of Positions" required autofocus>
<input type="number" class="form-control" min="1" id="noofpositions" name="noofpositions" placeholder="Number of Positions" required autofocus>
</div>
<div class="col-sm-12">
<div class="form-group form-float">
<div class="form-line">
<textarea rows="4" class="form-control no-resize" name="requirements" id="requirements"></textarea>
<input name="requirements" id="requirements" class="form-control no-resize" required></input>
<label class="form-label">Job Descriptions</label>
</div>
</div>
<button class="btn btn-primary waves-effect" type="submit">SUBMIT</button>
<%--<div class="form-group">
<input type="checkbox" id="isactive" name="isactive" checked class="filled-in chk-col-pink"/>
<label for="checkbox">Is Active</label>
</div>--%>
<div class="demo-switch">
<div class="switch">
<label for="checkbox">Job Listing </label> <label>InActive<input type="checkbox" id="isactive" name="isactive" checked><span class="lever"></span>Active</label>
</div>

</div>
<button class="btn btn-primary waves-effect" onclick="new Candidate().createjob();">SUBMIT</button>
</div>
</form>
<!--</form>-->
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div class="header">
<h2>Job List</h2>
</div>
<div class="body">
<table id="tblJobs" class="table table-bordered table-striped table-hover js-basic-example ">
</table>
</div><!-- body -->
</div>
</div>
</div>
</div>
<script src="../Lib/Plugins/jquery/jquery.min.js"></script>
<script src="candidate.js"></script>
<script src="../Services/service.js"></script>
<script>
$(document).ready(()=> {

//candidate.bindSkills();
new Candidate().GetJobListing();
});
let candidate = new Candidate();
candidate.createjob();

</script>
</asp:Content>
102 changes: 79 additions & 23 deletions HRManagementApp/HRManagementApp/Admin/candidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
}

updatecandidate() {
debugger
$('#frmCandidateDetails').on('submit', (e, data) => {
let arrData = $("#frmCandidateDetails").serializeArray();
// Get fileuploader path
//let hrid = $('#hdRecordid').val();
let filename = '';
let biodata = document.getElementById("biodata");
if (biodata) {
Expand All @@ -14,9 +16,9 @@
let objService = new Service();
let objajax = objService.ajax("updateCandidate", objService.POST, `{skillset: "${arrData[0].value}" ,experience:"${arrData[1].value}" ,biodata:"${filename}"}`)
objajax.done((response)=> {
//$('#tagsinput').value = "";
//$('#totalexperience').value = "";
//$('#biodata').value = "";
$('#tagsinput').val("");
$('#totalexperience').val("");
$('#biodata').val("");
console.log(response);
});
objajax.error( (response) =>{
Expand All @@ -30,26 +32,25 @@
})
}
createjob() {
debugger
$('#frmJobCreation').on('submit', (e, data) => {
let arrData = $("#frmJobCreation").serializeArray();
let objService = new Service();
let objajax = objService.ajax("createJob", objService.POST, `{jobtitle: "${arrData[0].value}" ,skills:"${arrData[1].value}" ,noofvacancies:"${arrData[2].value}",remarks:"${arrData[3].value}"}`)
objajax.done((response)=> {
//$('#tagsinput').value = "";
//$('#totalexperience').value = "";
//$('#biodata').value = "";
console.log(response);
});
objajax.error((response)=> {
//$('#tagsinput').value = "";
//$('#totalexperience').value = "";
//$('#biodata').value = "";
console.log(response);
});
e.preventDefault();
return false;
})
let jobtitle = $("#jobtitle");
let skills = $("#skills")
let noofpositions = $("#noofpositions");
let requirements = $("#requirements");
let isActive = $('#isactive')[0].checked
let hrid = $('#hdRecordid').val();
let data = `{recordid: "${hrid}" ,jobtitle: "${jobtitle.val()}" ,skills:"${skills.val()}" ,noofvacancies:"${noofpositions.val()}",remarks:"${requirements.val()}",isActive:${isActive}}`
let objService = new Service();

let objajax = objService.ajax("createJob", objService.POST, data)
objajax.done((response) => {
$('#jobtitle').val("");
$('#skills').val("");
$('#requirements').val("");
$('#noofpositions').val("");
new Candidate().GetJobListing()
console.log(response);
});

}
bindSkills() {
let objService = new Service();
Expand All @@ -67,4 +68,59 @@

});
}
GetJobListing() {
let objService = new Service();
let objajax = objService.ajax("GetJobs", objService.POST, `{}`)
objajax.then((response)=> {

let table = $("#tblJobs");

table.find("tr:gt(0)").remove();; // empty table

table.append('<thead> <tr><th>Id</th><th>Job Title</th> <th>Skills</th><th>Experience Needed</th><th></th></tr></thead><tbody>');
var data = JSON.parse(response.d);
for (let n of data) {
let strEditanchor = `new Candidate().editJob( '${n.jobId}','${n.jobTilte}','${n.skills}','${n.noOfVacancies}','${n.remarks}','${n.isActive}');`;
table.append(`<tr><td>${n.jobId}</td><td>${n.jobTilte}</td><td>${n.skills}</td><td>${n.noOfVacancies}</td><td ><a style='cursor:pointer' onclick="${strEditanchor}">Edit</a></td></tr>`);
}
table.append('</tbody>');
if ($.fn.dataTable.isDataTable(table) == false) {

try {
$('.js-basic-example').DataTable({
responsive: true
});

} catch (e) {

}
}

});
}
editJob(jobid, jobtitle, skills, noofpositions, descriptions, isactive) {

let hdEdit = $("#hdRecordid");
let txtjobtitle = $('#jobtitle');
let txtskills = $('#skills');
let txtrequirements = $('#requirements');
let txtnoofpositions = $('#noofpositions');
let chkIsActive = $('#isactive')[0];

isactive = (isactive === 'true');
hdEdit.val(jobid);
txtjobtitle.val(jobtitle);
txtskills.val(skills);
txtnoofpositions.val(noofpositions);
txtrequirements.val(descriptions);
chkIsActive.checked = isactive;


txtjobtitle.focus();

txtskills.focus();

txtnoofpositions.focus();
txtrequirements.focus();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"grunt-contrib-less": "~0.7.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-shell": "~0.5.0",
"bower": "~1.2.8"
},
"scripts": {
"test": "grunt concat coffee mocha"
Expand Down
Loading