From 880329d3aeecbd45f62e9e2e0e7cc3a106ae95ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Thu, 14 Aug 2025 10:10:56 +0300 Subject: [PATCH] =?UTF-8?q?Ba=C5=9Fl=C4=B1klar=20ve=20Seed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/SeederData.json | 24 ++ ui/dev-dist/sw.js | 5 +- ui/index.html | 4 +- .../components/layouts/AuthLayout/Simple.tsx | 2 +- ui/src/components/template/HeaderLogo.tsx | 4 +- ui/src/utils/hooks/useMenuData.ts | 5 +- ui/src/views/AccessDenied.tsx | 10 +- ui/src/views/Dashboard.tsx | 12 +- ui/src/views/NotFound.tsx | 10 +- .../views/admin/activityLog/ActivityLog.tsx | 7 + ui/src/views/admin/chart/ChartEdit.tsx | 12 +- ui/src/views/admin/listForm/Wizard.tsx | 2 +- ui/src/views/admin/profile/Profile.tsx | 8 +- ui/src/views/ai/Assistant.tsx | 7 + ui/src/views/auth/ExtendLogin.tsx | 25 +- ui/src/views/auth/ForgotPassword.tsx | 140 +++++----- ui/src/views/auth/Login.tsx | 256 +++++++++--------- ui/src/views/auth/Register.tsx | 9 +- ui/src/views/auth/ResetPassword.tsx | 6 + ui/src/views/auth/SendConfirmationCode.tsx | 11 +- ui/src/views/auth/VerifyConfirmationCode.tsx | 7 + ui/src/views/developerKit/DashboardPage.tsx | 21 +- ui/src/views/docs/ChangeLog.tsx | 130 ++++----- ui/src/views/forum/Forum.tsx | 10 + ui/src/views/forum/Management.tsx | 9 + ui/src/views/menu/MenuManager.tsx | 10 + ui/src/views/public/About.tsx | 175 ++++++------ ui/src/views/public/Blog.tsx | 136 +++++----- ui/src/views/public/BlogDetail.tsx | 20 +- ui/src/views/public/Checkout.tsx | 10 + ui/src/views/public/Contact.tsx | 35 ++- ui/src/views/public/Home.tsx | 160 +++++++++-- ui/src/views/public/Payment.tsx | 9 + ui/src/views/public/Products.tsx | 10 + ui/src/views/public/Services.tsx | 66 ++--- ui/src/views/public/Success.tsx | 8 + ui/src/views/settings/Settings.tsx | 2 +- 37 files changed, 842 insertions(+), 535 deletions(-) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json index 8d6cbff5..0a103d02 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json @@ -505,6 +505,12 @@ "en": "Abp Settings", "tr": "Abp Ayarları" }, + { + "resourceName": "Platform", + "key": "App.ChangeLog", + "en": "Change Log", + "tr": "Versiyon Günlüğü" + }, { "resourceName": "Platform", "key": "App.BlogManagement", @@ -6343,6 +6349,24 @@ "tr": "Ürünler", "en": "Products" }, + { + "resourceName": "Platform", + "key": "Public.nav.checkout", + "tr": "Organizasyon Seçimi", + "en": "Select Organization" + }, + { + "resourceName": "Platform", + "key": "Public.nav.payment", + "tr": "Ödeme", + "en": "Payment" + }, + { + "resourceName": "Platform", + "key": "Public.nav.success", + "tr": "Sipariş Durumu", + "en": "Success" + }, { "resourceName": "Platform", "key": "Public.nav.basket", diff --git a/ui/dev-dist/sw.js b/ui/dev-dist/sw.js index 6f4eba4f..cbb992b0 100644 --- a/ui/dev-dist/sw.js +++ b/ui/dev-dist/sw.js @@ -82,11 +82,12 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.172lu27b4eg" + "revision": "0.6nc9e67jtoo" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { - allowlist: [/^\/$/] + allowlist: [/^\/$/], + denylist: [/^\/api\//] })); })); diff --git a/ui/index.html b/ui/index.html index b5e7f3e2..277c541c 100644 --- a/ui/index.html +++ b/ui/index.html @@ -5,8 +5,8 @@ - - Kurs Platform + + Sözsoft
diff --git a/ui/src/components/layouts/AuthLayout/Simple.tsx b/ui/src/components/layouts/AuthLayout/Simple.tsx index 895d13a1..ad625793 100644 --- a/ui/src/components/layouts/AuthLayout/Simple.tsx +++ b/ui/src/components/layouts/AuthLayout/Simple.tsx @@ -90,7 +90,7 @@ const Simple = ({ children, content, ...rest }: SimpleProps) => { return (
- +
{!hasSubdomain() && ( { - const mode = useStoreState((state) => state.theme.mode) + const mode = useStoreState((state) => state.theme.mode) - return + return } export default HeaderLogo diff --git a/ui/src/utils/hooks/useMenuData.ts b/ui/src/utils/hooks/useMenuData.ts index 85b0c014..3808f4a2 100644 --- a/ui/src/utils/hooks/useMenuData.ts +++ b/ui/src/utils/hooks/useMenuData.ts @@ -73,7 +73,10 @@ export const useMenuData = () => { try { // Flatten the hierarchy for API - const flatten = (items: MenuItem[], parentCode: string | null = null): MenuItem[] => { + const flatten = ( + items: MenuItem[], + parentCode: string | undefined = undefined, + ): MenuItem[] => { const result: MenuItem[] = [] items.forEach((item, index) => { const flatItem = { diff --git a/ui/src/views/AccessDenied.tsx b/ui/src/views/AccessDenied.tsx index f555eb30..6dbda09e 100644 --- a/ui/src/views/AccessDenied.tsx +++ b/ui/src/views/AccessDenied.tsx @@ -3,6 +3,7 @@ import DoubleSidedImage from '@/components/shared/DoubleSidedImage' import { Button } from '@/components/ui' import { ROUTES_ENUM } from '@/routes/route.constant' import { useLocalization } from '@/utils/hooks/useLocalization' +import { Helmet } from 'react-helmet' import { MdArrowBack } from 'react-icons/md' import { useNavigate } from 'react-router-dom' @@ -15,6 +16,11 @@ const AccessDenied = () => { return ( +
{ size="xs" className="mt-2" variant="default" - onClick={() => navigate(isAdminPath ? ROUTES_ENUM.protected.dashboard : ROUTES_ENUM.public.home)} + onClick={() => + navigate(isAdminPath ? ROUTES_ENUM.protected.dashboard : ROUTES_ENUM.public.home) + } > diff --git a/ui/src/views/Dashboard.tsx b/ui/src/views/Dashboard.tsx index f84f6fa6..fb1634d0 100644 --- a/ui/src/views/Dashboard.tsx +++ b/ui/src/views/Dashboard.tsx @@ -5,13 +5,11 @@ const Dashboard = () => { const { translate } = useLocalization() return ( - <> - - + ) } diff --git a/ui/src/views/NotFound.tsx b/ui/src/views/NotFound.tsx index c0853557..d9df357f 100644 --- a/ui/src/views/NotFound.tsx +++ b/ui/src/views/NotFound.tsx @@ -1,5 +1,6 @@ import { ROUTES_ENUM } from '@/routes/route.constant' import { useLocalization } from '@/utils/hooks/useLocalization' +import { Helmet } from 'react-helmet' import { useNavigate } from 'react-router-dom' const NotFoundPage = () => { @@ -11,6 +12,11 @@ const NotFoundPage = () => { return (
+
404 @@ -21,7 +27,9 @@ const NotFoundPage = () => {

-
- {translate('::Abp.Account.Backto')} - {translate('::Abp.Account.SignIn')} -
- - +
+ {emailSent ? ( + <> +

{translate('::Abp.Account.ForgotPassword.Checkyouremail')}

+

{translate('::Abp.Account.ForgotPassword.Checkyouremail.Message')}

+ + ) : ( + <> +

{translate('::Abp.Account.ForgotPassword')}

+

{translate('::Abp.Account.ForgotPassword.Message')}

+ + )} +
+ {message && ( + + {message} + )} - - + { + if (!disableSubmit) { + onSendMail(values, setSubmitting) + } else { + setSubmitting(false) + } + }} + > + {({ touched, errors, isSubmitting, setFieldValue }) => ( +
+ +
+ + + +
+ setFieldValue('captchaResponse', '')} + onExpire={() => setFieldValue('captchaResponse', '')} + onSuccess={(token: string) => setFieldValue('captchaResponse', token)} + /> + +
+ {translate('::Abp.Account.Backto')} + {translate('::Abp.Account.SignIn')} +
+
+
+ )} +
+ + ) } diff --git a/ui/src/views/auth/Login.tsx b/ui/src/views/auth/Login.tsx index efe44237..5579162b 100644 --- a/ui/src/views/auth/Login.tsx +++ b/ui/src/views/auth/Login.tsx @@ -21,6 +21,7 @@ import { useEffect, useRef, useState } from 'react' import { useNavigate } from 'react-router-dom' import * as Yup from 'yup' import { getSubdomain } from '@/utils/subdomain' +import { Helmet } from 'react-helmet' type SignInFormSchema = { userName: string @@ -195,134 +196,141 @@ const Login = () => { : undefined return ( - -
-

{translate('::Abp.Account.WelcomeBack')}

-

{translate('::Abp.Account.WelcomeBack.Message')}

-
+ <> + + +
+

{translate('::Abp.Account.WelcomeBack')}

+

{translate('::Abp.Account.WelcomeBack.Message')}

+
- {isMultiTenant && ( - <> - -
- setTenantName(e.target.value)} - style={tenantStyle} - aria-hidden={subDomainName && subDomainName !== defaultSubDomain ? 'true' : 'false'} - /> -
- - )} -
- - {({ touched, errors, isSubmitting, setFieldValue }) => ( -
- - {!twoFactor && ( - - + +
+ setTenantName(e.target.value)} + style={tenantStyle} + aria-hidden={subDomainName && subDomainName !== defaultSubDomain ? 'true' : 'false'} + /> +
+ + )} +
+ + {({ touched, errors, isSubmitting, setFieldValue }) => ( + + + {!twoFactor && ( + + + + )} + {!twoFactor && ( + + + + )} + {twoFactor && ( + + + + )} + +
+ + {translate('::Abp.Account.RememberMe')} + + + {translate('::Abp.Account.ForgotPassword')} + +
+ {showCaptcha && ( + setFieldValue('captchaResponse', '')} + onExpire={() => setFieldValue('captchaResponse', '')} + onSuccess={(token: string) => setFieldValue('captchaResponse', token)} /> - - )} - {!twoFactor && ( - - - - )} - {twoFactor && ( - - - - )} + )} -
- - {translate('::Abp.Account.RememberMe')} - - - {translate('::Abp.Account.ForgotPassword')} - -
- {showCaptcha && ( - setFieldValue('captchaResponse', '')} - onExpire={() => setFieldValue('captchaResponse', '')} - onSuccess={(token: string) => setFieldValue('captchaResponse', token)} - /> - )} + {message && ( + + {message} + + )} + {error && ( + + {error} + + )} - {message && ( - - {message} - - )} - {error && ( - - {error} - - )} - - -
- {translate('::Abp.Account.SignUp.Message')} - - {translate('::Abp.Account.Register')} - -
-
- - )} -
-
- + +
+ {translate('::Abp.Account.SignUp.Message')} + + {translate('::Abp.Account.Register')} + +
+
+ + )} +
+
+
+ ) } diff --git a/ui/src/views/auth/Register.tsx b/ui/src/views/auth/Register.tsx index 301580ed..049d974a 100644 --- a/ui/src/views/auth/Register.tsx +++ b/ui/src/views/auth/Register.tsx @@ -12,6 +12,7 @@ import { Field, Form, Formik } from 'formik' import { useState } from 'react' import * as Yup from 'yup' import { useLocalization } from '@/utils/hooks/useLocalization' +import { Helmet } from 'react-helmet' type SignUpFormSchema = { password: string @@ -60,7 +61,13 @@ const Register = () => { return ( <> -
+ + +

{translate('::Abp.Account.Register.Title')}

{translate('::Abp.Account.Register.Message')}

diff --git a/ui/src/views/auth/ResetPassword.tsx b/ui/src/views/auth/ResetPassword.tsx index 9d24d831..9ad856d1 100644 --- a/ui/src/views/auth/ResetPassword.tsx +++ b/ui/src/views/auth/ResetPassword.tsx @@ -10,6 +10,7 @@ import useTimeOutMessage from '@/utils/hooks/useTimeOutMessage' import type { AxiosError } from 'axios' import { Field, Form, Formik } from 'formik' import { useState } from 'react' +import { Helmet } from 'react-helmet' import { useNavigate, useSearchParams } from 'react-router-dom' import * as Yup from 'yup' @@ -77,6 +78,11 @@ const ResetPassword = () => { return (
+
{resetComplete ? ( <> diff --git a/ui/src/views/auth/SendConfirmationCode.tsx b/ui/src/views/auth/SendConfirmationCode.tsx index eb74bf5c..d3f18124 100644 --- a/ui/src/views/auth/SendConfirmationCode.tsx +++ b/ui/src/views/auth/SendConfirmationCode.tsx @@ -7,6 +7,7 @@ import { ROUTES_ENUM } from '@/routes/route.constant' import { store } from '@/store' import Captcha from '@/components/shared/Captcha' import { useLocalization } from '@/utils/hooks/useLocalization' +import { Helmet } from 'react-helmet' type FormSchema = { email: string @@ -34,6 +35,12 @@ const SendConfirmationCode = () => { return ( <> + +

{translate('::Abp.Account.SendConfirmationCode')}

{translate('::Abp.Account.SendConfirmationCode.Message')}

@@ -85,7 +92,9 @@ const SendConfirmationCode = () => {
{translate('::Abp.Account.Backto')} - {translate('::Abp.Account.SignIn')} + + {translate('::Abp.Account.SignIn')} +
diff --git a/ui/src/views/auth/VerifyConfirmationCode.tsx b/ui/src/views/auth/VerifyConfirmationCode.tsx index c3168672..14627074 100644 --- a/ui/src/views/auth/VerifyConfirmationCode.tsx +++ b/ui/src/views/auth/VerifyConfirmationCode.tsx @@ -3,6 +3,7 @@ import { Alert, Button } from '@/components/ui' import { useNavigate, useParams } from 'react-router-dom' import useAccount from '@/utils/hooks/useAccount' import { useLocalization } from '@/utils/hooks/useLocalization' +import { Helmet } from 'react-helmet' const VerifyConfirmationCode = () => { const { userId, token } = useParams() @@ -19,6 +20,12 @@ const VerifyConfirmationCode = () => { return ( <> + +
{message && ( diff --git a/ui/src/views/developerKit/DashboardPage.tsx b/ui/src/views/developerKit/DashboardPage.tsx index d0b703d7..68a5b549 100644 --- a/ui/src/views/developerKit/DashboardPage.tsx +++ b/ui/src/views/developerKit/DashboardPage.tsx @@ -2,14 +2,25 @@ import React from 'react' import { EntityProvider } from '@/contexts/EntityContext' import DeveloperLayout from '@/components/layouts/DeveloperLayout' import Dashboard from '@/components/developerKit/Dashboard' +import { useLocalization } from '@/utils/hooks/useLocalization' +import { Helmet } from 'react-helmet' const DashboardPage: React.FC = () => { + const { translate } = useLocalization() + return ( - - - - - + <> + + + + + + + ) } diff --git a/ui/src/views/docs/ChangeLog.tsx b/ui/src/views/docs/ChangeLog.tsx index aac21e69..2dc686e1 100644 --- a/ui/src/views/docs/ChangeLog.tsx +++ b/ui/src/views/docs/ChangeLog.tsx @@ -1,91 +1,81 @@ import AdaptableCard from '@/components/shared/AdaptableCard' import Container from '@/components/shared/Container' +import { useLocalization } from '@/utils/hooks/useLocalization' import type { ReactNode } from 'react' +import { Helmet } from 'react-helmet' type Log = { - version: string - date: string - updateContent: string[] + version: string + date: string + updateContent: string[] } type LogProps = Omit & { - border?: boolean - children?: ReactNode + border?: boolean + children?: ReactNode } const logData: Log[] = [ - { - version: '1.0.3', - date: '04 Şubat 2025', - updateContent: [ - '[Fix] GridBoxEditorComponent bug', - '[Fix] TagBoxEditorComponent bug', - ], - }, - { - version: '1.0.2', - date: '27 Ocak 2025', - updateContent: [ - '[Add] jspdf kurulumu', - '[Add] exceljs kurulumu', - '[Add] file-saver kurulumu', - ], - }, - { - version: '1.0.1', - date: '23 Ocak 2025', - updateContent: [ - '[Fix] Bağımlılık güvenlik açığı', - ], - }, - { - version: '1.0.0', - date: '20 Ocak 2025', - updateContent: [ - '[Update] İlk yeni sürüm', - ], - }, + { + version: '1.0.3', + date: '04 Şubat 2025', + updateContent: ['[Fix] GridBoxEditorComponent bug', '[Fix] TagBoxEditorComponent bug'], + }, + { + version: '1.0.2', + date: '27 Ocak 2025', + updateContent: ['[Add] jspdf kurulumu', '[Add] exceljs kurulumu', '[Add] file-saver kurulumu'], + }, + { + version: '1.0.1', + date: '23 Ocak 2025', + updateContent: ['[Fix] Bağımlılık güvenlik açığı'], + }, + { + version: '1.0.0', + date: '20 Ocak 2025', + updateContent: ['[Update] İlk yeni sürüm'], + }, ] const Log = (props: LogProps) => { - return ( -
-
-
- {props.version} -
- {props.date} -
-
- {props.children} -
-
- ) + return ( +
+
+
{props.version}
+ {props.date} +
+
{props.children}
+
+ ) } const Changelog = () => { - return ( - - -

Platform Güncelleme Günlüğü

- {logData.map((elm) => ( - - {elm.updateContent.length > 0 ? ( -
    - {elm.updateContent.map((item, i) => ( -
  • - {item}
  • - ))} -
- ) : null} -
+ const { translate } = useLocalization() + + return ( + + + +

Platform Güncelleme Günlüğü

+ {logData.map((elm) => ( + + {elm.updateContent.length > 0 ? ( +
    + {elm.updateContent.map((item, i) => ( +
  • - {item}
  • ))} - - - ) +
+ ) : null} +
+ ))} +
+
+ ) } export default Changelog diff --git a/ui/src/views/forum/Forum.tsx b/ui/src/views/forum/Forum.tsx index ee75759e..03621370 100644 --- a/ui/src/views/forum/Forum.tsx +++ b/ui/src/views/forum/Forum.tsx @@ -4,8 +4,12 @@ import React, { useState, useEffect } from 'react' import { useForumData } from './useForumData' import { ForumView } from './forum/ForumView' import { Container } from '@/components/shared' +import { Helmet } from 'react-helmet' +import { useLocalization } from '@/utils/hooks/useLocalization' export function Forum() { + const { translate } = useLocalization() + const { user, tenant } = useStoreState((state) => state.auth) const { categories, @@ -47,6 +51,12 @@ export function Forum() { return ( + + {error && (
diff --git a/ui/src/views/forum/Management.tsx b/ui/src/views/forum/Management.tsx index f171d3c3..5f564e01 100644 --- a/ui/src/views/forum/Management.tsx +++ b/ui/src/views/forum/Management.tsx @@ -2,6 +2,8 @@ import { useEffect } from 'react' import { useForumData } from './useForumData' import { AdminView } from './admin/AdminView' import { Container } from '@/components/shared' +import { Helmet } from 'react-helmet' +import { useLocalization } from '@/utils/hooks/useLocalization' export function Management() { const { @@ -31,6 +33,7 @@ export function Management() { unmarkPostAsAcceptedAnswer, clearError, } = useForumData() + const { translate } = useLocalization() useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { @@ -54,6 +57,12 @@ export function Management() { return ( + + {error && (
diff --git a/ui/src/views/menu/MenuManager.tsx b/ui/src/views/menu/MenuManager.tsx index e84f3e59..bba2d970 100644 --- a/ui/src/views/menu/MenuManager.tsx +++ b/ui/src/views/menu/MenuManager.tsx @@ -4,11 +4,15 @@ import { MenuItem } from '@/@types/menu' import { useMenuData } from '@/utils/hooks/useMenuData' import { AlertCircle, Loader2, Menu, Save } from 'lucide-react' import { Container } from '@/components/shared' +import { Helmet } from 'react-helmet' +import { useLocalization } from '@/utils/hooks/useLocalization' export const MenuManager = () => { const { menuItems, setMenuItems, loading, error, refetch, saveMenuData } = useMenuData() const [isDesignMode, setIsDesignMode] = useState(true) const [isSaving, setIsSaving] = useState(false) + const { translate } = useLocalization() + const [saveMessage, setSaveMessage] = useState<{ type: 'success' | 'error' text: string @@ -78,6 +82,12 @@ export const MenuManager = () => { return ( + +
{/* Sol kısım: Başlık */} diff --git a/ui/src/views/public/About.tsx b/ui/src/views/public/About.tsx index 6a0fadcf..41dc99d4 100644 --- a/ui/src/views/public/About.tsx +++ b/ui/src/views/public/About.tsx @@ -2,6 +2,7 @@ import React from 'react' import { Users, Award, Clock, Globe2 } from 'lucide-react' import { useLocalization } from '@/utils/hooks/useLocalization' import { useCountUp } from '@/utils/hooks/useCountUp' +import { Helmet } from 'react-helmet' const About: React.FC = () => { const { translate } = useLocalization() @@ -12,97 +13,105 @@ const About: React.FC = () => { const countriesCount = useCountUp({ end: 3, duration: 1500 }) return ( -
- {/* Hero Section */} -
-
-
-

- {translate('::Public.about.title')} -

-

{translate('::Public.about.subtitle')}

-
-
+ <> + - {/* Stats Section */} -
-
-
-
- -
- {clientsCount.displayValue} +
+ {/* Hero Section */} +
+
+
+

+ {translate('::Public.about.title')} +

+

{translate('::Public.about.subtitle')}

+
+
+ + {/* Stats Section */} +
+
+
+
+ +
+ {clientsCount.displayValue} +
+
{translate('::Public.about.stats.clients')}
-
{translate('::Public.about.stats.clients')}
-
-
- -
- {experienceCount.displayValue} +
+ +
+ {experienceCount.displayValue} +
+
{translate('::Public.about.stats.experience')}
-
{translate('::Public.about.stats.experience')}
-
-
- -
7/24
-
{translate('::Public.about.stats.support')}
-
-
- -
- {countriesCount.displayValue} +
+ +
7/24
+
{translate('::Public.about.stats.support')}
+
+
+ +
+ {countriesCount.displayValue} +
+
{translate('::Public.about.stats.countries')}
+
+
+
+
+ + {/* Main Content */} +
+
+
+
+

+ {translate('::Public.about.description.part1')} +

+

+ {translate('::Public.about.description.motto')} +

+

+ {translate('::Public.about.description.part2')} +

+

+ {translate('::Public.about.description.closing')} +

+
+
+ +
+
+

+ {translate('::Public.about.mission')} +

+

{translate('::Public.about.mission.desc')}

+
+
+

+ {translate('::Public.about.vision')} +

+

{translate('::Public.about.vision.desc')}

-
{translate('::Public.about.stats.countries')}
- - {/* Main Content */} -
-
-
-
-

- {translate('::Public.about.description.part1')} -

-

- {translate('::Public.about.description.motto')} -

-

- {translate('::Public.about.description.part2')} -

-

- {translate('::Public.about.description.closing')} -

-
-
- -
-
-

- {translate('::Public.about.mission')} -

-

{translate('::Public.about.mission.desc')}

-
-
-

- {translate('::Public.about.vision')} -

-

{translate('::Public.about.vision.desc')}

-
-
-
-
-
+ ) } diff --git a/ui/src/views/public/Blog.tsx b/ui/src/views/public/Blog.tsx index 3b589611..ec3c77c2 100644 --- a/ui/src/views/public/Blog.tsx +++ b/ui/src/views/public/Blog.tsx @@ -1,30 +1,31 @@ -import React, { useEffect, useState } from "react"; -import { Link } from "react-router-dom"; -import { Calendar, Clock, User, Tag, Search } from "lucide-react"; -import { format } from "date-fns"; -import { tr } from "date-fns/locale"; -import { BlogCategory, BlogPost } from "@/proxy/blog/blog"; -import { blogService } from "@/services/blog.service"; -import { useLocalization } from "@/utils/hooks/useLocalization"; +import React, { useEffect, useState } from 'react' +import { Link } from 'react-router-dom' +import { Calendar, Clock, User, Tag, Search } from 'lucide-react' +import { format } from 'date-fns' +import { tr } from 'date-fns/locale' +import { BlogCategory, BlogPost } from '@/proxy/blog/blog' +import { blogService } from '@/services/blog.service' +import { useLocalization } from '@/utils/hooks/useLocalization' +import { Helmet } from 'react-helmet' const Blog = () => { const { translate } = useLocalization() - const [posts, setPosts] = useState([]); - const [categories, setCategories] = useState([]); - const [loading, setLoading] = useState(true); - const [selectedCategory, setSelectedCategory] = useState(""); - const [searchQuery, setSearchQuery] = useState(""); - const [currentPage, setCurrentPage] = useState(1); - const [totalPages, setTotalPages] = useState(1); + const [posts, setPosts] = useState([]) + const [categories, setCategories] = useState([]) + const [loading, setLoading] = useState(true) + const [selectedCategory, setSelectedCategory] = useState('') + const [searchQuery, setSearchQuery] = useState('') + const [currentPage, setCurrentPage] = useState(1) + const [totalPages, setTotalPages] = useState(1) useEffect(() => { - loadBlogData(); - }, [currentPage, selectedCategory]); + loadBlogData() + }, [currentPage, selectedCategory]) const loadBlogData = async () => { try { - setLoading(true); + setLoading(true) const [postsData, categoriesData] = await Promise.all([ blogService.getPosts({ page: currentPage, @@ -33,29 +34,29 @@ const Blog = () => { search: searchQuery, }), blogService.getCategories(), - ]); + ]) - setPosts(postsData.items.filter(a=> a.isPublished)); - setTotalPages(postsData.totalPages); - setCategories(categoriesData.filter(a=> a.isActive)); + setPosts(postsData.items.filter((a) => a.isPublished)) + setTotalPages(postsData.totalPages) + setCategories(categoriesData.filter((a) => a.isActive)) } catch (error) { - console.error("Blog verileri yüklenemedi:", error); - setPosts([]); + console.error('Blog verileri yüklenemedi:', error) + setPosts([]) } finally { - setLoading(false); + setLoading(false) } - }; + } const handleSearch = (e: React.FormEvent) => { - e.preventDefault(); - setCurrentPage(1); - loadBlogData(); - }; + e.preventDefault() + setCurrentPage(1) + loadBlogData() + } const handleCategoryChange = (categoryId: string) => { - setSelectedCategory(categoryId); - setCurrentPage(1); - }; + setSelectedCategory(categoryId) + setCurrentPage(1) + } if (loading && posts.length === 0) { return ( @@ -64,11 +65,16 @@ const Blog = () => {

Blog yazıları yükleniyor...

- ); + ) } return (
+ {/* Hero Section */}
{ style={{ backgroundImage: 'url("https://images.pexels.com/photos/3183164/pexels-photo-3183164.jpeg?auto=compress&cs=tinysrgb&w=1920")', - backgroundSize: "cover", - backgroundPosition: "center", + backgroundSize: 'cover', + backgroundPosition: 'center', }} >
-

{translate('::Public.blog.title')}

+

+ {translate('::Public.blog.title')} +

{translate('::Public.blog.subtitle')}

@@ -107,11 +115,11 @@ const Blog = () => { {/* Category Filter */}
))}
@@ -138,24 +146,16 @@ const Blog = () => {
{!Array.isArray(posts) || posts.length === 0 ? (
-

- Henüz blog yazısı bulunmuyor. -

+

Henüz blog yazısı bulunmuyor.

) : (
{posts.map((post) => ( - +
{post.title} @@ -167,7 +167,9 @@ const Blog = () => {

{translate('::Public.' + post.title)}

-

{translate('::Public.' + post.summary)}

+

+ {translate('::Public.' + post.summary)} +

{/* Tags */} {post.tags.length > 0 && ( @@ -191,11 +193,9 @@ const Blog = () => {
- {format( - new Date(post.publishedAt || post.creationTime), - "dd MMM yyyy", - { locale: tr } - )} + {format(new Date(post.publishedAt || post.creationTime), 'dd MMM yyyy', { + locale: tr, + })}
@@ -223,8 +223,8 @@ const Blog = () => { onClick={() => setCurrentPage(i + 1)} className={`px-4 py-2 rounded-lg ${ currentPage === i + 1 - ? "bg-blue-600 text-white" - : "border border-gray-300 hover:bg-gray-50" + ? 'bg-blue-600 text-white' + : 'border border-gray-300 hover:bg-gray-50' }`} > {i + 1} @@ -232,9 +232,7 @@ const Blog = () => { ))}
- ); -}; + ) +} -export default Blog; +export default Blog diff --git a/ui/src/views/public/BlogDetail.tsx b/ui/src/views/public/BlogDetail.tsx index 89ea925c..fdfad4bb 100644 --- a/ui/src/views/public/BlogDetail.tsx +++ b/ui/src/views/public/BlogDetail.tsx @@ -7,6 +7,7 @@ import { blogService } from '@/services/blog.service' import { useLocalization } from '@/utils/hooks/useLocalization' import { useStoreState } from '@/store/store' import { ROUTES_ENUM } from '@/routes/route.constant' +import { Helmet } from 'react-helmet' interface PostData { image?: string @@ -78,9 +79,17 @@ const BlogDetail: React.FC = () => { return (
+
- + ← {translate('::Public.blog.backToBlog')} {postData.image && ( @@ -90,7 +99,9 @@ const BlogDetail: React.FC = () => { className="w-full h-96 object-cover rounded-lg mb-8" /> )} -

{translate('::Public.' + blogPost.title)}

+

+ {translate('::Public.' + blogPost.title)} +

{postData.author?.name} @@ -105,7 +116,10 @@ const BlogDetail: React.FC = () => {
diff --git a/ui/src/views/public/Checkout.tsx b/ui/src/views/public/Checkout.tsx index 6a1d229b..e6904c87 100644 --- a/ui/src/views/public/Checkout.tsx +++ b/ui/src/views/public/Checkout.tsx @@ -8,12 +8,16 @@ import { removeItemFromCart, updateCartItemQuantity, } from '@/utils/cartUtils' +import { useLocalization } from '@/utils/hooks/useLocalization' import React, { useState, useEffect } from 'react' +import { Helmet } from 'react-helmet' import { useNavigate } from 'react-router-dom' const Checkout: React.FC = () => { const navigate = useNavigate() const [isCartOpen, setIsCartOpen] = useState(false) + const { translate } = useLocalization() + const [cartState, setCartState] = useState(() => { const savedCart = localStorage.getItem('cartState') return savedCart ? JSON.parse(savedCart) : initialCartState @@ -55,6 +59,12 @@ const Checkout: React.FC = () => { return (
+ + {/* Hero Section */}
{ const { translate } = useLocalization() return (
+ + {/* Hero Section */}
{ style={{ backgroundImage: 'url("https://images.pexels.com/photos/3183171/pexels-photo-3183171.jpeg?auto=compress&cs=tinysrgb&w=1920")', - backgroundSize: "cover", - backgroundPosition: "center", + backgroundSize: 'cover', + backgroundPosition: 'center', }} >
-

{translate('::Public.contact.title')}

+

+ {translate('::Public.contact.title')} +

{translate('::Public.contact.subtitle')}

@@ -46,9 +55,7 @@ const Contact: React.FC = () => {
-

- {translate('::Public.contact.address.full')} -

+

{translate('::Public.contact.address.full')}

@@ -96,9 +103,7 @@ const Contact: React.FC = () => { className="w-24 object-contain mt-1 flex-shrink-0" />
-

- Özlem Öztürk -

+

Özlem Öztürk

03663 / Enpara
@@ -163,7 +168,7 @@ const Contact: React.FC = () => {

- ); -}; + ) +} -export default Contact; +export default Contact diff --git a/ui/src/views/public/Home.tsx b/ui/src/views/public/Home.tsx index d11da8cc..3ffb7f41 100644 --- a/ui/src/views/public/Home.tsx +++ b/ui/src/views/public/Home.tsx @@ -17,46 +17,123 @@ import { } from 'lucide-react' import { useLocalization } from '@/utils/hooks/useLocalization' import { ROUTES_ENUM } from '@/routes/route.constant' +import { Helmet } from 'react-helmet' const Home: React.FC = () => { const { translate } = useLocalization() const features = [ - { icon: , title: translate('::Public.features.reliable'), description: translate('::Public.features.reliable.desc') }, - { icon: , title: translate('::Public.features.rapid'), description: translate('::Public.features.rapid.desc') }, - { icon: , title: translate('::Public.features.expert'), description: translate('::Public.features.expert.desc') }, - { icon: , title: translate('::Public.features.muhasebe'), description: translate('::Public.features.muhasebe.desc') }, - { icon: , title: translate('::Public.features.iletisim'), description: translate('::Public.features.iletisim.desc') }, - { icon: , title: translate('::Public.features.mobil'), description: translate('::Public.features.mobil.desc') }, - { icon: , title: translate('::Public.features.scalable'), description: translate('::Public.features.scalable.desc') }, - { icon: , title: translate('::Public.features.guvenlik'), description: translate('::Public.features.guvenlik.desc') }, + { + icon: , + title: translate('::Public.features.reliable'), + description: translate('::Public.features.reliable.desc'), + }, + { + icon: , + title: translate('::Public.features.rapid'), + description: translate('::Public.features.rapid.desc'), + }, + { + icon: , + title: translate('::Public.features.expert'), + description: translate('::Public.features.expert.desc'), + }, + { + icon: , + title: translate('::Public.features.muhasebe'), + description: translate('::Public.features.muhasebe.desc'), + }, + { + icon: , + title: translate('::Public.features.iletisim'), + description: translate('::Public.features.iletisim.desc'), + }, + { + icon: , + title: translate('::Public.features.mobil'), + description: translate('::Public.features.mobil.desc'), + }, + { + icon: , + title: translate('::Public.features.scalable'), + description: translate('::Public.features.scalable.desc'), + }, + { + icon: , + title: translate('::Public.features.guvenlik'), + description: translate('::Public.features.guvenlik.desc'), + }, ] const solutions = [ - { icon: , title: translate('::Public.solutions.web.title'), description: translate('::Public.solutions.web.desc'), color: 'bg-blue-600' }, - { icon: , title: translate('::Public.solutions.mobile.title'), description: translate('::Public.solutions.mobile.desc'), color: 'bg-purple-600' }, - { icon: , title: translate('::Public.solutions.custom.title'), description: translate('::Public.solutions.custom.desc'), color: 'bg-green-600' }, - { icon: , title: translate('::Public.solutions.database.title'), description: translate('::Public.solutions.database.desc'), color: 'bg-red-600' }, + { + icon: , + title: translate('::Public.solutions.web.title'), + description: translate('::Public.solutions.web.desc'), + color: 'bg-blue-600', + }, + { + icon: , + title: translate('::Public.solutions.mobile.title'), + description: translate('::Public.solutions.mobile.desc'), + color: 'bg-purple-600', + }, + { + icon: , + title: translate('::Public.solutions.custom.title'), + description: translate('::Public.solutions.custom.desc'), + color: 'bg-green-600', + }, + { + icon: , + title: translate('::Public.solutions.database.title'), + description: translate('::Public.solutions.database.desc'), + color: 'bg-red-600', + }, ] return (
+ {/* Hero */}
-
+
-

{translate('::Public.hero.title')}

-

{translate('::Public.hero.subtitle')}

+

+ {translate('::Public.hero.title')} +

+

+ {translate('::Public.hero.subtitle')} +

- - {translate('::Public.hero.cta.consultation')} + + {translate('::Public.hero.cta.consultation')}{' '} + - + {translate('::Public.hero.cta.discover')}
@@ -64,17 +141,23 @@ const Home: React.FC = () => {
-

{translate('::Public.hero.service1.title')}

+

+ {translate('::Public.hero.service1.title')} +

{translate('::Public.hero.service1.desc')}

-

{translate('::Public.hero.service2.title')}

+

+ {translate('::Public.hero.service2.title')} +

{translate('::Public.hero.service2.desc')}

-

{translate('::Public.hero.service3.title')}

+

+ {translate('::Public.hero.service3.title')} +

{translate('::Public.hero.service3.desc')}

@@ -86,13 +169,20 @@ const Home: React.FC = () => {
-

{translate('::Public.features.title')}

-

{translate('::Public.features.subtitle')}

+

+ {translate('::Public.features.title')} +

+

+ {translate('::Public.features.subtitle')} +

{features.map((feature, i) => ( -
+
{feature.icon}

{feature.title}

{feature.description}

@@ -106,13 +196,20 @@ const Home: React.FC = () => {
-

{translate('::Public.solutions.title')}

-

{translate('::Public.solutions.subtitle')}

+

+ {translate('::Public.solutions.title')} +

+

+ {translate('::Public.solutions.subtitle')} +

{solutions.map((s, i) => ( -
+
{s.icon}

{s.title}

@@ -127,9 +224,14 @@ const Home: React.FC = () => { {/* Call to Action */}
-

{translate('::Public.common.getStarted')}

+

+ {translate('::Public.common.getStarted')} +

{translate('::Public.common.contact')}

- + {translate('::Public.common.learnMore')}
diff --git a/ui/src/views/public/Payment.tsx b/ui/src/views/public/Payment.tsx index 394b03da..f5410e21 100644 --- a/ui/src/views/public/Payment.tsx +++ b/ui/src/views/public/Payment.tsx @@ -10,7 +10,9 @@ import { removeItemFromCart, updateCartItemQuantity, } from '@/utils/cartUtils' +import { useLocalization } from '@/utils/hooks/useLocalization' import React, { useState, useEffect } from 'react' +import { Helmet } from 'react-helmet' import { useNavigate } from 'react-router-dom' const Payment: React.FC = () => { @@ -18,6 +20,7 @@ const Payment: React.FC = () => { const [tenant, setTenant] = useState(null) const [isCartOpen, setIsCartOpen] = useState(false) const [cartState, setCartState] = useState(initialCartState) + const { translate } = useLocalization() useEffect(() => { const tenantData = localStorage.getItem('tenantData') // ✅ güncellendi @@ -109,6 +112,12 @@ const Payment: React.FC = () => { return (
+ + {/* Hero Section */}
{ const [searchQuery, setSearchQuery] = useState('') const [isCartOpen, setIsCartOpen] = useState(false) + const { translate } = useLocalization() + const [cartState, setCartState] = useState(() => { // Load cart state from localStorage if available const savedCart = localStorage.getItem('cartState') @@ -70,6 +74,12 @@ const Products: React.FC = () => { return (
+ + {/* Hero Section */}
{ const { translate } = useLocalization() @@ -88,7 +81,7 @@ const Services: React.FC = () => { translate('::Public.services.consulting.features.training'), ], }, - ]; + ] const supportPlans = [ { @@ -127,10 +120,16 @@ const Services: React.FC = () => { translate('::Public.services.support.sms.features.api'), ], }, - ]; + ] return (
+ + {/* Hero Section */}
{ style={{ backgroundImage: 'url("https://images.pexels.com/photos/3183173/pexels-photo-3183173.jpeg?auto=compress&cs=tinysrgb&w=1920")', - backgroundSize: "cover", - backgroundPosition: "center", + backgroundSize: 'cover', + backgroundPosition: 'center', }} >
-

{translate('::Public.services.title')}

+

+ {translate('::Public.services.title')} +

{translate('::Public.services.subtitle')}

@@ -158,16 +159,11 @@ const Services: React.FC = () => { className="bg-white rounded-xl shadow-lg p-8 hover:shadow-xl transition-shadow" >
{service.icon}
-

- {service.title} -

+

{service.title}

{service.description}

    {service.features.map((feature, fIndex) => ( -
  • +
  • {feature}
  • @@ -187,18 +183,12 @@ const Services: React.FC = () => {
    {supportPlans.map((plan, index) => ( -
    +

    {plan.title}

      {plan.features.map((feature, fIndex) => ( -
    • +
    • {feature}
    • @@ -219,7 +209,9 @@ const Services: React.FC = () => { {/* Call to Action */}
      -

      {translate('::Public.services.cta.title')}

      +

      + {translate('::Public.services.cta.title')} +

      {translate('::Public.services.cta.description')}

      @@ -232,7 +224,7 @@ const Services: React.FC = () => {
    - ); -}; + ) +} -export default Services; +export default Services diff --git a/ui/src/views/public/Success.tsx b/ui/src/views/public/Success.tsx index 66cfc697..ea31242d 100644 --- a/ui/src/views/public/Success.tsx +++ b/ui/src/views/public/Success.tsx @@ -1,10 +1,13 @@ import { OrderSuccess } from '@/components/orders/OrderSuccess' +import { useLocalization } from '@/utils/hooks/useLocalization' import React, { useState, useEffect } from 'react' +import { Helmet } from 'react-helmet' import { useNavigate } from 'react-router-dom' const Success: React.FC = () => { const navigate = useNavigate() const [orderId, setOrderId] = useState('') + const { translate } = useLocalization() useEffect(() => { // Get order ID from local storage @@ -28,6 +31,11 @@ const Success: React.FC = () => { return (
    +
    {