increase time & show extra
This commit is contained in:
@@ -45,13 +45,7 @@ export default function ProductChoicesCard({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Space orientation="vertical" size="small">
|
<Space orientation="vertical" size="small">
|
||||||
<div
|
<div style={{}}>
|
||||||
style={{
|
|
||||||
position: "absolute",
|
|
||||||
top: 0,
|
|
||||||
[isRTL ? "right" : "left"]: 0,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ProText
|
<ProText
|
||||||
style={{
|
style={{
|
||||||
margin: 0,
|
margin: 0,
|
||||||
@@ -62,7 +56,6 @@ export default function ProductChoicesCard({
|
|||||||
>
|
>
|
||||||
{product.name}
|
{product.name}
|
||||||
</ProText>
|
</ProText>
|
||||||
<br />
|
|
||||||
<ProText
|
<ProText
|
||||||
type="secondary"
|
type="secondary"
|
||||||
className={`${styles.itemDescription} responsive-text`}
|
className={`${styles.itemDescription} responsive-text`}
|
||||||
@@ -92,6 +85,34 @@ export default function ProductChoicesCard({
|
|||||||
{product.type === "OrderItem" && product.variantName}
|
{product.type === "OrderItem" && product.variantName}
|
||||||
</ProText>
|
</ProText>
|
||||||
|
|
||||||
|
{product.extras && (
|
||||||
|
<ProText
|
||||||
|
type="secondary"
|
||||||
|
className={`${styles.itemDescription} responsive-text`}
|
||||||
|
style={{
|
||||||
|
margin: 0,
|
||||||
|
lineClamp: 1,
|
||||||
|
fontSize: isMobile ? 14 : isTablet ? 18 : 20,
|
||||||
|
display: "-webkit-box",
|
||||||
|
WebkitBoxOrient: "vertical",
|
||||||
|
WebkitLineClamp: 1,
|
||||||
|
overflow: "hidden",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
wordWrap: "break-word",
|
||||||
|
overflowWrap: "break-word",
|
||||||
|
lineHeight: "1.4",
|
||||||
|
maxHeight: isMobile ? "3em" : isTablet ? "5em" : "7em",
|
||||||
|
fontWeight: 500,
|
||||||
|
letterSpacing: "0.01em",
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{product.extras.map((o) => (
|
||||||
|
<span key={o.id}>{o.name}</span>
|
||||||
|
))}
|
||||||
|
</ProText>
|
||||||
|
)}
|
||||||
|
|
||||||
{product.type === "CartItem"
|
{product.type === "CartItem"
|
||||||
? product.extrasgroupnew?.map((o) => (
|
? product.extrasgroupnew?.map((o) => (
|
||||||
<ProText
|
<ProText
|
||||||
@@ -122,13 +143,7 @@ export default function ProductChoicesCard({
|
|||||||
: // ToDo
|
: // ToDo
|
||||||
product.itemline}
|
product.itemline}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div style={{}}>
|
||||||
style={{
|
|
||||||
position: "absolute",
|
|
||||||
bottom: addDividerAfter ? 16 : 3,
|
|
||||||
[isRTL ? "right" : "left"]: 0,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ArabicPrice price={product.price} style={{ fontStyle: "bold" }} />
|
<ArabicPrice price={product.price} style={{ fontStyle: "bold" }} />
|
||||||
</div>
|
</div>
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export default function PickupEstimateContent({
|
|||||||
let hour = nextHour;
|
let hour = nextHour;
|
||||||
let minute = nextMinute;
|
let minute = nextMinute;
|
||||||
|
|
||||||
for (let i = 1; i < 48; i++) {
|
for (let i = 0; i <= 96; i++) {
|
||||||
const time = dayjs().hour(hour).minute(minute).second(0);
|
const time = dayjs().hour(hour).minute(minute).second(0);
|
||||||
const formatted = time.format("h:mm A");
|
const formatted = time.format("h:mm A");
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { Dispatch, SetStateAction } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Extra as ExtraType } from "utils/types/appTypes";
|
import { Extra as ExtraType } from "utils/types/appTypes";
|
||||||
import styles from "../product.module.css";
|
import styles from "../product.module.css";
|
||||||
|
import { formatPriceUi } from "utils/helpers";
|
||||||
|
|
||||||
export default function Extra({
|
export default function Extra({
|
||||||
extrasList,
|
extrasList,
|
||||||
@@ -49,7 +50,7 @@ export default function Extra({
|
|||||||
return {
|
return {
|
||||||
value: value.id.toString(),
|
value: value.id.toString(),
|
||||||
label: value.name,
|
label: value.name,
|
||||||
price: `+${value.price}`,
|
price: `+${formatPriceUi(value.price, 3)}`,
|
||||||
};
|
};
|
||||||
})}
|
})}
|
||||||
value={selectedExtras.map((ex) => ex.id.toString())}
|
value={selectedExtras.map((ex) => ex.id.toString())}
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ export default function ProductFooter({
|
|||||||
const extrasInfo = groupInfo?.extras.filter((e) =>
|
const extrasInfo = groupInfo?.extras.filter((e) =>
|
||||||
selectedGroupExtrasIds.includes(e.id.toString()),
|
selectedGroupExtrasIds.includes(e.id.toString()),
|
||||||
);
|
);
|
||||||
console.log(extrasInfo);
|
|
||||||
return {
|
return {
|
||||||
groupid: key,
|
groupid: key,
|
||||||
extrasid: selectedGroupExtrasIds,
|
extrasid: selectedGroupExtrasIds,
|
||||||
|
|||||||
Reference in New Issue
Block a user