uodate loyalty card
This commit is contained in:
@@ -36,9 +36,9 @@
|
|||||||
background-image: url(/empty-dish.png);
|
background-image: url(/empty-dish.png);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
width: 32px;
|
width: 40px;
|
||||||
height: 32px;
|
height: 40px;
|
||||||
border-radius: 50%;
|
border-radius: 6px;
|
||||||
border: none;
|
border: none;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,54 +87,41 @@ const LoyaltyCard = () => {
|
|||||||
)}
|
)}
|
||||||
</ProText>
|
</ProText>
|
||||||
</Col>
|
</Col>
|
||||||
<Col>
|
<Col>{/* <PresentIcon /> */}</Col>
|
||||||
{/* <PresentIcon /> */}
|
|
||||||
</Col>
|
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)}
|
||||||
{token && !isHasLoyaltyGift && (
|
{token && !isHasLoyaltyGift && (
|
||||||
<Row justify="space-between" align="middle">
|
<div
|
||||||
<Col>
|
style={{
|
||||||
<div className={styles.presentIcon}>
|
display: "flex",
|
||||||
<div style={{ display: "flex" }}>
|
flexDirection: "row",
|
||||||
|
gap: 10,
|
||||||
|
overflow: "auto",
|
||||||
|
scrollbarWidth: "none",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{Array.from({ length: restaurant?.loyalty_stamps || 0 }).map(
|
||||||
|
(_, index) => {
|
||||||
|
const currentPoints = restaurant?.customer_loyalty_points || 0;
|
||||||
|
const isCollected = index < currentPoints;
|
||||||
|
return (
|
||||||
|
<Col key={index}>
|
||||||
<Image
|
<Image
|
||||||
|
key={index}
|
||||||
className={styles.presentIconItem}
|
className={styles.presentIconItem}
|
||||||
preview={false}
|
preview={false}
|
||||||
width={32}
|
width={40}
|
||||||
height={32}
|
height={40}
|
||||||
src={restaurant?.loyalty_stamp_image}
|
src={restaurant?.loyalty_stamp_image}
|
||||||
|
style={{
|
||||||
|
opacity: isCollected ? 1 : 0.4,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<ProText
|
|
||||||
type="secondary"
|
|
||||||
strong
|
|
||||||
style={{
|
|
||||||
fontSize: "1rem",
|
|
||||||
fontWeight: 400,
|
|
||||||
position: "relative",
|
|
||||||
top: 3,
|
|
||||||
margin: "0 2px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
x
|
|
||||||
{(restaurant?.loyalty_stamps ?? 0) -
|
|
||||||
(restaurant?.customer_loyalty_points ?? 0)}
|
|
||||||
</ProText>{" "}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Col>
|
</Col>
|
||||||
{/* <Col>
|
);
|
||||||
<Button
|
},
|
||||||
style={{
|
)}
|
||||||
backgroundColor: colors.primary,
|
</div>
|
||||||
color: "white",
|
|
||||||
border: 0,
|
|
||||||
height: 32,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("menu.claim")}
|
|
||||||
</Button>
|
|
||||||
</Col> */}
|
|
||||||
</Row>
|
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user