diff --git a/src/api/reports.ts b/src/api/reports.ts
index a1c6309..d28bec3 100644
--- a/src/api/reports.ts
+++ b/src/api/reports.ts
@@ -58,6 +58,7 @@ export interface DailyReportRow {
billable_duration: string;
non_billable_duration: string;
total_duration: string;
+ latest_hourly_rate: CurrencyTotal | null;
income_totals: CurrencyTotal[];
}
diff --git a/src/components/reports/ReportsTablePanel.tsx b/src/components/reports/ReportsTablePanel.tsx
index 17bbb4f..8809b26 100644
--- a/src/components/reports/ReportsTablePanel.tsx
+++ b/src/components/reports/ReportsTablePanel.tsx
@@ -43,6 +43,14 @@ const formatMoneyTotals = (totals: { currency: string; amount: string }[], lang:
return totals.map((item) => `${formatAmount(item.amount, lang)} ${currencyLabel(item.currency, lang)}`).join(" | ");
};
+const formatHourlyRate = (
+ rate: { currency: string; amount: string } | null,
+ lang: "en" | "fa",
+) => {
+ if (!rate) return "-";
+ return `${formatAmount(rate.amount, lang)} ${currencyLabel(rate.currency, lang)}`;
+};
+
const formatDisplayDate = (value: string, lang: "en" | "fa") => {
const parsed = new Date(`${value}T00:00:00`);
return new Intl.DateTimeFormat(lang === "fa" ? "fa-IR" : "en-US", {
@@ -209,6 +217,10 @@ export function ReportsTablePanel({
{labels.totalIncome}
{formatMoneyTotals(day.income_totals, lang)}
@@ -249,9 +261,10 @@ export function ReportsTablePanel({
| {labels.date} |
- {labels.billableHours} |
- {labels.nonBillableHours} |
- {labels.totalIncome} |
+ {labels.billableHours} |
+ {labels.nonBillableHours} |
+ {labels.hourlyRate} |
+ {labels.totalIncome} |
{labels.details} |
@@ -264,6 +277,7 @@ export function ReportsTablePanel({
{formatDisplayDate(day.date, lang)} |
{localizeDigits(day.billable_duration, lang)} |
{localizeDigits(day.non_billable_duration, lang)} |
+
{formatHourlyRate(day.latest_hourly_rate, lang)} |
{formatMoneyTotals(day.income_totals, lang)} |
|
{localizeDigits(data.summary.billable_duration, lang)} |
{localizeDigits(data.summary.non_billable_duration, lang)} |
+
- |
{formatMoneyTotals(data.summary.income_totals, lang)} |
|
diff --git a/src/locales/en.ts b/src/locales/en.ts
index e9c0fa3..1917c42 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -468,10 +468,11 @@ export const en = {
name: "Name",
clear: "Clear",
apply: "Apply",
- totalHours: "Total hours",
- billableHours: "Billable hours",
- nonBillableHours: "Non-billable hours",
- totalIncome: "Total income",
+ totalHours: "Total hours",
+ billableHours: "Billable hours",
+ nonBillableHours: "Non-billable hours",
+ hourlyRate: "Hourly rate",
+ totalIncome: "Total income",
chartTitle: "Activity chart",
totalSeconds: "Total seconds",
exportExcel: "Export Excel",
diff --git a/src/locales/fa.ts b/src/locales/fa.ts
index 7b67b3d..ecb4ae1 100644
--- a/src/locales/fa.ts
+++ b/src/locales/fa.ts
@@ -464,10 +464,11 @@ export const fa = {
name: "نام",
clear: "پاک کردن",
apply: "اعمال",
- totalHours: "مجموع ساعت",
- billableHours: "ساعات کاری",
- nonBillableHours: "ساعات غیر کاری",
- totalIncome: "مجموع درآمد",
+ totalHours: "مجموع ساعت",
+ billableHours: "ساعات کاری",
+ nonBillableHours: "ساعات غیر کاری",
+ hourlyRate: "نرخ ساعتی",
+ totalIncome: "مجموع درآمد",
chartTitle: "نمودار فعالیت",
totalSeconds: "مجموع ثانیه",
exportExcel: "خروجی Excel",
diff --git a/src/pages/Reports.tsx b/src/pages/Reports.tsx
index 40c6e71..938c9a9 100644
--- a/src/pages/Reports.tsx
+++ b/src/pages/Reports.tsx
@@ -381,6 +381,7 @@ export default function Reports() {
billableHours: t.reports?.billableHours || "Billable hours",
nonBillableHours: t.reports?.nonBillableHours || "Non-billable hours",
totalHours: t.reports?.totalHours || "Total hours",
+ hourlyRate: t.reports?.hourlyRate || "Hourly rate",
totalIncome: t.reports?.totalIncome || "Total income",
details: t.reports?.details || "Details",
total: t.reports?.total || "Total",