[UPDT] HORILLA CRUMBS: Add new urls to sidebar_urls list

This commit is contained in:
Horilla
2024-12-27 20:02:08 +05:30
parent 7bb000a32f
commit 1f3ce1bf42
4 changed files with 90 additions and 33 deletions

View File

@@ -1,43 +1,61 @@
{% load i18n %}
{% if messages %}
<span hx-trigger="load" hx-target="#companyLeave" hx-get="{% url 'company-leave-filter' %}" hx-on-htmx-after-request="setTimeout(() => {
{% load i18n %} {% if messages %}
<span
hx-trigger="load"
hx-target="#companyLeave"
hx-get="{% url 'company-leave-filter' %}"
hx-on-htmx-after-request="setTimeout(() => {
$('.oh-modal__close').click();
}, 1000);">
</span>
{% endif %}
{% if form.errors %}
<div class="oh-wrapper">
<div class="oh-alert-container">
{% for error in form.non_field_errors %}
<div class="oh-alert oh-alert--animated oh-alert--danger">{{ error }}</div>
{% endfor %}
}, 1000);"
>
</span>
{% endif %} {% if form.errors %}
<div class="oh-wrapper">
<div class="oh-alert-container">
{% for error in form.non_field_errors %}
<div class="oh-alert oh-alert--animated oh-alert--danger">
{{ error }}
</div>
{% endfor %}
</div>
</div>
{% endif %}
<div class="oh-modal__dialog-header pb-0">
<span class="oh-modal__dialog-title" id="editDialogDialog">{% trans "Create Company Leaves" %}</span>
<span class="oh-modal__dialog-title" id="editDialogDialog"
>{% trans "Create Company Leaves" %}</span
>
<button class="oh-modal__close" aria-label="Close">
<ion-icon name="close-outline"></ion-icon>
</button>
</div>
<div class="oh-modal__dialog-body">
<form hx-post="{% url 'company-leave-creation' %}" hx-target="#objectCreateModalTarget"
class="oh-profile-section pt-1">
<form
hx-post="{% url 'company-leave-creation' %}"
hx-target="#objectCreateModalTarget"
class="oh-profile-section pt-1"
>
<label class="oh-label d-block">{% trans "Based On Week" %}</label>
{{form.based_on_week}} {{form.based_on_week.errors}}
<label class="oh-label d-block">{% trans "Based On Week Day" %}</label>
{{form.based_on_week_day}} {{form.based_on_week_day.errors}}
<label class="oh-label d-block">{% trans "Company" %}</label>
{{form.company_id}} {{form.company_id.errors}}
<div class="oh-modal__dialog-footer p-0 mt-3">
<button type="submit" class="oh-btn oh-btn--secondary oh-btn--shadow">
<button
type="submit"
class="oh-btn oh-btn--secondary oh-btn--shadow"
>
{% trans "Save" %}
</button>
</div>
</form>
</div>
<script>
var week_select = $('#objectCreateModalTarget #id_based_on_week');
var week_select = $("#objectCreateModalTarget #id_based_on_week");
week_select.find('option').filter(function () {
return $(this).text() === '---------';
}).text('All');
week_select
.find("option")
.filter(function () {
return $(this).text() === "---------";
})
.text("All");
</script>

View File

@@ -1,19 +1,28 @@
{% load i18n %}
{% if messages %}
<span hx-get="{% url 'holiday-filter' %}?{{pd}}" hx-target="#holidays" hx-trigger="load" hx-on-htmx-after-request="setTimeout(() => {
{% load i18n %} {% if messages %}
<span
hx-get="{% url 'holiday-filter' %}?{{pd}}"
hx-target="#holidays"
hx-trigger="load"
hx-on-htmx-after-request="setTimeout(() => {
$('.oh-modal__close').click();
}, 1000);">
</span>
}, 1000);"
>
</span>
{% endif %}
<div class="oh-modal__dialog-header pb-0">
<span class="oh-modal__dialog-title" id="editDialogDialog">{% trans "Create Holiday" %}</span>
<span class="oh-modal__dialog-title" id="editDialogDialog"
>{% trans "Create Holiday" %}</span
>
<button class="oh-modal__close" aria-label="Close">
<ion-icon name="close-outline"></ion-icon>
</button>
</div>
<div class="oh-modal__dialog-body">
<form hx-post="{% url 'holiday-creation' %}?{{pd}}" hx-target="#objectCreateModalTarget"
class="oh-profile-section pt-0">
<form
hx-post="{% url 'holiday-creation' %}?{{pd}}"
hx-target="#objectCreateModalTarget"
class="oh-profile-section pt-0"
>
<label class="oh-label d-block" for="{{ form.name.id_for_label }}">
{% trans "Holiday Name" %}
</label>
@@ -21,7 +30,10 @@
<div class="row">
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
<div class="oh-input__group">
<label class="oh-input__label" for="{{form.start_date.id_for_label}}">
<label
class="oh-input__label"
for="{{form.start_date.id_for_label}}"
>
{% trans "Start Date" %}
</label>
{{ form.start_date }} {{ form.start_date.errors }}
@@ -29,17 +41,42 @@
</div>
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
<div class="oh-input__group">
<label class="oh-input__label" for="{{form.end_date.id_for_label}}">
<label
class="oh-input__label"
for="{{form.end_date.id_for_label}}"
>
{% trans "End Date" %}
</label>
{{ form.end_date }} {{ form.end_date.errors }}
</div>
</div>
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
<div class="oh-input__group">
<label
class="oh-input__label"
for="{{form.end_date.id_for_label}}"
>
{% trans "Company" %}
</label>
{{ form.company_id }} {{ form.company_id.errors }}
</div>
</div>
<div class="col-12 col-sm-12 col-md-6 col-lg-6">
<label
class="oh-label d-block"
for="{{ form.name.id_for_label }}"
>{% trans "Recurring" %}</label
>
<div class="oh-switch">
{{ form.recurring }} {{ form.recurring.errors }}
</div>
</div>
</div>
<label class="oh-label d-block" for="{{ form.name.id_for_label }}">{% trans "Recurring" %}</label>
<div class="oh-switch">{{ form.recurring }} {{ form.recurring.errors }}</div>
<div class="oh-modal__dialog-footer p-0">
<button type="submit" class="oh-btn oh-btn--secondary oh-btn--shadow">
<button
type="submit"
class="oh-btn oh-btn--secondary oh-btn--shadow"
>
{% trans "Save" %}
</button>
</div>

View File

@@ -342,3 +342,4 @@ _("candidate-reject-reasons"),
_("skills-view"),
_("employee-bonus-point"),
_("mail-automations"),
_("check-in-check-out-setting"),

View File

@@ -147,6 +147,7 @@ sidebar_urls = [
"skills-view",
"employee-bonus-point",
"mail-automations",
"check-in-check-out-setting",
]
remove_urls = [
"feedback-detailed-view",