briz multi lang part 2
parent
1a49c04ee2
commit
338def67b5
|
@ -36,6 +36,7 @@ const AppHeader = ({
|
|||
const notifUnreadData = CTX.state.notifUnreadData;
|
||||
|
||||
const t = useTranslations("login");
|
||||
const t2 = useTranslations("extra");
|
||||
const locale = useLocale();
|
||||
const isRTL = locale === "fa";
|
||||
|
||||
|
@ -172,7 +173,7 @@ const AppHeader = ({
|
|||
{logOut && (
|
||||
<div
|
||||
{...attrs}
|
||||
className="w-fit h-fit bg-red-500 text-white rounded-full mx-1 "
|
||||
className="w-fit h-fit bg-red-500 text-white rounded-full mx-1 mt-[5px] "
|
||||
onClick={() => {
|
||||
toast.error(`برای خروج نگه دارید`, {
|
||||
position: "bottom-right",
|
||||
|
@ -180,7 +181,7 @@ const AppHeader = ({
|
|||
});
|
||||
}}
|
||||
>
|
||||
<p className="mb-0 p-2 px-4">خروج</p>
|
||||
<p className="mb-0 p-1 px-4 text-sm">{t2("exit")}</p>
|
||||
</div>
|
||||
)}
|
||||
{icon1 ? (
|
||||
|
@ -212,7 +213,7 @@ const AppHeader = ({
|
|||
{notif && (
|
||||
<Link href={"/app/news"} className="ml-5">
|
||||
{notifUnreadData > 0 && (
|
||||
<div className="absolute">
|
||||
<div className={`absolute ${isRTL ? "" : "ml-[13px]"}`}>
|
||||
<div className="w-3 h-3 rounded-full bg-red-300 border-2 border-black"></div>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
import React from "react";
|
||||
|
||||
const AboutUsHero = () => {
|
||||
return (
|
||||
<>
|
||||
<div className="flex justify-center lg:pt-[150px] xs:pt-[100px] xs:ml-5 lg:ml-0 px-20">
|
||||
<div className=" ml-1 ">
|
||||
<h1
|
||||
className={`font-black text-white lg:text-[100px] sm:text-[70px] xs:text-[60px] text-[40px] mb-0 text-center `}
|
||||
>
|
||||
Welcome to Briz
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default AboutUsHero;
|
|
@ -77,7 +77,7 @@ const Navbar = () => {
|
|||
// Function to change the locale
|
||||
const changeLocale = (newLocale) => {
|
||||
// Navigate to the same route but with a different locale
|
||||
router.push(newLocale);
|
||||
router.push(`/${newLocale}`);
|
||||
setIsOpenLang(false); // Close the dropdown
|
||||
};
|
||||
|
||||
|
@ -120,7 +120,7 @@ const Navbar = () => {
|
|||
{nav.go ? (
|
||||
<Link href={`/${nav.id}`}>{nav.title}</Link>
|
||||
) : (
|
||||
<a href={`/#${nav.id}`}>{nav.title}</a>
|
||||
<Link href={`/#${nav.id}`}>{nav.title}</Link>
|
||||
)}
|
||||
</>
|
||||
</li>
|
||||
|
@ -195,7 +195,7 @@ const Navbar = () => {
|
|||
{nav.go ? (
|
||||
<Link href={`/${nav.id}`}>{nav.title}</Link>
|
||||
) : (
|
||||
<a href={`/#${nav.id}`}>{nav.title}</a>
|
||||
<Link href={`/#${nav.id}`}>{nav.title}</Link>
|
||||
)}
|
||||
</>
|
||||
</li>
|
||||
|
|
|
@ -151,6 +151,17 @@
|
|||
"signUpButton": "Verification of information"
|
||||
},
|
||||
|
||||
"aboutUs": {
|
||||
"title": "Welcome to Briz",
|
||||
"p1": "At Briz, we envision each coffee shop as a symphony, with every element from the espresso shot to the customer service playing in perfect harmony. Our journey began with the coming together of two innovative startups: 'Tuk Coffee,' a renowned delivery platform for brewed coffee with physical branches, and 'Igarson,' an accounting application tailored for coffee shops and restaurants. Our combined experience and passion for coffee shop excellence are the foundation of Briz.",
|
||||
"t2": "Our Team's Heritage",
|
||||
"p2": "Our team consists of six dedicated members, each bringing a unique blend of expertise and innovation from our roots in 'Tuk Coffee' and 'Igarson.' We are baristas, managers, tech enthusiasts, and, above all, coffee lovers. Together, we've seen the challenges and triumphs of running coffee shops, and it's this rich experience that fuels our commitment to making Briz the ace of your coffee shop orchestr",
|
||||
"t3": "Our Team's Heritage",
|
||||
"p3": "We believe in the power of an efficiently managed coffee shop - where every task, every role, and every shift contributes to the delightful crescendo of customer satisfaction. Briz is not just an app; it's your partner in achieving this efficiency. It's the conductor's baton that helps you lead your coffee shop's symphony to play more harmoniously than ever before. With Briz, you're not just managing; you're performing. ",
|
||||
"t4": "Our Commitment to Your Coffee Shop",
|
||||
"p4": "Our mission is simple yet ambitious: to empower coffee shops to manage their spaces with unprecedented efficiency and insight. Whether it's the bustling rush of the morning crowd or the relaxed ambiance of late evenings, Briz is there to ensure that every note of your coffee shop's day is pitch-perfect. Join us in redefining what it means to run a coffee shop, and let's make every cup of coffee an experience to remember."
|
||||
},
|
||||
|
||||
"homePage": {
|
||||
"activityText": " activities today",
|
||||
"shiftText": " shifts today",
|
||||
|
@ -276,5 +287,26 @@
|
|||
"staffsTitle": " Management of staffs",
|
||||
"shiftsTitle": "Management of shifts",
|
||||
"taskTitle": "Add a task"
|
||||
},
|
||||
|
||||
"tasks": {
|
||||
"title": "Collection activity management ",
|
||||
"subTitle": "Activity Management",
|
||||
"filter": "Filter",
|
||||
"specialDay": "Special Day",
|
||||
"priority": "Priority"
|
||||
},
|
||||
"account": {
|
||||
"title": "",
|
||||
"subTitle": "",
|
||||
"firstName": "First name",
|
||||
"lastName": "Last name",
|
||||
"phoneNumber": "Phone number",
|
||||
"language": "Language"
|
||||
},
|
||||
"extra": {
|
||||
"noting": "Nothing found",
|
||||
"loading": "Please wait",
|
||||
"exit": "log out"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,6 +149,16 @@
|
|||
"signUpComplexAddressInput": "آدرس",
|
||||
"signUpButton": "تأیید اطلاعات"
|
||||
},
|
||||
"aboutUs": {
|
||||
"title": "به بریز خوش آمدید",
|
||||
"p1": "در بریز، ما هر کافه را مانند یک سمفونی میبینیم که هر عنصر، از شات اسپرسو تا خدمات مشتری، در هماهنگی کامل نواخته میشود. سفر ما با ادغام دو استارتاپ نوآورانه آغاز شد: «توک کافی»، یک پلتفرم تحویل قهوه با شعب فیزیکی، و «ایگارسان»، یک برنامه حسابداری مخصوص کافهها و رستورانها. تجربه و اشتیاق مشترک ما به کمال در کافهداری، پایه و اساس بریز است.",
|
||||
"t2": "میراث تیم ما",
|
||||
"p2": "تیم ما از شش عضو متعهد تشکیل شده است که هرکدام ترکیبی از تخصص و نوآوری را از ریشههای ما در «توک کافی» و «ایگارسان» به ارمغان آوردهاند. ما باریستاها، مدیران، علاقهمندان به فناوری، و بالاتر از همه، عاشقان قهوه هستیم. با هم، چالشها و موفقیتهای مدیریت کافهها را تجربه کردهایم و این تجربه غنی ما را متعهد به ساختن بریز به عنوان بهترین ابزار برای مدیریت کافه شما کرده است.",
|
||||
"t3": "میراث تیم ما",
|
||||
"p3": "ما به قدرت مدیریت کارآمد یک کافه باور داریم - جایی که هر وظیفه، هر نقش و هر شیفت به کرشندوی دلنشین رضایت مشتری کمک میکند. بریز فقط یک اپلیکیشن نیست؛ شریک شما برای دستیابی به این بهرهوری است. این باتوم رهبر ارکستری است که به شما کمک میکند سمفونی کافه خود را هماهنگتر از همیشه اجرا کنید. با بریز، شما فقط مدیریت نمیکنید؛ شما اجرا میکنید.",
|
||||
"t4": "تعهد ما به کافه شما",
|
||||
"p4": "ماموریت ما ساده اما بلندپروازانه است: توانمندسازی کافهها برای مدیریت فضاهای خود با کارایی و بصیرت بیسابقه. چه شلوغی صبحگاهی باشد، چه آرامش عصرگاهی، بریز در کنار شماست تا هر لحظه از روز کافه شما در بهترین حالت ممکن باشد. به ما بپیوندید تا معنای جدیدی به مدیریت کافه بدهیم و هر فنجان قهوه را به تجربهای به یادماندنی تبدیل کنیم."
|
||||
},
|
||||
"homePage": {
|
||||
"activityText": " فعالیت امروز",
|
||||
"shiftText": " شیفت امروز",
|
||||
|
@ -273,5 +283,25 @@
|
|||
"staffsTitle": "مدیریت کارکنان",
|
||||
"shiftsTitle": "مدیریت شیفتها",
|
||||
"taskTitle": "افزودن وظیفه"
|
||||
},
|
||||
"tasks": {
|
||||
"title": "مدیریت فعالیت جمعآوری",
|
||||
"subTitle": "مدیریت فعالیت",
|
||||
"filter": "فیلتر",
|
||||
"specialDay": "روز ویژه",
|
||||
"priority": "اولویت"
|
||||
},
|
||||
"account": {
|
||||
"title": "",
|
||||
"subTitle": "",
|
||||
"firstName": "نام",
|
||||
"lastName": "نام خانوادگی",
|
||||
"phoneNumber": "شماره تلفن",
|
||||
"language": "زبان"
|
||||
},
|
||||
"extra": {
|
||||
"noting": "چیزی یافت نشد",
|
||||
"loading": "لطفا صبر کنید",
|
||||
"exit": "خروج"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,6 +149,16 @@
|
|||
"signUpComplexAddressInput": "地址",
|
||||
"signUpButton": "验证信息"
|
||||
},
|
||||
"aboutUs": {
|
||||
"title": "欢迎来到Briz",
|
||||
"p1": "在Briz,我们将每家咖啡店视为一场交响乐,每个元素,从浓缩咖啡到客户服务,都在完美的和谐中演奏。我们的旅程始于两个创新初创公司的结合:“Tuk Coffee”,一个知名的现煮咖啡配送平台并拥有实体店;以及“Igarson”,一个专为咖啡馆和餐厅设计的会计应用程序。我们的丰富经验和对咖啡馆卓越的热情构成了Briz的基石。",
|
||||
"t2": "我们团队的传承",
|
||||
"p2": "我们的团队由六名敬业成员组成,他们从“Tuk Coffee”和“Igarson”带来了独特的专业知识和创新精神。我们是咖啡师、管理者、科技爱好者,更是热爱咖啡的人。我们共同经历了咖啡馆运营的挑战和成功,这种丰富的经验驱动我们致力于让Briz成为您的咖啡馆管理王牌。",
|
||||
"t3": "我们团队的传承",
|
||||
"p3": "我们相信高效管理咖啡馆的力量——每项任务、每个角色、每个班次都为顾客满意的美妙高潮贡献力量。Briz不仅仅是一个应用程序;它是您实现效率的伙伴。它是指挥棒,帮助您带领咖啡馆的交响乐更加和谐地演奏。有了Briz,您不仅是在管理;您是在表演。",
|
||||
"t4": "我们对您咖啡馆的承诺",
|
||||
"p4": "我们的使命既简单又雄心勃勃:赋能咖啡馆以前所未有的效率和洞察力管理空间。无论是早晨的忙碌高峰,还是傍晚的悠闲氛围,Briz都在您身边,确保咖啡馆一天中的每一个时刻都如同音符般完美无缺。加入我们,重新定义咖啡馆运营的意义,让每杯咖啡都成为值得回味的体验。"
|
||||
},
|
||||
"homePage": {
|
||||
"activityText": " 今日活动",
|
||||
"shiftText": " 今日班次",
|
||||
|
@ -273,5 +283,26 @@
|
|||
"staffsTitle": "员工管理",
|
||||
"shiftsTitle": "班次管理",
|
||||
"taskTitle": "添加任务"
|
||||
},
|
||||
|
||||
"tasks": {
|
||||
"title": "收集活动管理",
|
||||
"subTitle": "活动管理",
|
||||
"filter": "筛选",
|
||||
"specialDay": "特殊日",
|
||||
"priority": "优先级"
|
||||
},
|
||||
"account": {
|
||||
"title": "",
|
||||
"subTitle": "",
|
||||
"firstName": "名字",
|
||||
"lastName": "姓氏",
|
||||
"phoneNumber": "电话号码",
|
||||
"language": "语言"
|
||||
},
|
||||
"extra": {
|
||||
"noting": "没有找到任何内容",
|
||||
"loading": "请稍等",
|
||||
"exit": "离开"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,5 +46,6 @@
|
|||
"devDependencies": {
|
||||
"css-loader": "^6.8.1",
|
||||
"webpack": "^5.89.0"
|
||||
}
|
||||
},
|
||||
"packageManager": "pnpm@9.14.2+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387"
|
||||
}
|
||||
|
|
|
@ -34,7 +34,9 @@ const Input = ({
|
|||
type="text"
|
||||
className={`peer w-full border-b placeholder:text-transparent relative rtl !text-sm ${
|
||||
theme == 1 ? "form-control-white" : "form-control"
|
||||
} ${isRTL ? "!text-right" : "!text-left"}`}
|
||||
} ${isRTL ? "!text-right" : "!text-left"} ${
|
||||
readOnly ? "!bg-gray-50 opacity-50" : ""
|
||||
}`}
|
||||
placeholder={name}
|
||||
disabled={disabled ? true : false}
|
||||
readOnly={readOnly ? true : false}
|
||||
|
@ -48,7 +50,7 @@ const Input = ({
|
|||
theme == 1 ? "form-control-white" : "form-control"
|
||||
} ${style ? style : ""} relative ${
|
||||
isRTL ? "!text-right" : "!text-left"
|
||||
}`}
|
||||
}${readOnly ? "!bg-gray-50 opacity-50" : ""}`}
|
||||
placeholder={name}
|
||||
disabled={disabled ? true : false}
|
||||
readOnly={readOnly ? true : false}
|
||||
|
@ -78,7 +80,7 @@ const Input = ({
|
|||
theme == 1 ? "form-control-white" : "form-control"
|
||||
} ${style ? style : ""} relative ${
|
||||
isRTL ? "!text-right" : "!text-left"
|
||||
}`}
|
||||
} ${readOnly ? "!bg-gray-50 opacity-50" : ""}`}
|
||||
placeholder={name}
|
||||
disabled={disabled ? true : false}
|
||||
readOnly={readOnly ? true : false}
|
||||
|
|
|
@ -3,10 +3,14 @@ import React, { useContext } from "react";
|
|||
import AppContext from "@ctx/AppContext";
|
||||
import gif from "@img/loading.gif";
|
||||
import Image from "next/image";
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
|
||||
const Loading = ({ rateId }) => {
|
||||
const CTX = useContext(AppContext);
|
||||
const loading = CTX.state.loading;
|
||||
const t = useTranslations("extra");
|
||||
const locale = useLocale();
|
||||
const isRTL = locale === "fa";
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -16,7 +20,7 @@ const Loading = ({ rateId }) => {
|
|||
} `}
|
||||
>
|
||||
<div className="bg-secondary-950 w-fit rounded-full px-1 py-2 flex rtl m-3 ">
|
||||
<p className="mb-0 text-primary-300 mx-2 blacj ">لطفا صبر کنید</p>
|
||||
<p className="mb-0 text-primary-300 mx-2 blacj ">{t("loading")}</p>
|
||||
<div className="w-[30px] ml-3">
|
||||
<Image src={gif} alt="" className="" />
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
import { useLocale, useTranslations } from "next-intl";
|
||||
import React from "react";
|
||||
|
||||
const NothingFound = () => {
|
||||
const t = useTranslations("extra");
|
||||
const locale = useLocale();
|
||||
const isRTL = locale === "fa";
|
||||
return (
|
||||
<div className="flex justify-center py-5">
|
||||
<div className="bg-gray-100 mt-5 w-fit rounded-full p-2">
|
||||
<p className="mb-0 text-sm ">چیزی یافت نشد.</p>
|
||||
<p className="mb-0 text-sm ">{t("noting")}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -2,68 +2,57 @@
|
|||
import Navbar from "@comp/landingComponents/Navbar";
|
||||
import Footer from "@comp/landingComponents/Footer/page";
|
||||
import React from "react";
|
||||
import AboutUsHero from "@comp/landingComponents/AboutUsHero/page";
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
|
||||
// import ig from "../../../public/images/ig.png";
|
||||
// import tuk from "../../../public/images/tuk.png";
|
||||
// import Image from "next/image";
|
||||
|
||||
const AboutUs = () => {
|
||||
const t = useTranslations("aboutUs");
|
||||
const locale = useLocale();
|
||||
const isRTL = locale === "fa";
|
||||
return (
|
||||
<div className="relative z-0 bg-black">
|
||||
<div className="bg-hero-pattern bg-cover bg-no-repeat bg-center">
|
||||
<Navbar />
|
||||
<AboutUsHero />
|
||||
<div className="flex justify-center lg:pt-[150px] xs:pt-[100px] xs:ml-5 lg:ml-0 px-20">
|
||||
<div className=" ml-1 ">
|
||||
<h1
|
||||
className={`font-black text-white lg:text-[100px] sm:text-[70px] xs:text-[60px] text-[40px] mb-0 text-center `}
|
||||
>
|
||||
{t("title")}{" "}
|
||||
</h1>
|
||||
</div>
|
||||
<div className="xs:px-[20px] lg:px-[120px] my-20">
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={`xs:px-[20px] lg:px-[120px] my-20 ${isRTL ? "rtl" : "ltr"} `}
|
||||
>
|
||||
<p className="mb-0 sm:text-[20px] xs:text-[20px] lg:text-justify xs:text-left text-secondary tracking-wider text-gray-300 ">
|
||||
At Briz, we envision each coffee shop as a symphony, with every
|
||||
element from the espresso shot to the customer service playing in
|
||||
perfect harmony. Our journey began with the coming together of two
|
||||
innovative startups: 'Tuk Coffee,' a renowned delivery platform for
|
||||
brewed coffee with physical branches, and 'Igarson,' an accounting
|
||||
application tailored for coffee shops and restaurants. Our combined
|
||||
experience and passion for coffee shop excellence are the foundation
|
||||
of Briz.
|
||||
{t("p1")}{" "}
|
||||
</p>
|
||||
<h2 className="text-white font-bold md:text-[30px] sm:text-[20px] xs:text-[20px] text-[18px] mt-4">
|
||||
Our Team's Heritage
|
||||
{t("t2")}{" "}
|
||||
</h2>
|
||||
<p className="mb-0 sm:text-[20px] xs:text-[20px] lg:text-justify xs:text-left text-secondary tracking-wider text-gray-300 ">
|
||||
Our team consists of six dedicated members, each bringing a unique
|
||||
blend of expertise and innovation from our roots in 'Tuk Coffee' and
|
||||
'Igarson.' We are baristas, managers, tech enthusiasts, and, above
|
||||
all, coffee lovers. Together, we've seen the challenges and triumphs
|
||||
of running coffee shops, and it's this rich experience that fuels our
|
||||
commitment to making Briz the ace of your coffee shop orchestr
|
||||
{t("p2")}{" "}
|
||||
</p>
|
||||
|
||||
<h2 className="text-white font-bold md:text-[30px] sm:text-[20px] xs:text-[20px] text-[18px] mt-4">
|
||||
Our Team's Heritage
|
||||
{t("t3")}{" "}
|
||||
</h2>
|
||||
|
||||
<p className="mb-0 sm:text-[20px] xs:text-[20px] lg:text-justify xs:text-left text-secondary tracking-wider text-gray-300 ">
|
||||
We believe in the power of an efficiently managed coffee shop - where
|
||||
every task, every role, and every shift contributes to the delightful
|
||||
crescendo of customer satisfaction. Briz is not just an app; it's your
|
||||
partner in achieving this efficiency. It's the conductor's baton that
|
||||
helps you lead your coffee shop's symphony to play more harmoniously
|
||||
than ever before. With Briz, you're not just managing; you're
|
||||
performing.
|
||||
{t("p3")}{" "}
|
||||
</p>
|
||||
|
||||
<h2 className="text-white font-bold md:text-[30px] sm:text-[20px] xs:text-[20px] text-[18px] mt-4">
|
||||
Our Commitment to Your Coffee Shop{" "}
|
||||
{t("t4")}{" "}
|
||||
</h2>
|
||||
|
||||
<p className="mb-0 sm:text-[20px] xs:text-[20px] lg:text-justify xs:text-left text-secondary tracking-wider text-gray-300 ">
|
||||
Our mission is simple yet ambitious: to empower coffee shops to manage
|
||||
their spaces with unprecedented efficiency and insight. Whether it's
|
||||
the bustling rush of the morning crowd or the relaxed ambiance of late
|
||||
evenings, Briz is there to ensure that every note of your coffee
|
||||
shop's day is pitch-perfect. Join us in redefining what it means to
|
||||
run a coffee shop, and let's make every cup of coffee an experience to
|
||||
remember.
|
||||
{t("p4")}{" "}
|
||||
</p>
|
||||
{/* <div className="flex justify-center my-10 ">
|
||||
<div className="">
|
||||
|
|
|
@ -10,6 +10,8 @@ import SimpleReactValidator from "simple-react-validator";
|
|||
import DatePickerIran from "plugins/DatePickerIran/page";
|
||||
import { useLongPress } from "@uidotdev/usehooks";
|
||||
import GoBack from "plugins/GoBack/page";
|
||||
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
|
||||
const page = () => {
|
||||
const CTX = useContext(AppContext);
|
||||
|
@ -18,9 +20,16 @@ const page = () => {
|
|||
const [fistName, setFistName] = useState("");
|
||||
const [lastName, setLastName] = useState("");
|
||||
const [phoneNumber, setPhoneNumber] = useState("");
|
||||
const [lang, setLang] = useState("");
|
||||
// const [nationalId, setNationalId] = useState("");
|
||||
// const [birthDateTimeStamp, setBirthDateTimeStamp] = useState("");
|
||||
const [, forceUpdate] = useState();
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const searchParams = useSearchParams();
|
||||
const t = useTranslations("account");
|
||||
const locale = useLocale();
|
||||
const isRTL = locale === "fa";
|
||||
|
||||
const validator = useRef(
|
||||
new SimpleReactValidator({
|
||||
|
@ -37,6 +46,52 @@ const page = () => {
|
|||
})
|
||||
);
|
||||
|
||||
const availableLocales = [
|
||||
{ value: "en", key: "English" },
|
||||
{ value: "fa", key: "فارسی" },
|
||||
{ value: "zh", key: "中文" },
|
||||
];
|
||||
|
||||
const detectLocale = () => {
|
||||
const pathSegments = pathname.split("/").filter((segment) => segment);
|
||||
|
||||
const firstSegment = pathSegments[0];
|
||||
const locale = availableLocales.find(
|
||||
(locale) => locale.value === firstSegment
|
||||
);
|
||||
return locale ? locale.value : "en";
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const currentLocale = detectLocale();
|
||||
setLang(currentLocale);
|
||||
|
||||
if (currentLocale === "fa") {
|
||||
document.documentElement.dir = "rtl";
|
||||
} else {
|
||||
document.documentElement.dir = "ltr";
|
||||
}
|
||||
}, [pathname]);
|
||||
|
||||
const changeLocale = (newLocale) => {
|
||||
setLang(newLocale);
|
||||
const pathSegments = pathname.split("/").filter((segment) => segment);
|
||||
const currentLocale = detectLocale();
|
||||
|
||||
if (availableLocales.some((locale) => locale.value === pathSegments[0])) {
|
||||
pathSegments[0] = newLocale;
|
||||
} else {
|
||||
pathSegments.unshift(newLocale);
|
||||
}
|
||||
|
||||
const newPath =
|
||||
"/" +
|
||||
pathSegments.join("/") +
|
||||
(searchParams.toString() ? `?${searchParams.toString()}` : "");
|
||||
|
||||
router.push(newPath);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
// if (profile.birthDateTimeStamp < 0) {
|
||||
// return (date = moment
|
||||
|
@ -119,7 +174,7 @@ const page = () => {
|
|||
<div className="w-full">
|
||||
<div className="">
|
||||
<Input
|
||||
lable="نام "
|
||||
lable={t("firstName")}
|
||||
id="fistName-id"
|
||||
name="fistName"
|
||||
type={"text"}
|
||||
|
@ -136,11 +191,12 @@ const page = () => {
|
|||
"required"
|
||||
)}
|
||||
theme={1}
|
||||
readOnly={true}
|
||||
/>
|
||||
</div>
|
||||
<div className="">
|
||||
<Input
|
||||
lable="نام خانوادگی "
|
||||
lable={t("lastName")}
|
||||
id="lastName-id"
|
||||
name="lastName"
|
||||
type={"text"}
|
||||
|
@ -157,12 +213,13 @@ const page = () => {
|
|||
"required"
|
||||
)}
|
||||
theme={1}
|
||||
readOnly={true}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="شماره تماس "
|
||||
lable={t("phoneNumber")}
|
||||
id="phoneNumber-id"
|
||||
name="phoneNumber"
|
||||
type={"text"}
|
||||
|
@ -183,6 +240,35 @@ const page = () => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable={t("language")}
|
||||
id="lang-id"
|
||||
name="lang"
|
||||
type="select"
|
||||
value={lang}
|
||||
inputEvent={(e) => {
|
||||
const selectedLang = e.target.value;
|
||||
setLang(selectedLang);
|
||||
changeLocale(selectedLang);
|
||||
if (validator.current) {
|
||||
validator.current.showMessageFor("lang");
|
||||
}
|
||||
}}
|
||||
style={lang === "fa" ? "text-right" : "text-left"}
|
||||
validator={true}
|
||||
validatorData={
|
||||
validator.current
|
||||
? validator.current.message("lang", lang, "required")
|
||||
: ""
|
||||
}
|
||||
theme={1}
|
||||
select={true}
|
||||
selectData={availableLocales}
|
||||
defaultValue="انتخاب کنید"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* <DatePickerIran
|
||||
datePickerEvent={(e) => setBirthDateTimeStamp(e)}
|
||||
date={birthDateTimeStamp}
|
||||
|
|
|
@ -120,7 +120,7 @@ const Home = (props) => {
|
|||
<div className=" w-full">
|
||||
<div className=" p-3 rounded-2xl">
|
||||
<div>
|
||||
<p className="mb-0 text-[12px] mt-3 font-medium text-center">
|
||||
<p className="mb-0 text-black text-[12px] mt-3 font-medium text-center">
|
||||
{isRTL ? (
|
||||
<PersianNumber
|
||||
number={homePageData?.totalActivitiesToday}
|
||||
|
@ -152,7 +152,7 @@ const Home = (props) => {
|
|||
/>
|
||||
) : (
|
||||
<>
|
||||
<span className="!text-[20px] font-bold mx-2">
|
||||
<span className="!text-[18px] font-bold mx-2">
|
||||
{" "}
|
||||
{homePageData?.totalShiftToday}
|
||||
</span>
|
||||
|
|
|
@ -17,6 +17,7 @@ import Loading from "plugins/Loading/page";
|
|||
import { useLongPress } from "@uidotdev/usehooks";
|
||||
import BottomFilterActivities from "plugins/BottomSheet/BottomFilterActivities";
|
||||
import NothingFound from "plugins/NothingFound/page";
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
|
||||
const page = () => {
|
||||
const CTX = useContext(AppContext);
|
||||
|
@ -32,6 +33,10 @@ const page = () => {
|
|||
const [activeStaffId, setActiveStaffId] = useState(-1);
|
||||
const [dateQueryFilterValue, setDateQueryFilterValue] = useState(1);
|
||||
|
||||
const t = useTranslations("tasks");
|
||||
const locale = useLocale();
|
||||
const isRTL = locale === "fa";
|
||||
|
||||
const handleInfiniteNextFetchActivity = () => {
|
||||
CTX.setPageGetActivity((e) => e + 1);
|
||||
CTX.GetActivity(
|
||||
|
@ -68,17 +73,13 @@ const page = () => {
|
|||
|
||||
return (
|
||||
<div className="pb-20">
|
||||
<AppHeader
|
||||
title=" مدیریت فعالیت مجموعه"
|
||||
sub=" مدیریت فعالیت ها"
|
||||
notif={true}
|
||||
/>
|
||||
<AppHeader title={t("title")} sub={t("subTitle")} notif={true} />
|
||||
|
||||
<div className="bg-white overflow-hidden p-5 rtl">
|
||||
<div className={`bg-white overflow-hidden p-5 ${isRTL ? "rtl" : "ltr"} `}>
|
||||
{" "}
|
||||
<div className="flex justify-start mb-3">
|
||||
<div
|
||||
className="border-2 border-secondary-300 px-2 py-1 w-fit rounded-full flex mt-2"
|
||||
className="border-2 border-secondary-300 px-2 py-1 w-fit rounded-full flex mx-1 mt-2"
|
||||
onClick={() => CTX.setBottomFilterActivitiesOpen(true)}
|
||||
>
|
||||
<div>
|
||||
|
@ -95,14 +96,14 @@ const page = () => {
|
|||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<div className="mr-1">
|
||||
<div className="mx-1">
|
||||
<p className="mb-0 text-[12px] text-secondary-950 font-medium">
|
||||
فیلــتر
|
||||
{t("filter")}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="border-2 border-secondary-300 px-2 py-1 w-fit rounded-full flex mt-2 mr-2 opacity-30">
|
||||
<div className="border-2 border-secondary-300 px-2 py-1 w-fit rounded-full flex mt-2 mx-1 opacity-30">
|
||||
<div>
|
||||
<svg
|
||||
width="15"
|
||||
|
@ -117,14 +118,14 @@ const page = () => {
|
|||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<div className="mr-1">
|
||||
<div className="mx-1">
|
||||
<p className="mb-0 text-[12px] text-secondary-950 font-medium">
|
||||
روز خاص
|
||||
{t("specialDay")}{" "}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="border-2 border-secondary-300 px-2 py-1 w-fit rounded-full flex mt-2 mr-2 opacity-30">
|
||||
<div className="border-2 border-secondary-300 px-2 py-1 w-fit rounded-full flex mt-2 mx-1 opacity-30">
|
||||
<div>
|
||||
<svg
|
||||
width="15"
|
||||
|
@ -139,9 +140,9 @@ const page = () => {
|
|||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<div className="mr-1">
|
||||
<div className="mx-1">
|
||||
<p className="mb-0 text-[12px] text-secondary-950 font-medium">
|
||||
اولویت
|
||||
{t("priority")}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue