fix: use correct translation keys for visitors/revenue/bar/pie toggles
All checks were successful
Deploy HiHala Dashboard / deploy (push) Successful in 8s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
fahed
2026-04-07 13:11:47 +03:00
parent cb4fb6071a
commit ebdf90c8ab
3 changed files with 18 additions and 18 deletions

View File

@@ -621,12 +621,12 @@ function Dashboard({ data, seasons, userRole, showDataLabels, setShowDataLabels,
controls={
<div style={{ display: 'flex', gap: '6px' }}>
<div className="toggle-switch">
<button className={eventMetric === 'visitors' ? 'active' : ''} onClick={() => setEventMetric('visitors')}>{t('dashboard.visitors')}</button>
<button className={eventMetric === 'revenue' ? 'active' : ''} onClick={() => setEventMetric('revenue')}>{t('dashboard.revenue')}</button>
<button className={eventMetric === 'visitors' ? 'active' : ''} onClick={() => setEventMetric('visitors')}>{t('metrics.visitors')}</button>
<button className={eventMetric === 'revenue' ? 'active' : ''} onClick={() => setEventMetric('revenue')}>{t('metrics.revenue')}</button>
</div>
<div className="toggle-switch">
<button className={eventChartType === 'bar' ? 'active' : ''} onClick={() => setEventChartType('bar')}>{t('presentation.bar')}</button>
<button className={eventChartType === 'pie' ? 'active' : ''} onClick={() => setEventChartType('pie')}>{t('presentation.pie')}</button>
<button className={eventChartType === 'bar' ? 'active' : ''} onClick={() => setEventChartType('bar')}>{t('metrics.bar')}</button>
<button className={eventChartType === 'pie' ? 'active' : ''} onClick={() => setEventChartType('pie')}>{t('metrics.pie')}</button>
</div>
</div>
}
@@ -651,8 +651,8 @@ function Dashboard({ data, seasons, userRole, showDataLabels, setShowDataLabels,
className="chart-container"
controls={
<div className="toggle-switch">
<button className={channelChartType === 'bar' ? 'active' : ''} onClick={() => setChannelChartType('bar')}>{t('presentation.bar')}</button>
<button className={channelChartType === 'pie' ? 'active' : ''} onClick={() => setChannelChartType('pie')}>{t('presentation.pie')}</button>
<button className={channelChartType === 'bar' ? 'active' : ''} onClick={() => setChannelChartType('bar')}>{t('metrics.bar')}</button>
<button className={channelChartType === 'pie' ? 'active' : ''} onClick={() => setChannelChartType('pie')}>{t('metrics.pie')}</button>
</div>
}
>
@@ -738,12 +738,12 @@ function Dashboard({ data, seasons, userRole, showDataLabels, setShowDataLabels,
<h2>{eventMetric === 'visitors' ? t('dashboard.visitorsByMuseum') : t('dashboard.revenueByMuseum')}</h2>
<div style={{ display: 'flex', gap: '6px', marginBottom: '8px' }}>
<div className="toggle-switch">
<button className={eventMetric === 'visitors' ? 'active' : ''} onClick={() => setEventMetric('visitors')}>{t('dashboard.visitors')}</button>
<button className={eventMetric === 'revenue' ? 'active' : ''} onClick={() => setEventMetric('revenue')}>{t('dashboard.revenue')}</button>
<button className={eventMetric === 'visitors' ? 'active' : ''} onClick={() => setEventMetric('visitors')}>{t('metrics.visitors')}</button>
<button className={eventMetric === 'revenue' ? 'active' : ''} onClick={() => setEventMetric('revenue')}>{t('metrics.revenue')}</button>
</div>
<div className="toggle-switch">
<button className={eventChartType === 'bar' ? 'active' : ''} onClick={() => setEventChartType('bar')}>{t('presentation.bar')}</button>
<button className={eventChartType === 'pie' ? 'active' : ''} onClick={() => setEventChartType('pie')}>{t('presentation.pie')}</button>
<button className={eventChartType === 'bar' ? 'active' : ''} onClick={() => setEventChartType('bar')}>{t('metrics.bar')}</button>
<button className={eventChartType === 'pie' ? 'active' : ''} onClick={() => setEventChartType('pie')}>{t('metrics.pie')}</button>
</div>
</div>
<div className="chart-container">
@@ -768,8 +768,8 @@ function Dashboard({ data, seasons, userRole, showDataLabels, setShowDataLabels,
<div className="chart-card">
<h2>{t('dashboard.channelPerformance')}</h2>
<div className="toggle-switch" style={{ marginBottom: '8px' }}>
<button className={channelChartType === 'bar' ? 'active' : ''} onClick={() => setChannelChartType('bar')}>{t('presentation.bar')}</button>
<button className={channelChartType === 'pie' ? 'active' : ''} onClick={() => setChannelChartType('pie')}>{t('presentation.pie')}</button>
<button className={channelChartType === 'bar' ? 'active' : ''} onClick={() => setChannelChartType('bar')}>{t('metrics.bar')}</button>
<button className={channelChartType === 'pie' ? 'active' : ''} onClick={() => setChannelChartType('pie')}>{t('metrics.pie')}</button>
</div>
<div className="chart-container">
{channelChartType === 'bar'

View File

@@ -57,7 +57,9 @@
"avgRevenue": "متوسط الإيراد/زائر",
"avgRevenuePerVisitor": "متوسط الإيراد لكل زائر",
"pilgrims": "المعتمرون",
"captureRate": "نسبة الاستقطاب"
"captureRate": "نسبة الاستقطاب",
"bar": "أعمدة",
"pie": "دائري"
},
"dashboard": {
"title": "لوحة التحكم",
@@ -137,8 +139,6 @@
"addFirst": "أضف شريحتك الأولى",
"slideTitle": "عنوان الشريحة",
"chartType": "نوع الرسم البياني",
"bar": "أعمدة",
"pie": "دائري",
"metric": "المقياس",
"startDate": "تاريخ البداية",
"endDate": "تاريخ النهاية",

View File

@@ -57,7 +57,9 @@
"avgRevenue": "Avg Rev/Visitor",
"avgRevenuePerVisitor": "Avg Revenue/Visitor",
"pilgrims": "Pilgrims",
"captureRate": "Capture Rate"
"captureRate": "Capture Rate",
"bar": "Bar",
"pie": "Pie"
},
"dashboard": {
"title": "Dashboard",
@@ -137,8 +139,6 @@
"addFirst": "Add your first slide",
"slideTitle": "Slide Title",
"chartType": "Chart Type",
"bar": "Bar",
"pie": "Pie",
"metric": "Metric",
"startDate": "Start Date",
"endDate": "End Date",