Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/game_craft/lib/store/purchases/purchases.thunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import { createAppAsyncThunk } from "../createAppAsyncThunk";
import { PurchasesResponse } from "@ssc/core";
import {eventId} from "../../utils/constants";

export const fetchPurchasesThunk = createAppAsyncThunk(
"purchases/fetchPurchases",
async (_, thunkAPI) => {
try {
const response = await thunkAPI.extra.Api.purchases.fetchPurchases();
const response = await thunkAPI.extra.Api.purchases.fetchPurchases(eventId);
const data = response.data.data;
return thunkAPI.fulfillWithValue(data);
} catch (error) {
Expand Down
7 changes: 2 additions & 5 deletions apps/level_up/app/[locale]/(public)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
"use client";

import { Flex, theme } from "antd";
import { GameCraftTimeline } from "../../../components/features/Timeline";
import { GameCraftIntro } from "../../../components/features/home/GameCraftIntro";
import { Prizes } from "../../../components/features/home/Prizes";
import { AboutUs } from "../../../components/features/home/AboutUs";
import { OfflineWorkshop } from "../../../components/features/workshops/OfflineWorkshop";
import { OnlineWorkshop } from "../../../components/features/workshops/OnlineWorkshop";
Expand Down Expand Up @@ -47,7 +45,6 @@ export default function HomePage() {
{/*<Prizes padding={homeViewPadding} backgroundColor={token.colorBgBase} />*/}

{/* Workshop Sections - Matching React order exactly */}
<div/>
<Wave
width="100%"
height="auto"
Expand All @@ -70,10 +67,10 @@ export default function HomePage() {
backgroundColor={token.colorPrimary}
/>

{/* Sponsors Section */}
{/*Sponsors Section*/}
{/*<Sponsors*/}
{/* padding={homeViewPadding}*/}
{/* backgroundColor={token.colorPrimary}*/}
{/* backgroundColor={customColors.colorOfflineWorkshop}*/}
{/*/>*/}
<Wave width="100%" height="auto" fill={token.colorPrimary} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface Props {
}

export function CompetitionsList({
padding = "3rem 2rem",
padding = "2rem 2rem",
backgroundColor,
dashboardMode = false,
}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ import { useEffect, useMemo, useState } from "react";
import { PresentationsList, PresentationType } from "@ssc/core";
import { clientApi } from "lib/api/client/clientApi";
import { eventId } from "lib/utils/constants";
import Wave from "../../common/Wave";
import {customColors} from "../../../config/colors";

interface OfflineWorkshopProps {
padding?: string;
backgroundColor?: string;
}

export function OfflineWorkshop({
padding = "3rem 2rem",
padding = "2rem 2rem",
backgroundColor,
}: OfflineWorkshopProps) {
const screens = useResponsive();
Expand Down
16 changes: 12 additions & 4 deletions apps/level_up/components/features/workshops/OnlineWorkshop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useEffect, useMemo, useState } from "react";
import { PresentationsList, PresentationType } from "@ssc/core";
import { clientApi } from "lib/api/client/clientApi";
import { eventId } from "lib/utils/constants";
import {customColors} from "../../../config/colors";

const { useToken } = theme;

Expand All @@ -18,7 +19,7 @@ interface OnlineWorkshopProps {
}

export function OnlineWorkshop({
padding = "3rem 2rem",
padding = "2rem 2rem",
backgroundColor,
}: OnlineWorkshopProps) {
const { token } = useToken();
Expand Down Expand Up @@ -101,7 +102,7 @@ export function OnlineWorkshop({
backgroundColor: backgroundColor,
}}
>
<Wave width="100%" height="auto" fill="#4F7B79" />
<Wave width="100%" height="auto" fill={customColors.colorOfflineWorkshop} />
<Flex
vertical
align="center"
Expand All @@ -115,7 +116,7 @@ export function OnlineWorkshop({
<Typography.Title
level={screens.md ? 1 : 2}
style={{
margin: 0,
marginTop: "2rem",
fontWeight: 900,
color: "white",
textAlign: "center",
Expand All @@ -124,7 +125,14 @@ export function OnlineWorkshop({
{t("workshop.presentations")}
</Typography.Title>

{content}
<Flex
style={{
marginBottom: "2rem",
}}
>
{content}
</Flex>

</Flex>
<Wave
width="100%"
Expand Down
26 changes: 14 additions & 12 deletions apps/level_up/components/providers/AntDesignProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ const lightTheme = {
fontFamily: "var(--font-estedad), var(--font-vazirmatn), sans-serif",
borderRadius: 16,
colorPrimary: customColors.colorPrimary,
// colorInfo: customColors.colorPrimary,
colorAction: customColors.colorAction,
colorOfflineWorkshop: customColors.colorOfflineWorkshop,
colorInfo: customColors.colorPrimary,
colorSuccess: customColors.colorAction,
colorWarning: "#faad14",
colorError: "#ff4d4f",
colorBgBase: "#ffffff",
colorBgContainer: "#ffffff",
colorBgElevated: "#ffffff",
colorWarning: "#F59E0B",
colorError: "#EF4444",
colorBgBase: "#FFFFFF",
colorBgContainer: "#FFFFFF",
colorBgElevated: "#FFFFFF",
colorText: "#000000d9",
colorTextSecondary: "#00000073",
},
Expand All @@ -38,17 +40,17 @@ const lightTheme = {
},
Button: {
colorPrimary: customColors.colorPrimary,
colorPrimaryHover: "#4c4a8d",
colorPrimaryActive: "#2c2a6d",
colorPrimaryHover: "#2A2A68",
colorPrimaryActive: "#15153A",
},
Layout: {
headerBg: customColors.colorPrimary,
bodyBg: "#f5f5f5",
bodyBg: "#F3F4F6",
},
Switch: {},
Collapse: {},
Message: {
colorBgBase: "#ffffff",
colorBgBase: "#FFFFFF",
},
},
};
Expand All @@ -59,14 +61,14 @@ export const darkTheme = {
...lightTheme.token,
colorBgBase: "#1E1E1E",
colorBgContainer: "#262626",
colorBgElevated: "#2a2a2a",
colorBgElevated: "#2A2A2A",
colorText: "#ffffffd9",
colorTextSecondary: "#ffffff73",
},
components: {
...lightTheme.components,
Layout: {
headerBg: "#3c3a7d",
headerBg: customColors.colorPrimary,
bodyBg: "#1E1E1E",
},
Message: {
Expand Down
7 changes: 4 additions & 3 deletions apps/level_up/config/colors.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Custom brand colors for the application
export const customColors = {
colorAction: "#01B582", // Brand action color
colorPrimary: "#3c3a7d", // Primary brand color
colorOfflineWorkshop: "#4F7B79", // Offline workshop background color
colorAction: "#FF6B35", // Bright orange-red action
colorPrimary: "#1E1E5A", // Deep royal navy
colorOfflineWorkshop: "#3C4F76", // Cool blue-gray
} as const;


export type CustomColors = typeof customColors;
3 changes: 2 additions & 1 deletion apps/level_up/lib/store/purchases/purchases.thunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import { createAppAsyncThunk } from "../createAppAsyncThunk";
import { PurchasesResponse } from "@ssc/core";
import {eventId} from "../../utils/constants";

export const fetchPurchasesThunk = createAppAsyncThunk(
"purchases/fetchPurchases",
async (_, thunkAPI) => {
try {
const response = await thunkAPI.extra.Api.purchases.fetchPurchases();
const response = await thunkAPI.extra.Api.purchases.fetchPurchases(eventId);
const data = response.data.data;
return thunkAPI.fulfillWithValue(data);
} catch (error) {
Expand Down
6 changes: 3 additions & 3 deletions apps/level_up/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@
"offlineWorkshops": "In-Person Workshops",
"free": "Free",
"error": "Failed to load workshops",
"noWorkshops": "No workshops available",
"noOnlineWorkshops": "No online workshops are currently available",
"noOfflineWorkshops": "No in-person workshops are currently available",
"noWorkshops": "No Items available",
"noOnlineWorkshops": "No items are currently available.",
"noOfflineWorkshops": "No items are currently available.",
"viewDetails": "View Details",
"capacity": "Total Capacity",
"teamsCapacity": "Teams Total Capacity",
Expand Down
6 changes: 3 additions & 3 deletions apps/level_up/messages/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@
"offlineWorkshops": "کارگاه‌های حضوری",
"free": "رایگان",
"error": "خطا در بارگذاری کارگاه‌ها",
"noWorkshops": "کارگاهی موجود نیست",
"noOnlineWorkshops": "در حال حاضر هیچ کارگاه آنلاینی موجود نیست",
"noOfflineWorkshops": "در حال حاضر هیچ کارگاه حضوری موجود نیست",
"noWorkshops": "آیتمی موجود نیست.",
"noOnlineWorkshops": "در حال حاضر هیچ آیتمی موجود نیست.",
"noOfflineWorkshops": "در حال حاضر هیچ آیتمی موجود نیست.",
"viewDetails": "جزئیات بیشتر",
"capacity": "ظرفیت کل",
"teamsCapacity": "ظرفیت کل تیم ها",
Expand Down
48 changes: 22 additions & 26 deletions apps/level_up/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,32 @@ const config: Config = {
"sf-pro": ["SF Pro Rounded", "sans-serif"],
},
colors: {
// Your custom brand colors
primary: "#0056D2", // Bright blue
action: "#00C897", // Fresh green accent
"offline-workshop": "#4E6E81", // Muted teal
primary: "#4B164C",
action: "#E83E8C",
"offline-workshop": "#5C4D7D",

// Ant Design theme colors extracted from provider
"antd-primary": "#0056D2",
"antd-primary-hover": "#1E6DEB",
"antd-primary-active": "#0041A8",
"antd-success": "#00C897",
"antd-warning": "#FFC93C",
"antd-error": "#FF5A5F",
"antd-primary": "#4B164C",
"antd-primary-hover": "#662566",
"antd-primary-active": "#351034",
"antd-success": "#22C55E",
"antd-warning": "#FACC15",
"antd-error": "#F43F5E",

// Light theme colors
"antd-bg-base": "#ffffff",
"antd-bg-container": "#f9fafb",
"antd-bg-elevated": "#ffffff",
"antd-text": "#1a1a1a",
"antd-text-secondary": "#4b5563",
"antd-layout-header": "#0056D2",
"antd-layout-body": "#f4f6f8",
"antd-bg-base": "#FFFFFF",
"antd-bg-container": "#F9F7FB",
"antd-bg-elevated": "#FFFFFF",
"antd-text": "#1E1B1B",
"antd-text-secondary": "#575369",
"antd-layout-header": "#4B164C",
"antd-layout-body": "#F6F4F9",

// Dark theme colors
"antd-dark-bg-base": "#0F172A",
"antd-dark-bg-container": "#1E293B",
"antd-dark-bg-elevated": "#27364A",
"antd-dark-bg-base": "#130E15",
"antd-dark-bg-container": "#1F1825",
"antd-dark-bg-elevated": "#2B1F36",
"antd-dark-text": "#F8FAFC",
"antd-dark-text-secondary": "#CBD5E1",
"antd-dark-layout-header": "#0056D2",
"antd-dark-layout-body": "#0F172A",
"antd-dark-text-secondary": "#A1A1AA",
"antd-dark-layout-header": "#4B164C",
"antd-dark-layout-body": "#130E15",
},
backgroundImage: {
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
Expand Down
12 changes: 6 additions & 6 deletions apps/ssc/app/payment/callback/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ const PaymentCallbackContent = () => {
});
}, [searchParams]);

const handleRedirectToGameCraft = () => {
const gamecraftUrl =
process.env.NEXT_PUBLIC_GAMECRAFT_URL || "https://gamecraft.ir";
window.location.href = gamecraftUrl;
const handleRedirect = () => {
const redirectUrl =
process.env.NEXT_PUBLIC_API_URL || "https://ceit-ssc.ir";
window.location.href = redirectUrl;
};

const { success, message, orderId } = paymentState;
Expand Down Expand Up @@ -86,9 +86,9 @@ const PaymentCallbackContent = () => {
<Button
variant={ButtonVariant.PRIMARY}
size={ButtonSize.LARGE}
label="بازگشت به گیم کرفت"
label="بازگشت به خانه"
suffixIcon={HiArrowLeft}
onClick={handleRedirectToGameCraft}
onClick={handleRedirect}
className="w-full justify-center"
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/api/Purchases/purchases.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { PurchasesResponse } from "../../types/api/Purchases/Purchases";
import { RequestResponse } from "../../types/api/general";

export class PurchasesApi extends ApiClient {
async fetchPurchases() {
async fetchPurchases(event: number) {
return await this.Api.get<PurchasesResponse, RequestResponse<PurchasesResponse>>(
apiPath(ApiPath.PURCHASES_GET_LIST),
apiPath(ApiPath.PURCHASES_GET_LIST, {event}),
{
requiresAuth: true,
}
Expand Down
Loading