[RMV] ONBOARDING: Remove duplicate/ redundant files

This commit is contained in:
Horilla
2024-04-18 12:33:27 +05:30
parent f4143de862
commit b2ae9d7b4f
7 changed files with 0 additions and 774 deletions

View File

@@ -1,87 +0,0 @@
{% extends 'index.html' %} {% load i18n %} {% block content %} {% if form.errors %}
<!-- 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 %}
<section class="oh-wrapper oh-main__topbar" x-data="{searchShow: false} ">
<div class="oh-main__titlebar oh-main__titlebar--left">
<form action="{% url 'candidates-view' %}">
<button class="oh-btn oh-btn--secondary oh-btn--shadow">
{% trans "View candidates" %}
</button>
</form>
</div>
</section>
<div class="oh-wrapper d-flex justify-content-center">
<div class="oh-onboarding-card">
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="oh-onboarding-card__address-group">
<h2 class="oh-onboarding-card__section-title">{% trans "Candidate Details" %}</h2>
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Full Name" %}</label>
{{form.name}} {{form.name.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Profile Picture" %}</label>
{{form.profile}} {{form.profile.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Recruitment" %}</label>
{{form.recruitment_id}} {{form.recruitment_id.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Email" %}</label>
{{form.email}} {{form.email.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Mobile" %}</label>
{{form.mobile}} {{form.mobile.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Joining Date" %}</label>
{{form.joining_date}} {{form.joining_date.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Gender" %}</label>
{{form.gender}} {{form.gender.errors}}
</div>
</div>
</div>
</div>
<button
href="#"
class="oh-btn oh-onboarding-card__button mt-4 oh-btn--secondary oh-btn--shadow w-100 mb-4"
role="button"
>
{% trans "Create" %}
</button>
</form>
</div>
</div>
{% endblock content %}

View File

@@ -1,52 +0,0 @@
{% load i18n %}{% load static %}
<form hx-get="{% url 'candidate-filter' %}" hx-target="#candidates" id="filterForm">
<div
class="oh-dropdown__menu oh-dropdown__menu--right oh-dropdown__filter p-4"
x-show="open"
style="display: none"
@click.outside="open = false"
>
<div class="oh-dropdown__filter-body">
<div class="oh-accordion">
<div class="oh-accordion-header">{% trans "Candidate Filter" %}</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>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label class="oh-label">{% trans "Job Position" %}</label>
{{form.job_position_id}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label class="oh-label">{% trans "Joining From" %}</label>
{{form.scheduled_from}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label class="oh-label">{% trans "Joining Till" %}l</label>
{{form.scheduled_till}}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="oh-dropdown__filter-footer">
<button
class="oh-btn oh-btn--secondary oh-btn--small w-100 filterButton"
type="submit"
>
{% trans "Filter" %}
</button>
</div>
</div>
</form>
<script src="{% static '/base/filter.js' %}"></script>

View File

@@ -1,28 +0,0 @@
<select name="task" class="w-100" data-task-id="{{task.id}}" style="
border: 1px solid hsl(213deg,22%,84%);
padding: 0.3rem 0.8rem 0.3rem 0.3rem;
border-radius: 0rem;" hx-post="{% url 'candidate-task-update' task.id %}"
hx-trigger="change" hx-target="#task{{task.id}}">
{% for choice in choices %}
{% if choice.0 == task.status %}
<option value="{{choice.0}}" selected>{{choice.1}}</option>
{% else %}
<option value="{{choice.0}}">{{choice.1}}</option>
{% endif %}
{% endfor %}
</select>
<script>
$(document).ready(function() {
$("select[name='task']").on("htmx:afterRequest", function(event, xhr, data) {
var alertContainer = $('<div class="oh-alert-container">');
var alertDiv = $('<div class="oh-alert oh-alert--animated oh-alert--info">').text("Candidate task updated successfully..");
alertContainer.append(alertDiv);
$(".messages").html(alertContainer);
});
});
</script>

View File

@@ -1,103 +0,0 @@
{% extends 'index.html' %}
{% load i18n %}
{% block content %}
{% if form.errors %}
<!-- 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 %}
<section class="oh-wrapper oh-main__topbar " x-data="{searchShow: false} ">
<div class="oh-main__titlebar oh-main__titlebar--left">
<form action="{% url 'candidates-view' %}">
<button class="oh-btn oh-btn--secondary oh-btn--shadow">
{% trans "View candidates" %}
</button>
</form>
</div>
</section >
<div class="oh-wrapper d-flex justify-content-center">
<div class="oh-onboarding-card ">
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="oh-onboarding-card__address-group">
<h2 class="oh-onboarding-card__section-title">{% trans "Candidate Details" %}</h2>
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Full Name" %}</label>
{{form.name}}
{{form.name.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Profile Picture" %}</label>
{{form.profile}}
{{form.profile.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Recruitment" %}</label>
{{form.recruitment_id}}
{{form.recruitment_id.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Email" %}</label>
{{form.email}}
{{form.email.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Mobile" %}</label>
{{form.mobile}}
{{form.mobile.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Joining Date" %}</label>
{{form.joining_date}}
{{form.joining_date.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Gender" %}</label>
{{form.gender}}
{{form.gender.errors}}
</div>
</div>
</div>
</div>
<button href="#" class="oh-btn oh-onboarding-card__button mt-4 oh-btn--secondary oh-btn--shadow w-100 mb-4"
role="button">
{% trans "Update" %}
</button>
</form>
</div>
</div>
{% endblock content %}

View File

@@ -1,152 +0,0 @@
{% extends 'index.html' %} {% load i18n %} {% block content %} {% if messages %}
<div class="oh-wrapper">
{% for message in messages %}
<div class="oh-alert-container">
<div class="oh-alert oh-alert--animated {{message.tags}}">
{{ message }}
</div>
</div>
{% endfor %}
</div>
{% endif %}
<div class="oh-wrapper">
<div class="oh-alert-container" id="message"></div>
</div>
<section class="oh-wrapper oh-main__topbar" x-data="{searchShow: false}">
<div class="oh-main__titlebar oh-main__titlebar--left">
<h1 class="oh-main__titlebar-title fw-bold mb-0">
{% trans "Hired Candidates" %}
</h1>
<a
class="oh-main__titlebar-search-toggle"
role="button"
aria-label="Toggle Search"
@click="searchShow = !searchShow"
>
<ion-icon
name="search-outline"
class="oh-main__titlebar-serach-icon"
></ion-icon>
</a>
</div>
<div class="oh-main__titlebar oh-main__titlebar--right">
<div
class="oh-input-group oh-input__search-group"
:class="searchShow ? 'oh-input__search-group--show' : ''"
>
<ion-icon
name="search-outline"
class="oh-input-group__icon oh-input-group__icon--left"
></ion-icon>
<input
type="text"
class="oh-input oh-input__icon"
aria-label="Search Input"
placeholder="{% trans 'Search' %}"
name="name"
hx-get="{% url 'candidate-filter' %}"
hx-trigger="keyup"
hx-target="#candidates"
/>
</div>
<div class="oh-main__titlebar-button-container">
<div class="oh-dropdown" x-data="{open: false}">
<button class="oh-btn ml-2" @click="open = !open">
<ion-icon name="filter" class="mr-1"></ion-icon>{% trans "Filter" %}<div id="filterCount"></div>
</button>
{% include 'onboarding/candidate-filter.html' %}
</div>
<div class="oh-btn-group ml-2">
<button
class="oh-btn oh-btn--primary oh-btn--shadow"
id="trigger-onboarding"
>
{% trans "Trigger Onboarding" %}
</button>
<input
type="hidden"
name="csrfmiddlewaretoken"
value="{{ csrf_token }}"
/>
</div>
<div class="oh-btn-group ml-2">
<a
href="{% url 'candidate-create' %}?onboarding=True"
class="oh-btn oh-btn--secondary oh-btn--shadow"
method="get"
>
<ion-icon name="add-outline" class="me-1"></ion-icon>
{% trans "Create" %}
</a>
</div>
</div>
</div>
</section>
<div class="oh-wrapper" id="candidates">
{% include 'onboarding/candidates.html' %}
</div>
<script>
$("#trigger-onboarding").on("click", function () {
var array = [];
$(".checkboxAll:checked").each(function () {
array.push($(this).attr("id"));
$("#message").empty();
$("#message").append(`
<div class="oh-alert oh-alert--animated oh-alert--success">
Processing
</div>`);
});
$.ajax({
type: "post",
url: "{% url 'email-send' %}",
data: {
candidates: JSON.stringify(array),
csrfmiddlewaretoken: $("input[name=csrfmiddlewaretoken]").val(),
},
dataType: "json",
success: function (response) {
$("#message").empty();
$("#message").append(`
<div class="oh-alert oh-alert--animated oh-alert--${response.tags}">
${response.message}
</div>`);
if (response.tags == "success") {
setTimeout(function () {
// Code to be executed after the delay
location.reload();
}, 2000);
}
},
});
});
$("#selectAll").on("click", function () {
if (this.checked) {
$(".checkboxAll").each(function () {
$(".checkboxAll").prop("checked", true);
});
} else {
$(".checkboxAll").each(function () {
$(".checkboxAll").prop("checked", false);
});
}
});
$("#delete-link").on("click", function (event) {
event.preventDefault(); // prevent the default behavior of the link
const link = $(this);
const confirmation = confirm("{% trans 'Are you sure you want to delete?' %}");
if (confirmation) {
window.location.href = link.attr("href"); // execute the href if confirmed
}
});
</script>
{% endblock content %}

View File

@@ -1,159 +0,0 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Employee Onboarding - Horilla Dashboard</title>
<link rel="stylesheet" href="{% static 'build/css/style.min.css' %}" />
</head>
<body>
{% if form.errors %}
<!-- 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 %}
{% if messages %}
<div class="oh-wrapper">
{% for message in messages %}
<div class="oh-alert-container">
<div class="oh-alert oh-alert--animated {{message.tags}}">
{{ message }}
</div>
</div>
{% endfor %}
</div>
{% endif %}
<div id="main">
<main class="oh-onboarding">
<div class="oh-onboarding-card">
<div class="oh-onboarding-card__header">
<span class="oh-onboarding-card__company-name">Acme, Inc.</span>
<ul class="oh-onboarding-card__steps">
<li class="oh-onboarding-card__step">
<div class="oh-onboarding-card__count">1</div>
<span class="oh-onboarding-card__text">{% trans "Login" %}</span>
</li>
<li class="oh-onboarding-card__step">
<div class="oh-onboarding-card__count">2</div>
<span class="oh-onboarding-card__text">{% trans "Profile Setup" %}</span>
</li>
<li class="oh-onboarding-card__step ">
<div class="oh-onboarding-card__count">3</div>
<span class="oh-onboarding-card__text">{% trans "Personal Details" %}</span>
</li>
<li class="oh-onboarding-card__step oh-onboarding-card__step--active">
<div class="oh-onboarding-card__count">4</div>
<span class="oh-onboarding-card__text">{% trans "Bank Details" %}</span>
</li>
</ul>
</div>
<form method="Post">
{% csrf_token %}
<div class="oh-onboarding-card__address-group">
<h2 class="oh-onboarding-card__section-title">{% trans "Bank Details" %}</h2>
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Bank Name" %}</label>
{{form.bank_name}}
{{form.bank_name.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Account number" %}</label>
{{form.account_number}}
{{form.account_number.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Branch" %}</label>
{{form.branch}}
{{form.branch.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Address" %}</label>
{{form.address}}
{{form.address.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12 ">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Country" %}</label>
<select name="country" id="id_country" class="oh-select oh-select-2">
</select>
{{form.country.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12 ">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "State" %}</label>
<select name="state" id="id_state" class="oh-select oh-select-2">
</select>
{{form.state.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "City" %}</label>
{{form.city}}
{{form.city.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Bank Code" %} #1</label>
{{form.any_other_code1}}
{{form.any_other_code1.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Bank Code" %} #2</label>
{{form.any_other_code2}}
{{form.any_other_code2.errors}}
</div>
</div>
</div>
</div>
<button href="#"
class="oh-btn oh-onboarding-card__button mt-4 oh-btn--secondary oh-btn--shadow w-100 mb-4"
role="button">
{% trans "Finish Onboarding" %}
</button>
</form>
</div>
</main>
</div>
<script src="{% static 'build/js/web.frontend.min.js' %}"></script>
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<script>
{% include 'onboarding/static/country.js' %}
</script>
</body>
</html>

View File

@@ -1,193 +0,0 @@
{% load static %} {% load i18n %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Employee Onboarding - Horilla Dashboard</title>
<link rel="stylesheet" href="{% static 'build/css/style.min.css' %}" />
</head>
<body>
{% if form.errors %}
<!-- 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 id="main">
<main class="oh-onboarding">
<div class="oh-onboarding-card">
<div class="oh-onboarding-card__header">
<span class="oh-onboarding-card__company-name">{{employee}}</span>
<ul class="oh-onboarding-card__steps">
<li class="oh-onboarding-card__step">
<div class="oh-onboarding-card__count">1</div>
<span class="oh-onboarding-card__text">{% trans "Login" %}</span>
</li>
<li class="oh-onboarding-card__step">
<div class="oh-onboarding-card__count">2</div>
<span class="oh-onboarding-card__text">{% trans "Profile Setup" %}</span>
</li>
<li class="oh-onboarding-card__step oh-onboarding-card__step--active">
<div class="oh-onboarding-card__count">3</div>
<span class="oh-onboarding-card__text">{% trans "Personal Details" %}</span>
</li>
<li class="oh-onboarding-card__step">
<div class="oh-onboarding-card__count">4</div>
<span class="oh-onboarding-card__text">{% trans "Bank Details" %}</span>
</li>
</ul>
</div>
<form method="post">
{% csrf_token %}
<div class="oh-onboarding-card__address-group">
<h2 class="oh-onboarding-card__section-title">{% trans "Personal Details" %}</h2>
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "First Name" %}</label>
{{form.employee_first_name}}
{{form.employee_first_name.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Last Name" %}</label>
{{form.employee_last_name}}
{{form.employee_last_name.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Phone" %}</label>
{{form.phone}}
{{form.phone.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Address" %}</label>
{{form.address}}
{{form.address.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12 ">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Country" %}</label>
<input type="hidden" name="country" id="" value="{{request.user.employee_get.country}}">
<select name="country" id="id_country" class="oh-select oh-select-2">
<option value="{{request.user.employee_get.country}}" selected>{{form.initial.country}}</option>
</select>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12 ">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "State" %}</label>
<input type="hidden" name="state" id="" value="{{request.user.employee_get.state}}">
<select name="state" id="id_state" data-selected="{{form.initial.country}}" class="oh-select oh-select-2">
</select>
{{form.state.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Zip" %}</label>
{{form.zip}}
{{form.zip.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "DOB" %}</label>
{{form.dob}}
{{form.dob.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Gender" %}</label>
{{form.gender}}
{{form.gender.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Qualification" %}</label>
{{form.qualification}}
{{form.qualification.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Experience" %}</label>
{{form.experience}}
{{form.experience.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Marital status" %}</label>
{{form.marital_status}}
{{form.marital_status.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Childrens" %}</label>
{{form.children}}
{{form.children.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Emergency Contact Number" %}</label>
{{form.emergency_contact}}
{{form.emergency_contact.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Emergency Contact Name" %}</label>
{{form.emergency_contact_name}}
{{form.emergency_contact_name.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Emergency Contact Relation" %}</label>
{{form.emergency_contact_relation}}
{{form.emergency_contact_relation.errors}}
</div>
</div>
</div>
</div>
<button href="#" class="oh-btn oh-onboarding-card__button mt-4 oh-btn--secondary oh-btn--shadow w-100 mb-4"
role="button">
{% trans "Next Step" %}
<ion-icon class="ms-2" name="arrow-forward-outline"></ion-icon>
</button>
</form>
</div>
</main>
</div>
<script src="{% static 'build/js/web.frontend.min.js' %}"></script>
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<script>
{% include 'onboarding/static/country.js' %}
</script>
</body>
</html>