diff --git a/company/.env b/company/.env index 8a5f9aa2..b75ab81b 100644 --- a/company/.env +++ b/company/.env @@ -1 +1,3 @@ -VITE_API_BASE_URL='https://localhost:44344' \ No newline at end of file +VITE_APPLICATION_BASEURL='http://localhost:3003/' +VITE_API_URL='https://localhost:44344' +VITE_KURS_URL='http://localhost:3000/' diff --git a/company/.env.dev b/company/.env.dev index 9e52720a..3cc3786b 100644 --- a/company/.env.dev +++ b/company/.env.dev @@ -1 +1,3 @@ -VITE_API_BASE_URL='https://kurs-dev-api.sozsoft.com' +VITE_APPLICATION_BASEURL='https://sozsoft.com' +VITE_API_URL='https://kurs-dev-api.sozsoft.com' +VITE_KURS_URL='https://kurs-dev.sozsoft.com' diff --git a/company/.env.production b/company/.env.production index c6242c12..2c58f138 100644 --- a/company/.env.production +++ b/company/.env.production @@ -1 +1,3 @@ -VITE_API_BASE_URL='https://kurs-api.sozsoft.com' +VITE_APPLICATION_BASEURL='https://sozsoft.com' +VITE_API_URL='https://kurs-api.sozsoft.com' +VITE_KURS_URL='https://kurs.sozsoft.com' diff --git a/company/src/App.tsx b/company/src/App.tsx index bc74943a..345ea0e4 100644 --- a/company/src/App.tsx +++ b/company/src/App.tsx @@ -24,7 +24,7 @@ function App() { } /> } /> } /> - } /> {/* Eşleşmeyen tüm yollar için 404 sayfasını göster */} + } /> diff --git a/company/src/components/layout/Header.tsx b/company/src/components/layout/Header.tsx index 7a0b661b..7c88daba 100644 --- a/company/src/components/layout/Header.tsx +++ b/company/src/components/layout/Header.tsx @@ -31,7 +31,7 @@ const Header: React.FC = () => { { name: t("nav.services"), path: "/services" }, { name: t("nav.blog"), path: "/blog" }, { name: t("nav.contact"), path: "/contact" }, - { name: t("nav.demo"), path: "https://kurs.sozsoft.com" }, + { name: t("nav.demo"), path: import.meta.env.VITE_KURS_URL }, ]; return ( diff --git a/company/src/context/LanguageContext.tsx b/company/src/context/LanguageContext.tsx index 57c8ae4a..1c0617e1 100644 --- a/company/src/context/LanguageContext.tsx +++ b/company/src/context/LanguageContext.tsx @@ -277,7 +277,7 @@ const translations = { "contact.info.title": "İletişim Bilgileri", "contact.address": "Adres", "contact.address.full": - "Barbaros Mah. Ahlat Sok. Varyap Meridian Sitesi D1 Blok Daire 115 Kat 14 PK:34746 Ataşehir İstanbul", + "Esenşehir Mah. Baraj Yolu Cad. Kemerdere Mevkii No:17 Ağaoglu Eltes Güneşi Sitesi C5 Blok Daire 36 PK:34776 Ümraniye İstanbul", "contact.phone": "Telefon", "contact.email": "E-posta", "contact.taxOffice": "Vergi Dairesi", @@ -386,7 +386,7 @@ const translations = { "footer.quickLinksTitle": "Hızlı Bağlantılar", "footer.servicesTitle": "Hizmetlerimiz", "footer.address": - "Barbaros Mah. Ahlat Sok. Varyap Meridian Sitesi D1 Blok Daire 115 Kat 14 PK:34746 Ataşehir İstanbul", + "Esenşehir Mah. Baraj Yolu Cad. Kemerdere Mevkii No:17 Ağaoglu Eltes Güneşi Sitesi C5 Blok Daire 36 PK:34776 Ümraniye İstanbul", "footer.copyright": "Tüm hakları saklıdır.", "footer.privacyPolicy": "Gizlilik Politikası", "footer.termsOfUse": "Kullanım Şartları", @@ -668,7 +668,7 @@ const translations = { "contact.info.title": "Contact Information", "contact.address": "Address", "contact.address.full": - "Barbaros Mah. Ahlat Sok. Varyap Meridian Sitesi D1 Blok Daire 115 Kat 14 PK:34746 Ataşehir İstanbul", + "Esenşehir Mah. Baraj Yolu Cad. Kemerdere Mevkii No:17 Ağaoglu Eltes Güneşi Sitesi C5 Blok Daire 36 PK:34776 Ümraniye İstanbul", "contact.phone": "Phone", "contact.email": "Email", "contact.taxOffice": "Tax Office", @@ -776,7 +776,7 @@ const translations = { "footer.quickLinksTitle": "Quick Links", "footer.servicesTitle": "Our Services", "footer.address": - "Barbaros Mah. Ahlat Sok. Varyap Meridian Sitesi D1 Blok Daire 115 Kat 14 PK:34746 Ataşehir İstanbul", + "Esenşehir Mah. Baraj Yolu Cad. Kemerdere Mevkii No:17 Ağaoglu Eltes Güneşi Sitesi C5 Blok Daire 36 PK:34776 Ümraniye İstanbul", "footer.copyright": "All rights reserved.", "footer.privacyPolicy": "Privacy Policy", "footer.termsOfUse": "Terms of Use", diff --git a/company/src/pages/Contact.tsx b/company/src/pages/Contact.tsx index 2836408a..d359c253 100644 --- a/company/src/pages/Contact.tsx +++ b/company/src/pages/Contact.tsx @@ -38,8 +38,8 @@ const Contact: React.FC = () => { const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); - const apiUrl = `${import.meta.env.VITE_API_BASE_URL}/api/app/demo/demo-form`; - + const apiUrl = `${import.meta.env.VITE_API_URL}/api/app/demo/demo-form`; + try { const response = await fetch(apiUrl, { method: "POST", diff --git a/company/src/vite-env.d.ts b/company/src/vite-env.d.ts index 11f02fe2..b473e410 100644 --- a/company/src/vite-env.d.ts +++ b/company/src/vite-env.d.ts @@ -1 +1,11 @@ /// + +interface ImportMetaEnv { + readonly VITE_APPLICATION_BASEURL: string + readonly VITE_API_URL: string + readonly VITE_KURS_URL: string +} + +interface ImportMeta { + readonly env: ImportMetaEnv +} diff --git a/company/tsconfig.app.json b/company/tsconfig.app.json index f0a23505..a2e8471f 100644 --- a/company/tsconfig.app.json +++ b/company/tsconfig.app.json @@ -20,5 +20,5 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, - "include": ["src"] + "include": ["src", "src/vite-env.d.ts"] } diff --git a/ui/.env b/ui/.env index 07a197e1..8a270afc 100644 --- a/ui/.env +++ b/ui/.env @@ -11,4 +11,5 @@ VITE_API_URL='https://localhost:44344/' API_ROOTNAMESPACE='Kurs.Platform' VITE_CDN_URL='http://localhost:4005' VITE_REACT_APP_VERSION=$npm_package_version -VITE_AI_URL='https://ai.sozsoft.com/webhook/' \ No newline at end of file +VITE_AI_URL='https://ai.sozsoft.com/webhook/' +VITE_COMPANY_URL='http://localhost:3003' \ No newline at end of file diff --git a/ui/.env.dev b/ui/.env.dev index 849c5283..7592753b 100644 --- a/ui/.env.dev +++ b/ui/.env.dev @@ -9,4 +9,5 @@ OAUTH_SCOPE='offline_access Platform' OAUTH_REQUIREHTTPS=true VITE_API_URL='https://kurs-dev-api.sozsoft.com/' API_ROOTNAMESPACE='Kurs.Platform' -VITE_CDN_URL='https://kurs-dev-cdn.sozsoft.com' \ No newline at end of file +VITE_CDN_URL='https://kurs-dev-cdn.sozsoft.com' +VITE_COMPANY_URL='https://sozsoft.com' diff --git a/ui/.env.production b/ui/.env.production index ebd6b0be..fae15026 100644 --- a/ui/.env.production +++ b/ui/.env.production @@ -9,4 +9,5 @@ OAUTH_SCOPE='offline_access Platform' OAUTH_REQUIREHTTPS=true VITE_API_URL='https://kurs-api.sozsoft.com/' API_ROOTNAMESPACE='Kurs.Platform' -VITE_CDN_URL='https://kurs-cdn.sozsoft.com' \ No newline at end of file +VITE_CDN_URL='https://kurs-cdn.sozsoft.com' +VITE_COMPANY_URL='https://sozsoft.com' diff --git a/ui/dev-dist/sw.js b/ui/dev-dist/sw.js index 8a12b39a..9892bb3d 100644 --- a/ui/dev-dist/sw.js +++ b/ui/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.952ffulqdco" + "revision": "0.ahaqbcsu15g" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/ui/src/components/layouts/AuthLayout/Simple.tsx b/ui/src/components/layouts/AuthLayout/Simple.tsx index 796f24d8..1ef2fbd1 100644 --- a/ui/src/components/layouts/AuthLayout/Simple.tsx +++ b/ui/src/components/layouts/AuthLayout/Simple.tsx @@ -16,7 +16,7 @@ const Simple = ({ children, content, ...rest }: SimpleProps) => { diff --git a/ui/src/views/auth/Login.tsx b/ui/src/views/auth/Login.tsx index 5753b667..67f97574 100644 --- a/ui/src/views/auth/Login.tsx +++ b/ui/src/views/auth/Login.tsx @@ -49,7 +49,6 @@ const validationSchema = Yup.object().shape({ }) const Login = () => { - const [loading, setLoading] = useState(false) const navigate = useNavigate() const isMultiTenant = useStoreState((a) => a.abpConfig.config?.multiTenancy.isEnabled) const { setTenantId } = useStoreActions((a) => a.auth) @@ -178,23 +177,6 @@ const Login = () => { setSubmitting(false) } - const CustomControl = ({ children, ...props }: any) => { - const selected = props.getValue()[0] - return ( - - {selected && ( - - )} - {children} - - ) - } - const CustomSingleValue = ({ data, ...props }: any) => { return ( @@ -245,6 +227,7 @@ const Login = () => { const { config } = useStoreState((state) => state.abpConfig) const { setLang } = useStoreActions((actions) => actions.locale) + const currentCulture = config?.localization?.currentCulture?.cultureName const languageList = config?.localization.languages const languageOptions = useMemo(() => { @@ -258,18 +241,10 @@ const Login = () => { ) }, [languageList]) - const [selectedLang, setSelectedLang] = useState(() => { - const currentCulture = config?.localization?.currentCulture?.cultureName - return languageOptions.find((lang) => lang.cultureName === currentCulture) || null - }) - const onLanguageSelect = (cultureName = appConfig.locale) => { - setLoading(true) - const dispatchLang = () => { i18n.changeLanguage(cultureName) setLang(cultureName) - setLoading(false) } if (dateLocales[cultureName]) { @@ -297,6 +272,8 @@ const Login = () => { } }, [isMultiTenant]) + console.log(currentCulture) + return ( { Option: CustomSelectOption, SingleValue: CustomSingleValue, }} - defaultValue={selectedLang} + value={languageOptions.find((lang) => lang.cultureName === currentCulture)} onChange={(option) => onLanguageSelect(option?.value)} className="mb-4" /> diff --git a/ui/src/vite-env.d.ts b/ui/src/vite-env.d.ts index d70433c7..619e73c3 100644 --- a/ui/src/vite-env.d.ts +++ b/ui/src/vite-env.d.ts @@ -15,6 +15,7 @@ interface ImportMetaEnv { readonly VITE_CDN_URL: string readonly VITE_REACT_APP_VERSION: string readonly VITE_AI_URL: string + readonly VITE_COMPANY_URL: string } interface ImportMeta {