From 0f5be580938047885cdead6165a7ab64b412a898 Mon Sep 17 00:00:00 2001 From: khadiatullo Date: Tue, 29 Apr 2025 20:40:00 +0300 Subject: [PATCH] update: update ru.json --- .../(dashboard)/corporate-dashboard/page.tsx | 309 +----------------- .../(dashboard)/customer-dashboard/page.tsx | 113 +------ src/app/charity/page.tsx | 307 +---------------- .../(dashboard)/corporate-dashboard/index.tsx | 186 +++++++++++ .../(dashboard)/customer-dashboard/index.tsx | 116 +++++++ src/pages-templates/charity/index.tsx | 278 ++++++++++++++++ src/shared/language/locales/ru.json | 100 +++++- src/widgets/about-page/company-timeline.tsx | 7 +- src/widgets/about-page/station-gallery.tsx | 7 +- src/widgets/footer.tsx | 4 +- src/widgets/header/ui/desktop-nav.tsx | 4 +- src/widgets/header/ui/mobile-nav.tsx | 37 +-- src/widgets/transactions-table.tsx | 35 +- 13 files changed, 734 insertions(+), 769 deletions(-) create mode 100644 src/pages-templates/(dashboard)/corporate-dashboard/index.tsx create mode 100644 src/pages-templates/(dashboard)/customer-dashboard/index.tsx create mode 100644 src/pages-templates/charity/index.tsx diff --git a/src/app/(dashboard)/corporate-dashboard/page.tsx b/src/app/(dashboard)/corporate-dashboard/page.tsx index ca8ed83..834effd 100644 --- a/src/app/(dashboard)/corporate-dashboard/page.tsx +++ b/src/app/(dashboard)/corporate-dashboard/page.tsx @@ -1,308 +1,5 @@ -'use client'; +import { CorporateDashboard } from "@/pages-templates/(dashboard)/corporate-dashboard"; -import { format, subMonths } from 'date-fns'; -import { ru } from 'date-fns/locale'; -import { Building2, CalendarIcon, LogOut, Wallet } from 'lucide-react'; -import { useState } from 'react'; - -import { Button } from '@/shared/shadcn-ui/button'; -import { Calendar } from '@/shared/shadcn-ui/calendar'; -import { - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, -} from '@/shared/shadcn-ui/card'; -import { Label } from '@/shared/shadcn-ui/label'; -import { - Popover, - PopoverContent, - PopoverTrigger, -} from '@/shared/shadcn-ui/popover'; -import { - Table, - TableBody, - TableCell, - TableHead, - TableHeader, - TableRow, -} from '@/shared/shadcn-ui/table'; - -// import { CardsList } from '@/widgets/cards-list'; - -// Sample company data -const companyData = { - companyName: 'ООО «ТаджикТранс»', - numberOfCards: 12, - fund: 25000, - overdraft: 5000, - totalFund: 30000, - registrationDate: '10.03.2019', -}; - -// Sample transaction data -const generateTransactions = () => { - const stations = [ - 'АЗС Душанбе-Центр', - 'АЗС Душанбе-Запад', - 'АЗС Душанбе-Восток', - 'АЗС Худжанд', - 'АЗС Куляб', - ]; - - const products = [ - { name: 'ДТ', price: 8.5 }, - { name: 'АИ-92', price: 9.2 }, - { name: 'АИ-95', price: 10.5 }, - { name: 'Z-100 Power', price: 11.8 }, - { name: 'Пропан', price: 6.3 }, - ]; - - const transactions = []; - - // Generate 50 random transactions over the last 6 months - for (let i = 0; i < 50; i++) { - const date = subMonths(new Date(), Math.random() * 6); - const station = stations[Math.floor(Math.random() * stations.length)]; - const product = products[Math.floor(Math.random() * products.length)]; - const quantity = Math.floor(Math.random() * 40) + 10; // 10-50 liters - const cost = product.price; - const total = quantity * cost; - - transactions.push({ - id: i + 1, - date, - station, - product: product.name, - quantity, - cost, - total, - }); - } - - // Sort by date (newest first) - return transactions.sort((a, b) => b.date.getTime() - a.date.getTime()); -}; - -const transactions = generateTransactions(); - -export default function CorporateDashboard() { - const [startDate, setStartDate] = useState( - subMonths(new Date(), 1), - ); - const [endDate, setEndDate] = useState(new Date()); - const [filteredTransactions, setFilteredTransactions] = - useState(transactions); - - // Filter transactions by date range - const filterTransactions = () => { - if (!startDate || !endDate) return; - - const filtered = transactions.filter((transaction) => { - const transactionDate = new Date(transaction.date); - return transactionDate >= startDate && transactionDate <= endDate; - }); - - setFilteredTransactions(filtered); - }; - - return ( -
-
-
-
-

Корпоративный кабинет

- -
- -
- {/* Company Card */} - - - - - Информация о компании - - - -
-
-
-

Название компании

-

{companyData.companyName}

-
-
-

Количество карт

-

{companyData.numberOfCards}

-
-
-

Дата регистрации

-

- {companyData.registrationDate} -

-
-
-
-
-

Фонд

-

- {companyData.fund.toLocaleString()} сомони -

-
-
-

Овердрафт

-

- {companyData.overdraft.toLocaleString()} сомони -

-
-
-
-
-
- - {/* Fund Card */} - - - - - Общий фонд - - - Доступные средства - - - -
-

- {companyData.totalFund.toLocaleString()} -

-

сомони

-
-
-
-
- - {/* */} - - {/* Transactions */} -
-
-

История операций

- -
-
-
- - - - - - - - - -
- -
- - - - - - - - - -
-
- - -
-
- -
- - - - Дата - Станция - Продукт - Кол-во (л) - Стоимость - Сумма - - - - {filteredTransactions.length > 0 ? ( - filteredTransactions.map((transaction) => ( - - - {format(transaction.date, 'dd.MM.yyyy')} - - {transaction.station} - {transaction.product} - - {transaction.quantity} - - - {transaction.cost.toFixed(2)} сомони - - - {transaction.total.toFixed(2)} сомони - - - )) - ) : ( - - - Нет операций за выбранный период - - - )} - -
-
-
-
-
-
- ); +export default function Corporate() { + return } diff --git a/src/app/(dashboard)/customer-dashboard/page.tsx b/src/app/(dashboard)/customer-dashboard/page.tsx index aa2f7ea..f4cb147 100644 --- a/src/app/(dashboard)/customer-dashboard/page.tsx +++ b/src/app/(dashboard)/customer-dashboard/page.tsx @@ -1,110 +1,5 @@ -import { ArrowUpRight, Clock, CreditCard, LogOut, User } from 'lucide-react'; +import { CustomerDashboard } from "@/pages-templates/(dashboard)/customer-dashboard"; -import { Button } from '@/shared/shadcn-ui/button'; -import { - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, -} from '@/shared/shadcn-ui/card'; - -import { TransactionsTable } from '@/widgets/transactions-table'; - -// Sample customer data -const customerData = { - firstName: 'Алишер', - lastName: 'Рахмонов', - passportNumber: 'A12345678', - bonusPoints: 1250, - cardNumber: '5678-9012-3456-7890', - expiryDate: '12/2025', - registrationDate: '15.06.2020', -}; - -export default function CustomerDashboard() { - return ( -
-
-
-
-

Личный кабинет

- -
- -
- {/* Bonus Card */} - - - - - Бонусная карта - - - Ваши накопленные бонусы - - - -
-

- {customerData.bonusPoints} -

-

бонусных баллов

-
-
-
- - Действует до: 31.12.2023 -
- -
-
-
- {/* Customer Card */} - - - - - Информация о клиенте - - - -
-
-
-

ФИО

-

- {customerData.firstName} {customerData.lastName} -

-
-
-

Дата регистрации

-

- {customerData.registrationDate} -

-
-
-
-
-

Номер карты

-

{customerData.cardNumber}

-
-
-

Срок действия

-

{customerData.expiryDate}

-
-
-
-
-
-
- - -
-
-
- ); -} +export default function Customer() { + return +} \ No newline at end of file diff --git a/src/app/charity/page.tsx b/src/app/charity/page.tsx index 2b38a2e..4fc8510 100644 --- a/src/app/charity/page.tsx +++ b/src/app/charity/page.tsx @@ -1,304 +1,5 @@ -import { - Calendar, - CheckCircle, - Heart, - Landmark, - MapPin, - Users, -} from 'lucide-react'; -import Image from 'next/image'; +import { CharityPage } from "@/pages-templates/charity" -import { Button } from '@/shared/shadcn-ui/button'; -import { - Card, - CardContent, - CardFooter, - CardHeader, - CardTitle, -} from '@/shared/shadcn-ui/card'; - -import { CtaSection } from '@/widgets/cta-section'; - -export const metadata = { - title: 'Благотворительность | GasNetwork - Сеть заправок в Таджикистане', - description: - 'Благотворительные проекты и инициативы GasNetwork. Мы помогаем обществу и заботимся о будущем.', -}; - -export default function CharityPage() { - return ( -
-
- {/* Hero Section */} -
-
- Благотворительный фонд GasNetwork -
-
-
-
- -
-

- Благотворительный фонд GasNetwork -

-

- Мы верим, что бизнес должен быть социально ответственным. - Наш фонд поддерживает образование, здравоохранение и - экологические инициативы в Таджикистане. -

-
-
-
-
-
- - {/* Mission Section */} -
-
-
-
-
- -
-

- Наша миссия -

-

- Благотворительный фонд GasNetwork был создан в 2020 году с - целью поддержки социально значимых проектов в Таджикистане. Мы - стремимся внести свой вклад в развитие общества и помочь тем, - кто в этом нуждается. -

-

- Наша миссия — создавать возможности для улучшения жизни людей - через образование, здравоохранение, экологические инициативы и - поддержку уязвимых групп населения. -

- -
-
- -
-

Прозрачность

-

- Мы публикуем ежегодные отчеты о всех наших проектах и - расходах, обеспечивая полную прозрачность нашей - деятельности. -

-
-
-
- -
-

Эффективность

-

- Мы тщательно выбираем проекты, которые могут принести - максимальную пользу обществу и имеют долгосрочное - влияние. -

-
-
-
- -
-

Сотрудничество

-

- Мы сотрудничаем с местными и международными - организациями для достижения наибольшего эффекта от - наших инициатив. -

-
-
-
-
-
- Наша миссия -
-
-
-
- - {/* Key Figures */} -
-
-
-

- Наш вклад в цифрах -

-

- За время существования нашего фонда мы достигли значительных - результатов -

-
-
-
-

15+

-

Реализованных проектов

-
-
-

1.2M

-

Сомони пожертвований

-
-
-

5000+

-

Людей получили помощь

-
-
-
-
- - {/* Upcoming Events */} -
-
-
-
- -
-

- Предстоящие мероприятия -

-

- Присоединяйтесь к нашим благотворительным мероприятиям и внесите - свой вклад в общее дело -

-
- -
- {[ - { - title: 'Благотворительный марафон', - description: - 'Ежегодный благотворительный марафон в поддержку детей с особыми потребностями.', - date: '15 июня 2023', - location: 'Парк Рудаки, Душанбе', - image: '/placeholder.svg?height=200&width=300&text=Марафон', - }, - { - title: 'Экологическая акция', - description: - 'Очистка берегов реки Варзоб от мусора и посадка деревьев.', - date: '22 июля 2023', - location: 'Река Варзоб, Душанбе', - image: - '/placeholder.svg?height=200&width=300&text=Экологическая+акция', - }, - { - title: 'Сбор школьных принадлежностей', - description: - 'Сбор школьных принадлежностей для детей из малообеспеченных семей к новому учебному году.', - date: '1-20 августа 2023', - location: 'Все заправки GasNetwork', - image: - '/placeholder.svg?height=200&width=300&text=Школьные+принадлежности', - }, - ].map((event, index) => ( - -
- {event.title} -
- - {event.title} - - -

{event.description}

-
- - {event.date} -
-
- - {event.location} -
-
- - - -
- ))} -
-
-
- - {/* How to Help */} -
-
-
-
- -
-

- Как вы можете помочь -

-

- Есть много способов внести свой вклад в наши благотворительные - инициативы -

-
- -
- {[ - { - title: 'Сделать пожертвование', - description: - 'Ваше пожертвование поможет нам реализовать больше проектов и помочь большему количеству людей.', - icon: , - }, - { - title: 'Стать волонтером', - description: - 'Присоединяйтесь к нашей команде волонтеров и помогайте нам в реализации благотворительных проектов.', - icon: , - }, - { - title: 'Участвовать в мероприятиях', - description: - 'Принимайте участие в наших благотворительных мероприятиях и акциях.', - icon: , - }, - { - title: 'Распространять информацию', - description: - 'Расскажите о нашем фонде и его деятельности своим друзьям и знакомым.', - icon: , - }, - ].map((item, index) => ( - - -
{item.icon}
- - {item.title} - -
- -

{item.description}

-
-
- ))} -
-
-
- -
-
- ); -} +export default function Charity() { + return +} \ No newline at end of file diff --git a/src/pages-templates/(dashboard)/corporate-dashboard/index.tsx b/src/pages-templates/(dashboard)/corporate-dashboard/index.tsx new file mode 100644 index 0000000..1e8f103 --- /dev/null +++ b/src/pages-templates/(dashboard)/corporate-dashboard/index.tsx @@ -0,0 +1,186 @@ +"use client" + +import { subMonths } from 'date-fns'; +import { Building2, LogOut, Wallet } from 'lucide-react'; +import { useState } from 'react'; + +import { Button } from '@/shared/shadcn-ui/button'; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from '@/shared/shadcn-ui/card'; +import { useLanguage } from '@/shared/language'; +import { TransactionsTable } from '@/widgets/transactions-table'; + +// import { CardsList } from '@/widgets/cards-list'; + +// Sample company data +const companyData = { + companyName: 'ООО «ТаджикТранс»', + numberOfCards: 12, + fund: 25000, + overdraft: 5000, + totalFund: 30000, + registrationDate: '10.03.2019', +}; + +// Sample transaction data +const generateTransactions = () => { + const stations = [ + 'АЗС Душанбе-Центр', + 'АЗС Душанбе-Запад', + 'АЗС Душанбе-Восток', + 'АЗС Худжанд', + 'АЗС Куляб', + ]; + + const products = [ + { name: 'ДТ', price: 8.5 }, + { name: 'АИ-92', price: 9.2 }, + { name: 'АИ-95', price: 10.5 }, + { name: 'Z-100 Power', price: 11.8 }, + { name: 'Пропан', price: 6.3 }, + ]; + + const transactions = []; + + // Generate 50 random transactions over the last 6 months + for (let i = 0; i < 50; i++) { + const date = subMonths(new Date(), Math.random() * 6); + const station = stations[Math.floor(Math.random() * stations.length)]; + const product = products[Math.floor(Math.random() * products.length)]; + const quantity = Math.floor(Math.random() * 40) + 10; // 10-50 liters + const cost = product.price; + const total = quantity * cost; + + transactions.push({ + id: i + 1, + date, + station, + product: product.name, + quantity, + cost, + total, + }); + } + + // Sort by date (newest first) + return transactions.sort((a, b) => b.date.getTime() - a.date.getTime()); +}; + +const transactions = generateTransactions(); + +export function CorporateDashboard() { + const [startDate, setStartDate] = useState( + subMonths(new Date(), 1), + ); + const [endDate, setEndDate] = useState(new Date()); + const [filteredTransactions, setFilteredTransactions] = + useState(transactions); + + // Filter transactions by date range + const filterTransactions = () => { + if (!startDate || !endDate) return; + + const filtered = transactions.filter((transaction) => { + const transactionDate = new Date(transaction.date); + return transactionDate >= startDate && transactionDate <= endDate; + }); + + setFilteredTransactions(filtered); + }; + + const {t} = useLanguage() + + return ( +
+
+
+
+

{t('corporate.pageTitle')}

+ +
+ +
+ {/* Company Card */} + + + + + {t('corporate.companyCard.title')} + + + +
+
+
+

{t('corporate.companyCard.companyNameLabel')}

+

{companyData.companyName}

+
+
+

{t('corporate.companyCard.cardsCountLabel')}

+

{companyData.numberOfCards}

+
+
+

{t('corporate.companyCard.registrationDateLabel')}

+

+ {companyData.registrationDate} +

+
+
+
+
+

{t('corporate.companyCard.fundLabel')}

+

+ {companyData.fund.toLocaleString()} {t('corporate.currency')} +

+
+
+

{t('corporate.companyCard.overdraftLabel')}

+

+ {companyData.overdraft.toLocaleString()} {t('corporate.currency')} +

+
+
+
+
+
+ + {/* Fund Card */} + + + + + {t('corporate.fundCard.title')} + + + {t('corporate.fundCard.description')} + + + +
+

+ {companyData.totalFund.toLocaleString()} +

+

{t('corporate.fundCard.currency')}

+
+
+
+
+ + {/* */} + + {/* Transactions */} + + +
+
+
+ ); +} \ No newline at end of file diff --git a/src/pages-templates/(dashboard)/customer-dashboard/index.tsx b/src/pages-templates/(dashboard)/customer-dashboard/index.tsx new file mode 100644 index 0000000..3ef0c6c --- /dev/null +++ b/src/pages-templates/(dashboard)/customer-dashboard/index.tsx @@ -0,0 +1,116 @@ +"use client" + +import { ArrowUpRight, Clock, CreditCard, LogOut, User } from 'lucide-react'; + +import { Button } from '@/shared/shadcn-ui/button'; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from '@/shared/shadcn-ui/card'; + +import { TransactionsTable } from '@/widgets/transactions-table'; +import { useLanguage } from '@/shared/language'; + +// Sample customer data +const customerData = { + firstName: 'Алишер', + lastName: 'Рахмонов', + passportNumber: 'A12345678', + bonusPoints: 1250, + cardNumber: '5678-9012-3456-7890', + expiryDate: '12/2025', + registrationDate: '15.06.2020', +}; + +export function CustomerDashboard() { + + const {t} = useLanguage() + + return ( +
+
+
+
+

{t('customer.pageTitle')}

+ +
+ +
+ {/* Bonus Card */} + + + + + {t('customer.bonusCard.title')} + + + {t('customer.bonusCard.description')} + + + +
+

+ {customerData.bonusPoints} +

+

{t('customer.bonusCard.points')}

+
+
+
+ + {t('customer.bonusCard.validUntil')} +
+ +
+
+
+ {/* Customer Card */} + + + + + {t('customer.infoCard.title')} + + + +
+
+
+

{t('customer.infoCard.regDateLabel')}

+

+ {customerData.firstName} {customerData.lastName} +

+
+
+

{t('customer.infoCard.regDateLabel')}

+

+ {customerData.registrationDate} +

+
+
+
+
+

{t('customer.infoCard.cardNumberLabel')}

+

{customerData.cardNumber}

+
+
+

{t('customer.infoCard.expiryDateLabel')}

+

{customerData.expiryDate}

+
+
+
+
+
+
+ + +
+
+
+ ); +} diff --git a/src/pages-templates/charity/index.tsx b/src/pages-templates/charity/index.tsx new file mode 100644 index 0000000..76ac8cb --- /dev/null +++ b/src/pages-templates/charity/index.tsx @@ -0,0 +1,278 @@ +"use client" + +import { + Calendar, + CheckCircle, + Heart, + Landmark, + MapPin, + Users, +} from 'lucide-react'; +import Image from 'next/image'; + +import { Button } from '@/shared/shadcn-ui/button'; +import { + Card, + CardContent, + CardFooter, + CardHeader, + CardTitle, +} from '@/shared/shadcn-ui/card'; + +import { CtaSection } from '@/widgets/cta-section'; +import { useLanguage } from '@/shared/language'; + +export const metadata = { + title: 'Благотворительность | GasNetwork - Сеть заправок в Таджикистане', + description: + 'Благотворительные проекты и инициативы GasNetwork. Мы помогаем обществу и заботимся о будущем.', +}; + +export function CharityPage() { + + const {t} = useLanguage(); + + return ( +
+
+ {/* Hero Section */} +
+
+ {t('charity.hero.imageAlt')} +
+
+
+
+ +
+

+ {t('charity.hero.title')} +

+

+ {t('charity.hero.subtitle')} +

+
+
+
+
+
+ + {/* Mission Section */} +
+
+
+
+
+ +
+

+ {t('charity.mission.title')} +

+

+ {t('charity.mission.description1')} +

+

+ {t('charity.mission.description2')} +

+ +
+ {[0, 1, 2].map((index) => ( +
+ +
+

+ {t(`charity.mission.principles.${index}.title`)} +

+

+ {t(`charity.mission.principles.${index}.description`)} +

+
+
+ ))} +
+
+
+ {t('charity.mission.imageAlt')} +
+
+
+
+ + {/* Key Figures */} +
+
+
+

+ {t('charity.stats.title')} +

+

+ {t('charity.stats.subtitle')} +

+
+
+ {[0, 1, 2].map((index) => ( +
+

+ {t(`charity.stats.items.${index}.value`)} +

+

+ {t(`charity.stats.items.${index}.label`)} +

+
+ ))} +
+
+
+ + {/* Upcoming Events */} +
+
+
+
+ +
+

+ {t('charity.events.title')} +

+

+ {t('charity.events.subtitle')} +

+
+ +
+ {[ + { + title: 'Благотворительный марафон', + description: + 'Ежегодный благотворительный марафон в поддержку детей с особыми потребностями.', + date: '15 июня 2023', + location: 'Парк Рудаки, Душанбе', + image: '/placeholder.svg?height=200&width=300&text=Марафон', + }, + { + title: 'Экологическая акция', + description: + 'Очистка берегов реки Варзоб от мусора и посадка деревьев.', + date: '22 июля 2023', + location: 'Река Варзоб, Душанбе', + image: + '/placeholder.svg?height=200&width=300&text=Экологическая+акция', + }, + { + title: 'Сбор школьных принадлежностей', + description: + 'Сбор школьных принадлежностей для детей из малообеспеченных семей к новому учебному году.', + date: '1-20 августа 2023', + location: 'Все заправки GasNetwork', + image: + '/placeholder.svg?height=200&width=300&text=Школьные+принадлежности', + }, + ].map((event, index) => ( + +
+ {event.title} +
+ + {event.title} + + +

{event.description}

+
+ + {event.date} +
+
+ + {event.location} +
+
+ + + +
+ ))} +
+
+
+ + {/* How to Help */} +
+
+
+
+ +
+

+ {t('charity.help.title')} +

+

+ {t('charity.help.subtitle')} +

+
+ +
+ {[ + { + title: 'Сделать пожертвование', + description: + 'Ваше пожертвование поможет нам реализовать больше проектов и помочь большему количеству людей.', + icon: , + }, + { + title: 'Стать волонтером', + description: + 'Присоединяйтесь к нашей команде волонтеров и помогайте нам в реализации благотворительных проектов.', + icon: , + }, + { + title: 'Участвовать в мероприятиях', + description: + 'Принимайте участие в наших благотворительных мероприятиях и акциях.', + icon: , + }, + { + title: 'Распространять информацию', + description: + 'Расскажите о нашем фонде и его деятельности своим друзьям и знакомым.', + icon: , + }, + ].map((item, index) => ( + + +
{item.icon}
+ + {item.title} + +
+ +

{item.description}

+
+
+ ))} +
+
+
+ +
+
+ ); +} diff --git a/src/shared/language/locales/ru.json b/src/shared/language/locales/ru.json index 273fd70..3739fe2 100644 --- a/src/shared/language/locales/ru.json +++ b/src/shared/language/locales/ru.json @@ -2,6 +2,7 @@ "common.contacts.address": "ул. Рудаки 137, Душанбе, Таджикистан", "common.contacts.tel": "+992 (37) 223-45-67", "common.contacts.email": "info@gasnetwork.tj", + "common.name": "Ориё", "common.buttons.readMore": "Подробнее", "common.buttons.findStation": "Найти заправку", @@ -29,6 +30,8 @@ "common.navigation.promotions": "Акции", "common.navigation.charity": "Благотворительность", "common.navigation.certificates": "Сертификаты", + "common.navigation.loyatly": "Программа лояльности", + "common.navigation.partners": "Партнеры", "common.navigation.contacts": "Контакты", "common.footer.contacts": "Контакты", @@ -54,6 +57,10 @@ "home.about.features.staff.title": "Профессиональный персонал", "home.about.features.staff.description": "Наши сотрудники - профессионалы своего дела", + "about.companyTimeline.rollUp.button": "Свернуть", + "about.companyTimeline.show.button": "Показать больше", + "about.gallery.previous": "Предыдущая", + "about.gallery.next": "Следующая", "about.hero.imageAlt": "О нашей компании", "about.hero.title": "О нашей компании", "about.hero.subtitle": "Узнайте больше о нашей истории, ценностях и миссии. Мы стремимся предоставлять лучший сервис и качественное топливо для наших клиентов.", @@ -163,13 +170,47 @@ "home.cta.title": "Присоединяйтесь к нам", "home.cta.description": "Станьте частью нашей сети. Получайте специальные предложения, бонусы и скидки.", + "charity.events.button": "Принять участие", + "charity.hero.imageAlt": "Благотворительный фонд GasNetwork", + "charity.hero.title": "Благотворительный фонд GasNetwork", + "charity.hero.subtitle": "Мы верим, что бизнес должен быть социально ответственным. Наш фонд поддерживает образование, здравоохранение и экологические инициативы в Таджикистане.", + + "charity.mission.title": "Наша миссия", + "charity.mission.description1": "Благотворительный фонд GasNetwork был создан в 2020 году с целью поддержки социально значимых проектов в Таджикистане. Мы стремимся внести свой вклад в развитие общества и помочь тем, кто в этом нуждается.", + "charity.mission.description2": "Наша миссия — создавать возможности для улучшения жизни людей через образование, здравоохранение, экологические инициативы и поддержку уязвимых групп населения.", + "charity.mission.imageAlt": "Наша миссия", + + "charity.mission.principles.0.title": "Прозрачность", + "charity.mission.principles.0.description": "Мы публикуем ежегодные отчеты о всех наших проектах и расходах, обеспечивая полную прозрачность нашей деятельности.", + "charity.mission.principles.1.title": "Эффективность", + "charity.mission.principles.1.description": "Мы тщательно выбираем проекты, которые могут принести максимальную пользу обществу и имеют долгосрочное влияние.", + "charity.mission.principles.2.title": "Сотрудничество", + "charity.mission.principles.2.description": "Мы сотрудничаем с местными и международными организациями для достижения наибольшего эффекта от наших инициатив.", + + "charity.stats.title": "Наш вклад в цифрах", + "charity.stats.subtitle": "За время существования нашего фонда мы достигли значительных результатов", + "charity.stats.items.0.value": "15+", + "charity.stats.items.0.label": "Реализованных проектов", + "charity.stats.items.1.value": "1.2M", + "charity.stats.items.1.label": "Сомони пожертвований", + "charity.stats.items.2.value": "5000+", + "charity.stats.items.2.label": "Людей получили помощь", + + "charity.events.title": "Предстоящие мероприятия", + "charity.events.subtitle": "Присоединяйтесь к нашим благотворительным мероприятиям и внесите свой вклад в общее дело", + + "charity.help.title": "Как вы можете помочь", + "charity.help.subtitle": "Есть много способов внести свой вклад в наши благотворительные инициативы", + "clients.title": "Для наших клиентов", "clients.description": "Информация для клиентов: программа лояльности, топливные карты, сертификаты и способы оплаты.", "clients.services.title": "Наши услуги для клиентов", "clients.services.subtitle": "Мы стремимся сделать обслуживание на наших заправках максимально удобным и выгодным для вас", "clients.benefits.title": "Преимущества для клиентов", "clients.benefits.subtitle": "Став клиентом GasNetwork, вы получаете множество преимуществ, которые делают заправку вашего автомобиля более выгодной и удобной.", - + "clients.header.loyalty.description": "Накапливайте баллы и получайте скидки на топливо и услуги", + "clients.header.certificates.description": "Подарочные сертификаты на топливо и услуги нашей сети", + "clients.loyalty.title": "Программа лояльности", "clients.loyalty.description": "Накапливайте баллы и получайте скидки на топливо и услуги нашей сети", @@ -246,5 +287,58 @@ "map.totalStations": "Всего станций", "map.services": "Услуги", "map.cities": "Города", - "map.allCities": "Все города" -} + "map.allCities": "Все города", + + "corporate.pageTitle": "Корпоративный кабинет", + "corporate.logoutButton": "Выйти", + + "corporate.companyCard.title": "Информация о компании", + "corporate.companyCard.companyNameLabel": "Название компании", + "corporate.companyCard.cardsCountLabel": "Количество карт", + "corporate.companyCard.registrationDateLabel": "Дата регистрации", + "corporate.companyCard.fundLabel": "Фонд", + "corporate.companyCard.overdraftLabel": "Овердрафт", + "corporate.currency": "сомони", + + "corporate.fundCard.title": "Общий фонд", + "corporate.fundCard.description": "Доступные средства", + "corporate.fundCard.currency": "сомони", + + "corporate.transactions.title": "История операций", + "corporate.transactions.dateFrom": "От", + "corporate.transactions.dateTo": "До", + "corporate.transactions.selectDate": "Выберите дату", + "corporate.transactions.applyButton": "Применить", + + "corporate.transactions.tableHeaders.date": "Дата", + "corporate.transactions.tableHeaders.station": "Станция", + "corporate.transactions.tableHeaders.product": "Продукт", + "corporate.transactions.tableHeaders.quantity": "Кол-во (л)", + "corporate.transactions.tableHeaders.price": "Стоимость", + "corporate.transactions.tableHeaders.total": "Сумма", + + "corporate.transactions.noTransactions": "Нет операций за выбранный период", + + "customer.pageTitle": "Личный кабинет", + "customer.logoutButton": "Выйти", + + "customer.bonusCard.title": "Бонусная карта", + "customer.bonusCard.description": "Ваши накопленные бонусы", + "customer.bonusCard.points": "бонусных баллов", + "customer.bonusCard.validUntil": "Действует до: 31.12.2023", + + "customer.infoCard.title": "Информация о клиенте", + "customer.infoCard.fullNameLabel": "ФИО", + "customer.infoCard.regDateLabel": "Дата регистрации", + "customer.infoCard.cardNumberLabel": "Номер карты", + "customer.infoCard.expiryDateLabel": "Срок действия", + + "customer.transactions.title": "История операций", + "customer.transactions.dateColumn": "Дата", + "customer.transactions.stationColumn": "АЗС", + "customer.transactions.productColumn": "Топливо", + "customer.transactions.quantityColumn": "Литры", + "customer.transactions.priceColumn": "Цена", + "customer.transactions.totalColumn": "Сумма", + "customer.transactions.noData": "Нет данных о транзакциях" +} \ No newline at end of file diff --git a/src/widgets/about-page/company-timeline.tsx b/src/widgets/about-page/company-timeline.tsx index 4ea937d..ee25915 100644 --- a/src/widgets/about-page/company-timeline.tsx +++ b/src/widgets/about-page/company-timeline.tsx @@ -5,6 +5,7 @@ import { useState } from 'react'; import { Button } from '@/shared/shadcn-ui/button'; import { Card, CardContent } from '@/shared/shadcn-ui/card'; +import { useLanguage } from '@/shared/language'; const timelineEvents = [ { @@ -61,6 +62,8 @@ export function CompanyTimeline() { const [expanded, setExpanded] = useState(false); const displayEvents = expanded ? timelineEvents : timelineEvents.slice(0, 4); + const {t} = useLanguage() + return (
@@ -116,11 +119,11 @@ export function CompanyTimeline() { > {expanded ? ( <> - Свернуть + {t("about.companyTimeline.rollUp.button")} ) : ( <> - Показать больше + {t("about.companyTimeline.show.button")} )} diff --git a/src/widgets/about-page/station-gallery.tsx b/src/widgets/about-page/station-gallery.tsx index aea4552..ca2e8d2 100644 --- a/src/widgets/about-page/station-gallery.tsx +++ b/src/widgets/about-page/station-gallery.tsx @@ -13,6 +13,7 @@ import { DialogTitle, DialogTrigger, } from '@/shared/shadcn-ui/dialog'; +import { useLanguage } from '@/shared/language'; interface Station { id: number; @@ -72,6 +73,8 @@ export function StationGallery() { setCurrentImage((prev) => (prev === 0 ? stations.length - 1 : prev - 1)); }; + const {t} = useLanguage() + return (
@@ -93,7 +96,7 @@ export function StationGallery() { onClick={prevImage} > - Предыдущая + {t('about.gallery.previous')} diff --git a/src/widgets/footer.tsx b/src/widgets/footer.tsx index f09e22c..7639bc2 100644 --- a/src/widgets/footer.tsx +++ b/src/widgets/footer.tsx @@ -15,7 +15,7 @@ export const Footer = () => {
- GasNetwork + {t('common.name')}

{t('home.hero.description')}

@@ -122,7 +122,7 @@ export const Footer = () => {

- © {new Date().getFullYear()} GasNetwork.{' '} + © {new Date().getFullYear()} {t("common.name")}.{' '} {t('common.footer.rights')}

diff --git a/src/widgets/header/ui/desktop-nav.tsx b/src/widgets/header/ui/desktop-nav.tsx index 9dec4b4..2bee203 100644 --- a/src/widgets/header/ui/desktop-nav.tsx +++ b/src/widgets/header/ui/desktop-nav.tsx @@ -60,10 +60,10 @@ export function DesktopNav() { - Накапливайте баллы и получайте скидки на топливо и услуги + {t('clients.header.loyalty.description')} - Подарочные сертификаты на топливо и услуги нашей сети + {t('clients.header.certificates.description')} diff --git a/src/widgets/header/ui/mobile-nav.tsx b/src/widgets/header/ui/mobile-nav.tsx index 1e47b65..4745d71 100644 --- a/src/widgets/header/ui/mobile-nav.tsx +++ b/src/widgets/header/ui/mobile-nav.tsx @@ -11,11 +11,14 @@ import { CollapsibleTrigger, } from '@/shared/shadcn-ui/collapsible'; import { Sheet, SheetContent, SheetTrigger } from '@/shared/shadcn-ui/sheet'; +import { useLanguage } from '@/shared/language'; export function MobileNav() { const [open, setOpen] = useState(false); const [clientsOpen, setClientsOpen] = useState(false); + const {t} = useLanguage(); + return ( @@ -31,19 +34,19 @@ export function MobileNav() { onClick={() => setOpen(false)} className='text-lg font-medium transition-colors hover:text-red-600' > - Главная + {t("common.navigation.home")} setOpen(false)} className='text-lg font-medium transition-colors hover:text-red-600' > - О нас + {t("common.navigation.about")} - Клиентам + {t("common.navigation.clients")} {clientsOpen ? ( ) : ( @@ -56,28 +59,14 @@ export function MobileNav() { onClick={() => setOpen(false)} className='block py-1 text-base transition-colors hover:text-red-600' > - Программа лояльности - - setOpen(false)} - className='block py-1 text-base transition-colors hover:text-red-600' - > - Топливная карта + {t("common.navigation.loyatly")} setOpen(false)} className='block py-1 text-base transition-colors hover:text-red-600' > - Сертификаты - - setOpen(false)} - className='block py-1 text-base transition-colors hover:text-red-600' - > - Способы оплаты + {t("common.navigation.certificates")} @@ -87,35 +76,35 @@ export function MobileNav() { onClick={() => setOpen(false)} className='text-lg font-medium transition-colors hover:text-red-600' > - Наши заправки + {t("common.navigation.stations")} setOpen(false)} className='text-lg font-medium transition-colors hover:text-red-600' > - Вакансии + {t("common.navigation.vacancies")} setOpen(false)} className='text-lg font-medium transition-colors hover:text-red-600' > - Акции + {t("common.navigation.promotions")} setOpen(false)} className='text-lg font-medium transition-colors hover:text-red-600' > - Партнеры + {t("common.navigation.partners")} setOpen(false)} className='text-lg font-medium transition-colors hover:text-red-600' > - Благотворительность + {t("common.navigation.charity")} diff --git a/src/widgets/transactions-table.tsx b/src/widgets/transactions-table.tsx index 8cee4b8..f636411 100644 --- a/src/widgets/transactions-table.tsx +++ b/src/widgets/transactions-table.tsx @@ -1,4 +1,4 @@ -'use client'; +"use client"; import { format, subMonths } from 'date-fns'; import { ru } from 'date-fns/locale'; @@ -21,6 +21,7 @@ import { TableHeader, TableRow, } from '@/shared/shadcn-ui/table'; +import { useLanguage } from '@/shared/language'; // Sample customer data const customerData = { @@ -99,15 +100,17 @@ export const TransactionsTable = () => { setFilteredTransactions(filtered); }; + const {t} = useLanguage(); + return (
-

История операций

+

{t('corporate.transactions.title')}

- +
- + @@ -161,7 +164,7 @@ export const TransactionsTable = () => { className='mt-auto bg-red-600 hover:bg-red-700' onClick={filterTransactions} > - Применить + {t('corporate.transactions.applyButton')}
@@ -170,12 +173,12 @@ export const TransactionsTable = () => { - Дата - Станция - Продукт - Кол-во (л) - Стоимость - Сумма + {t('corporate.transactions.tableHeaders.date')} + {t('corporate.transactions.tableHeaders.station')} + {t('corporate.transactions.tableHeaders.product')} + {t('corporate.transactions.tableHeaders.quantity')} + {t('corporate.transactions.tableHeaders.price')} + {t('corporate.transactions.tableHeaders.total')} @@ -191,10 +194,10 @@ export const TransactionsTable = () => { {transaction.quantity} - {transaction.cost.toFixed(2)} сомони + {transaction.cost.toFixed(2)} {t('corporate.currency')} - {transaction.total.toFixed(2)} сомони + {transaction.total.toFixed(2)} {t('corporate.currency')} )) @@ -204,13 +207,13 @@ export const TransactionsTable = () => { colSpan={6} className='py-6 text-center text-gray-500' > - Нет операций за выбранный период + {t('corporate.transactions.noTransactions')} )}
-
+
); };