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

View File

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

View File

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