Skip to content

Commit 115beb9

Browse files
Merge pull request #148 from DoWhile-UOM/dev
Dev
2 parents 287f09c + 79c4f51 commit 115beb9

File tree

14 files changed

+287
-109
lines changed

14 files changed

+287
-109
lines changed

FirstStep/Controllers/AdvertisementController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using FirstStep.Services;
33
using Microsoft.AspNetCore.Http;
44
using Microsoft.AspNetCore.Mvc;
5-
using System.Reflection.Metadata.Ecma335;
65

76
namespace FirstStep.Controllers
87
{

FirstStep/Controllers/AppointmentController.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,28 @@ public async Task<IActionResult> GetBookedAppointmentList(int advertismentId)
4646
}
4747

4848
[HttpGet]
49-
[Route("GetByDate/{date}")]
50-
public async Task<ActionResult<List<dailyInterviewDto>>> GetSchedulesByDate(DateTime date)
49+
[Route("GetSchedulesByDateAndCompany/{date}/Company/{companyId}")]
50+
public async Task<ActionResult<List<dailyInterviewDto>>> GetSchedulesByDate(DateTime date, int companyId)
5151
{
52-
var schedules = await _appointmentService.GetSchedulesByDate(date);
52+
var schedules = await _appointmentService.GetSchedulesByDate(date, companyId);
5353
return Ok(schedules);
5454
}
5555

56+
57+
[HttpGet]
58+
[Route("GetInterviewStat")]
59+
public async Task<IActionResult> GetInterviewStat(int companyId)
60+
{
61+
try
62+
{
63+
return Ok(await _appointmentService.GetInterviewStat(companyId));
64+
}
65+
catch (Exception e)
66+
{
67+
return ReturnStatusCode(e);
68+
}
69+
}
70+
5671
[HttpPost]
5772
[Route("CreateAppointments")]
5873
public async Task<IActionResult> CreateAppointments(AddAppointmentDto newAppointment)

FirstStep/Controllers/EmailController.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using FirstStep.Services;
33
using FirstStep.Models.DTOs;
44
using FirstStep.Models.ServiceModels;
5+
using FirstStep.Models;
56

67
namespace FirstStep.Controllers
78
{
@@ -28,6 +29,15 @@ public async Task<IActionResult> RequestOTP(VerifyEmailDto request)
2829
};
2930
}
3031

32+
[HttpGet]
33+
[Route("TestEmail")]
34+
public async Task<IActionResult> RequestOTP()
35+
{
36+
await _emailService.SendEmailInterviewBookConfirm("ashanmatheesha@gmail.com", "Software Developer","Bistec Global","2023-07-20","1.00 PM");
37+
//Task SendEmailInterviewBook(string email, string advertismentTitle, string company_name, int userid, int advertismentid);
38+
return Ok("Email Sent");
39+
}
40+
3141
[HttpPost]
3242
[Route("VerifyEmail")]
3343
public IActionResult OTPCheck(OTPRequest request)

FirstStep/Data/DataSeeder.cs

Lines changed: 74 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ public async Task SeedAdvertisements(int count)
1818

1919
// random job titles
2020
string[] jobTitles = {
21-
"AI Engineer", "Data Scientist", "AI Developer", "AI Data Scientist", "AI Product Manager", "AI Research Scientist", "DevOps Engineer", "Python Web Developer", "Senior Data Scientist",
22-
"Python DevOps Engineer", "Python Automation Engineer", "Deep Learning Engineer", "Python Scripting Specialist", "Applied Machine Learning Researcher", "NLP (Natural Language Processing) Engineer",
23-
"Quantitative Data Scientist", "Marketing Data Analyst", "Big Data Analyst", "Full Stack Engineer", "Business Data Analyst", "Python Backend Developer", "Machine Learning Scientist", "Computer Vision Engineer"
24-
};
21+
"Software Engineer", "Senior Software Engineer", "Dynamics 365 and C# Developer", "Quality Assurance Engineer", "QA Analyst", "Solution Architect", "DevOps Engineer", "Frontend Developer", "Backend Developer"
22+
};
2523

2624
// random countries and cities
2725
Dictionary<string, string[]> countries = new Dictionary<string, string[]>()
@@ -32,7 +30,7 @@ public async Task SeedAdvertisements(int count)
3230
{ "Australia", new string[] {"Sydney", "Melbourne", "Brisbane", "Perth" } },
3331
};
3432

35-
string[] cities = { "Colombo", "Kandy", "Matara", "Kalutara", "Gampaha", "Moratuwa", "Galle", "Matale"};
33+
string[] cities = { "Colombo", "Kandy", "Matara", "Kalutara", "Gampaha", "Moratuwa", "Galle"};
3634

3735
// random employment types
3836
string[] employmentTypes = { "Full-time", "Part-time", "Contract", "Internship", "Temporary", "Volunteer" };
@@ -44,103 +42,91 @@ public async Task SeedAdvertisements(int count)
4442
string[] experiences = { "Internship", "Entry Level", "Associate", "Mid Level", "Senior Level", "Experienced" };
4543

4644
// random job keywords
47-
string[] keywords = { "ai", "machine learning", "data science", "devop", "big data", "deep learning", "computer vision", "python", "software engineer", "ai engineer" };
45+
string[] keywords = { "software engineer", "web developer", "full stack developer", "software developer" };
4846

49-
// random skills
50-
string[] skills = { "machine learning", "flask", "fastapi", "python", "machine learning", "classification", "machine learning models", "data science", "cicd", "azure", "aws" };
47+
//string[] keywords = { "ai", "machine learning", "data science", "devop", "big data", "deep learning", "computer vision", "python", "software engineer", "ai engineer" };
48+
string[] skills = { "C#", "ASP.NET", "Unit Testing", "Agile", "Continuous Integration", "RESTful APIs" };
5149

5250
// random salary
5351
float[] salaries = { 6500f, 2500f, 2550f, 1500f };
5452

5553
// random hr managers
56-
int[] hrmanager = { 1075, 4137 };
54+
int[] hrmanager = { 2, 7 };
5755

5856
// sample description
59-
string description = @"<h2>
57+
string description = @"
58+
<h2>
6059
<strong>
6160
Overview
6261
</strong>
6362
</h2>
6463
<p style=""letter-spacing: 0.214286px;"">
6564
As a Machine Learning Engineer, you’ll play a crucial role in designing, developing, and implementing machine learning models and algorithms. Your work will directly impact our organization’s products and services, driving innovation and improving user experiences.
6665
</p>
67-
<p>
68-
<br>
69-
</br>
70-
<h2>
71-
<strong>
72-
Qualifications
73-
</strong>
74-
</h2>
75-
<ul>
76-
<li style="""">
77-
<span style=""letter-spacing: 0.214286px;"">
78-
A strong background in machine learning, deep learning, and statistical modeling.
79-
</span>
80-
</li>
81-
<li style="""">
82-
<span style=""letter-spacing: 0.214286px;"">
83-
Proficiency in programming languages such as Python, R, or Julia.
84-
</span>
85-
</li>
86-
<li style="""">
87-
<span style=""letter-spacing: 0.214286px;"">
88-
Experience with popular machine learning libraries (e.g., TensorFlow, PyTorch, scikit-learn).
89-
</span>
90-
</li>
91-
<li style="""">
92-
<span style=""letter-spacing: 0.214286px;"">
93-
Knowledge of data preprocessing, feature engineering, and model evaluation techniques.
94-
</span>
95-
</li>
96-
<li style="""">
97-
<span style=""letter-spacing: 0.214286px;"">
98-
Strong problem-solving skills and the ability to collaborate with cross-functional teams.
99-
</span>
100-
</li>
101-
</ul>
102-
<p>
103-
<br>
104-
</br>
105-
<h2>
106-
<strong>
107-
Responsibilities
108-
</strong>
109-
</h2>
110-
<ul>
111-
<li style="""">
112-
<span style=""letter-spacing: 0.214286px;"">
113-
Developing and implementing machine learning models for various applications (e.g., natural language processing, computer vision, recommendation systems).
114-
</span>
115-
</li>
116-
<li style="""">
117-
<span style=""letter-spacing: 0.214286px;"">
118-
Collecting, cleaning, and analyzing large datasets to extract meaningful insights.
119-
</span>
120-
</li>
121-
<li style="""">
122-
<span style=""letter-spacing: 0.214286px;"">
123-
Collaborating with data scientists, software engineers, and product managers to define project goals and requirements.
124-
</span>
125-
</li>
126-
<li style="""">
127-
<span style=""letter-spacing: 0.214286px;"">
128-
Optimizing and fine-tuning models for performance and scalability.
129-
</span>
130-
</li>
131-
<li style="""">
132-
<span style=""letter-spacing: 0.214286px;"">
133-
Staying up-to-date with the latest advancements in machine learning and AI.
134-
</span>
135-
</li>
136-
</ul>
137-
<p>
138-
<br>
139-
</br>
140-
</p>
141-
</p>
142-
</p>
143-
";
66+
<h2>
67+
<strong>
68+
Qualifications
69+
</strong>
70+
</h2>
71+
<ul>
72+
<li style="""">
73+
<span style=""letter-spacing: 0.214286px;"">
74+
A strong background in machine learning, deep learning, and statistical modeling.
75+
</span>
76+
</li>
77+
<li style="""">
78+
<span style=""letter-spacing: 0.214286px;"">
79+
Proficiency in programming languages such as Python, R, or Julia.
80+
</span>
81+
</li>
82+
<li style="""">
83+
<span style=""letter-spacing: 0.214286px;"">
84+
Experience with popular machine learning libraries (e.g., TensorFlow, PyTorch, scikit-learn).
85+
</span>
86+
</li>
87+
<li style="""">
88+
<span style=""letter-spacing: 0.214286px;"">
89+
Knowledge of data preprocessing, feature engineering, and model evaluation techniques.
90+
</span>
91+
</li>
92+
<li style="""">
93+
<span style=""letter-spacing: 0.214286px;"">
94+
Strong problem-solving skills and the ability to collaborate with cross-functional teams.
95+
</span>
96+
</li>
97+
</ul>
98+
<h2>
99+
<strong>
100+
Responsibilities
101+
</strong>
102+
</h2>
103+
<ul>
104+
<li style="""">
105+
<span style=""letter-spacing: 0.214286px;"">
106+
Developing and implementing machine learning models for various applications (e.g., natural language processing, computer vision, recommendation systems).
107+
</span>
108+
</li>
109+
<li style="""">
110+
<span style=""letter-spacing: 0.214286px;"">
111+
Collecting, cleaning, and analyzing large datasets to extract meaningful insights.
112+
</span>
113+
</li>
114+
<li style="""">
115+
<span style=""letter-spacing: 0.214286px;"">
116+
Collaborating with data scientists, software engineers, and product managers to define project goals and requirements.
117+
</span>
118+
</li>
119+
<li style="""">
120+
<span style=""letter-spacing: 0.214286px;"">
121+
Optimizing and fine-tuning models for performance and scalability.
122+
</span>
123+
</li>
124+
<li style="""">
125+
<span style=""letter-spacing: 0.214286px;"">
126+
Staying up-to-date with the latest advancements in machine learning and AI.
127+
</span>
128+
</li>
129+
</ul>";
144130

145131
Random random = new Random();
146132

@@ -191,7 +177,7 @@ Staying up-to-date with the latest advancements in machine learning and AI.
191177
experience = experiences[random.Next(experiences.Length)],
192178
salary = salaries[i % salaries.Length],
193179
currency_unit = "USD",
194-
submission_deadline = System.DateTime.Now.AddDays(90),
180+
submission_deadline = DateTime.Now.AddDays(90),
195181
job_description = description,
196182
hrManager_id = hrmanager[random.Next(hrmanager.Length)],
197183
field_id = 1,

FirstStep/Models/DTOs/AddAppointmentDto.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ public struct AddAppointmentDto
66
public int advertisement_id { get; set; }
77
public int duration { get; set; }
88
public List<DateTime> time_slots { get; set; }
9+
10+
public string comment { get; set; }
11+
12+
913
}
1014
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace FirstStep.Models.DTOs
2+
{
3+
public class DailyInterviewCount
4+
{
5+
public DateTime Date { get; set; }
6+
public int Booked { get; set; }
7+
public int Completed { get; set; }
8+
public int Missed { get; set; }
9+
}
10+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace FirstStep.Models.DTOs
2+
{
3+
public class InterviewStatDto
4+
{
5+
public List<DailyInterviewCount>? InterviewCountPerDay { get; set; }
6+
public double IsCalledPercentage { get; set; }
7+
}
8+
}

FirstStep/Models/DTOs/dailyInterviewDto.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class dailyInterviewDto
1515
public required string first_name { get; set; }
1616

1717
public required string last_name { get; set; }
18+
19+
public int? seeker_id { get; set; }
1820
}
1921

2022
}

0 commit comments

Comments
 (0)