+
+
+
+ {data.attendance_alert.points_in_norm
+ ? "Баллы в норме, но есть дни без подтверждённого посещения"
+ : "Есть дни без подтверждённого посещения"}
+
+
+ {attendanceAlertDays.map((day) => formatDate(day.date)).join(", ")}. Удалённые дни и отсутствия, закрытые кадровыми событиями, сюда не входят.
+
+
+
+ ) : null}
+
Нажмите на значение, чтобы открыть исходные данные дня.
Подсвечивается любое дневное расхождение с выработкой:
@@ -254,13 +274,16 @@ export function PayrollPointBreakdownModal({
{data.dates.map((day) => {
const parts = dateParts(day.date);
const hasActivity = hasAttendanceActivity(day) || Boolean(day.work_entry);
+ const hasAttendanceAlert = day.attendance_alert === "unconfirmed_absence";
return (
- {parts.date}
+
+ {hasAttendanceAlert ? : null}{parts.date}
+
{parts.weekday}
|
);
diff --git a/frontend/src/lib/api/finance.ts b/frontend/src/lib/api/finance.ts
index 31056e2e..180ce5c8 100644
--- a/frontend/src/lib/api/finance.ts
+++ b/frontend/src/lib/api/finance.ts
@@ -398,6 +398,14 @@ export type PayrollCellCommentSummary = {
latest_at: string;
};
+export type PayrollAttendanceAlert = {
+ kind: "compensated_absence" | "unconfirmed_absence";
+ severity: "warning" | "danger";
+ count: number;
+ dates: string[];
+ points_in_norm: boolean;
+};
+
export type PayrollPeriodTableRow = {
employee: PayrollAdminEmployee & {
first_name: string;
@@ -415,6 +423,7 @@ export type PayrollPeriodTableRow = {
target_points_automatic: boolean;
target_points_source: string;
attendance_points: string | null;
+ attendance_alert: PayrollAttendanceAlert | null;
personnel_points: string;
actual_points: string | null;
point_delta: string | null;
@@ -470,6 +479,8 @@ export type PayrollPeriodTable = {
draft_count: number;
incomplete_count: number;
preliminary_count: number;
+ attendance_alert_employee_count: number;
+ attendance_alert_day_count: number;
gross_total: string | null;
deduction_total: string | null;
payable_total: string | null;
@@ -488,6 +499,7 @@ export type PayrollPointBreakdownDay = {
date: string;
is_workday: boolean;
attendance_points: string | null;
+ attendance_alert: "unconfirmed_absence" | null;
personnel_points: string | null;
work_points: string | null;
attendance_record: {
@@ -547,6 +559,7 @@ export type PayrollPointBreakdown = {
employee: PayrollAdminEmployee & { is_active: boolean };
target_points: string | null;
actual_points: string | null;
+ attendance_alert: PayrollAttendanceAlert | null;
undated_work_points: string | null;
undated_work_record: {
id: number;