[FIX] RECRUITMENT: Fixed template filter not loading issue and pylint issues
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
from django.contrib.auth.backends import BaseBackend
|
||||
from .models import Candidate
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
|
||||
from .models import Candidate
|
||||
|
||||
|
||||
class CandidateAuthenticationBackend(BaseBackend):
|
||||
def authenticate(self, request, username=None, password=None):
|
||||
try:
|
||||
@@ -14,4 +16,4 @@ class CandidateAuthenticationBackend(BaseBackend):
|
||||
try:
|
||||
return Candidate.objects.get(pk=user_id)
|
||||
except Candidate.DoesNotExist:
|
||||
return AnonymousUser()
|
||||
return AnonymousUser()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% load static i18n %}
|
||||
{% load static i18n recruitmentfilters %}
|
||||
<style>
|
||||
.interview-item {
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
@@ -72,7 +72,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="tracking-card">
|
||||
<div class="tracking-card">
|
||||
<div class="interview-list">
|
||||
<ol class="oh-activity-sidebar__qa-list" role="list">
|
||||
{% for interview in candidate.candidate_interview.all %}
|
||||
@@ -163,4 +163,4 @@
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -343,15 +343,15 @@
|
||||
<div
|
||||
class="oh-rate"
|
||||
>
|
||||
{% for i in "54321" %}
|
||||
{% for i in "54321" %}
|
||||
<input
|
||||
type="radio"
|
||||
id="star{{i}}{{candidate.id}}"
|
||||
name="rating" class="rating-radio"
|
||||
value="{{i}}" disabled
|
||||
value="{{i}}" disabled
|
||||
{% if candidate.candidate_rating.all|avg_rating:candidate == i %}
|
||||
checked
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
/>
|
||||
<label for="star{{i}}{{candidate.id}}"
|
||||
>5</label
|
||||
@@ -365,7 +365,7 @@
|
||||
</div>
|
||||
<div class="mb-3 d-flex justify-content-between">
|
||||
<h5 class="text-secondary">
|
||||
{{ candidate.recruitment_id.title }} /
|
||||
{{ candidate.recruitment_id.title }} /
|
||||
{{ candidate.stage_id.stage }}
|
||||
</h5>
|
||||
<div class="oh-recuritment_tag">
|
||||
@@ -429,8 +429,8 @@
|
||||
>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<button
|
||||
class="btn oh-btn--secondary border-0 px-3 py-1 small"
|
||||
<button
|
||||
class="btn oh-btn--secondary border-0 px-3 py-1 small"
|
||||
hx-get="{% url 'candidate-file-upload' document.id %}"
|
||||
hx-target="#objectCreateModalTarget"
|
||||
data-document-id="{{ document.id }}"
|
||||
@@ -582,11 +582,11 @@
|
||||
{% if note.candidate_can_view %}
|
||||
<div class="note-card card">
|
||||
{% if request.user.is_authenticated or note.updated_user == candidate %}
|
||||
<button class="note-close-btn"
|
||||
<button class="note-close-btn"
|
||||
aria-label="Close note"
|
||||
hx-get="{% url 'note-delete-individual' note.id %}"
|
||||
title="delete" hx-swap="delete"
|
||||
hx-target="closest .card"
|
||||
hx-get="{% url 'note-delete-individual' note.id %}"
|
||||
title="delete" hx-swap="delete"
|
||||
hx-target="closest .card"
|
||||
hx-on:click="setTimeout(() => {reloadMessage(this);},250);"
|
||||
>
|
||||
<ion-icon name="close-outline" style="font-size: 24px;color:red;" role="img" class="md hydrated" aria-label="close outline"></ion-icon>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% load i18n static recruitmentfilters %}
|
||||
<style>
|
||||
|
||||
|
||||
.custom-dialog {
|
||||
max-width: 1000px;
|
||||
max-height: 800px;
|
||||
@@ -62,13 +62,13 @@
|
||||
<div class="mt-2">
|
||||
{% for document in documents %}
|
||||
<div id="document{{document.id}}">
|
||||
<div class="oh-user_permission-list_item accordion exclude-accordion-style"
|
||||
<div class="oh-user_permission-list_item accordion exclude-accordion-style"
|
||||
hx-get="{% url 'candidate-view-file' document.id %}"
|
||||
hx-target="#viewFile" data-toggle="oh-modal-toggle" data-target="#viewFileModal"
|
||||
>
|
||||
<div class="oh-user_permission-list_profile
|
||||
<div class="oh-user_permission-list_profile
|
||||
{% if document.status == "approved" %}row-status--yellow
|
||||
{% elif document.status == 'rejected' %}row-status--red
|
||||
{% elif document.status == 'rejected' %}row-status--red
|
||||
{% elif document.status == 'requested' %}row-status--blue
|
||||
{% endif %}"
|
||||
>
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
hx-swap="innerHTML" method="post" hx-encoding="multipart/form-data">
|
||||
{{form.errors}} {{form.as_p}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
hx-encoding="multipart/form-data"
|
||||
class="oh-profile-section pt-3"
|
||||
>
|
||||
{% csrf_token %}
|
||||
{% csrf_token %}
|
||||
<input
|
||||
type="hidden"
|
||||
name="candidate_id"
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
hx-encoding="multipart/form-data"
|
||||
class="oh-profile-section pt-3"
|
||||
>
|
||||
{% csrf_token %} {{form.non_field_errors}}
|
||||
|
||||
{% csrf_token %} {{form.non_field_errors}}
|
||||
|
||||
<div class="oh-input__group">
|
||||
<label class="oh-input__label" for="{{form.reject_reason.id_for_label}}"
|
||||
>{% trans "Reason" %}</label
|
||||
|
||||
Reference in New Issue
Block a user