Skip to content

Commit

Permalink
Merge pull request #25 from ArpithaVijayakumar/addingViewMoreFunction…
Browse files Browse the repository at this point in the history
…alityFresh

all the view more buttons will show you the relevant tasklist
  • Loading branch information
ivbhatt authored Nov 4, 2021
2 parents ff77659 + f9af9f0 commit 6a4dc94
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 50 deletions.
4 changes: 2 additions & 2 deletions Controller/application_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def __init__(self):
self.application = application_dao()

# @login_required
def get(self):
return {'about':"hello!"}
def get(self, email, application_category):
return self.application.get_application(email, application_category)

# @login_required
def post(self, email, company_name, location, job_profile, salary, username, password, security_question, security_answer, notes,
Expand Down
13 changes: 10 additions & 3 deletions Controller/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,17 @@ def signup():
return render_template('home.html', data=data, upcoming_events=upcoming_events)

@home_route.route('/view', methods=['GET'])
@login_required
# @login_required
def view():
card_selected = request.args.get('user')
return render_template('view_list.html', data=data, upcoming_events=upcoming_events)
application_category = request.args.get('show')


result_data = application.get(session["email"], application_category)

print(result_data)


return render_template('view_list.html', data=result_data, upcoming_events=upcoming_events)

@home_route.route("/add_new_application", methods = ["GET","POST"])
# @login_required
Expand Down
8 changes: 6 additions & 2 deletions DAO/application_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ def add_application(self, email, company_name, location, job_profile, salary, us

return self.__db.run_query("INSERT INTO application (user_id, company_id, role_id, application_date, job_description, salary, location, status) values ("+str(userId)+", "+str(companyId)+", "+str(roleId)+", "+date_applied+", '"+job_profile+"', "+str(salary)+", '"+location+"', '"+status+"');")

def get_application(self):
pass
def get_application(self, email, application_status):
userId = self.__db.run_query("SELECT user_id FROM user WHERE email='"+email+"'")[0][0]
res = self.__db.run_query("SELECT company_name, status, application_date FROM application JOIN company ON company.company_id = application.company_id WHERE user_id="+str(userId))

print(res)
return res

def update_application(self):
pass
Expand Down
50 changes: 7 additions & 43 deletions templates/view_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,16 @@
<th scope="col">Company</th>
<th scope="col">Status</th>
<th scope="col">Applied On</th>
<th scope="col">Due Date</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Amazon</th>
<td>TO_DO</td>
<td>2021/06/01</td>
<td>2021/10/10</td>
</tr>
<tr>
<th scope="row">Microsoft</th>
<td>TO_DO</td>
<td>2021/06/01</td>
<td>2021/10/10</td>
</tr>
<tr>
<th scope="row">Microsoft</th>
<td>TO_DO</td>
<td>2021/06/01</td>
<td>2021/10/10</td>
</tr>
<tr>
<th scope="row">Microsoft</th>
<td>TO_DO</td>
<td>2021/06/01</td>
<td>2021/10/10</td>
</tr>
<tr>
<th scope="row">Microsoft</th>
<td>TO_DO</td>
<td>2021/06/01</td>
<td>2021/10/10</td>
</tr>
<tr>
<th scope="row">Microsoft</th>
<td>TO_DO</td>
<td>2021/06/01</td>
<td>2021/10/10</td>
</tr>
<tr>
<th scope="row">Microsoft</th>
<td>TO_DO</td>
<td>2021/06/01</td>
<td>2021/10/10</td>
</tr>
{%for row in data %}
<tr>
<th scope="row">{{row[0]}}</th>
<td>{{row[1]}}</td>
<td>{{row[2]}}</td>
</tr>
{% endfor %}
</tbody>
</table>

Expand Down

0 comments on commit 6a4dc94

Please sign in to comment.