Added part of mainPage
parent
c2d40ce4dd
commit
4abc1360d3
|
|
@ -0,0 +1,13 @@
|
|||
import RequestList from "@/components/RecentRequest/RequestList";
|
||||
import React from "react";
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<section className="flex w-full md:grid md:grid-cols-2 h-full items-center flex-col overflow-y-auto p-5">
|
||||
<RequestList
|
||||
// source={{ controller: "CitizenReport", params: { tail: "Mine" } }}
|
||||
// isSelfRequest={true}
|
||||
/>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import React from 'react'
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<div>page</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import React from 'react'
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<div>page</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import React from 'react'
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<div>page</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -2,9 +2,7 @@ import React from 'react'
|
|||
import RecentRequests from '@/components/RecentRequest/RecentRequests'
|
||||
function page() {
|
||||
return (
|
||||
<div>
|
||||
<RecentRequests />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import React from 'react'
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<div>page</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@ export default function RequestLayout({
|
|||
{/* Include shared UI here e.g. a header or sidebar */}
|
||||
<SideMenu />
|
||||
<UserHeader />
|
||||
<div className=" w-[calc(100%-208px)] flex flex-1 p-10 flex-col overflow-hidden overflow-y-auto fixed top-[60px] left-0 transition-all ">{children}</div>
|
||||
<div className=" w-[calc(100%-208px)] h-[calc(100%-100px)] flex flex-1 p-10 flex-col overflow-hidden fixed top-[60px] left-0 transition-all ">{children}</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import React from 'react'
|
||||
|
||||
function page() {
|
||||
return (
|
||||
<div>page User</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default page
|
||||
|
|
@ -1,9 +1,17 @@
|
|||
import React from 'react'
|
||||
import React from "react";
|
||||
import { Button } from "../ui/button";
|
||||
|
||||
const NearestRequests = () => {
|
||||
return (
|
||||
<div>NearestRequests</div>
|
||||
)
|
||||
}
|
||||
<div>
|
||||
<p className="text-sm font-bold p-3 text-center">
|
||||
برای دسترسی به این بخش به برنامه کاربردی شهربین مراجعه کنید
|
||||
</p>
|
||||
<Button className="relative text-center flex items-center justify-center rounded-3xl border-0 cursor-pointer transition-all ease-in-out text-black min-h-[40px] border-[1px solid yellow] bg-yellow py-2 px-5 max-w-[640px] m-auto disabled:text-black disabled:cursor-not-allowed disabled:shadow-none disabled:border-0 hover:bg-yellow">
|
||||
دانلود برنامه شهربین
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default NearestRequests
|
||||
export default NearestRequests;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import RequestCard from "../Requests/RequestCard";
|
|||
|
||||
const RequestList = () => {
|
||||
return (
|
||||
<div>
|
||||
<section className="flex flex-1 w-full items-center flex-col overflow-y-scroll overflow-x-hidden pl-5 scrollbar-thin scrollbar-thumb-yellow scrollbar-track-white " >
|
||||
<RequestCard />
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
import React from "react";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import RequestList from "./RequestList";
|
||||
import NearestRequests from "./NearestRequests";
|
||||
|
||||
export function TabRequests() {
|
||||
return (
|
||||
<Tabs defaultValue="nearest" className="">
|
||||
<Tabs defaultValue="all" className="">
|
||||
<TabsList className="grid w-full grid-cols-2">
|
||||
<TabsTrigger value="nearest">نزدیک ترین ها </TabsTrigger>
|
||||
<TabsTrigger value="all">همه</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="nearest">
|
||||
<RequestList />
|
||||
<NearestRequests />
|
||||
</TabsContent>
|
||||
<TabsContent value="all">
|
||||
<p>همه همه </p>
|
||||
<RequestList />
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,10 +2,16 @@ import Image from "next/image";
|
|||
import React from "react";
|
||||
import img1 from "@/assets/images/no-image.jpeg";
|
||||
import RequestStatus from "./RequestStatus";
|
||||
import { MdLocationOn } from "react-icons/md";
|
||||
import RequestProcessIcon from "./RequestProcessIcon";
|
||||
import RequestViolation from "./RequestViolation";
|
||||
import RequestLike from "./RequestLike";
|
||||
import RequestComments from "./RequestComments";
|
||||
|
||||
const RequestCard = () => {
|
||||
return (
|
||||
<article
|
||||
className="w-full bg-white flex items-stretch mb-3 cursor-pointer min-h-[170px] md:p-3 md:rounded-md md:border-0 md:shadow-[0_2px_5px_rgba(0,0,0,0.05)]"
|
||||
className="w-full bg-white flex items-stretch mb-3 min-h-[170px] md:p-3 md:rounded-md md:border-0 md:shadow-[0_2px_5px_rgba(0,0,0,0.05)]"
|
||||
style={{ direction: "rtl" }}
|
||||
>
|
||||
<div className="w-full max-w-[100px] flex items-center justify-center">
|
||||
|
|
@ -24,13 +30,33 @@ const RequestCard = () => {
|
|||
</div>
|
||||
|
||||
{/* 2 */}
|
||||
<div className="w-full flex items-center justify-between mb-2">222</div>
|
||||
<div className="w-full flex items-center justify-between mb-2">
|
||||
<div className="flex items-center text-sm text-gray-500 text-ellipsis">
|
||||
<MdLocationOn className="text-blue ml-1 text-xl" />
|
||||
<p className="line-clamp-1 ">م. آزادی، بل فرخی</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 3 */}
|
||||
<div className="w-full flex items-center justify-between mb-2">333</div>
|
||||
<div className="w-full flex items-center justify-between mb-2">
|
||||
<div className="text-xs text-gray-500">
|
||||
<span>کد رهگیری: </span>
|
||||
<span>21221212121</span>
|
||||
</div>
|
||||
<div className="text-xs text-gray-500">
|
||||
<span> jul 28 2024 11:20</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 4 */}
|
||||
<div className="w-full flex items-center justify-between mb-2">444</div>
|
||||
<div className="w-full flex items-center justify-between mb-2">
|
||||
<RequestProcessIcon />
|
||||
<div className="flex items-center justify-center">
|
||||
<RequestViolation />
|
||||
<RequestLike />
|
||||
<RequestComments />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
import React from "react";
|
||||
import { FaRegComment } from "react-icons/fa";
|
||||
|
||||
const RequestComments = () => {
|
||||
return (
|
||||
<>
|
||||
<span className="flex items-center justify-center text-black text-lg font-bold">
|
||||
<FaRegComment className="mx-1 cursor-pointer" />
|
||||
</span>
|
||||
<span className="mx-[2px]">0</span>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default RequestComments;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import React from "react";
|
||||
import { FiHeart } from "react-icons/fi";
|
||||
import { IoMdHeart } from "react-icons/io";
|
||||
|
||||
const RequestLike = () => {
|
||||
return (
|
||||
<>
|
||||
<span className="flex items-center justify-center text-black text-lg font-bold cursor-pointer">
|
||||
<FiHeart />
|
||||
</span>
|
||||
<span>0</span>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default RequestLike;
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import React from "react";
|
||||
import { CgMenuRightAlt } from "react-icons/cg";
|
||||
|
||||
const RequestProcessIcon = () => {
|
||||
return (
|
||||
<div className="text-xs text-gray-500 flex items-center cursor-pointer rounded-md">
|
||||
<CgMenuRightAlt className="ml-1 text-lg" />
|
||||
<span>مشاهده روند بررسی</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RequestProcessIcon;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import React from "react";
|
||||
import { FaRegFlag } from "react-icons/fa6";
|
||||
|
||||
const RequestViolation = () => {
|
||||
return <FaRegFlag className="text-lg mx-1 cursor-pointer" />;
|
||||
};
|
||||
|
||||
export default RequestViolation;
|
||||
|
|
@ -6,11 +6,11 @@ import { TbWorld } from "react-icons/tb";
|
|||
import { FaCogs } from "react-icons/fa";
|
||||
|
||||
export const menuItems = [
|
||||
{ id: 1, title: "صفحه اصلی", href: "/RecentRequest", icon: <FaList/>},
|
||||
{ id: 2, title: "ثبت درخواست", href: "/", icon: <FaPlus /> },
|
||||
{ id: 3, title: "درخواست های من", href: "/", icon: <PiSquaresFourFill /> },
|
||||
{ id: 4, title: "نظرسنجی ها ", href: "/", icon: <FaChartBar /> },
|
||||
{ id: 5, title: "اخبار", href: "/" , icon: <TbWorld /> },
|
||||
{ id: 6, title: "تنظیمات", href: "/", icon: <FaCogs /> },
|
||||
{ id: 1, title: "صفحه اصلی", href: "/User/RecentRequest", icon: <FaList/>},
|
||||
{ id: 2, title: "ثبت درخواست", href: "/User/NewRequest", icon: <FaPlus /> },
|
||||
{ id: 3, title: "درخواست های من", href: "/User/MyRequest", icon: <PiSquaresFourFill /> },
|
||||
{ id: 4, title: "نظرسنجی ها ", href: "/User/Polls", icon: <FaChartBar /> },
|
||||
{ id: 5, title: "اخبار", href: "/User/News" , icon: <TbWorld /> },
|
||||
{ id: 6, title: "تنظیمات", href: "/User/Settings", icon: <FaCogs /> },
|
||||
];
|
||||
|
||||
|
|
@ -34,6 +34,7 @@
|
|||
"react-otp-input": "^3.1.1",
|
||||
"sonner": "^1.4.41",
|
||||
"tailwind-merge": "^2.2.2",
|
||||
"tailwind-scrollbar": "^3.1.0",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"zod": "^3.22.4",
|
||||
"zustand": "^4.5.2"
|
||||
|
|
@ -5264,6 +5265,17 @@
|
|||
"url": "https://github.com/sponsors/dcastil"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwind-scrollbar": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tailwind-scrollbar/-/tailwind-scrollbar-3.1.0.tgz",
|
||||
"integrity": "sha512-pmrtDIZeHyu2idTejfV59SbaJyvp1VRjYxAjZBH0jnyrPRo6HL1kD5Glz8VPagasqr6oAx6M05+Tuw429Z8jxg==",
|
||||
"engines": {
|
||||
"node": ">=12.13.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"tailwindcss": "3.x"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss": {
|
||||
"version": "3.4.3",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz",
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
"react-otp-input": "^3.1.1",
|
||||
"sonner": "^1.4.41",
|
||||
"tailwind-merge": "^2.2.2",
|
||||
"tailwind-scrollbar": "^3.1.0",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"zod": "^3.22.4",
|
||||
"zustand": "^4.5.2"
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ const config = {
|
|||
green: "#006400",
|
||||
lightGreen: "#06d6a0",
|
||||
blue: "#003aa3",
|
||||
blue2: "#3b82f6",
|
||||
blue3: "#0ea5e9",
|
||||
bgmain: "#f5f7fa",
|
||||
border: "hsl(var(--border))",
|
||||
input: "hsl(var(--input))",
|
||||
|
|
@ -89,7 +91,7 @@ const config = {
|
|||
},
|
||||
},
|
||||
},
|
||||
plugins: [require("tailwindcss-animate")],
|
||||
plugins: [require("tailwindcss-animate"), require('tailwind-scrollbar')],
|
||||
} satisfies Config;
|
||||
|
||||
export default config;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
import axios from "axios";
|
||||
import { CookieValueTypes } from "cookies-next";
|
||||
|
||||
axios.defaults.baseURL = process.env.NEXT_PUBLIC_BASE_URL_APP;
|
||||
// axios.defaults.baseURL = "https://shahrbinapi.shetabdahi.ir/";
|
||||
|
||||
// Get Captcha
|
||||
export async function getLocation() {
|
||||
const data = await axios.get(`/api/CitizenReport/Locations`, {
|
||||
});
|
||||
return data.data;
|
||||
}
|
||||
|
||||
export async function resendOtp(payload: { otpToken: string | any}) {
|
||||
const data = await axios.post(
|
||||
`/api/Authenticate/ResendOtp`,
|
||||
payload
|
||||
);
|
||||
return data.data;
|
||||
}
|
||||
Loading…
Reference in New Issue