Compare commits
No commits in common. "4525b0b8c3bce9b63a9c291cd46250b4a2eb40f7" and "ed526338dda7b8315d98eff69d9f7a29e13a11d8" have entirely different histories.
4525b0b8c3
...
ed526338dd
Binary file not shown.
|
Before Width: | Height: | Size: 101 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 74 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 191 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 580 KiB |
@ -104,7 +104,7 @@ export function CorporateDashboard() {
|
|||||||
<div className='flex min-h-screen flex-col px-2.5'>
|
<div className='flex min-h-screen flex-col px-2.5'>
|
||||||
<main className='flex-1 py-10'>
|
<main className='flex-1 py-10'>
|
||||||
<div className='container mx-auto max-w-6xl'>
|
<div className='container mx-auto max-w-6xl'>
|
||||||
<div className='mb-4 flex flex-col gap-4 items-start sm:justify-between sm:items-center sm:mb-8 sm:flex-row'>
|
<div className='mb-8 flex items-center justify-between'>
|
||||||
<h1 className='text-3xl font-bold'>{t('corporate.pageTitle')}</h1>
|
<h1 className='text-3xl font-bold'>{t('corporate.pageTitle')}</h1>
|
||||||
<Button variant='outline' className='gap-2'>
|
<Button variant='outline' className='gap-2'>
|
||||||
<LogOut className='h-4 w-4' />
|
<LogOut className='h-4 w-4' />
|
||||||
@ -114,7 +114,11 @@ export function CorporateDashboard() {
|
|||||||
|
|
||||||
<div className='mb-10 grid gap-3 md:grid-cols-3 md:gap-6'>
|
<div className='mb-10 grid gap-3 md:grid-cols-3 md:gap-6'>
|
||||||
{/* Company Card */}
|
{/* Company Card */}
|
||||||
<Card data-aos='zoom-in' data-aos-mirror="true" className='md:col-span-2'>
|
<Card
|
||||||
|
data-aos='zoom-in'
|
||||||
|
data-aos-mirror='true'
|
||||||
|
className='md:col-span-2'
|
||||||
|
>
|
||||||
<CardHeader className='pb-2'>
|
<CardHeader className='pb-2'>
|
||||||
<CardTitle className='flex items-center gap-2'>
|
<CardTitle className='flex items-center gap-2'>
|
||||||
<Building2 className='h-5 w-5 text-red-600' />
|
<Building2 className='h-5 w-5 text-red-600' />
|
||||||
@ -178,7 +182,11 @@ export function CorporateDashboard() {
|
|||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{/* Fund Card */}
|
{/* Fund Card */}
|
||||||
<Card data-aos='zoom-in' data-aos-mirror="true" className='bg-gradient-to-br from-red-600 to-red-800 text-white'>
|
<Card
|
||||||
|
data-aos='zoom-in'
|
||||||
|
data-aos-mirror='true'
|
||||||
|
className='bg-gradient-to-br from-red-600 to-red-800 text-white'
|
||||||
|
>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className='flex items-center gap-2'>
|
<CardTitle className='flex items-center gap-2'>
|
||||||
<Wallet className='h-5 w-5' />
|
<Wallet className='h-5 w-5' />
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import {
|
|||||||
} from '@/shared/shadcn-ui/card';
|
} from '@/shared/shadcn-ui/card';
|
||||||
|
|
||||||
import { TransactionsTable } from '@/widgets/transactions-table';
|
import { TransactionsTable } from '@/widgets/transactions-table';
|
||||||
import Loader from '@/shared/components/loader';
|
|
||||||
|
|
||||||
export function CustomerDashboard() {
|
export function CustomerDashboard() {
|
||||||
const { t } = useTextController();
|
const { t } = useTextController();
|
||||||
@ -37,7 +36,8 @@ export function CustomerDashboard() {
|
|||||||
<div className='mb-10 grid gap-3 md:grid-cols-3 md:gap-6'>
|
<div className='mb-10 grid gap-3 md:grid-cols-3 md:gap-6'>
|
||||||
<Card data-aos="zoom-in" data-aos-mirror="true" className='bg-gradient-to-br from-red-600 to-red-800 text-white'>
|
<Card data-aos="zoom-in" data-aos-mirror="true" className='bg-gradient-to-br from-red-600 to-red-800 text-white'>
|
||||||
{!data || isLoading ? (
|
{!data || isLoading ? (
|
||||||
<Loader/>
|
// TODO: Bunyod please add loader here
|
||||||
|
<>Loader here</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
@ -82,7 +82,8 @@ export function CustomerDashboard() {
|
|||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
{!data || isLoading ? (
|
{!data || isLoading ? (
|
||||||
<Loader/>
|
// TODO: Bunyod please add loader here
|
||||||
|
<>Loader here</>
|
||||||
) : (
|
) : (
|
||||||
<div className='grid gap-6 md:grid-cols-2'>
|
<div className='grid gap-6 md:grid-cols-2'>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@ -251,7 +251,7 @@ export default function AboutPage({ content }: AboutPageProps) {
|
|||||||
{/* Our Team */}
|
{/* Our Team */}
|
||||||
<Container>
|
<Container>
|
||||||
<section className='bg-gray-50 py-16'>
|
<section className='bg-gray-50 py-16'>
|
||||||
<div className='container mx-auto px-2'>
|
<div className='container mx-auto'>
|
||||||
<div className='mb-12 flex flex-col items-center justify-center text-center'>
|
<div className='mb-12 flex flex-col items-center justify-center text-center'>
|
||||||
<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'>
|
||||||
<Users className='h-6 w-6 text-red-600' />
|
<Users className='h-6 w-6 text-red-600' />
|
||||||
|
|||||||
@ -87,7 +87,7 @@ export function CharityPage() {
|
|||||||
|
|
||||||
<div className='space-y-4'>
|
<div className='space-y-4'>
|
||||||
{[0, 1, 2].map((index) => (
|
{[0, 1, 2].map((index) => (
|
||||||
<div data-aos='fade-right' key={index} className='flex items-start'>
|
<div key={index} className='flex items-start'>
|
||||||
<CheckCircle className='mr-3 h-6 w-6 flex-shrink-0 text-red-600' />
|
<CheckCircle className='mr-3 h-6 w-6 flex-shrink-0 text-red-600' />
|
||||||
<div>
|
<div>
|
||||||
<h3 className='text-lg font-medium'>
|
<h3 className='text-lg font-medium'>
|
||||||
@ -101,7 +101,7 @@ export function CharityPage() {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div data-aos='fade-right' className='relative h-[500px] overflow-hidden rounded-xl shadow-xl'>
|
<div className='relative h-[500px] overflow-hidden rounded-xl shadow-xl'>
|
||||||
<Image
|
<Image
|
||||||
src='/placeholder.svg?height=500&width=600&text=Наша+миссия'
|
src='/placeholder.svg?height=500&width=600&text=Наша+миссия'
|
||||||
alt={t('charity.mission.imageAlt')}
|
alt={t('charity.mission.imageAlt')}
|
||||||
@ -185,7 +185,7 @@ export function CharityPage() {
|
|||||||
'/placeholder.svg?height=200&width=300&text=Школьные+принадлежности',
|
'/placeholder.svg?height=200&width=300&text=Школьные+принадлежности',
|
||||||
},
|
},
|
||||||
].map((event, index) => (
|
].map((event, index) => (
|
||||||
<Card data-aos='zoom-in-up' key={index} className='overflow-hidden flex flex-col justify-between'>
|
<Card key={index} className='overflow-hidden flex flex-col justify-between'>
|
||||||
<div>
|
<div>
|
||||||
<div className='relative h-48 w-full'>
|
<div className='relative h-48 w-full'>
|
||||||
<Image
|
<Image
|
||||||
@ -265,7 +265,7 @@ export function CharityPage() {
|
|||||||
icon: <Heart className='h-10 w-10 text-red-600' />,
|
icon: <Heart className='h-10 w-10 text-red-600' />,
|
||||||
},
|
},
|
||||||
].map((item, index) => (
|
].map((item, index) => (
|
||||||
<Card data-aos='zoom-in' key={index} className='text-center'>
|
<Card key={index} className='text-center'>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<div className='mb-4 flex justify-center'>{item.icon}</div>
|
<div className='mb-4 flex justify-center'>{item.icon}</div>
|
||||||
<CardTitle className='break-words hyphens-auto'>
|
<CardTitle className='break-words hyphens-auto'>
|
||||||
|
|||||||
@ -9,8 +9,6 @@ import { Card, CardContent } from '@/shared/shadcn-ui/card';
|
|||||||
import { CtaSection } from '@/widgets/cta-section';
|
import { CtaSection } from '@/widgets/cta-section';
|
||||||
import Container from '@/shared/shadcn-ui/conteiner';
|
import Container from '@/shared/shadcn-ui/conteiner';
|
||||||
|
|
||||||
import ProgrammImg from '../../../../public/clients/loyatly/03a771e7-5d76-4111-a516-801aa925659f.jpg'
|
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
title: 'Программа лояльности | GasNetwork - Сеть заправок в Таджикистане',
|
title: 'Программа лояльности | GasNetwork - Сеть заправок в Таджикистане',
|
||||||
description:
|
description:
|
||||||
@ -114,11 +112,10 @@ export function LoyaltyPage() {
|
|||||||
</div>
|
</div>
|
||||||
<div data-aos='fade-up' className='relative h-[400px] overflow-hidden rounded-xl shadow-xl'>
|
<div data-aos='fade-up' className='relative h-[400px] overflow-hidden rounded-xl shadow-xl'>
|
||||||
<Image
|
<Image
|
||||||
src={ProgrammImg}
|
src='/placeholder.svg?height=400&width=600&text=Программа+лояльности'
|
||||||
alt='Программа лояльности'
|
alt='Программа лояльности'
|
||||||
fill
|
fill
|
||||||
className="w-full object-contain p-2.5"
|
className='object-cover'
|
||||||
priority
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -126,7 +123,7 @@ export function LoyaltyPage() {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
{/* How It Works */}
|
{/* How It Works */}
|
||||||
<section className='bg-gray-50 py-16 px-2'>
|
<section className='bg-gray-50 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'>
|
||||||
@ -137,8 +134,8 @@ export function LoyaltyPage() {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='grid gap-8 sm:grid-cols-2 lg:grid-cols-4'>
|
<div data-aos='zoom-in-right' className='grid gap-8 md:grid-cols-4'>
|
||||||
<div data-aos='zoom-in-up' className='text-center'>
|
<div className='text-center'>
|
||||||
<div className='mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-600 text-2xl font-bold text-white'>
|
<div className='mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-600 text-2xl font-bold text-white'>
|
||||||
1
|
1
|
||||||
</div>
|
</div>
|
||||||
@ -149,7 +146,7 @@ export function LoyaltyPage() {
|
|||||||
{t('clients.loyalty.works.stage.description-1')}
|
{t('clients.loyalty.works.stage.description-1')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div data-aos='zoom-in-up' className='text-center'>
|
<div className='text-center'>
|
||||||
<div className='mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-600 text-2xl font-bold text-white'>
|
<div className='mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-600 text-2xl font-bold text-white'>
|
||||||
2
|
2
|
||||||
</div>
|
</div>
|
||||||
@ -160,7 +157,7 @@ export function LoyaltyPage() {
|
|||||||
{t('clients.loyalty.works.stage.description-2')}
|
{t('clients.loyalty.works.stage.description-2')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div data-aos='zoom-in-up' className='text-center'>
|
<div className='text-center'>
|
||||||
<div className='mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-600 text-2xl font-bold text-white'>
|
<div className='mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-600 text-2xl font-bold text-white'>
|
||||||
3
|
3
|
||||||
</div>
|
</div>
|
||||||
@ -171,7 +168,7 @@ export function LoyaltyPage() {
|
|||||||
{t('clients.loyalty.works.stage.description-3')}
|
{t('clients.loyalty.works.stage.description-3')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div data-aos='zoom-in-up' className='text-center'>
|
<div className='text-center'>
|
||||||
<div className='mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-600 text-2xl font-bold text-white'>
|
<div className='mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-600 text-2xl font-bold text-white'>
|
||||||
4
|
4
|
||||||
</div>
|
</div>
|
||||||
@ -198,8 +195,8 @@ export function LoyaltyPage() {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='grid gap-8 md:grid-cols-3'>
|
<div data-aos='flip-down' className='grid gap-8 md:grid-cols-3'>
|
||||||
<Card data-aos='flip-left' data-aos-duration='500' className='overflow-hidden border-t-4 border-t-gray-400 transition-all hover:shadow-lg'>
|
<Card className='overflow-hidden border-t-4 border-t-gray-400 transition-all hover:shadow-lg'>
|
||||||
<CardContent className='p-6'>
|
<CardContent className='p-6'>
|
||||||
<h3 className='mb-4 text-center text-2xl font-bold'>
|
<h3 className='mb-4 text-center text-2xl font-bold'>
|
||||||
{t('clients.loyalty.works.levels.card-1.title')}
|
{t('clients.loyalty.works.levels.card-1.title')}
|
||||||
@ -235,7 +232,7 @@ export function LoyaltyPage() {
|
|||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card data-aos='flip-left' data-aos-duration='500' className='overflow-hidden border-t-4 border-t-yellow-500 transition-all hover:shadow-lg'>
|
<Card className='overflow-hidden border-t-4 border-t-yellow-500 transition-all hover:shadow-lg'>
|
||||||
<CardContent className='p-6'>
|
<CardContent className='p-6'>
|
||||||
<h3 className='mb-4 text-center text-2xl font-bold'>
|
<h3 className='mb-4 text-center text-2xl font-bold'>
|
||||||
{t('clients.loyalty.works.levels.card-2.title')}
|
{t('clients.loyalty.works.levels.card-2.title')}
|
||||||
@ -277,7 +274,7 @@ export function LoyaltyPage() {
|
|||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card data-aos='flip-left' data-aos-duration='500' className='overflow-hidden border-t-4 border-t-red-600 transition-all hover:shadow-lg'>
|
<Card className='overflow-hidden border-t-4 border-t-red-600 transition-all hover:shadow-lg'>
|
||||||
<CardContent className='p-6'>
|
<CardContent className='p-6'>
|
||||||
<h3 className='mb-4 text-center text-2xl font-bold'>
|
<h3 className='mb-4 text-center text-2xl font-bold'>
|
||||||
{t('clients.loyalty.works.levels.card-3.title')}
|
{t('clients.loyalty.works.levels.card-3.title')}
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import Link from 'next/link';
|
|||||||
export const Logo = () => {
|
export const Logo = () => {
|
||||||
return (
|
return (
|
||||||
<Link className='flex items-center gap-2' href={'/'}>
|
<Link className='flex items-center gap-2' href={'/'}>
|
||||||
<Image src='/logo-new.png' alt='oriyo-logo' width={110} height={40} />
|
<Image src='/logo.svg' alt='oriyo-logo' width={24} height={24} />
|
||||||
{/* <span className='text-xl font-bold'>Ориё</span> */}
|
<span className='text-xl font-bold'>Ориё</span>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
'use client'
|
|
||||||
|
|
||||||
export default function Loader() {
|
|
||||||
return (
|
|
||||||
<div className="flex justify-center items-center p-8">
|
|
||||||
<div className="animate-spin rounded-full h-14 w-14 border-4 border-black border-t-transparent"></div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@ -5,12 +5,12 @@ import Image from 'next/image';
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { Discounts } from '@/app/api-utlities/@types/index';
|
import { Discounts } from '@/app/api-utlities/@types';
|
||||||
|
|
||||||
import { useTextController } from '@/shared/language/hooks/use-text-controller';
|
import { useTextController } from '@/shared/language/hooks/use-text-controller';
|
||||||
import { Button } from '@/shared/shadcn-ui/button';
|
import { Button } from '@/shared/shadcn-ui/button';
|
||||||
import { Card, CardContent } from '@/shared/shadcn-ui/card';
|
import { Card, CardContent } from '@/shared/shadcn-ui/card';
|
||||||
import PromoImg from '../../../public/main/#promotions/995b9daa-959f-4bd5-9135-ef7c47148f2c.jpg'
|
|
||||||
const promotions = [
|
const promotions = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@ -99,16 +99,14 @@ export default function PromotionSlider({ discounts }: PromotionSliderProps) {
|
|||||||
data-aos-duration='700'
|
data-aos-duration='700'
|
||||||
>
|
>
|
||||||
<Card className='h-full overflow-hidden transition-shadow hover:shadow-lg'>
|
<Card className='h-full overflow-hidden transition-shadow hover:shadow-lg'>
|
||||||
<div className='relative h-72'>
|
<div className='relative h-48'>
|
||||||
<div className='rounded-lg'>
|
|
||||||
<Image
|
<Image
|
||||||
src={PromoImg}
|
src={promo.image || '/placeholder.svg'}
|
||||||
alt={promo.name}
|
alt={promo.name}
|
||||||
fill
|
fill
|
||||||
className='object-contain p-2 rounded-lg'
|
className='object-cover'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<CardContent className='p-4'>
|
<CardContent className='p-4'>
|
||||||
<h3 className='mb-2 text-lg font-bold'>{promo.name}</h3>
|
<h3 className='mb-2 text-lg font-bold'>{promo.name}</h3>
|
||||||
<p className='mb-3 text-sm text-gray-600'>
|
<p className='mb-3 text-sm text-gray-600'>
|
||||||
|
|||||||
@ -10,20 +10,7 @@ interface AosInitProps {
|
|||||||
|
|
||||||
export const AosProvider = ({ children }: AosInitProps) => {
|
export const AosProvider = ({ children }: AosInitProps) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const timer = setTimeout(() => {
|
AOS.init({ once: false, mirror: false, });
|
||||||
AOS.init({
|
|
||||||
mirror: false,
|
|
||||||
once: false,
|
|
||||||
offset: 100,
|
|
||||||
duration: 600,
|
|
||||||
easing: 'ease-out-quart',
|
|
||||||
});
|
|
||||||
}, 500);
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
clearTimeout(timer);
|
|
||||||
AOS.refreshHard();
|
|
||||||
};
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return <>{children}</>;
|
return <>{children}</>;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export const HeroSection = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<section className='relative'>
|
<section className='relative'>
|
||||||
<div className='relative h-[400px] w-full overflow-hidden sm:h-[500px] xl:h-[700px]'>
|
<div className='relative h-[300px] w-full overflow-hidden md:h-[500px] xl:h-[700px]'>
|
||||||
<Image
|
<Image
|
||||||
src='/oriyo_bg.jpeg'
|
src='/oriyo_bg.jpeg'
|
||||||
alt='Gas Station Network'
|
alt='Gas Station Network'
|
||||||
@ -24,14 +24,14 @@ export const HeroSection = () => {
|
|||||||
<div className='container mx-auto'>
|
<div className='container mx-auto'>
|
||||||
<div className='max-w-lg space-y-4 text-white'>
|
<div className='max-w-lg space-y-4 text-white'>
|
||||||
<div className='animate-fade animate-duration-[3000ms] animate-ease-in-out'>
|
<div className='animate-fade animate-duration-[3000ms] animate-ease-in-out'>
|
||||||
<h1 className='font-bold tracking-tight text-4xl md:text-6xl'>
|
<h1 className='text-2xl font-bold tracking-tight sm:text-4xl md:text-6xl'>
|
||||||
{t('home.hero.title')}
|
{t('home.hero.title')}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<p className='text-gray-200 sm:text-lg'>
|
<p className='text-gray-200 sm:text-lg'>
|
||||||
{t('home.hero.description')}
|
{t('home.hero.description')}
|
||||||
</p>
|
</p>
|
||||||
<div className='flex flex-col mt-6 gap-2 sm:flex-row sm:gap-4'>
|
<div className='flex flex-col gap-2 sm:flex-row sm:gap-4'>
|
||||||
<Link href='#'>
|
<Link href='#'>
|
||||||
<Button className='bg-red-600 hover:bg-red-700'>
|
<Button className='bg-red-600 hover:bg-red-700'>
|
||||||
{t('common.buttons.findStation')}{' '}
|
{t('common.buttons.findStation')}{' '}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { Gift } from 'lucide-react';
|
import { Gift } from 'lucide-react';
|
||||||
|
|
||||||
import { Discounts } from '@/app/api-utlities/@types/index';
|
import { Discounts } from '@/app/api-utlities/@types';
|
||||||
|
|
||||||
import PromotionSlider from '@/shared/components/promotion-slider';
|
import PromotionSlider from '@/shared/components/promotion-slider';
|
||||||
import { useTextController } from '@/shared/language/hooks/use-text-controller';
|
import { useTextController } from '@/shared/language/hooks/use-text-controller';
|
||||||
|
|||||||
@ -26,16 +26,14 @@ import {
|
|||||||
} from '@/shared/shadcn-ui/table';
|
} from '@/shared/shadcn-ui/table';
|
||||||
|
|
||||||
export const TransactionsTable = () => {
|
export const TransactionsTable = () => {
|
||||||
const [startDate, setStartDate] = useState<Date | undefined>(
|
const [startDate, setStartDate] = useState<Date>(subMonths(new Date(), 1));
|
||||||
subMonths(new Date(), 1),
|
const [endDate, setEndDate] = useState<Date>(new Date());
|
||||||
);
|
|
||||||
const [endDate, setEndDate] = useState<Date | undefined>(new Date());
|
|
||||||
|
|
||||||
const { data, refetch } = useFetchBonusTransactionsQuery({
|
const { data, refetch } = useFetchBonusTransactionsQuery({
|
||||||
limit: 100,
|
limit: 100,
|
||||||
page: 1,
|
page: 1,
|
||||||
...(startDate ? { start_date: format(startDate, 'yyyy-MM-dd') } : {}),
|
start_date: format(startDate, 'yyyy-MM-dd'),
|
||||||
...(endDate ? { end_date: format(endDate, 'yyyy-MM-dd') } : {}),
|
end_date: format(endDate, 'yyyy-MM-dd'),
|
||||||
});
|
});
|
||||||
|
|
||||||
// Filter transactions by date range
|
// Filter transactions by date range
|
||||||
@ -59,7 +57,7 @@ export const TransactionsTable = () => {
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div className='flex w-full flex-col gap-4 md:w-auto md:flex-row'>
|
<div className='flex w-full flex-col gap-4 md:w-auto md:flex-row'>
|
||||||
<div className='grid sm:grid-cols-2 gap-2'>
|
<div className='grid grid-cols-2 gap-2'>
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex items-center gap-2'>
|
||||||
<Label htmlFor='start-date'>
|
<Label htmlFor='start-date'>
|
||||||
{t('corporate.transactions.dateFrom')}
|
{t('corporate.transactions.dateFrom')}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { Briefcase } from 'lucide-react';
|
import { Briefcase } from 'lucide-react';
|
||||||
|
|
||||||
import { Jobs } from '@/app/api-utlities/@types/index';
|
import { Jobs } from '@/app/api-utlities/@types';
|
||||||
|
|
||||||
import { useTextController } from '@/shared/language/hooks/use-text-controller';
|
import { useTextController } from '@/shared/language/hooks/use-text-controller';
|
||||||
import { cn } from '@/shared/lib/utils';
|
import { cn } from '@/shared/lib/utils';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user