-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] LEAVE: An alert message at time of leave request creation if em…
…ployee have a scheduled interview in the requesting date range and an indication for the request
- Loading branch information
1 parent
5f68045
commit 3c32335
Showing
13 changed files
with
524 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
leave/templates/leave/user_leave/user_leave_confirm.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
{% load i18n %} | ||
<div | ||
class="oh-modal oh-modal--show" | ||
role="dialog" | ||
id="confirmModal" | ||
aria-labelledby="confirmModalLabel" | ||
aria-hidden="true" | ||
> | ||
<div | ||
class="oh-modal__dialog oh-modal__dialog--confirm" | ||
style="max-width: 512px; border-radius:25px;" | ||
> | ||
<p class="swal2-close"></p> | ||
<ul class="swal2-progress-steps" style="display: none"></ul> | ||
<div class="swal2-icon swal2-info swal2-icon-show" style="display: flex"> | ||
<div class="swal2-icon-content">!</div> | ||
</div> | ||
<h2 class="swal2-title" id="swal2-title">{{title}}</h2> | ||
<div | ||
class="swal2-html-container" | ||
id="swal2-html-container" | ||
style="display: block" | ||
> | ||
<p style="font-size:18px;">{{employee.employee_id}} {% trans "has interview in the requested date." %}</p> | ||
</div> | ||
|
||
<div class="ms-5"> | ||
{% for i in interview %} | ||
<div class="d-flex"> | ||
<span class="d-flex" style="font-size:16px;">{{forloop.counter}}.</span>  <p style="font-size:16px;">{{i}}</p> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
|
||
<h2 class="swal2-title" style="font-size:22px;" id="swal2-title">{% trans "Are you sure want to proceed with the request ?" %}</h2> | ||
<div class="swal2-actions" style="display: flex"> | ||
<div class="swal2-loader"></div> | ||
{% if admin %} | ||
<button | ||
class="swal2-deny swal2-styled mb-4" | ||
data-toggle="oh-modal-toggle" | ||
data-target="#objectCreateModal" | ||
hx-get="{% url 'request-creation' %}?confirm=True" | ||
hx-target="#objectCreateModalTarget" | ||
style="display: inline-block;background-color:#008000;" | ||
> | ||
{% trans "Yes" %} | ||
</button> | ||
{% elif update_admin %} | ||
<button | ||
class="swal2-deny swal2-styled mb-4" | ||
data-toggle="oh-modal-toggle" | ||
data-target="#objectUpdateModal" hx-get="{% url 'request-update' id %}?confirm=True" | ||
hx-target="#objectUpdateModalTarget" | ||
style="display: inline-block;background-color:#008000;" | ||
> | ||
{% trans "Yes" %} | ||
</button> | ||
{% elif update %} | ||
<button | ||
class="swal2-deny swal2-styled mb-4" | ||
data-toggle="oh-modal-toggle" | ||
data-target="#objectUpdateModal" hx-get="{% url 'user-request-update' id %}?confirm=True" | ||
hx-target="#objectUpdateModalTarget" | ||
style="display: inline-block;background-color:#008000;" | ||
> | ||
{% trans "Yes" %} | ||
</button> | ||
{% elif id %} | ||
<button | ||
class="swal2-deny swal2-styled mb-4" | ||
data-toggle="oh-modal-toggle" | ||
data-target="#objectCreateModal" | ||
hx-get="{% url 'user-request' id %}?confirm=True" | ||
hx-target="#objectCreateModalTarget" | ||
style="display: inline-block;background-color:#008000;" | ||
> | ||
{% trans "Yes" %} | ||
</button> | ||
{% else %} | ||
<button | ||
class="swal2-deny swal2-styled mb-4" | ||
data-toggle="oh-modal-toggle" | ||
data-target="#objectCreateModal" | ||
hx-get="{% url 'leave-request-create' %}?confirm=True" | ||
hx-target="#objectCreateModalTarget" | ||
style="display: inline-block;background-color:#008000;" | ||
> | ||
{% trans "Yes" %} | ||
</button> | ||
{% endif %} | ||
<button | ||
type="button" | ||
class="swal2-confirm swal2-styled oh-modal__cancel mb-4" | ||
aria-label="" | ||
style="display: inline-block;background-color:#d33;" | ||
> | ||
{% trans "No" %} | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
<script> | ||
$(document).ready(function (e) { | ||
$("#replaceEmployeeForm").submit(function (e) { | ||
var empId = $("#replaceEmployeeForm").attr("data-id"); | ||
$(".manager-select").each(function () { | ||
var selectElement = $(this); | ||
var managerId = selectElement.val(); | ||
var errorElementId = selectElement.data("error"); | ||
if (empId === managerId) { | ||
$("#" + errorElementId).css("display", "inline-flex"); | ||
event.preventDefault(); | ||
} else { | ||
$("#" + errorElementId).css("display", "none"); | ||
} | ||
}); | ||
}); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.