{% extends "base.html" %} {% load static %} {% block title %}Delete Schedule Assignment - HR{% endblock %} {% block content %}

Delete Schedule Assignment Confirmation Required

Confirm Assignment Deletion

Warning

You are about to delete this schedule assignment. This action cannot be undone and will affect time tracking and payroll calculations.

Assignment Details:
Employee: {{ object.employee.get_full_name }}
Employee ID: {{ object.employee.employee_id }}
Department: {{ object.employee.department.name }}
Schedule: {{ object.schedule.name }}
Schedule Type: {{ object.schedule.get_schedule_type_display }}
Assignment Period:
Start Date: {{ object.start_date|date:"M d, Y" }}
End Date: {{ object.end_date|date:"M d, Y"|default:"Ongoing" }}
Status: {{ object.get_status_display }}
Days Active: {{ object.days_active }} days
Assigned By: {{ object.assigned_by.get_full_name }}
Impact Assessment
  • Time Entries: {{ object.time_entries_count }} time entries will lose their schedule reference
  • Payroll: Historical payroll calculations may be affected
  • Attendance: Attendance tracking for this assignment will be lost
  • Reports: Schedule-based reports may show incomplete data
  • Audit Trail: Deletion will be logged for compliance purposes
{% if object.status == 'ACTIVE' %}
Active Assignment Warning

This is an active schedule assignment. Deleting it will:

  • Immediately remove the employee from this schedule
  • Affect ongoing time tracking and attendance monitoring
  • Potentially disrupt current work assignments
  • Impact payroll calculations for the current period
{% endif %} {% if object.time_entries_count > 0 %}
Time Entries Warning

This assignment has {{ object.time_entries_count }} associated time entries. These entries will remain but will lose their schedule reference, which may affect:

  • Overtime calculations
  • Schedule compliance reporting
  • Performance metrics
{% endif %}
{{ object.time_entries_count }}
Time Entries
{{ object.total_hours_worked }}
Hours Worked
{{ object.attendance_rate }}%
Attendance Rate
{{ object.overtime_hours }}
Overtime Hours
Alternative Actions

Consider these alternatives instead of deletion:

{% csrf_token %}
Deletion Confirmation
{% if object.status == 'ACTIVE' %}
{% endif %} {% if object.time_entries_count > 0 %}
{% endif %}
{% endblock %} {% block js %} {% endblock %}