Compare commits
No commits in common. "fe52df1b7a403c686484778c9b0620c2c235c3aa" and "26b714ecc7fc4b19cf5b19525192f0033b0c4eaa" have entirely different histories.
fe52df1b7a
...
26b714ecc7
@ -1,5 +1,93 @@
|
|||||||
import LoginPage from "@/pages-templates/login";
|
import { Building2, Fuel, User } from 'lucide-react';
|
||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
export default function Login() {
|
import { LoginForm } from '@/features/auth/login-form';
|
||||||
return <LoginPage/>
|
|
||||||
}
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from '@/shared/shadcn-ui/card';
|
||||||
|
import {
|
||||||
|
Tabs,
|
||||||
|
TabsContent,
|
||||||
|
TabsList,
|
||||||
|
TabsTrigger,
|
||||||
|
} from '@/shared/shadcn-ui/tabs';
|
||||||
|
|
||||||
|
export default function LoginPage() {
|
||||||
|
return (
|
||||||
|
<div className='flex min-h-screen flex-col items-center justify-center'>
|
||||||
|
<main className='flex-1'>
|
||||||
|
<div className='container max-w-6xl py-16'>
|
||||||
|
<div className='mb-12 flex flex-col items-center text-center'>
|
||||||
|
<div className='mb-4 inline-flex items-center justify-center rounded-full bg-red-100 p-2'>
|
||||||
|
<Fuel className='h-6 w-6 text-red-600' />
|
||||||
|
</div>
|
||||||
|
<h1 className='mb-4 text-3xl font-bold tracking-tight sm:text-4xl'>
|
||||||
|
Вход в личный кабинет
|
||||||
|
</h1>
|
||||||
|
<p className='max-w-2xl text-gray-600'>
|
||||||
|
Войдите в личный кабинет, чтобы получить доступ к информации о
|
||||||
|
ваших бонусах, истории операций и другим возможностям.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='mx-auto max-w-md'>
|
||||||
|
<Tabs defaultValue='bonus' className='w-full'>
|
||||||
|
<TabsList className='mb-8 grid w-full grid-cols-2'>
|
||||||
|
<TabsTrigger value='bonus' className='text-base'>
|
||||||
|
<User className='mr-2 h-4 w-4' /> Бонусный клиент
|
||||||
|
</TabsTrigger>
|
||||||
|
<TabsTrigger value='corporate' className='text-base'>
|
||||||
|
<Building2 className='mr-2 h-4 w-4' /> Корпоративный клиент
|
||||||
|
</TabsTrigger>
|
||||||
|
</TabsList>
|
||||||
|
|
||||||
|
<TabsContent value='bonus'>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Вход для бонусных клиентов</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Введите номер телефона и номер бонусной карты для входа в
|
||||||
|
личный кабинет.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className='space-y-4'>
|
||||||
|
<LoginForm />
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</TabsContent>
|
||||||
|
|
||||||
|
<TabsContent value='corporate'>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Вход для корпоративных клиентов</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Введите номер телефона и номер корпоративной карты для
|
||||||
|
входа в личный кабинет.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className='space-y-4'>
|
||||||
|
<LoginForm />
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</TabsContent>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
<div className='mt-8 text-center text-sm text-gray-500'>
|
||||||
|
<p>
|
||||||
|
Возникли проблемы со входом?{' '}
|
||||||
|
<Link href='/contact' className='text-red-600 hover:underline'>
|
||||||
|
Свяжитесь с нами
|
||||||
|
</Link>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@ -17,15 +17,12 @@ import {
|
|||||||
import { Input } from '@/shared/shadcn-ui/input';
|
import { Input } from '@/shared/shadcn-ui/input';
|
||||||
|
|
||||||
import { LoginFormData, loginFormSchema } from '../model/login-form.schema';
|
import { LoginFormData, loginFormSchema } from '../model/login-form.schema';
|
||||||
import { useLanguage } from '@/shared/language';
|
|
||||||
|
|
||||||
interface LoginFormProps {
|
interface LoginFormProps {
|
||||||
// onSubmit: (data: any) => Promise<void>;
|
// onSubmit: (data: any) => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LoginForm = ({}: LoginFormProps) => {
|
export const LoginForm = ({}: LoginFormProps) => {
|
||||||
const {t} = useLanguage()
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
// const [login, results] = useLoginMutation();
|
// const [login, results] = useLoginMutation();
|
||||||
|
|
||||||
@ -65,7 +62,7 @@ export const LoginForm = ({}: LoginFormProps) => {
|
|||||||
name='phoneNumber'
|
name='phoneNumber'
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>{t("auth.phoneNumber")}</FormLabel>
|
<FormLabel>Номер телефона</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
type='tel'
|
type='tel'
|
||||||
@ -83,7 +80,7 @@ export const LoginForm = ({}: LoginFormProps) => {
|
|||||||
name='cardNumber'
|
name='cardNumber'
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>{t("auth.cardNumber")}</FormLabel>
|
<FormLabel>Номер карты</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
type='text'
|
type='text'
|
||||||
|
|||||||
@ -1,95 +0,0 @@
|
|||||||
"use client"
|
|
||||||
|
|
||||||
import { Building2, Fuel, User } from 'lucide-react';
|
|
||||||
import Link from 'next/link';
|
|
||||||
|
|
||||||
import { LoginForm } from '@/features/auth/login-form';
|
|
||||||
import { useLanguage } from '@/shared/language';
|
|
||||||
|
|
||||||
import {
|
|
||||||
Card,
|
|
||||||
CardContent,
|
|
||||||
CardDescription,
|
|
||||||
CardHeader,
|
|
||||||
CardTitle,
|
|
||||||
} from '@/shared/shadcn-ui/card';
|
|
||||||
import {
|
|
||||||
Tabs,
|
|
||||||
TabsContent,
|
|
||||||
TabsList,
|
|
||||||
TabsTrigger,
|
|
||||||
} from '@/shared/shadcn-ui/tabs';
|
|
||||||
|
|
||||||
export default function LoginPage() {
|
|
||||||
const { t } = useLanguage();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='flex min-h-screen flex-col items-center justify-center'>
|
|
||||||
<main className='flex-1'>
|
|
||||||
<div className='container max-w-6xl py-16'>
|
|
||||||
<div className='mb-12 flex flex-col items-center text-center'>
|
|
||||||
<div className='mb-4 inline-flex items-center justify-center rounded-full bg-red-100 p-2'>
|
|
||||||
<Fuel className='h-6 w-6 text-red-600' />
|
|
||||||
</div>
|
|
||||||
<h1 className='mb-4 text-3xl font-bold tracking-tight sm:text-4xl'>
|
|
||||||
{t('auth.title')}
|
|
||||||
</h1>
|
|
||||||
<p className='max-w-2xl text-gray-600'>
|
|
||||||
{t('auth.description')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='mx-auto max-w-md'>
|
|
||||||
<Tabs defaultValue='bonus' className='w-full'>
|
|
||||||
<TabsList className='mb-8 grid w-full grid-cols-2'>
|
|
||||||
<TabsTrigger value='bonus' className='text-base'>
|
|
||||||
<User className='mr-2 h-4 w-4' /> {t('auth.bonusClient')}
|
|
||||||
</TabsTrigger>
|
|
||||||
<TabsTrigger value='corporate' className='text-base'>
|
|
||||||
<Building2 className='mr-2 h-4 w-4' /> {t('auth.corporateClient')}
|
|
||||||
</TabsTrigger>
|
|
||||||
</TabsList>
|
|
||||||
|
|
||||||
<TabsContent value='bonus'>
|
|
||||||
<Card>
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle>{t('auth.bonusLogin.title')}</CardTitle>
|
|
||||||
<CardDescription>
|
|
||||||
{t('auth.bonusLogin.description')}
|
|
||||||
</CardDescription>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent className='space-y-4'>
|
|
||||||
<LoginForm />
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</TabsContent>
|
|
||||||
|
|
||||||
<TabsContent value='corporate'>
|
|
||||||
<Card>
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle>{t('auth.corporateLogin.title')}</CardTitle>
|
|
||||||
<CardDescription>
|
|
||||||
{t('auth.corporateLogin.description')}
|
|
||||||
</CardDescription>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent className='space-y-4'>
|
|
||||||
<LoginForm/>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</TabsContent>
|
|
||||||
</Tabs>
|
|
||||||
|
|
||||||
<div className='mt-8 text-center text-sm text-gray-500'>
|
|
||||||
<p>
|
|
||||||
{t('auth.loginIssues')}{' '}
|
|
||||||
<Link href='/contact' className='text-red-600 hover:underline'>
|
|
||||||
{t('auth.contactLink')}
|
|
||||||
</Link>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -4,14 +4,11 @@ import { Users } from 'lucide-react';
|
|||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
|
|
||||||
import AnimatedCounter from './animated-counter';
|
import AnimatedCounter from './animated-counter';
|
||||||
import { useLanguage } from '../language';
|
|
||||||
|
|
||||||
export default function AboutCounter() {
|
export default function AboutCounter() {
|
||||||
const [isVisible, setIsVisible] = useState(false);
|
const [isVisible, setIsVisible] = useState(false);
|
||||||
const sectionRef = useRef<HTMLDivElement>(null);
|
const sectionRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
const {t} = useLanguage()
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const observer = new IntersectionObserver(
|
const observer = new IntersectionObserver(
|
||||||
(entries) => {
|
(entries) => {
|
||||||
@ -44,7 +41,7 @@ export default function AboutCounter() {
|
|||||||
<h3 className='text-2xl font-bold text-gray-900'>
|
<h3 className='text-2xl font-bold text-gray-900'>
|
||||||
{isVisible ? <AnimatedCounter end={150} suffix='+' /> : '0+'}
|
{isVisible ? <AnimatedCounter end={150} suffix='+' /> : '0+'}
|
||||||
</h3>
|
</h3>
|
||||||
<p className='text-gray-600'>{t("about.stats.items.2.label")}</p>
|
<p className='text-gray-600'>Сотрудников</p>
|
||||||
</div>
|
</div>
|
||||||
<div className='transform rounded-lg bg-white p-3 shadow-md transition-transform hover:scale-105 sm:p-6'>
|
<div className='transform rounded-lg bg-white p-3 shadow-md transition-transform hover:scale-105 sm:p-6'>
|
||||||
<div className='mb-4 inline-flex items-center justify-center rounded-full bg-red-100 p-2'>
|
<div className='mb-4 inline-flex items-center justify-center rounded-full bg-red-100 p-2'>
|
||||||
@ -53,7 +50,7 @@ export default function AboutCounter() {
|
|||||||
<h3 className='text-2xl font-bold text-gray-900'>
|
<h3 className='text-2xl font-bold text-gray-900'>
|
||||||
{isVisible ? <AnimatedCounter end={5} suffix='M+' /> : '0M+'}
|
{isVisible ? <AnimatedCounter end={5} suffix='M+' /> : '0M+'}
|
||||||
</h3>
|
</h3>
|
||||||
<p className='text-gray-600'>{t("about.stats.items.4.label")}</p>
|
<p className='text-gray-600'>Литров топлива в месяц</p>
|
||||||
</div>
|
</div>
|
||||||
<div className='transform rounded-lg bg-white p-3 shadow-md transition-transform hover:scale-105 sm:p-6'>
|
<div className='transform rounded-lg bg-white p-3 shadow-md transition-transform hover:scale-105 sm:p-6'>
|
||||||
<div className='mb-4 inline-flex items-center justify-center rounded-full bg-red-100 p-2'>
|
<div className='mb-4 inline-flex items-center justify-center rounded-full bg-red-100 p-2'>
|
||||||
@ -66,7 +63,7 @@ export default function AboutCounter() {
|
|||||||
'0%'
|
'0%'
|
||||||
)}
|
)}
|
||||||
</h3>
|
</h3>
|
||||||
<p className='text-gray-600'>{t("about.stats.items.5.label")}</p>
|
<p className='text-gray-600'>Довольных клиентов</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -87,8 +87,6 @@
|
|||||||
"about.stats.items.3.value": "1000000",
|
"about.stats.items.3.value": "1000000",
|
||||||
"about.stats.items.3.suffix": "+",
|
"about.stats.items.3.suffix": "+",
|
||||||
"about.stats.items.3.label": "Клиентов в год",
|
"about.stats.items.3.label": "Клиентов в год",
|
||||||
"about.stats.items.4.label": "Литров топлива в месяц",
|
|
||||||
"about.stats.items.5.label": "Довольных клиентов",
|
|
||||||
|
|
||||||
"about.history.title": "Наша история",
|
"about.history.title": "Наша история",
|
||||||
"about.history.subtitle": "История развития нашей компании от небольшой сети до лидера рынка",
|
"about.history.subtitle": "История развития нашей компании от небольшой сети до лидера рынка",
|
||||||
@ -164,12 +162,12 @@
|
|||||||
"home.cta.description": "Станьте частью нашей сети. Получайте специальные предложения, бонусы и скидки.",
|
"home.cta.description": "Станьте частью нашей сети. Получайте специальные предложения, бонусы и скидки.",
|
||||||
|
|
||||||
"clients.title": "Для наших клиентов",
|
"clients.title": "Для наших клиентов",
|
||||||
"clients.description": "Информация для клиентов: программа лояльности, топливные карты, сертификаты и способы оплаты.",
|
"clients.description": "Специальные предложения, программы лояльности и удобные способы оплаты для наших клиентов",
|
||||||
"clients.services.title": "Наши услуги для клиентов",
|
"clients.services": "Наши услуги для клиентов",
|
||||||
"clients.services.subtitle": "Мы стремимся сделать обслуживание на наших заправках максимально удобным и выгодным для вас",
|
"clients.services.description": "Мы стремимся сделать обслуживание на наших заправках максимально удобным и выгодным для вас",
|
||||||
"clients.benefits.title": "Преимущества для клиентов",
|
"clients.loyalty.title": "Программа лояльности",
|
||||||
"clients.benefits.subtitle": "Став клиентом GasNetwork, вы получаете множество преимуществ, которые делают заправку вашего автомобиля более выгодной и удобной.",
|
"clients.loyalty.description": "Накапливайте баллы и получайте скидки на топливо и услуги нашей сети",
|
||||||
|
|
||||||
"clients.loyalty.programm.about": "О программе лояльности",
|
"clients.loyalty.programm.about": "О программе лояльности",
|
||||||
"clients.loyalty.programm.about-description": "Программа лояльности GasNetwork — это возможность получать баллы за каждую покупку топлива и услуг на наших заправочных станциях. Накопленные баллы можно обменять на скидки, подарки или дополнительные услуги.",
|
"clients.loyalty.programm.about-description": "Программа лояльности GasNetwork — это возможность получать баллы за каждую покупку топлива и услуг на наших заправочных станциях. Накопленные баллы можно обменять на скидки, подарки или дополнительные услуги.",
|
||||||
"clients.loyalty.programm.about-description-2": "Участие в программе абсолютно бесплатное. Вам нужно только получить карту лояльности в любой нашей заправочной станции или зарегистрироваться в мобильном приложении.",
|
"clients.loyalty.programm.about-description-2": "Участие в программе абсолютно бесплатное. Вам нужно только получить карту лояльности в любой нашей заправочной станции или зарегистрироваться в мобильном приложении.",
|
||||||
@ -234,7 +232,6 @@
|
|||||||
"auth.phoneNumber": "Номер телефона",
|
"auth.phoneNumber": "Номер телефона",
|
||||||
"auth.cardNumber": "Номер карты",
|
"auth.cardNumber": "Номер карты",
|
||||||
"auth.loginIssues": "Возникли проблемы со входом?",
|
"auth.loginIssues": "Возникли проблемы со входом?",
|
||||||
"auth.contactLink": "Свяжитесь с нами",
|
|
||||||
|
|
||||||
"map.filters": "Фильтры",
|
"map.filters": "Фильтры",
|
||||||
"map.stationsList": "Список заправок",
|
"map.stationsList": "Список заправок",
|
||||||
|
|||||||
@ -1,6 +1,3 @@
|
|||||||
"use client"
|
|
||||||
|
|
||||||
import { useLanguage } from '@/shared/language';
|
|
||||||
import { Percent } from 'lucide-react';
|
import { Percent } from 'lucide-react';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
|
|
||||||
@ -29,9 +26,6 @@ const benefits: Array<Benefit> = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const BenefitsSection = () => {
|
export const BenefitsSection = () => {
|
||||||
|
|
||||||
const {t} = useLanguage()
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className='bg-gray-50 py-16'>
|
<section className='bg-gray-50 py-16'>
|
||||||
<div className='container mx-auto'>
|
<div className='container mx-auto'>
|
||||||
@ -41,10 +35,12 @@ export const BenefitsSection = () => {
|
|||||||
<Percent className='h-6 w-6 text-red-600' />
|
<Percent className='h-6 w-6 text-red-600' />
|
||||||
</div>
|
</div>
|
||||||
<h2 className='mb-6 text-3xl font-bold tracking-tight sm:text-4xl'>
|
<h2 className='mb-6 text-3xl font-bold tracking-tight sm:text-4xl'>
|
||||||
{t('clients.benefits.title')}
|
Преимущества для клиентов
|
||||||
</h2>
|
</h2>
|
||||||
<p className='mb-6 text-gray-600'>
|
<p className='mb-6 text-gray-600'>
|
||||||
{t('clients.benefits.subtitle')}
|
Став клиентом GasNetwork, вы получаете множество преимуществ,
|
||||||
|
которые делают заправку вашего автомобиля более выгодной и
|
||||||
|
удобной.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className='space-y-4'>
|
<div className='space-y-4'>
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
"use client"
|
|
||||||
|
|
||||||
import { CreditCard, type LucideProps, Percent, Wallet } from 'lucide-react';
|
import { CreditCard, type LucideProps, Percent, Wallet } from 'lucide-react';
|
||||||
import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
||||||
|
|
||||||
@ -10,7 +8,6 @@ import {
|
|||||||
CardHeader,
|
CardHeader,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from '@/shared/shadcn-ui/card';
|
} from '@/shared/shadcn-ui/card';
|
||||||
import { useLanguage } from '@/shared/language';
|
|
||||||
|
|
||||||
interface ServiceOverview {
|
interface ServiceOverview {
|
||||||
title: string;
|
title: string;
|
||||||
@ -46,18 +43,16 @@ const servicesOverview: Array<ServiceOverview> = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const ServicesOverviewSection = () => {
|
export const ServicesOverviewSection = () => {
|
||||||
|
|
||||||
const {t} = useLanguage()
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className='py-16'>
|
<section className='py-16'>
|
||||||
<div className='container mx-auto'>
|
<div className='container mx-auto'>
|
||||||
<div className='mb-12 text-center'>
|
<div className='mb-12 text-center'>
|
||||||
<h2 className='mb-4 text-3xl font-bold tracking-tight sm:text-4xl'>
|
<h2 className='mb-4 text-3xl font-bold tracking-tight sm:text-4xl'>
|
||||||
{t('clients.services.title')}
|
Наши услуги для клиентов
|
||||||
</h2>
|
</h2>
|
||||||
<p className='mx-auto max-w-2xl text-gray-600'>
|
<p className='mx-auto max-w-2xl text-gray-600'>
|
||||||
{t('clients.services.subtitle')}
|
Мы стремимся сделать обслуживание на наших заправках максимально
|
||||||
|
удобным и выгодным для вас
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user