[FIX] ONBOARDING: Candidate send portal/trigger onboarding issue fix
This commit is contained in:
@@ -113,7 +113,9 @@
|
||||
<ion-icon name="close-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<form hx-post="{% url 'email-send' %}" hx-target="#addAttachmentsBody" hx-encoding="multipart/form-data">
|
||||
<form hx-post="{% url 'email-send' %}"
|
||||
hx-target="#addAttachmentsBody"
|
||||
hx-encoding="multipart/form-data">
|
||||
<div class="oh-modal__dialog-body" id="addAttachmentsBody">
|
||||
<section>
|
||||
<div id="keyResultsContainer">
|
||||
@@ -146,7 +148,7 @@
|
||||
</section>
|
||||
</div>
|
||||
<div class="oh-modal__dialog-footer">
|
||||
<button type="button" onclick="$('.oh-modal#addAttachments').removeClass('oh-modal--show');$(`#messages`).html(
|
||||
<button onclick="$('.oh-modal#addAttachments').removeClass('oh-modal--show');$(`#messages`).html(
|
||||
$(`
|
||||
<div class='oh-alert oh-alert--animated oh-alert--info'>
|
||||
Processing...
|
||||
|
||||
@@ -29,7 +29,7 @@ from django.views.decorators.http import require_http_methods
|
||||
from base.models import JobPosition
|
||||
from notifications.signals import notify
|
||||
from horilla import settings
|
||||
from horilla.decorators import login_required, hx_request_required
|
||||
from horilla.decorators import login_required, hx_request_required, logger
|
||||
from horilla.decorators import permission_required
|
||||
from base.methods import generate_pdf, get_key_instances, get_pagination, sortby
|
||||
from onboarding.filters import OnboardingCandidateFilter, OnboardingStageFilter
|
||||
@@ -668,7 +668,8 @@ def email_send(request):
|
||||
email.send()
|
||||
# to check ajax or not
|
||||
messages.success(request, "Portal link sent to the candidate")
|
||||
except:
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
messages.error(request, f"Mail not send to {candidate.name}")
|
||||
candidate.start_onboard = True
|
||||
candidate.save()
|
||||
@@ -679,8 +680,8 @@ def email_send(request):
|
||||
)
|
||||
onboarding_candidate.candidate_id = candidate
|
||||
onboarding_candidate.save()
|
||||
except:
|
||||
messages.error(request, "Something went wrong.")
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
|
||||
return HttpResponse("<script>window.location.reload()</script>")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user