diff --git a/next.config.js b/next.config.js index e9cb40a..b80b794 100644 --- a/next.config.js +++ b/next.config.js @@ -6,7 +6,7 @@ module.exports = { ignoreDuringBuilds: false, }, typescript: { - ignoreBuildErrors: true, + ignoreBuildErrors: false, }, images: { diff --git a/src/app/[locale]/(account-pages)/bills/BillCard.tsx b/src/app/[locale]/(account-pages)/bills/BillCard.tsx index cf1e81a..44fbe2f 100644 --- a/src/app/[locale]/(account-pages)/bills/BillCard.tsx +++ b/src/app/[locale]/(account-pages)/bills/BillCard.tsx @@ -12,10 +12,25 @@ import { BsCart3 } from "react-icons/bs"; import { MdCurrencyExchange } from "react-icons/md"; export interface Bill { service: string; + id: number; + title: string; created_at: string; expiration_date: string; amount: number; status: BillStatus; + passengers: { type: string; count: number }[]; + accountNumber: string; + message?: string; + uploadedImage?: { + name: string; + size: string; + src: string; + }; + detail_service: { + passenger_counts: { adults: string; children: string; infants: string }; + }; + transaction_receipt: string; + card_number: string | number; } interface BillCardProps { diff --git a/src/app/[locale]/(account-pages)/bills/[slug]/page.tsx b/src/app/[locale]/(account-pages)/bills/[slug]/page.tsx index b153154..1a82bf2 100644 --- a/src/app/[locale]/(account-pages)/bills/[slug]/page.tsx +++ b/src/app/[locale]/(account-pages)/bills/[slug]/page.tsx @@ -16,32 +16,31 @@ export type BillStatus = | "rejected" | "pending"; -export interface Bill { - id: number; - title: string; - created_at: string; - expiration_date: string; - amount: number; - status: BillStatus; - passengers: { type: string; count: number }[]; - accountNumber: string; - message?: string; - uploadedImage?: { - name: string; - size: string; - src: string; - }; - detail_service: { - passenger_counts: { adults: string; children: string; infants: string }; - }; - transaction_receipt: string; - card_number: string | number; -} - -interface BillDetailCardProps { - bill: Bill; -} - + export interface Bill { + id: number; + title: string; + created_at: string; + expiration_date: string; + amount: number; + status: BillStatus; + passengers: { type: string; count: number }[]; + accountNumber: string; + message?: string; + uploadedImage?: { + name: string; + size: string; + src: string; + }; + detail_service: { + passenger_counts: { adults: string; children: string; infants: string }; + }; + transaction_receipt: string; + card_number: string | number; + } + + interface BillDetailCardProps { + bill: Bill; + } const statusStyles: { [key in BillStatus]: JSX.Element } = { awaiting_payment: ( diff --git a/src/app/[locale]/(account-pages)/bills/page.tsx b/src/app/[locale]/(account-pages)/bills/page.tsx index 83a64aa..1453134 100644 --- a/src/app/[locale]/(account-pages)/bills/page.tsx +++ b/src/app/[locale]/(account-pages)/bills/page.tsx @@ -1,85 +1,38 @@ -// BillsPage.tsx "use client"; import React, { useEffect, useState } from "react"; import BillCard from "./BillCard"; import BillDetailCard from "./[slug]/page"; import axiosInstance from "@/components/api/axios"; import { useUserContext } from "@/components/contexts/userContext"; -import { headers } from "next/dist/client/components/headers"; -// types.ts -export type BillStatus = - | "Awaiting Payment" - | "Approved" - | "Rejected" - | "Pending"; +// Define the BillStatus and Bill interfaces +export type BillStatus = "awaiting_payment" | "approved" | "rejected" | "pending"; export interface Bill { + service: string; + id: number; title: string; - issuedDate: string; - expirationDate: string; + created_at: string; + expiration_date: string; amount: number; status: BillStatus; - passengers: {}; + passengers: { type: string; count: number }[]; accountNumber: string; message?: string; + uploadedImage?: { + name: string; + size: string; + src: string; + }; + detail_service: { + passenger_counts: { adults: string; children: string; infants: string }; + }; + transaction_receipt: string; + card_number: string | number; } -// const bills: Bill[] = [ -// { -// title: "Karbala Tour Bill", -// issuedDate: "12 Jan 2023", -// expirationDate: "10 Jan 2023", -// amount: 960, -// status: "Awaiting Payment", -// passengers: [ -// { type: "Adult", count: 3 }, -// { type: "Child", count: 2 }, -// { type: "Infant", count: 1 }, -// ], -// accountNumber: "123-456-7890-0123", -// }, -// { -// title: "SIM Card Bill", -// issuedDate: "12 Jan 2023", -// expirationDate: "10 Jan 2023", -// amount: 960, -// status: "Approved", -// passengers: [ -// { type: "Adult", count: 2 }, -// { type: "Child", count: 1 }, -// ], -// accountNumber: "987-654-3210-0123", -// }, -// { -// title: "Shop Bill", -// issuedDate: "12 Jan 2023", -// expirationDate: "10 Jan 2023", -// amount: 960, -// status: "Rejected", -// passengers: [ -// { type: "Adult", count: 1 }, -// ], -// accountNumber: "456-789-0123-4567", -// message: -// "The uploaded image does not meet the required quality standards. Please use a higher-resolution photo.", -// }, -// { -// title: "Tasrif Bill", -// issuedDate: "12 Jan 2023", -// expirationDate: "10 Jan 2023", -// amount: 960, -// status: "Pending", -// passengers: [ -// { type: "Adult", count: 3 }, -// { type: "Child", count: 2 }, -// ], -// accountNumber: "321-654-9870-1234", -// }, -// ]; - const BillsPage: React.FC = () => { - const [bills, setBills] = useState([]); + const [bills, setBills] = useState([]); const [selectedBill, setSelectedBill] = useState(null); const { user } = useUserContext(); @@ -90,6 +43,7 @@ const BillsPage: React.FC = () => { const handleBackToList = () => { setSelectedBill(null); }; + useEffect(() => { axiosInstance("/api/factors/list/", { headers: { @@ -97,13 +51,28 @@ const BillsPage: React.FC = () => { }, }) .then((response) => { - console.log(response); - setBills(response.data.results); + // Transform API response to match the Bill interface + const billsFromApi = response.data.results.map((bill: any) => ({ + id: bill.id, + title: bill.title, + created_at: bill.created_at, + expiration_date: bill.expiration_date, + amount: bill.amount, + status: bill.status, + passengers: bill.passengers, + accountNumber: bill.accountNumber, + message: bill.message, + uploadedImage: bill.uploadedImage, + detail_service: bill.detail_service, + transaction_receipt: bill.transaction_receipt, + card_number: bill.card_number, + })); + setBills(billsFromApi); }) .catch((error) => { - console.log(error.message); + console.error(error.message); }); - }, []); + }, [user.token]); return (
diff --git a/src/app/[locale]/(client-components)/(Header)/MainNav1.tsx b/src/app/[locale]/(client-components)/(Header)/MainNav1.tsx index ec7bd46..8157649 100644 --- a/src/app/[locale]/(client-components)/(Header)/MainNav1.tsx +++ b/src/app/[locale]/(client-components)/(Header)/MainNav1.tsx @@ -5,8 +5,6 @@ import SearchDropdown from "./SearchDropdown"; import MenuBar from "@/shared/MenuBar"; import SwitchDarkMode from "@/shared/SwitchDarkMode"; import HeroSearchForm2MobileFactory from "../(HeroSearchForm2Mobile)/HeroSearchForm2MobileFactory"; -import { MdOutlineCardTravel } from "react-icons/md"; -import Link from "next/link"; import LangDropdown from "./LangDropdown"; import UserMenu from "@/components/UserMenu"; import MyTripButton from "./MyTripButton"; diff --git a/src/app/[locale]/(server-components)/SectionHero.tsx b/src/app/[locale]/(server-components)/SectionHero.tsx index a57e3bb..1f4e775 100644 --- a/src/app/[locale]/(server-components)/SectionHero.tsx +++ b/src/app/[locale]/(server-components)/SectionHero.tsx @@ -2,7 +2,7 @@ import React, { FC } from "react"; import imagePng from "@/images/hero-right.png"; -import vectorPng from "@/images/Vector.png"; +import vectorPng from "@/images/HeroVector.svg"; import HeroSearchForm from "../(client-components)/(HeroSearchForm)/HeroSearchForm"; import Image from "next/image"; import ButtonPrimary from "@/shared/ButtonPrimary"; @@ -18,9 +18,11 @@ const SectionHero: FC = ({ className = "" }) => { return (
hero diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx index cfb9b4a..b2aed80 100644 --- a/src/app/[locale]/page.tsx +++ b/src/app/[locale]/page.tsx @@ -43,8 +43,8 @@ function PageHome() { {/* */} - +
diff --git a/src/app/[locale]/tours/[slug]/page.tsx b/src/app/[locale]/tours/[slug]/page.tsx index 82e08ac..3e8a4b7 100644 --- a/src/app/[locale]/tours/[slug]/page.tsx +++ b/src/app/[locale]/tours/[slug]/page.tsx @@ -14,6 +14,7 @@ import ButtonPrimary from "@/shared/ButtonPrimary"; import StartRating from "@/components/StartRating"; import { useTranslation } from "react-i18next"; // Import useTranslation import Head from "next/head"; +import Badge from "@/shared/Badge"; // Define the type of `details` interface TourDetails { @@ -152,6 +153,8 @@ const ListingStayDetailPage: FC = () => {
)} {/* */} + {} +
{/* Booking Form */} diff --git a/src/app/globals.css b/src/app/globals.css index e4b31c1..2ffacc2 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -10,4 +10,20 @@ outline: none; box-shadow: none; border: none; /* Ensures no border shows on focus */ + } + + .hero-image{ + left: -450px; + } + + @media(max-width : 1400px) { + .hero-image{ + left: -400px; + } + } + @media(max-width :450px){ + .hero-image{ + left: -300px; + top: 0px; + } } \ No newline at end of file diff --git a/src/components/SectionCustomTour.tsx b/src/components/SectionCustomTour.tsx index abd1318..fbc29d9 100644 --- a/src/components/SectionCustomTour.tsx +++ b/src/components/SectionCustomTour.tsx @@ -1,18 +1,20 @@ import BackgroundSection from "@/components/BackgroundSection"; import React from "react"; -import BackgroundImage from "@/images/Frame 412.png"; +import BackgroundImage from "@/images/Frame-412.webp"; import Image from "next/image"; import ButtonPrimary from "@/shared/ButtonPrimary"; const SectionDownloadApp = () => { return ( - + {/* Background Image */} Custom Tour Background {/* Content Wrapper */} @@ -29,48 +31,10 @@ const SectionDownloadApp = () => {

perfect travel experience tailored to your preferences.

- Custom Tour + Custom Tour
); }; -export default SectionDownloadApp; -// import BackgroundSection from "@/components/BackgroundSection"; -// import React from "react"; -// import BackgroundImage from "@/images/Frame 412.png"; -// import Image from "next/image"; -// import ButtonPrimary from "@/shared/ButtonPrimary"; - -// const SectionDownloadApp = () => { -// return ( -// -// {/* Background Image */} -// Custom Tour Background - -// {/* Content Wrapper */} -//
-//

-// Create -//

-//

-// Custom Tour -//

-//

-// Create your personalized tour and design the -//

-//

-// perfect travel experience tailored to your preferences. -//

-// Custom Tour -//
-//
-// ); -// }; - -// export default SectionDownloadApp; +export default SectionDownloadApp; \ No newline at end of file diff --git a/src/images/Frame 412.png b/src/images/Frame 412.png deleted file mode 100644 index 874a7e8..0000000 Binary files a/src/images/Frame 412.png and /dev/null differ diff --git a/src/images/Frame-412.webp b/src/images/Frame-412.webp new file mode 100644 index 0000000..9bd16f9 Binary files /dev/null and b/src/images/Frame-412.webp differ diff --git a/src/images/HeroVector.svg b/src/images/HeroVector.svg new file mode 100644 index 0000000..c5b3f7f --- /dev/null +++ b/src/images/HeroVector.svg @@ -0,0 +1,20 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/images/Vector.png b/src/images/Vector.png deleted file mode 100644 index 119c5bb..0000000 Binary files a/src/images/Vector.png and /dev/null differ diff --git a/src/images/logos/Frame 3 Dark.svg b/src/images/logos/Frame 3 Dark.svg new file mode 100644 index 0000000..d1ac3ce --- /dev/null +++ b/src/images/logos/Frame 3 Dark.svg @@ -0,0 +1,80 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/images/logos/Frame 3.svg b/src/images/logos/Frame 3.svg new file mode 100644 index 0000000..bc036c0 --- /dev/null +++ b/src/images/logos/Frame 3.svg @@ -0,0 +1,80 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/shared/Logo.tsx b/src/shared/Logo.tsx index 01f42c9..e4372c0 100644 --- a/src/shared/Logo.tsx +++ b/src/shared/Logo.tsx @@ -1,8 +1,7 @@ import React from "react"; -import logoImg from "@/images/logos/لوگو3 1.png"; -import logoLightImg from "@/images/logos/لوگو3 1.svg"; -import LogoSvgLight from "./LogoSvgLight"; -import LogoSvg from "./LogoSvg"; +import logoImg from "@/images/logos/Frame 3.svg"; +import logoLightImg from "@/images/logos/Frame 3.svg"; +import logoDarkImg from "@/images/logos/Frame 3 Dark.svg"; import Link from "next/link"; import Image, { StaticImageData } from "next/image"; @@ -20,44 +19,39 @@ const Logo: React.FC = ({ return ( {/* */} {/* THIS USE FOR MY CLIENT */} {/* PLEASE UN COMMENT BELLOW CODE AND USE IT */} - - {img ? ( -
- - Logo - -
-

Aqila

-

Traveling Agency

-
+ {img ? ( +
+ Logo
- ) : ( "Logo Here" )} {imgLight && ( -
+
{" "} Logo-Light -

AQILA

)} diff --git a/src/shared/Navigation/NavigationItem.tsx b/src/shared/Navigation/NavigationItem.tsx index b90966d..fd500ef 100644 --- a/src/shared/Navigation/NavigationItem.tsx +++ b/src/shared/Navigation/NavigationItem.tsx @@ -268,8 +268,8 @@ const NavigationItem: FC = ({ menuItem }) => { {item.name}