Initial commit

This commit is contained in:
2025-10-04 18:22:24 +03:00
commit 2852c2c054
291 changed files with 38109 additions and 0 deletions

View File

@@ -0,0 +1,108 @@
import { Col, Row } from "antd";
import ProText from "components/ProText";
import { useTranslation } from "react-i18next";
import { colors } from "ThemeConstants";
export default function Stepper() {
const { t } = useTranslation();
return (
<>
<div
style={{
display: "flex",
justifyContent: "center",
alignItems: "center",
}}
>
<Row
align={"middle"}
style={{
width: 330,
position: "relative",
padding: "12px",
}}
>
<Col>
<div
style={{
width: 12,
height: 12,
borderRadius: "50%",
backgroundColor: colors.primary,
}}
></div>
</Col>
<Col flex={"auto"}>
<div
style={{
height: 1.5,
backgroundColor: colors.primary,
margin: "0 8px",
}}
></div>
</Col>
<Col>
<div
style={{
width: 12,
height: 12,
borderRadius: "50%",
backgroundColor: colors.primary,
}}
></div>
</Col>
<Col flex={"auto"}>
<div
style={{
height: 1.5,
backgroundColor: colors.primary,
margin: "0 8px",
}}
></div>
</Col>
<Col>
{" "}
<div
style={{
width: 12,
height: 12,
borderRadius: "50%",
backgroundColor: "#FFF",
border: `2px solid #BDBDBD`,
}}
></div>
</Col>
</Row>
</div>
<div
style={{
display: "flex",
justifyContent: "center",
alignItems: "center",
}}
>
{" "}
<Row
align={"middle"}
style={{
width: 330,
position: "relative",
padding: "12px",
}}
>
<Col>
<ProText>{t("order.reserved")}</ProText>
</Col>
<Col flex={"auto"}></Col>
<Col>
<ProText>{t("order.prepare")}</ProText>
</Col>
<Col flex={"auto"}></Col>
<Col>
<ProText type="secondary">{t("order.ready")}</ProText>
</Col>
</Row>
</div>
</>
);
}

View File

@@ -0,0 +1,213 @@
.orderSummary :global(.ant-card-body) {
padding: 16px !important;
}
/* Enhanced responsive order summary */
@media (min-width: 769px) and (max-width: 1024px) {
.orderSummary {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
}
.fascanoIcon {
position: relative;
top: 3px;
}
.locationIcon {
position: relative;
top: 3px;
}
.orderDishIcon {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.orderCard :global(.ant-card-body) {
display: flex;
flex-direction: column;
justify-content: flex-start;
}
.orderCard :global(.ant-card-body) > *:not(:last-child) {
margin-bottom: 3.5rem;
}
.orderSummary {
transition: all 0.3s ease;
}
.invoiceIcon {
position: relative;
top: 3px;
}
.timeIcon {
position: relative;
top: 3px;
}
/* Enhanced responsive order summary */
@media (min-width: 769px) and (max-width: 1024px) {
.orderSummary {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
}
.summaryRow {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
}
/* Enhanced responsive summary rows */
@media (min-width: 769px) and (max-width: 1024px) {
.summaryRow {
padding: 12px 0;
font-size: 16px;
}
}
@media (min-width: 1025px) {
.summaryRow {
padding: 16px 0;
font-size: 18px;
}
}
.summaryDivider {
margin: 8px 0 !important;
}
/* Enhanced responsive summary divider */
@media (min-width: 769px) and (max-width: 1024px) {
.summaryDivider {
margin: 20px 0 !important;
}
}
@media (min-width: 1025px) {
.summaryDivider {
margin: 24px 0 !important;
}
}
.totalRow {
font-weight: bold;
font-size: 16px;
}
/* Enhanced responsive total row */
@media (min-width: 769px) and (max-width: 1024px) {
.totalRow {
font-size: 18px;
padding-top: 20px;
margin-top: 12px;
}
}
@media (min-width: 1025px) {
.totalRow {
font-size: 20px;
padding-top: 24px;
margin-top: 16px;
}
}
.desktopOrderSummary {
background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
border: 1px solid rgba(0, 0, 0, 0.08);
}
.desktopSummaryRow {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
font-size: 16px;
}
.desktopTotalRow {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 0;
margin-top: 16px;
}
[data-theme="dark"] .orderSummary {
background-color: #181818 !important;
border-color: #363636 !important;
}
[data-theme="dark"] .orderSummary:hover {
background-color: #363636 !important;
border-color: #424242 !important;
}
[data-theme="dark"] .summaryRow {
color: #b0b0b0;
}
[data-theme="dark"] .totalRow {
color: #ffffff;
border-top-color: #424242;
}
/* Enhanced responsive animations */
@media (prefers-reduced-motion: no-preference) {
.orderSummary {
animation: fadeInUp 0.8s ease-out;
}
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Enhanced responsive focus states */
.orderSummary:focus {
outline: 2px solid var(--primary);
outline-offset: 2px;
}
@media (min-width: 768px) {
.orderSummary:focus {
outline-offset: 4px;
}
}
/* Enhanced responsive print styles */
@media print {
.orderSummary {
box-shadow: none !important;
border: 1px solid #ccc !important;
}
}
/* Enhanced responsive hover effects */
@media (hover: hover) {
.orderSummary:hover {
transform: translateY(-2px);
}
.menuItemImage:hover {
transform: scale(1.05);
}
[data-theme="dark"] .orderSummary:hover {
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
}

162
src/pages/order/page.tsx Normal file
View File

@@ -0,0 +1,162 @@
import { Button, Card, Divider } from "antd";
import Ads2 from "components/Ads/Ads2";
import { CancelOrderBottomSheet } from "components/CustomBottomSheet/CancelOrderBottomSheet";
import Fascano50X50Icon from "components/Icons/fascano/Fascano50X50Icon";
import LocationIcon from "components/Icons/LocationIcon";
import InvoiceIcon from "components/Icons/order/InvoiceIcon";
import TimeIcon from "components/Icons/order/TimeIcon";
import OrderDishIcon from "components/Icons/OrderDishIcon";
import PaymentDetails from "components/PaymentDetails/PaymentDetails";
import ProHeader from "components/ProHeader/ProHeader";
import ProInputCard from "components/ProInputCard/ProInputCard";
import ProText from "components/ProText";
import ProTitle from "components/ProTitle";
import { useTranslation } from "react-i18next";
import Stepper from "./components/Stepper";
import styles from "./order.module.css";
export default function OrderPage() {
const { t } = useTranslation();
// const subtotal = getTotal();
// const tax = subtotal * 0.1; // 10% tax
// const total = subtotal + tax;
return (
<>
<ProHeader>{t("order.title")}</ProHeader>
<div
style={{
display: "flex",
flexDirection: "column",
height: "92vh",
padding: 16,
gap: 16,
overflow: "auto",
scrollbarWidth: "none",
}}
>
<Card className={styles.orderCard}>
<div
style={{
display: "flex",
flexDirection: "row",
gap: "1rem",
backgroundColor: "rgba(255, 183, 0, 0.08)",
borderRadius: "12px",
padding: 16,
}}
>
<Button
type="text"
shape="circle"
style={{
backgroundColor: "rgba(255, 183, 0, 0.08)",
}}
>
<Fascano50X50Icon className={styles.fascanoIcon} />
</Button>
<div>
<ProText style={{ fontSize: "1rem" }}>
{t("order.yourOrderFromFascanoRestaurant")}
</ProText>
<br />
<ProText type="secondary">
<LocationIcon className={styles.locationIcon} />{" "}
{t("order.muscat")}
</ProText>
</div>
</div>
<OrderDishIcon className={styles.orderDishIcon} />
<div>
<ProTitle
level={5}
style={{
fontWeight: 600,
fontSize: "18px",
marginBottom: "0.75rem",
}}
>
{t("order.inProgressOrder")} (1)
</ProTitle>
<div style={{ display: "flex", flexDirection: "row", gap: 8 }}>
<InvoiceIcon className={styles.invoiceIcon} />
<ProText type="secondary" style={{ fontSize: "14px" }}>
#A54363
</ProText>
<TimeIcon className={styles.timeIcon} />
<ProText type="secondary" style={{ fontSize: "14px" }}>
ordered :- Today - 13:55 PM
</ProText>
</div>
<Divider style={{ margin: "12px 0" }} />
<Stepper />
</div>
</Card>
<Ads2 />
<ProInputCard
title={
<div style={{ marginBottom: 7 }}>
<ProText style={{ fontSize: "1rem" }}>
{t("order.yourOrderFrom")}
</ProText>
<br />
<ProText type="secondary">
<LocationIcon className={styles.locationIcon} />{" "}
{t("order.muscat")}
</ProText>
</div>
}
>
<div
style={{ display: "flex", flexDirection: "column", gap: "1rem" }}
>
{[
{ id: 1, name: "Lazord Grill - half kilo" },
{ id: 2, name: "Lazord Grill - half kilo" },
{ id: 3, name: "Lazord Grill - half kilo" },
].map((item, index) => (
<div key={item.id}>
<div
style={{
display: "flex",
flexDirection: "row",
justifyContent: "flex-start",
gap: "1rem",
}}
>
<Button
type="text"
shape="circle"
style={{
backgroundColor: "rgba(255, 183, 0, 0.08)",
}}
>
{index + 1}X
</Button>
<div>
<ProText
style={{ fontSize: "1rem", position: "relative", top: 8 }}
>
{item.name}
</ProText>
</div>
</div>
</div>
))}
</div>
</ProInputCard>
<PaymentDetails />
<CancelOrderBottomSheet />
</div>
</>
);
}