linkedin2/templates/productoj.html

151 lines
8.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}Главная{% endblock %}
{% block content %}
<style>
.select2-container {
width: 100% !important;
}
</style>
<style>
.filter-link {
font-size: 18px; /* Увеличиваем размер шрифта */
font-weight: bold; /* Делаем текст жирным */
padding: 10px 20px; /* Добавляем отступы для лучшего кликабельности */
background-color: #7a61fe; /* Добавляем зелёный фон */
color: white; /* Текст белый */
border-radius: 5px; /* Слегка скругляем углы */
text-align: center; /* Выравнивание по центру */
cursor: pointer; /* Курсор в виде указателя при наведении */
transition: background-color 0.3s ease, transform 0.2s ease; /* Плавные анимации */
}
.filter-link:hover {
background-color: #7a61fe; /* Темнее при наведении */
transform: scale(1.002); /* Немного увеличиваем размер при наведении */
}
</style>
{% include "filtr.html" %}
<!-- Status и кнопка Apply Filters -->
<div class="col-span-6 mt-4">
<label>Status</label>
<div class="mt-2">
<select data-placeholder="Select Status" class="select2 w-full" multiple name="status">
<option value="Scheduled">Scheduled</option>
<option value="Requested">Requested</option>
<option value="In-Progress">In-Progress</option>
<option value="Applied">Applied</option>
<option value="Issues Applying">Issues Applying</option>
<option value="Cancelled">Cancelled</option>
</select>
</div>
<button type="submit" class="button bg-theme-1 text-white mt-5">Apply Filters</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
// Функция для настройки обработчиков событий для каждого селекта
function setupDateSelect(selectId, wrapperId, customValue) {
const select = document.getElementById(selectId);
const dateRangeWrapper = document.getElementById(wrapperId);
select.addEventListener('change', function() {
if (this.value === customValue) {
dateRangeWrapper.style.display = 'grid';
} else {
dateRangeWrapper.style.display = 'none';
}
});
// Инициализация при загрузке страницы
if (select.value === customValue) {
dateRangeWrapper.style.display = 'grid';
}
}
// Настройка всех трех селектов
document.addEventListener('DOMContentLoaded', function() {
setupDateSelect('date_requested', 'date-requested-range-wrapper', 'custom_date_requested');
setupDateSelect('date_posted', 'date-posted-range-wrapper', 'custom_date_posted');
setupDateSelect('date_applied', 'date-applied-range-wrapper', 'custom_date_applied');
});
</script>
<!-- BEGIN: Datatable -->
<div class="intro-y datatable-wrapper box p-5 mt-5">
<table class="table table-report table-report--bordered display datatable w-full">
<thead>
<tr>
<th class="border-b-2 whitespace-no-wrap">TITLE &#10760;</th>
<th class="border-b-2 text-center whitespace-no-wrap">COMPANY &#10760;</th>
<th class="border-b-2 text-center whitespace-no-wrap">CLIENT &#10760;</th>
<th class="border-b-2 text-center whitespace-no-wrap">Requested on &#10760;</th>
<th class="border-b-2 text-center whitespace-no-wrap">Posted on &#10760;</th>
<th class="border-b-2 text-center whitespace-no-wrap">STATUS &#10760;</th>
<th class="border-b-2 text-center whitespace-no-wrap">Assignee &#10760;</th>
<th class="border-b-2 text-center whitespace-no-wrap">Applied on</th>
</tr>
</thead>
<tbody>
{% for job in jobs %}
<tr>
<td class="border-b">
<a href="{{ job.job.link }}" target="_blank" class="font-medium whitespace-no-wrap">{{ job.job.job_title [:50] }}</a>
<div class="text-gray-600 text-xs whitespace-no-wrap">{{ job.job.job_id }}</div>
</td>
<td class="text-center border-b">{{job.job.job_company}}</td>
<td class="text-center border-b">
<a href="#" class="client-link text-blue-500" data-client-id="{{ job.client.id }}">{{ job.client.user_nicename }}</a>
</td>
<td class="text-center border-b">{{job.job.data_requested}}</td>
<td class="text-center border-b">{{job.job.date_posted}}</td>
<td class="text-center border-b">
<select class="select2" onchange="updateStatus(this, '{{ job.id }}')">
<option value="" {% if job.status is none %}selected{% endif %}>— Not selected —</option>
<option value="Scheduled" {% if job.status == "Scheduled" %}selected{% endif %}>Scheduled</option>
<option value="Requested" {% if job.status == "Requested" %}selected{% endif %}>Requested</option>
<option value="In-Progress" {% if job.status == "In-Progress" %}selected{% endif %}>In-Progress</option>
<option value="Applied" {% if job.status == "Applied" %}selected{% endif %}>Applied</option>
<option value="Issues Applying" {% if job.status == "Issues Applying" %}selected{% endif %}>Issues Applying</option>
<option value="Cancelled" {% if job.status == "Cancelled" %}selected{% endif %}>Cancelled</option>
</select>
</td>
<td class="text-center border-b">
<select class="select2" onchange="updateAssignee(this, '{{ job.id }}')">
<option value="" {% if job.assignee is none %}selected{% endif %}>— Not selected —</option>
{% for user in users %}
<option value="{{ user.id }}" {% if job.assignee == user.id %}selected{% endif %}>
{{ user.username }}
</option>
{% endfor %}
</select>
</td>
<td class="text-center border-b">-</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- END: Datatable -->
<!-- Включаем модалку -->
<!-- Модальное окно -->
{% include "modal.html" %}
<script src="/static/dist/js/prod.js"></script>
{% endblock %}