CBV code updates: 4th August
This commit is contained in:
@@ -66,8 +66,7 @@ class CompanyListView(HorillaListView):
|
||||
|
||||
model = Company
|
||||
filter_class = CompanyFilter
|
||||
|
||||
bulk_template = "cbv/settings/company_bulk_update.html"
|
||||
selected_instances_key_id = "selectedInstance"
|
||||
bulk_update_fields = ["country", "state", "city", "zip"]
|
||||
|
||||
def get_bulk_form(self):
|
||||
@@ -161,7 +160,6 @@ class CompanyCreateForm(HorillaFormView):
|
||||
|
||||
model = Company
|
||||
form_class = CompanyForm
|
||||
template_name = "cbv/settings/company_inherit.html"
|
||||
new_display_title = _("Create Company")
|
||||
|
||||
def get_form(self, form_class=None):
|
||||
|
||||
@@ -1,34 +1,9 @@
|
||||
{% extends 'settings.html' %} {% load i18n %} {% block settings %}{% load static %}
|
||||
{% include "generic/components.html" %}
|
||||
<meta name="csrf-token" content="{{ csrf_token }}">
|
||||
|
||||
<div id="selectedInstance" data-ids="[]"></div>
|
||||
<div class="oh-inner-sidebar-content">
|
||||
{% if perms.base.view_company %}
|
||||
<div
|
||||
class="oh-inner-sidebar-content__header d-flex justify-content-between align-items-center"
|
||||
>
|
||||
<h2 class="oh-inner-sidebar-content__title">{{model.get_verbose_name}}</h2>
|
||||
{% if perms.base.add_company %}
|
||||
<button
|
||||
class="oh-btn oh-btn--secondary oh-btn--shadow"
|
||||
data-toggle="oh-modal-toggle"
|
||||
data-target="#objectCreateModal"
|
||||
hx-get="{% url 'company-create' %}"
|
||||
hx-target="#objectCreateModalTarget"
|
||||
>
|
||||
<ion-icon name="add-outline" class="me-1"></ion-icon>
|
||||
{% trans "Create" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if companies %}
|
||||
{% include 'base/company/company_view.html' %}
|
||||
{% else %}
|
||||
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%;">
|
||||
<img style="display: block; width: 15%; margin: 20px auto; filter: opacity(0.5);" src="{% static 'images/ui/company.png' %}" class="" alt="Page not found. 404." />
|
||||
<h5 class="oh-404__subtitle">{% trans "There is no companies at this moment." %}</h5>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div hx-get="{% url 'company-navbar' %}" hx-trigger="load"></div>
|
||||
<div hx-get="{% url 'company-list' %}" hx-trigger="load"></div>
|
||||
</div>
|
||||
{% endblock settings %}
|
||||
|
||||
@@ -1,61 +1,3 @@
|
||||
{% load i18n %}
|
||||
<div class="oh-sticky-table">
|
||||
<div class="oh-sticky-table__table oh-table--sortable">
|
||||
<div class="oh-sticky-table__thead">
|
||||
<div class="oh-sticky-table__tr">
|
||||
<div class="oh-sticky-table__th">{% trans "Company" %}</div>
|
||||
<div class="oh-sticky-table__th">{% trans "Is Hq" %}</div>
|
||||
<div class="oh-sticky-table__th">{% trans "Address" %}</div>
|
||||
<div class="oh-sticky-table__th">{% trans "Country" %}</div>
|
||||
<div class="oh-sticky-table__th">{% trans "State" %}</div>
|
||||
<div class="oh-sticky-table__th">{% trans "City" %}</div>
|
||||
<div class="oh-sticky-table__th">{% trans "Zip" %}</div>
|
||||
{% if perms.base.change_company or perms.base.delete_company %}
|
||||
<div class="oh-sticky-table__th oh-sticky-table__right">{% trans "Actions" %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-sticky-table__tbody">
|
||||
{% for company in companies %}
|
||||
<div class="oh-sticky-table__tr" draggable="true">
|
||||
<div class="oh-sticky-table__sd">
|
||||
<div class="mr-1">
|
||||
<img src="{{company.icon.url}}" style="width: 30px; border-radius: 100%"
|
||||
class="oh-profile__image" alt="Username" />{{company.company}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-sticky-table__td">{{company.hq}}</div>
|
||||
<div class="oh-sticky-table__td">{{company.address}}</div>
|
||||
<div class="oh-sticky-table__td">{{company.country}}</div>
|
||||
<div class="oh-sticky-table__td">{{company.state}}</div>
|
||||
<div class="oh-sticky-table__td">{{company.city}}</div>
|
||||
<div class="oh-sticky-table__td">{{company.zip}}</div>
|
||||
{% if perms.base.change_company or perms.base.delete_company %}
|
||||
<div class="oh-sticky-table__td oh-sticky-table__right">
|
||||
<div class="oh-btn-group">
|
||||
{% if perms.base.change_company %}
|
||||
<button data-toggle="oh-modal-toggle" data-target="#objectUpdateModal"
|
||||
hx-get="{% url 'company-update' company.id %}" hx-target="#objectUpdateModalTarget"
|
||||
class="oh-btn oh-btn--light-bkg w-50" title="{% trans 'Edit' %}">
|
||||
<ion-icon name="create-outline"></ion-icon>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if perms.base.delete_company %}
|
||||
<form action="{% url 'company-delete' company.id %}"
|
||||
onsubmit="return confirm('{% trans "Are you sure you want to delete this company?" %}');"
|
||||
method='post' class='w-50'>
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="oh-btn oh-btn--danger-outline oh-btn--light-bkg w-100"
|
||||
title="{% trans 'Remove' %}">
|
||||
<ion-icon name="trash-outline"></ion-icon>
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div hx-get="{% url 'company-list' %}">
|
||||
</div>
|
||||
|
||||
@@ -3,16 +3,8 @@
|
||||
class="oh-label"
|
||||
for="id_{{ form.job_position_id.title }}"
|
||||
title="{{ form.job_position_id.help_text|safe }}"
|
||||
>{% trans form.job_position_id.label %}</label
|
||||
>{% trans form.job_position_id.label %} New</label
|
||||
>
|
||||
<div id ="dynamic_field_job_position_id">
|
||||
{{form.job_position_id}}
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -8,11 +8,3 @@
|
||||
<div id ="dynamic_field_job_role_id">
|
||||
{{form.job_role_id}}
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -3,25 +3,17 @@
|
||||
{% include "generic/components.html" %}
|
||||
<div id="formContainer">
|
||||
{% include "generic/horilla_form.html" %}
|
||||
|
||||
<button
|
||||
hidden
|
||||
hx-target="#multiApprovalManager_0"
|
||||
hx-swap="outerHTML"
|
||||
hx-get="{% url 'add-more-approval-managers' %}"
|
||||
role="button"
|
||||
id = "addmangerButton"
|
||||
style="color: green"
|
||||
>{% trans "Add more managers.." %}</button>
|
||||
<button hidden hx-target="#multiApprovalManager_0" hx-swap="outerHTML"
|
||||
hx-get="{% url 'add-more-approval-managers' %}" role="button" id="addmangerButton" style="color: green">
|
||||
{% trans "Add more managers.." %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
$("#id_condition_start_value_parent_div").hide();
|
||||
$("#id_condition_end_value_parent_div").hide();
|
||||
$("#id_condition_operator").change(function() {
|
||||
$("#id_condition_operator").change(function () {
|
||||
var selectedValue = $(this).val();
|
||||
if (selectedValue === "range") {
|
||||
$("#id_condition_start_value_parent_div").remove();
|
||||
@@ -48,27 +40,8 @@
|
||||
console.error("Parent div with ID 'id_multi_approval_manager_parent_div' not found.");
|
||||
}
|
||||
|
||||
$(document).off('click', '#addmanger').on('click', '#addmanger', function(event) {
|
||||
$(document).off('click', '#addmanger').on('click', '#addmanger', function (event) {
|
||||
$('#addmangerButton').trigger('click');
|
||||
});
|
||||
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
{% comment %} <script>
|
||||
$(document).ready(function () {
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
</script> {% endcomment %}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
role="button"
|
||||
id = "addmangerButton"
|
||||
style="color: green"
|
||||
>{% trans "Add more managers.." %}</button>
|
||||
>{% trans "Add more managers.. 321" %}</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -22,9 +22,6 @@
|
||||
$('#addmangerButton').trigger('click');
|
||||
});
|
||||
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
|
||||
var managersCount = {{ managers_count }};
|
||||
|
||||
|
||||
@@ -175,10 +175,3 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -8,11 +8,3 @@
|
||||
<div id ="dynamic_field_task_id">
|
||||
{{form.reallocate_to}}
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -175,4 +175,4 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -83,11 +83,3 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(".leave-message").hide();
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,57 +1,53 @@
|
||||
<form hx-post="{{request.path}}?{{request.GET.urlencode}}" hx-swap="outerHTML" hx-encoding="multipart/form-data">
|
||||
<input hidden type="submit" id="allocationEmployeeFormsSubmit">
|
||||
<input hidden type="text" name="instance_id" value="{{request.GET.instance_id}}">
|
||||
<form hx-post="{{ request.path }}?{{ request.GET.urlencode }}" hx-swap="outerHTML" hx-encoding="multipart/form-data">
|
||||
<input hidden type="submit" id="allocationEmployeeFormsSubmit">
|
||||
<input hidden type="text" name="instance_id" value="{{ request.GET.instance_id }}">
|
||||
|
||||
{% load widget_tweaks %} {% load i18n %}
|
||||
{% load generic_template_filters %}
|
||||
<script>
|
||||
$("#reloadMessagesButton").click()
|
||||
</script>
|
||||
<style>
|
||||
.oh-label{
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
{% load widget_tweaks %} {% load i18n %}
|
||||
{% load generic_template_filters %}
|
||||
<script>
|
||||
$("#reloadMessagesButton").click()
|
||||
</script>
|
||||
<style>
|
||||
.oh-label {
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="{{form.container_id}}">
|
||||
<div class="oh-profile-section__card row">
|
||||
<div class="row" style="padding-right: 0;">
|
||||
<div class="col-12" style="padding-right: 0;">{{ form.non_field_errors }}</div>
|
||||
{% for field in form.visible_fields %}
|
||||
<div class="col-12 col-md-{{field|col}}" id="id_{{ field.name }}_parent_div" style="padding-right: 0;">
|
||||
<div class="oh-label__info" for="id_{{ field.name }}">
|
||||
<label class="oh-label {% if field.field.required %} required-star{% endif %}" for="id_{{ field.name }}"
|
||||
>{% trans field.label %}</label
|
||||
>
|
||||
{% if field.help_text != '' %}
|
||||
<span
|
||||
class="oh-info mr-2"
|
||||
title="{{ field.help_text|safe }}"
|
||||
></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="{{ form.container_id }}">
|
||||
<div class="oh-profile-section__card row">
|
||||
<div class="row" style="padding-right: 0;">
|
||||
<div class="col-12" style="padding-right: 0;">{{ form.non_field_errors }}</div>
|
||||
{% for field in form.visible_fields %}
|
||||
<div class="col-12 col-md-{{ field|col }}" id="id_{{ field.name }}_parent_div" style="padding-right: 0;">
|
||||
<div class="oh-label__info" for="id_{{ field.name }}">
|
||||
<label class="oh-label {% if field.field.required %} required-star{% endif %}"
|
||||
for="id_{{ field.name }}">{% trans field.label %}</label>
|
||||
{% if field.help_text != '' %}
|
||||
<span class="oh-info mr-2" title="{{ field.help_text|safe }}"></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if field.field.widget.input_type == 'checkbox' %}
|
||||
<div class="oh-switch" style="width: 30px">
|
||||
{{ field|add_class:'oh-switch__checkbox' }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="dynamic_field_{{field.name}}">
|
||||
{{ field|add_class:'form-control' }}
|
||||
{{ field.errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if field.field.widget.input_type == 'checkbox' %}
|
||||
<div class="oh-switch" style="width: 30px">
|
||||
{{ field|add_class:'oh-switch__checkbox' }}
|
||||
</div>
|
||||
{% elif field.name == "country" or field.name == "state" %}
|
||||
<div class="oh-input-group mb-2">
|
||||
<select name="{{ field.name }}" id="{{ field.id_for_label }}" class="oh-select oh-select-2 form-control"
|
||||
data-selected="{{ field.value|default:'' }}">
|
||||
</select>
|
||||
{{ field.errors }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="dynamic_field_{{field.name}}">
|
||||
{{ field|add_class:'form-control' }}
|
||||
{{ field.errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% for field in form.hidden_fields %} {{ field }} {% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% for field in form.hidden_fields %} {{ field }} {% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
{% include 'country.js' %}
|
||||
populateCountries("country", "state");
|
||||
$('.oh-general__tab-target.oh-profile-section').not('.d-none').find('form').find('select[name=country]').val('{{form.instance.country}}').change()
|
||||
$('.oh-general__tab-target.oh-profile-section').not('.d-none').find('form').find('select[name=state]').val('{{form.instance.state}}').change()
|
||||
</script>
|
||||
</form>
|
||||
|
||||
@@ -6,10 +6,3 @@
|
||||
>{% trans form.notify_before.label %}</label
|
||||
>
|
||||
{{form.notify_before}}
|
||||
{% comment %} <script>
|
||||
$(document).ready(function () {
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
</script> {% endcomment %}
|
||||
|
||||
@@ -122,7 +122,3 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
{% include 'country.js' %}
|
||||
</script>
|
||||
|
||||
@@ -2,116 +2,117 @@
|
||||
{% load static %}
|
||||
{% load horillafilters %}
|
||||
|
||||
<div class="oh-dropdown__filter-body">
|
||||
<div class="oh-dropdown__filter-body">
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans "Employee" %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_first_name.id_for_label}}">{% trans "First Name" %}</label>
|
||||
{{form.employee_first_name}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.email.id_for_label}}">{% trans "Email" %}</label>
|
||||
{{form.email}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Country' %}</label>
|
||||
<select name="country" class="oh-select-2 oh-select w-100 country" id="country">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_last_name.id_for_label}}">{% trans "Last Name" %}</label>
|
||||
{{form.employee_last_name}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.phone.id_for_label}}">{% trans "Phone" %}</label>
|
||||
{{form.phone}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.gender.id_for_label}}">{% trans "Gender" %}</label>
|
||||
{{form.gender}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans "Work Info" %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__company_id.id_for_label}}">{% trans "Company" %}</label>
|
||||
{{form.employee_work_info__company_id}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__department_id.id_for_label}}">{% trans "Department" %}</label>
|
||||
{{form.employee_work_info__department_id}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__shift_id.id_for_label}}">{% trans "Shift" %}</label>
|
||||
{{form.employee_work_info__shift_id}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__tags.id_for_label}}">{% trans "Employee tag" %}</label>
|
||||
{{form.employee_work_info__tags}}
|
||||
</div>
|
||||
<div class="oh-accordion-header">{% trans "Employee" %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_first_name.id_for_label}}">{% trans "First Name" %}</label>
|
||||
{{form.employee_first_name}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.email.id_for_label}}">{% trans "Email" %}</label>
|
||||
{{form.email}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Country' %}</label>
|
||||
<select name="country" class="oh-select-2 oh-select w-100 country" id="country">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__reporting_manager_id.id_for_label}}">{% trans "Reporting Manager" %}</label>
|
||||
{{form.employee_work_info__reporting_manager_id}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__job_position_id.id_for_label}}">{% trans "Job Position" %}</label>
|
||||
{{form.employee_work_info__job_position_id}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__work_type_id.id_for_label}}">{% trans "Work Type" %}</label>
|
||||
{{form.employee_work_info__work_type_id}}
|
||||
</div>
|
||||
{% if "attendance"|app_installed %}
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.working_today.id_for_label}}">{% trans "Currently Working" %}</label>
|
||||
{{form.working_today}}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans "Advanced" %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_user_id__groups.id_for_label}}">{% trans "Groups" %}?</label>
|
||||
{{form.employee_user_id__groups}}
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_last_name.id_for_label}}">{% trans "Last Name" %}</label>
|
||||
{{form.employee_last_name}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.phone.id_for_label}}">{% trans "Phone" %}</label>
|
||||
{{form.phone}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.gender.id_for_label}}">{% trans "Gender" %}</label>
|
||||
{{form.gender}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans "Work Info" %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__company_id.id_for_label}}">{% trans "Company" %}</label>
|
||||
{{form.employee_work_info__company_id}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__department_id.id_for_label}}">{% trans "Department" %}</label>
|
||||
{{form.employee_work_info__department_id}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__shift_id.id_for_label}}">{% trans "Shift" %}</label>
|
||||
{{form.employee_work_info__shift_id}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__tags.id_for_label}}">{% trans "Employee tag" %}</label>
|
||||
{{form.employee_work_info__tags}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__reporting_manager_id.id_for_label}}">{% trans "Reporting Manager" %}</label>
|
||||
{{form.employee_work_info__reporting_manager_id}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__job_position_id.id_for_label}}">{% trans "Job Position" %}</label>
|
||||
{{form.employee_work_info__job_position_id}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_work_info__work_type_id.id_for_label}}">{% trans "Work Type" %}</label>
|
||||
{{form.employee_work_info__work_type_id}}
|
||||
</div>
|
||||
{% if "attendance"|app_installed %}
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.working_today.id_for_label}}">{% trans "Currently Working" %}</label>
|
||||
{{form.working_today}}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans "Advanced" %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_user_id__groups.id_for_label}}">{% trans "Groups" %}?</label>
|
||||
{{form.employee_user_id__groups}}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.is_active.id_for_label}}">{% trans "Is Active" %}?</label>
|
||||
{{form.is_active}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_user_id__user_permissions.id_for_label}}">{% trans "Permissions" %}</label>
|
||||
{{form.employee_user_id__user_permissions}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.is_active.id_for_label}}">{% trans "Is Active" %}?</label>
|
||||
{{form.is_active}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.employee_user_id__user_permissions.id_for_label}}">{% trans "Permissions" %}</label>
|
||||
{{form.employee_user_id__user_permissions}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{% static '/base/filter.js' %}"></script>
|
||||
<script>
|
||||
{% include 'filter_country.js' %}
|
||||
</script>
|
||||
|
||||
@@ -210,3 +210,15 @@ class MailTemplateSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = HorillaMailTemplate
|
||||
fields = "__all__"
|
||||
|
||||
|
||||
class UserAttendanceListSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = Attendance
|
||||
fields = [
|
||||
"id",
|
||||
"attendance_date",
|
||||
"attendance_clock_in",
|
||||
"attendance_clock_out",
|
||||
"attendance_worked_hour",
|
||||
]
|
||||
|
||||
@@ -55,4 +55,6 @@ urlpatterns = [
|
||||
path("offline-employee-mail-send", OfflineEmployeeMailsend.as_view()),
|
||||
path("converted-mail-template", ConvertedMailTemplateConvert.as_view()),
|
||||
path("mail-templates", MailTemplateView.as_view()),
|
||||
path("my-attendance/", UserAttendanceView.as_view()),
|
||||
path("attendance-type-check/", AttendanceTypeAccessCheck.as_view()),
|
||||
]
|
||||
|
||||
@@ -3,7 +3,7 @@ from django.urls import path
|
||||
from ...api_views.employee import views as views
|
||||
|
||||
urlpatterns = [
|
||||
path("employees/", views.EmployeeAPIView.as_view(), name="api-employees-list"),
|
||||
# path('employees/', views.EmployeeAPIView.as_view(), name='api-employees-list'),
|
||||
path(
|
||||
"employees/<int:pk>/",
|
||||
views.EmployeeAPIView.as_view(),
|
||||
|
||||
@@ -7,6 +7,7 @@ from django.db.models import Case, CharField, F, Value, When
|
||||
from django.http import QueryDict
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.utils.decorators import method_decorator
|
||||
from rest_framework import status
|
||||
from rest_framework.pagination import PageNumberPagination
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
from rest_framework.response import Response
|
||||
@@ -38,6 +39,7 @@ from ...api_serializers.attendance.serializers import (
|
||||
AttendanceRequestSerializer,
|
||||
AttendanceSerializer,
|
||||
MailTemplateSerializer,
|
||||
UserAttendanceListSerializer,
|
||||
)
|
||||
|
||||
# Create your views here.
|
||||
@@ -65,7 +67,6 @@ class ClockInAPIView(APIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
def post(self, request):
|
||||
print("========", request.user.employee_get.check_online())
|
||||
if not request.user.employee_get.check_online():
|
||||
try:
|
||||
if request.user.employee_get.get_company().geo_fencing.start:
|
||||
@@ -158,7 +159,6 @@ class ClockOutAPIView(APIView):
|
||||
except:
|
||||
pass
|
||||
if request.user.employee_get.check_online():
|
||||
print("----------------")
|
||||
current_date = date.today()
|
||||
current_time = datetime.now().time()
|
||||
current_datetime = datetime.now()
|
||||
@@ -722,6 +722,7 @@ class OfflineEmployeesCountView(APIView):
|
||||
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
@method_decorator(permission_required("employee.view_employee"))
|
||||
def get(self, request):
|
||||
count = (
|
||||
EmployeeFilter({"not_in_yet": date.today()})
|
||||
@@ -742,6 +743,7 @@ class OfflineEmployeesListView(APIView):
|
||||
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
@method_decorator(permission_required("employee.view_employee"))
|
||||
def get(self, request):
|
||||
queryset = (
|
||||
EmployeeFilter({"not_in_yet": date.today()})
|
||||
@@ -972,3 +974,46 @@ class OfflineEmployeeMailsend(APIView):
|
||||
return Response(f"Email not set for {employee.get_full_name()}")
|
||||
except Exception as e:
|
||||
return Response("Something went wrong")
|
||||
|
||||
|
||||
class UserAttendanceView(APIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
serializer_class = UserAttendanceListSerializer
|
||||
|
||||
def get(self, request):
|
||||
employee_id = request.user.employee_get.id
|
||||
|
||||
attendance_queryset = Attendance.objects.filter(
|
||||
employee_id=employee_id
|
||||
).order_by("-id")
|
||||
|
||||
paginator = PageNumberPagination()
|
||||
paginator.page_size = 20
|
||||
page = paginator.paginate_queryset(attendance_queryset, request)
|
||||
|
||||
serializer = self.serializer_class(page, many=True)
|
||||
return paginator.get_paginated_response(serializer.data)
|
||||
|
||||
|
||||
class AttendanceTypeAccessCheck(APIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
def get(self, request):
|
||||
user = request.user
|
||||
employee_id = user.employee_get.id
|
||||
|
||||
if user.has_perm("attendance.view_attendance"):
|
||||
return Response(status=200)
|
||||
|
||||
is_manager = (
|
||||
EmployeeWorkInformation.objects.filter(reporting_manager_id=employee_id)
|
||||
.only("id")
|
||||
.exists()
|
||||
)
|
||||
|
||||
if is_manager:
|
||||
return Response(status=200)
|
||||
|
||||
return Response(
|
||||
{"error": "Permission denied"}, status=status.HTTP_403_FORBIDDEN
|
||||
)
|
||||
|
||||
@@ -93,49 +93,61 @@ class EmployeeTypeAPIView(APIView):
|
||||
class EmployeeAPIView(APIView):
|
||||
"""
|
||||
Handles CRUD operations for employees.
|
||||
|
||||
Methods:
|
||||
get(request, pk=None):
|
||||
- Retrieves a single employee by pk if provided.
|
||||
- Retrieves and filters all employees if pk is not provided.
|
||||
|
||||
post(request):
|
||||
- Creates a new employee if the user has the 'employee.change_employee' permission.
|
||||
|
||||
put(request, pk):
|
||||
- Updates an existing employee if the user is the employee, a manager, or has 'employee.change_employee' permission.
|
||||
|
||||
delete(request, pk):
|
||||
- Deletes an employee if the user has the 'employee.delete_employee' permission.
|
||||
"""
|
||||
|
||||
filter_backends = [DjangoFilterBackend]
|
||||
filterset_class = EmployeeFilter
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
def get(self, request, pk=None):
|
||||
if pk:
|
||||
try:
|
||||
employee = Employee.objects.get(pk=pk)
|
||||
except Employee.DoesNotExist:
|
||||
return Response(
|
||||
{"error": "Employee does not exist"},
|
||||
status=status.HTTP_404_NOT_FOUND,
|
||||
)
|
||||
def get(self, request, pk):
|
||||
user = request.user
|
||||
try:
|
||||
employee = Employee.objects.only(
|
||||
"id",
|
||||
"employee_first_name",
|
||||
"employee_last_name", # include only needed fields
|
||||
).get(pk=pk)
|
||||
except Employee.DoesNotExist:
|
||||
return Response(
|
||||
{"error": "Employee does not exist"}, status=status.HTTP_404_NOT_FOUND
|
||||
)
|
||||
|
||||
# If user has global view permission
|
||||
if user.has_perm("employee.view_employee"):
|
||||
serializer = EmployeeSerializer(employee)
|
||||
return Response(serializer.data)
|
||||
paginator = PageNumberPagination()
|
||||
employees_queryset = Employee.objects.all()
|
||||
employees_filter_queryset = self.filterset_class(
|
||||
request.GET, queryset=employees_queryset
|
||||
).qs
|
||||
field_name = request.GET.get("groupby_field", None)
|
||||
if field_name:
|
||||
url = request.build_absolute_uri()
|
||||
return groupby_queryset(request, url, field_name, employees_filter_queryset)
|
||||
page = paginator.paginate_queryset(employees_filter_queryset, request)
|
||||
serializer = EmployeeSerializer(page, many=True)
|
||||
return paginator.get_paginated_response(serializer.data)
|
||||
|
||||
# If employee is in user's subordinates
|
||||
subordinates = user.employee_get.get_subordinate_employees()
|
||||
if subordinates.filter(pk=pk).exists():
|
||||
serializer = EmployeeSerializer(employee)
|
||||
return Response(serializer.data)
|
||||
|
||||
# If requesting own data
|
||||
if employee.pk == user.employee_get.id:
|
||||
serializer = EmployeeSerializer(employee)
|
||||
return Response(serializer.data)
|
||||
|
||||
return Response(
|
||||
{"error": "Permission denied"}, status=status.HTTP_403_FORBIDDEN
|
||||
)
|
||||
|
||||
# paginator = PageNumberPagination()
|
||||
# if request.user.has_perm('employee.view_employee'):
|
||||
# employees_queryset = Employee.objects.all()
|
||||
# elif request.user.employee_get.get_subordinate_employees():
|
||||
# employees_queryset = request.user.employee_get.get_subordinate_employees()
|
||||
# else:
|
||||
# employees_queryset = [request.user.employee_get]
|
||||
# employees_filter_queryset = self.filterset_class(
|
||||
# request.GET, queryset=employees_queryset).qs
|
||||
# field_name = request.GET.get("groupby_field", None)
|
||||
# if field_name:
|
||||
# url = request.build_absolute_uri()
|
||||
# return groupby_queryset(request, url, field_name, employees_filter_queryset)
|
||||
# page = paginator.paginate_queryset(employees_filter_queryset, request)
|
||||
# serializer = EmployeeSerializer(page, many=True)
|
||||
# return paginator.get_paginated_response(serializer.data)
|
||||
|
||||
@method_decorator(permission_required("employee.add_employee"))
|
||||
def post(self, request):
|
||||
@@ -176,27 +188,42 @@ class EmployeeAPIView(APIView):
|
||||
class EmployeeListAPIView(APIView):
|
||||
"""
|
||||
Retrieves a paginated list of employees with optional search functionality.
|
||||
|
||||
Methods:
|
||||
get(request):
|
||||
- Returns a paginated list of employees.
|
||||
- Optionally filters employees based on a search query in the first or last name.
|
||||
"""
|
||||
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
def get(self, request):
|
||||
paginator = PageNumberPagination()
|
||||
paginator.page_size = 13
|
||||
search = request.query_params.get("search", None)
|
||||
user = request.user
|
||||
search = request.query_params.get("search")
|
||||
|
||||
# Start with a base queryset with only required fields
|
||||
employees_queryset = Employee.objects.only(
|
||||
"id", "employee_first_name", "employee_last_name"
|
||||
)
|
||||
|
||||
# Permission-based filtering
|
||||
if user.has_perm("employee.view_employee"):
|
||||
pass # employees_queryset is already all employees
|
||||
else:
|
||||
subordinate_qs = user.employee_get.get_subordinate_employees()
|
||||
if subordinate_qs.exists():
|
||||
employees_queryset = subordinate_qs.only(
|
||||
"id", "employee_first_name", "employee_last_name"
|
||||
)
|
||||
else:
|
||||
employees_queryset = employees_queryset.filter(id=user.employee_get.id)
|
||||
|
||||
# Apply search filter if provided
|
||||
if search:
|
||||
employees_queryset = Employee.objects.filter(
|
||||
employees_queryset = employees_queryset.filter(
|
||||
Q(employee_first_name__icontains=search)
|
||||
| Q(employee_last_name__icontains=search)
|
||||
)
|
||||
else:
|
||||
employees_queryset = Employee.objects.all()
|
||||
|
||||
# Paginate
|
||||
paginator = PageNumberPagination()
|
||||
page = paginator.paginate_queryset(employees_queryset, request)
|
||||
|
||||
serializer = EmployeeListSerializer(page, many=True)
|
||||
return paginator.get_paginated_response(serializer.data)
|
||||
|
||||
@@ -386,14 +413,14 @@ class EmployeeWorkInfoImportView(APIView):
|
||||
|
||||
class EmployeeBulkUpdateView(APIView):
|
||||
"""
|
||||
Endpoint for bulk updating employee and work information.
|
||||
Endpoint for bulk updating employee and work information.
|
||||
|
||||
Permissions:
|
||||
- Requires authentication and "change_employee" permission.
|
||||
0
|
||||
Methods:
|
||||
put(request):
|
||||
- Updates multiple employees and their work information.
|
||||
Permissions:
|
||||
- Requires authentication and "change_employee" permission.
|
||||
|
||||
Methods:
|
||||
put(request):
|
||||
- Updates multiple employees and their work information.
|
||||
"""
|
||||
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
@@ -33,6 +33,8 @@ class AutomationForm(ModelForm):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
# --- Field: also_sent_to ---
|
||||
self.fields["also_sent_to"] = HorillaMultiSelectField(
|
||||
queryset=Employee.objects.all(),
|
||||
required=False,
|
||||
@@ -46,41 +48,57 @@ class AutomationForm(ModelForm):
|
||||
label="Also Sent to",
|
||||
help_text=_("The employees selected here will receive the email as Cc."),
|
||||
)
|
||||
if not self.data:
|
||||
mail_to = []
|
||||
|
||||
initial = []
|
||||
mail_details_choice = []
|
||||
if self.instance.pk:
|
||||
mail_to = generate_choices(self.instance.model)[0]
|
||||
mail_details_choice = generate_choices(self.instance.model)[1]
|
||||
self.fields["mail_to"] = forms.MultipleChoiceField(choices=mail_to)
|
||||
self.fields["mail_details"] = forms.ChoiceField(
|
||||
choices=mail_details_choice,
|
||||
help_text="Fill mail template details(reciever/instance, `self` will be the person who trigger the automation)",
|
||||
)
|
||||
self.fields["mail_to"].initial = initial
|
||||
attrs = self.fields["mail_to"].widget.attrs
|
||||
attrs["class"] = "oh-select oh-select-2 w-100"
|
||||
attrs = self.fields["model"].widget.attrs
|
||||
self.fields["model"].choices = [("", "Select model")] + list(set(MODEL_CHOICES))
|
||||
attrs["onchange"] = "getToMail($(this))"
|
||||
# --- Determine model for generate_choices ---
|
||||
model = getattr(self.instance, "model", None) or self.data.get("model")
|
||||
mail_to, mail_details_choice = [], []
|
||||
|
||||
if model:
|
||||
choices = generate_choices(model)
|
||||
mail_to, mail_details_choice = choices[0], choices[1]
|
||||
|
||||
# --- Field: mail_to ---
|
||||
self.fields["mail_to"] = forms.MultipleChoiceField(
|
||||
choices=mail_to,
|
||||
initial=self.data.get("mail_to"),
|
||||
widget=forms.SelectMultiple(attrs={"class": "oh-select oh-select-2 w-100"}),
|
||||
)
|
||||
|
||||
# --- Field: mail_details ---
|
||||
self.fields["mail_details"] = forms.ChoiceField(
|
||||
choices=mail_details_choice,
|
||||
help_text=_(
|
||||
"Fill mail template details (receiver/instance, `self` will be the person who triggers the automation)"
|
||||
),
|
||||
)
|
||||
self.fields["mail_details"].widget.attrs = {
|
||||
"class": "oh-select oh-select-2 w-100"
|
||||
}
|
||||
|
||||
# --- Field: model ---
|
||||
self.fields["model"].choices = [("", "Select model")] + sorted(
|
||||
set(MODEL_CHOICES)
|
||||
)
|
||||
self.fields["model"].widget.attrs["onchange"] = "getToMail($(this))"
|
||||
|
||||
# --- Field: mail_template ---
|
||||
self.fields["mail_template"].empty_label = "----------"
|
||||
attrs = attrs.copy()
|
||||
del attrs["onchange"]
|
||||
self.fields["mail_details"].widget.attrs = attrs
|
||||
|
||||
# --- Instance condition fields ---
|
||||
if self.instance.pk:
|
||||
self.fields["condition"].initial = self.instance.condition_html
|
||||
self.fields["condition_html"].initial = self.instance.condition_html
|
||||
self.fields["condition_querystring"].initial = (
|
||||
self.instance.condition_querystring
|
||||
)
|
||||
for _field_name, field in self.fields.items():
|
||||
|
||||
# --- Apply option template name for all select fields ---
|
||||
for field in self.fields.values():
|
||||
if isinstance(field.widget, forms.Select):
|
||||
field.widget.option_template_name = default_select_option_template
|
||||
|
||||
is_active_field = self.fields.pop("is_active")
|
||||
self.fields["is_active"] = is_active_field
|
||||
# --- Re-insert is_active field to ensure order ---
|
||||
self.fields["is_active"] = self.fields.pop("is_active")
|
||||
|
||||
def clean(self):
|
||||
cleaned_data = super().clean()
|
||||
|
||||
@@ -1896,6 +1896,7 @@ class HorillaFormView(FormView):
|
||||
context["form_class_path"] = self.form_class_path
|
||||
context["view_id"] = self.view_id
|
||||
context["hx_confirm"] = self.hx_confirm
|
||||
context["hx_target"] = self.request.META.get("HTTP_HX_TARGET", "this")
|
||||
pk = None
|
||||
if self.form.instance:
|
||||
pk = self.form.instance.pk
|
||||
|
||||
@@ -1,93 +1,81 @@
|
||||
{% load widget_tweaks %} {% load i18n %}
|
||||
{% load generic_template_filters %}
|
||||
<style>
|
||||
.condition-highlight {
|
||||
background-color: #ffa5000f;
|
||||
}
|
||||
.condition-highlight {
|
||||
background-color: #ffa5000f;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% if form.verbose_name %}
|
||||
<div class="oh-modal__dialog-header">
|
||||
<h2 class="oh-modal__dialog-title" id="createTitle">
|
||||
{{form.verbose_name}}
|
||||
</h2>
|
||||
<button type="button" class="oh-modal__close--custom" onclick="$(this).closest('.oh-modal--show').removeClass('oh-modal--show')" aria-label="Close" {{form.close_button_attrs|safe}}>
|
||||
<ion-icon name="close-outline" role="img" class="md hydrated" aria-label="close outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="oh-modal__dialog-body oh-modal__dialog-relative">
|
||||
{% if form.instance_ids %}
|
||||
<div class="oh-modal__dialog oh-modal__dialog--navigation m-0 p-0">
|
||||
<button
|
||||
hx-get="{{form.previous_url}}?{{form.ids_key}}={{form.instance_id}}&{{request.GET.urlencode}}"
|
||||
hx-swap="innerHTML"
|
||||
hx-target="#genericModalBody"
|
||||
class="oh-modal__diaglog-nav oh-modal__nav-prev"
|
||||
>
|
||||
<ion-icon name="chevron-back-outline"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button
|
||||
hx-get="{{form.next_url}}?{{form.ids_key}}={{form.instance_id}}&{{request.GET.urlencode}}"
|
||||
hx-swap="innerHTML"
|
||||
hx-target="#genericModalBody"
|
||||
class="oh-modal__diaglog-nav oh-modal__nav-next"
|
||||
>
|
||||
<ion-icon name="chevron-forward-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="oh-general__tab-target oh-profile-section" id="{{form.container_id}}">
|
||||
<div class="oh-profile-section__card row">
|
||||
<div class="row" style="padding-right: 0;">
|
||||
<div class="col-12" style="padding-right: 0;">{{ form.non_field_errors }}</div>
|
||||
{% for field in form.visible_fields %}
|
||||
<div class="col-12 col-md-{{field|col}}" id="id_{{ field.name }}_parent_div" style="padding-right: 0;">
|
||||
<div class="oh-label__info" for="id_{{ field.name }}">
|
||||
<label class="oh-label {% if field.field.required %} required-star{% endif %}" for="id_{{ field.name }}"
|
||||
>{% trans field.label %}</label
|
||||
>
|
||||
{% if field.help_text != '' %}
|
||||
<span
|
||||
class="oh-info mr-2"
|
||||
title="{{ field.help_text|safe }}"
|
||||
></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if field.field.widget.input_type == 'checkbox' %}
|
||||
<div class="oh-switch" style="width: 30px">
|
||||
{{ field|add_class:'oh-switch__checkbox' }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="dynamic_field_{{field.name}}">
|
||||
{{ field|add_class:'form-control' }}
|
||||
{{ field.errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% for field in form.hidden_fields %} {{ field }} {% endfor %}
|
||||
|
||||
<div class="d-flex flex-row-reverse">
|
||||
<button
|
||||
type="submit"
|
||||
class="oh-btn oh-btn--secondary mt-2 mr-0 pl-4 pr-5 oh-btn--w-100-resp"
|
||||
{{form.submit_button_attrs|safe}}
|
||||
>
|
||||
{% trans 'Save' %}
|
||||
<div class="oh-modal__dialog-header">
|
||||
<h2 class="oh-modal__dialog-title" id="createTitle">
|
||||
{{form.verbose_name}}
|
||||
</h2>
|
||||
<button type="button" class="oh-modal__close--custom"
|
||||
onclick="$(this).closest('.oh-modal--show').removeClass('oh-modal--show')" aria-label="Close"
|
||||
{{form.close_button_attrs|safe}}>
|
||||
<ion-icon name="close-outline" role="img" class="md hydrated" aria-label="close outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="oh-modal__dialog-body oh-modal__dialog-relative">
|
||||
{% if form.instance_ids %}
|
||||
<div class="oh-modal__dialog oh-modal__dialog--navigation m-0 p-0">
|
||||
<button hx-get="{{form.previous_url}}?{{form.ids_key}}={{form.instance_id}}&{{request.GET.urlencode}}"
|
||||
hx-swap="innerHTML" hx-target="#genericModalBody" class="oh-modal__diaglog-nav oh-modal__nav-prev">
|
||||
<ion-icon name="chevron-back-outline"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button hx-get="{{form.next_url}}?{{form.ids_key}}={{form.instance_id}}&{{request.GET.urlencode}}"
|
||||
hx-swap="innerHTML" hx-target="#genericModalBody" class="oh-modal__diaglog-nav oh-modal__nav-next">
|
||||
<ion-icon name="chevron-forward-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="oh-general__tab-target oh-profile-section" id="{{form.container_id}}">
|
||||
<div class="oh-profile-section__card row">
|
||||
<div class="row" style="padding-right: 0;">
|
||||
<div class="col-12" style="padding-right: 0;">{{ form.non_field_errors }}</div>
|
||||
{% for field in form.visible_fields %}
|
||||
<div class="col-12 col-md-{{field|col}}" id="id_{{ field.name }}_parent_div" style="padding-right: 0;">
|
||||
<div class="oh-label__info" for="id_{{ field.name }}">
|
||||
<label class="oh-label {% if field.field.required %} required-star{% endif %}"
|
||||
for="id_{{ field.name }}">{% trans field.label %}</label>
|
||||
{% if field.help_text != '' %}
|
||||
<span class="oh-info mr-2" title="{{ field.help_text|safe }}"></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if field.field.widget.input_type == 'checkbox' %}
|
||||
<div class="oh-switch" style="width: 30px">
|
||||
{{ field|add_class:'oh-switch__checkbox' }}
|
||||
</div>
|
||||
{% elif field.name == "country" or field.name == "state" %}
|
||||
<div class="oh-input-group mb-2">
|
||||
<select name="{{ field.name }}" id="{{ field.id_for_label }}" class="oh-select oh-select-2 form-control"
|
||||
data-selected="{{ field.value|default:'' }}">
|
||||
</select>
|
||||
{{ field.errors }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="dynamic_field_{{field.name}}">
|
||||
{{ field|add_class:'form-control' }}
|
||||
{{ field.errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% for field in form.hidden_fields %} {{ field }} {% endfor %}
|
||||
|
||||
<div class="d-flex flex-row-reverse">
|
||||
<button type="submit" class="oh-btn oh-btn--secondary mt-2 mr-0 pl-4 pr-5 oh-btn--w-100-resp"
|
||||
{{form.submit_button_attrs|safe}}>
|
||||
{% trans 'Save' %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(".leave-message").hide();
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,80 +1,74 @@
|
||||
{% load generic_template_filters %}
|
||||
<div id="{{view_id}}">
|
||||
{% for field_tuple in dynamic_create_fields %}
|
||||
<div
|
||||
class="oh-modal"
|
||||
id="dynamicModal{{field_tuple.0}}"
|
||||
role="dialog"
|
||||
aria-labelledby="dynamicModal{{field_tuple.0}}"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div
|
||||
class="oh-modal__dialog"
|
||||
id="dynamicModal{{field_tuple.0}}Body"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<form id="{{view_id}}Form" hx-post="{{request.path}}?{{request.GET.urlencode}}" hx-encoding="multipart/form-data" hx-swap="outerHTML" {% if hx_confirm %} hx-confirm="{{hx_confirm}}" {% endif %}>{{form.structured}}</form>
|
||||
{% for field_tuple in dynamic_create_fields %}
|
||||
<div >
|
||||
<script class="dynamic_{{field_tuple.0}}_scripts">
|
||||
{{form.initial|get_item:field_tuple.0}}
|
||||
$("#{{view_id}}Form [name={{field_tuple.0}}]").val({{form.initial|get_item:field_tuple.0|safe}}).change()
|
||||
</script>
|
||||
|
||||
<form
|
||||
hidden
|
||||
id="modalButton{{field_tuple.0}}Form"
|
||||
hx-get="/dynamic-path-{{field_tuple.0}}-{{request.session.session_key}}?dynamic_field={{field_tuple.0}}"
|
||||
hx-target="#dynamicModal{{field_tuple.0}}Body"
|
||||
>
|
||||
<input type="text" name="dynamic_initial" data-dynamic-field="{{field_tuple.0}}">
|
||||
<input type="text" name="view_id" value="{{view_id}}">
|
||||
{% for field in field_tuple.2 %}
|
||||
<input type="text" name="{{field}}">
|
||||
<div id="{{ view_id }}">
|
||||
{% for field_tuple in dynamic_create_fields %}
|
||||
<div class="oh-modal" id="dynamicModal{{ field_tuple.0 }}" role="dialog"
|
||||
aria-labelledby="dynamicModal{{ field_tuple.0 }}" aria-hidden="true">
|
||||
<div class="oh-modal__dialog" id="dynamicModal{{ field_tuple.0 }}Body"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<button
|
||||
type="submit"
|
||||
id="modalButton{{field_tuple.0}}"
|
||||
onclick="$('#dynamicModal{{field_tuple.0}}').addClass('oh-modal--show');"
|
||||
>
|
||||
{{field_tuple.0}}
|
||||
</button>
|
||||
</form>
|
||||
<form hidden id="reload-field{{field_tuple.0}}{{view_id}}" hx-get="{% url "reload-field" %}?form_class_path={{form_class_path}}&dynamic_field={{field_tuple.0}}" hx-target="#dynamic_field_{{field_tuple.0}}">
|
||||
<input type="text" name="dynamic_initial" data-dynamic-field="{{field_tuple.0}}">
|
||||
<input type="text" name="view_id" value="{{view_id}}">
|
||||
<button class="reload-field" data-target="{{field_tuple.0}}">
|
||||
{{field_tuple.0}}
|
||||
</button>
|
||||
</form>
|
||||
<script class="dynamic_{{field_tuple.0}}_scripts">
|
||||
$("#{{view_id}}Form [name={{field_tuple.0}}]").change(function (e) {
|
||||
values = $(this).val();
|
||||
if (!values) {
|
||||
values = ""
|
||||
}
|
||||
if (values == "dynamic_create") {
|
||||
$("#modalButton{{field_tuple.0}}").click()
|
||||
$(this).val("")
|
||||
}else if (values.includes("dynamic_create")) {
|
||||
let index = values.indexOf("dynamic_create");
|
||||
values.splice(index, 1);
|
||||
$(this).val(values).change();
|
||||
$("#modalButton{{field_tuple.0}}").parent().find('input[name=dynamic_initial]').val(values)
|
||||
$("#reload-field{{field_tuple.0}}{{view_id}}").find('input[name=dynamic_initial]').val(values)
|
||||
$("#modalButton{{field_tuple.0}}").click()
|
||||
}else if(values) {
|
||||
$("#modalButton{{field_tuple.0}}").parent().find('input[name=dynamic_initial]').val(values)
|
||||
$("#reload-field{{field_tuple.0}}{{view_id}}").find('input[name=dynamic_initial]').val(values)
|
||||
}
|
||||
});
|
||||
$("#reload-field{{field_tuple.0}}{{view_id}}").submit(function (e) {
|
||||
e.preventDefault();
|
||||
$(this).find("[name=dynamic_initial]").val();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<form id="{{ view_id }}Form" hx-post="{{ request.path }}?{{ request.GET.urlencode }}" hx-target="#{{ hx_target }}"
|
||||
hx-swap="{% if hx_target == 'this' %}outerHTML{% else %}innerHTML{% endif %}" hx-encoding="multipart/form-data"
|
||||
{% if hx_confirm %} hx-confirm="{{ hx_confirm }}" {% endif %}>
|
||||
{{ form.structured }}
|
||||
</form>
|
||||
|
||||
{% for field_tuple in dynamic_create_fields %}
|
||||
<div>
|
||||
<script class="dynamic_{{ field_tuple.0 }}_scripts">
|
||||
{{ form.initial|get_item:field_tuple.0 }}
|
||||
$("#{{ view_id }}Form [name={{ field_tuple.0 }}]").val({{ form.initial|get_item:field_tuple.0|safe }}).change()
|
||||
</script>
|
||||
|
||||
<form hidden id="modalButton{{ field_tuple.0 }}Form"
|
||||
hx-get="/dynamic-path-{{ field_tuple.0 }}-{{ request.session.session_key }}?dynamic_field={{ field_tuple.0 }}"
|
||||
hx-target="#dynamicModal{{ field_tuple.0 }}Body">
|
||||
<input type="text" name="dynamic_initial" data-dynamic-field="{{ field_tuple.0 }}">
|
||||
<input type="text" name="view_id" value="{{ view_id }}">
|
||||
{% for field in field_tuple.2 %}
|
||||
<input type="text" name="{{ field }}">
|
||||
{% endfor %}
|
||||
<button type="submit" id="modalButton{{ field_tuple.0 }}"
|
||||
onclick="$('#dynamicModal{{ field_tuple.0 }}').addClass('oh-modal--show');">
|
||||
{{ field_tuple.0 }}
|
||||
</button>
|
||||
</form>
|
||||
<form hidden id="reload-field{{ field_tuple.0 }}{{ view_id }}"
|
||||
hx-get="{% url 'reload-field' %}?form_class_path={{ form_class_path }}&dynamic_field={{ field_tuple.0 }}"
|
||||
hx-target="#dynamic_field_{{ field_tuple.0 }}">
|
||||
<input type="text" name="dynamic_initial" data-dynamic-field="{{ field_tuple.0 }}">
|
||||
<input type="text" name="view_id" value="{{ view_id }}">
|
||||
<button class="reload-field" data-target="{{ field_tuple.0 }}">
|
||||
{{ field_tuple.0 }}
|
||||
</button>
|
||||
</form>
|
||||
<script class="dynamic_{{ field_tuple.0 }}_scripts">
|
||||
$("#{{ view_id }}Form [name={{ field_tuple.0 }}]").change(function (e) {
|
||||
values = $(this).val();
|
||||
if (!values) {
|
||||
values = ""
|
||||
}
|
||||
if (values == "dynamic_create") {
|
||||
$("#modalButton{{ field_tuple.0 }}").click()
|
||||
$(this).val("")
|
||||
} else if (values.includes("dynamic_create")) {
|
||||
let index = values.indexOf("dynamic_create");
|
||||
values.splice(index, 1);
|
||||
$(this).val(values).change();
|
||||
$("#modalButton{{ field_tuple.0 }}").parent().find('input[name=dynamic_initial]').val(values)
|
||||
$("#reload-field{{ field_tuple.0 }}{{ view_id }}").find('input[name=dynamic_initial]').val(values)
|
||||
$("#modalButton{{ field_tuple.0 }}").click()
|
||||
} else if (values) {
|
||||
$("#modalButton{{ field_tuple.0 }}").parent().find('input[name=dynamic_initial]').val(values)
|
||||
$("#reload-field{{ field_tuple.0 }}{{ view_id }}").find('input[name=dynamic_initial]').val(values)
|
||||
}
|
||||
});
|
||||
$("#reload-field{{ field_tuple.0 }}{{ view_id }}").submit(function (e) {
|
||||
e.preventDefault();
|
||||
$(this).find("[name=dynamic_initial]").val();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -4,13 +4,6 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(".leave-message").hide();
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
|
||||
$("#createTitle").on("htmx:beforeSwap",function(e){
|
||||
$('.available-leave-count').remove();
|
||||
});
|
||||
|
||||
@@ -6,11 +6,9 @@
|
||||
|
||||
</style>
|
||||
{% if instance.attachment %}
|
||||
<a href="{{instance.attachment.url}}" target="_blank" class="oh-timeoff-modal__download-link">
|
||||
<ion-icon class="me-1" name="download-outline"></ion-icon>
|
||||
<span class="oh-timeoff-modal__download-link-text"></span>
|
||||
{% trans "View attachment" %}
|
||||
</a>
|
||||
<a href="{{instance.attachment.url}}" target="_blank" class="oh-timeoff-modal__download-link">
|
||||
<ion-icon class="me-1" name="download-outline"></ion-icon>
|
||||
<span class="oh-timeoff-modal__download-link-text"></span>
|
||||
{% trans "View attachment" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,108 +1,99 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
<div class="oh-dropdown__filter-body">
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Recruitment' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Managers' %}</label>
|
||||
{{ filter_instance_context_name.form.recruitment_managers }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Start Date' %}</label>
|
||||
{{ filter_instance_context_name.form.start_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Published' %}</label>
|
||||
{{ filter_instance_context_name.form.is_published }}
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Recruitment' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Managers' %}</label>
|
||||
{{ filter_instance_context_name.form.recruitment_managers }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Start Date' %}</label>
|
||||
{{ filter_instance_context_name.form.start_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Published' %}</label>
|
||||
{{ filter_instance_context_name.form.is_published }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Company' %}</label>
|
||||
{{ filter_instance_context_name.form.company_id }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'End Date' %}</label>
|
||||
{{ filter_instance_context_name.form.end_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is closed' %}</label>
|
||||
{{ filter_instance_context_name.form.closed }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Start Date From' %}</label>
|
||||
{{ filter_instance_context_name.form.start_from }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Till End Date' %}</label>
|
||||
{{ filter_instance_context_name.form.end_till }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Candidate' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Country' %}</label>
|
||||
<select name="country" class="oh-select-2 w-100 country" id="country"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'State' %}</label>
|
||||
<select name="state" class="oh-select-2 w-100 country" id="state"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Taks' %}</label>
|
||||
{{ candidate_filter_obj.form.tasks }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Stage' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12 mb-2" style="width: 100%;">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage Managers' %}</label>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Company' %}</label>
|
||||
{{ filter_instance_context_name.form.company_id }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'End Date' %}</label>
|
||||
{{ filter_instance_context_name.form.end_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is closed' %}</label>
|
||||
{{ filter_instance_context_name.form.closed }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Start Date From' %}</label>
|
||||
{{ filter_instance_context_name.form.start_from }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Till End Date' %}</label>
|
||||
{{ filter_instance_context_name.form.end_till }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Candidate' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Country' %}</label>
|
||||
<select name="country" class="oh-select-2 w-100 country" id="country"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'State' %}</label>
|
||||
<select name="state" class="oh-select-2 w-100 country" id="state"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Taks' %}</label>
|
||||
{{ candidate_filter_obj.form.tasks }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Stage' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12 mb-2" style="width: 100%;">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage Managers' %}</label>
|
||||
</div>
|
||||
{{ stage_filter_obj.form.employee_id }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ stage_filter_obj.form.employee_id }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
{% include "country.js" %}
|
||||
populateCountries("country","state")
|
||||
});
|
||||
</script>
|
||||
{% comment %} <div class="oh-dropdown__filter-footer">
|
||||
<button class="oh-btn oh-btn--secondary oh-btn--small w-100 filterButton" id="">{% trans 'Filter' %}</button>
|
||||
</div> {% endcomment %}
|
||||
|
||||
@@ -2,183 +2,180 @@
|
||||
{% load static %}
|
||||
|
||||
<div class="oh-dropdown__filter-body">
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Candidates' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Phone' %}</label>
|
||||
{{ form.mobile }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Hired Date' %}</label>
|
||||
{{ form.hired_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Country' %}</label>
|
||||
<select name="country" class="oh-select-2 oh-select w-100 country" id="country">
|
||||
</select>
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Hired' %}?</label>
|
||||
{{ form.hired }}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12 mb-2">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans "Reject Reason" %}</label>
|
||||
{{form.rejected_candidate__reject_reason_id}}
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Candidates' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Phone' %}</label>
|
||||
{{ form.mobile }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Hired Date' %}</label>
|
||||
{{ form.hired_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Country' %}</label>
|
||||
<select name="country" class="oh-select-2 oh-select w-100 country" id="country">
|
||||
</select>
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Hired' %}?</label>
|
||||
{{ form.hired }}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12 mb-2">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans "Reject Reason" %}</label>
|
||||
{{form.rejected_candidate__reject_reason_id}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Email' %}</label>
|
||||
{{ form.email }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Gender' %}</label>
|
||||
{{ form.gender }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'State' %}</label>
|
||||
<select name="state" class="oh-select-2 oh-select w-100 country" id="state">
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Canceled' %}?</label>
|
||||
{{ form.canceled }}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12 mb-2">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans "Offer Status" %}</label>
|
||||
{{form.offer_letter_status}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Email' %}</label>
|
||||
{{ form.email }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Recruitment' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Recruitment' %}</label>
|
||||
{{ form.recruitment_id }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Gender' %}</label>
|
||||
{{ form.gender }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Job Position' %}</label>
|
||||
{{ form.job_position_id }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'State' %}</label>
|
||||
<select name="state" class="oh-select-2 oh-select w-100 country" id="state">
|
||||
</select>
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Start Date' %}</label>
|
||||
{{ form.start_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Closed' %}?</label>
|
||||
{{ form.recruitment_id__closed }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Canceled' %}?</label>
|
||||
{{ form.canceled }}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12 mb-2">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans "Offer Status" %}</label>
|
||||
{{form.offer_letter_status}}
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage Type' %}</label>
|
||||
{{ form.stage_id__stage_type }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage Managers' %}</label>
|
||||
{{ form.stage_id__stage_managers }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage' %}</label>
|
||||
{{ form.stage_id }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Department' %}</label>
|
||||
{{ form.job_position_id__department_id }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Company' %}</label>
|
||||
{{ form.recruitment_id__company_id }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Recruitment Managers' %}</label>
|
||||
{{ form.recruitment_id__recruitment_managers }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'End Date' %}</label>
|
||||
{{ form.end_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Skill Zone' %}</label>
|
||||
{{ form.skillzonecandidate_set__skill_zone_id }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Recruitment' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Recruitment' %}</label>
|
||||
{{ form.recruitment_id }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Job Position' %}</label>
|
||||
{{ form.job_position_id }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Start Date' %}</label>
|
||||
{{ form.start_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Closed' %}?</label>
|
||||
{{ form.recruitment_id__closed }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage Type' %}</label>
|
||||
{{ form.stage_id__stage_type }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage Managers' %}</label>
|
||||
{{ form.stage_id__stage_managers }}
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Survey' %}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage' %}</label>
|
||||
{{ form.stage_id }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Department' %}</label>
|
||||
{{ form.job_position_id__department_id }}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Question & Response' %}</label>
|
||||
{{ form.survey_answer_by }}
|
||||
</div>
|
||||
</div>
|
||||
{% comment %} <div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Response' %}</label>
|
||||
{{ form.survey_response }}
|
||||
</div>
|
||||
</div> {% endcomment %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Company' %}</label>
|
||||
{{ form.recruitment_id__company_id }}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Recruitment Managers' %}</label>
|
||||
{{ form.recruitment_id__recruitment_managers }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'End Date' %}</label>
|
||||
{{ form.end_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Skill Zone' %}</label>
|
||||
{{ form.skillzonecandidate_set__skill_zone_id }}
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Advanced' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Survey' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Question & Response' %}</label>
|
||||
{{ form.survey_answer_by }}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Scheduled From' %}</label>
|
||||
{{ form.scheduled_from }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Active' %}?</label>
|
||||
{{ form.is_active }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Scheduled Till' %}</label>
|
||||
{{ form.scheduled_till }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% comment %} <div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Response' %}</label>
|
||||
{{ form.survey_response }}
|
||||
</div>
|
||||
</div> {% endcomment %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">
|
||||
{% trans 'Advanced' %}
|
||||
</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Scheduled From' %}</label>
|
||||
{{ form.scheduled_from }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Active' %}?</label>
|
||||
{{ form.is_active }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Scheduled Till' %}</label>
|
||||
{{ form.scheduled_till }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{% static '/base/filter.js' %}"></script>
|
||||
<script>
|
||||
{% include 'filter_country.js' %}
|
||||
</script>
|
||||
|
||||
@@ -1,8 +1 @@
|
||||
{{form.employee_id}}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("select").on("select2:select", function (e) {
|
||||
$(this).closest("select")[0].dispatchEvent(new Event("change"));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,171 +1,128 @@
|
||||
{% load i18n %} {% load static %}
|
||||
<div class="oh-dropdown__filter-body">
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans 'Recruitment' %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label
|
||||
class="oh-label"
|
||||
for="{{form.recruitment_managers.id_for_label}}"
|
||||
>{% trans 'Managers' %}</label
|
||||
>
|
||||
{{ form.recruitment_managers }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label
|
||||
class="oh-label"
|
||||
for="{{form.start_date.id_for_label}}"
|
||||
>{% trans 'Start Date' %}</label
|
||||
>
|
||||
{{ form.start_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label
|
||||
class="oh-label"
|
||||
for="{{form.start_from.id_for_label}}"
|
||||
>{% trans 'Start Date From' %}</label
|
||||
>
|
||||
{{ form.start_from }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label
|
||||
class="oh-label"
|
||||
for="{{form.closed.id_for_label}}"
|
||||
>{% trans 'Is Closed' %}</label
|
||||
>
|
||||
{{ form.closed }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans 'Recruitment' %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.recruitment_managers.id_for_label}}">{% trans 'Managers' %}</label>
|
||||
{{ form.recruitment_managers }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.start_date.id_for_label}}">{% trans 'Start Date' %}</label>
|
||||
{{ form.start_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.start_from.id_for_label}}">{% trans 'Start Date From' %}</label>
|
||||
{{ form.start_from }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.closed.id_for_label}}">{% trans 'Is Closed' %}</label>
|
||||
{{ form.closed }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label
|
||||
class="oh-label"
|
||||
for="{{form.company_id.id_for_label}}"
|
||||
>{% trans 'Company' %}</label
|
||||
>
|
||||
{{ form.company_id }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label
|
||||
class="oh-label"
|
||||
for="{{form.end_date.id_for_label}}"
|
||||
>{% trans 'End Date' %}</label
|
||||
>
|
||||
{{ form.end_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label
|
||||
class="oh-label"
|
||||
for="{{form.end_till.id_for_label}}"
|
||||
>{% trans 'Till End Date' %}</label
|
||||
>
|
||||
{{ form.end_till }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label
|
||||
class="oh-label"
|
||||
for="{{form.is_published.id_for_label}}"
|
||||
>{% trans 'Is Published' %}</label
|
||||
>
|
||||
{{ form.is_published }}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.company_id.id_for_label}}">{% trans 'Company' %}</label>
|
||||
{{ form.company_id }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.end_date.id_for_label}}">{% trans 'End Date' %}</label>
|
||||
{{ form.end_date }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.end_till.id_for_label}}">{% trans 'Till End Date' %}</label>
|
||||
{{ form.end_till }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label" for="{{form.is_published.id_for_label}}">{% trans 'Is Published' %}</label>
|
||||
{{ form.is_published }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans 'Stage' %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Recruitment' %}</label>
|
||||
{{ stage_filter_obj.form.recruitment_id }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage Type' %}</label>
|
||||
{{ stage_filter_obj.form.stage_type }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans 'Stage' %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Recruitment' %}</label>
|
||||
{{ stage_filter_obj.form.recruitment_id }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage Type' %}</label>
|
||||
{{ stage_filter_obj.form.stage_type }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage Managers' %}</label>
|
||||
{{ stage_filter_obj.form.stage_managers }}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Stage Managers' %}</label>
|
||||
{{ stage_filter_obj.form.stage_managers }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans 'Candidates' %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Country' %}</label>
|
||||
<select
|
||||
name="country"
|
||||
class="oh-select-2 w-100 country"
|
||||
id="country"
|
||||
></select>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12 mb-2">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Reject Reason' %}</label>
|
||||
{{ candidate_filter_obj.form.rejected_candidate__reject_reason_id }}
|
||||
<div class="oh-accordion">
|
||||
<div class="oh-accordion-header">{% trans 'Candidates' %}</div>
|
||||
<div class="oh-accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Country' %}</label>
|
||||
<select name="country" class="oh-select-2 w-100 country" id="country"></select>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12 mb-2">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Reject Reason' %}</label>
|
||||
{{ candidate_filter_obj.form.rejected_candidate__reject_reason_id }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Hired' %}</label>
|
||||
{{ candidate_filter_obj.form.hired }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Gender' %}</label>
|
||||
{{ candidate_filter_obj.form.gender }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Job Position' %}</label>
|
||||
{{ candidate_filter_obj.form.job_position_id }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'State' %}</label>
|
||||
<select name="state" class="oh-select-2 w-100 country" id="state"></select>
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Offer Status' %}</label>
|
||||
{{ candidate_filter_obj.form.offer_letter_status }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Canceled' %}</label>
|
||||
{{ candidate_filter_obj.form.canceled }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Rating' %}</label>
|
||||
{{ candidate_filter_obj.form.candidate_rating__rating }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Department' %}</label>
|
||||
{{ candidate_filter_obj.form.job_position_id__department_id }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Hired' %}</label>
|
||||
{{ candidate_filter_obj.form.hired }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Gender' %}</label>
|
||||
{{ candidate_filter_obj.form.gender }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Job Position' %}</label>
|
||||
{{ candidate_filter_obj.form.job_position_id }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'State' %}</label>
|
||||
<select
|
||||
name="state"
|
||||
class="oh-select-2 w-100 country"
|
||||
id="state"
|
||||
></select>
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Offer Status' %}</label>
|
||||
{{ candidate_filter_obj.form.offer_letter_status }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Is Canceled' %}</label>
|
||||
{{ candidate_filter_obj.form.canceled }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Rating' %}</label>
|
||||
{{ candidate_filter_obj.form.candidate_rating__rating }}
|
||||
</div>
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans 'Department' %}</label>
|
||||
{{ candidate_filter_obj.form.job_position_id__department_id }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{% static '/base/filter.js' %}"></script>
|
||||
<script>
|
||||
{% include "country.js" %}
|
||||
</script>
|
||||
|
||||
BIN
static/images/ui/company_avatar.jpg
Normal file
BIN
static/images/ui/company_avatar.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
@@ -750,5 +750,3 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
document.body.addEventListener("htmx:afterSettle", function (event) {
|
||||
initCountryStateDropdowns();
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user