ok
This commit is contained in:
@@ -46,7 +46,7 @@ const CreateCouponPage = () => {
|
||||
let encodedCouponCode = encodeURIComponent(encryptedCouponCode);
|
||||
|
||||
// Construct the URL with the encoded coupon code as a query parameter
|
||||
const urlWithCoupon = `https://coupon.kedaimaster.com/coupon?c=${encodedCouponCode}`;
|
||||
const urlWithCoupon = `https://dev.coupon.kedaimaster.com/coupon?c=${encodedCouponCode}`;
|
||||
|
||||
// Optionally, set the URL to use with the coupon
|
||||
setCouponUrl(urlWithCoupon);
|
||||
|
||||
@@ -27,7 +27,11 @@ const RoundedRectangle = ({
|
||||
loading = false,
|
||||
children, // Assuming this is a React component or JSX
|
||||
isChildren,
|
||||
width = 'calc(100% / 2 - 10px)'
|
||||
width = 'calc(100% / 2 - 10px)',
|
||||
height,
|
||||
marginBottom,
|
||||
backgroundColor,
|
||||
color
|
||||
}) => {
|
||||
const containerStyle = {
|
||||
display: "flex",
|
||||
@@ -35,25 +39,26 @@ const RoundedRectangle = ({
|
||||
alignItems: "flex-start",
|
||||
justifyContent: "center",
|
||||
width: width,
|
||||
height: "auto",
|
||||
borderRadius: "15px",
|
||||
height: height != undefined ? height : "auto",
|
||||
borderRadius: "11px",
|
||||
padding: "20px",
|
||||
margin: "5px",
|
||||
textAlign: "left",
|
||||
fontFamily: "Arial, sans-serif",
|
||||
boxSizing: "border-box",
|
||||
backgroundColor: loading ? "rgb(127 127 127)" : 'white',
|
||||
border: '1px solid #b3b1b1'
|
||||
backgroundColor: loading ? "rgb(127 127 127)" : backgroundColor,
|
||||
border: '1px solid #b3b1b1',
|
||||
fontSize: '15px'
|
||||
};
|
||||
|
||||
const titleStyle = {
|
||||
fontWeight: "bold",
|
||||
marginBottom: "10px",
|
||||
marginBottom: marginBottom,
|
||||
width: "100%",
|
||||
backgroundColor: loading
|
||||
? "rgb(85 85 85)"
|
||||
: !isChildren && !children && "inherit",
|
||||
color: loading ? "transparent" : "inherit",
|
||||
: !isChildren && !children && backgroundColor,
|
||||
color: loading ? "transparent" : color,
|
||||
};
|
||||
|
||||
const valueAndPercentageContainerStyle = {
|
||||
@@ -536,6 +541,9 @@ const App = ({ forCafe = true, cafeId = -1,
|
||||
percentage={roundToInteger(analytics?.growth?.incomeGrowth)}
|
||||
invert={false}
|
||||
loading={loading}
|
||||
marginBottom={'10px'}
|
||||
backgroundColor={'white'}
|
||||
color={'black'}
|
||||
/>
|
||||
|
||||
<RoundedRectangle
|
||||
@@ -545,6 +553,9 @@ const App = ({ forCafe = true, cafeId = -1,
|
||||
percentage={roundToInteger(analytics?.growth?.outcomeGrowth)}
|
||||
invert={true}
|
||||
loading={loading}
|
||||
marginBottom={'10px'}
|
||||
backgroundColor={'white'}
|
||||
color={'black'}
|
||||
/>
|
||||
<RoundedRectangle
|
||||
title="Transaksi"
|
||||
@@ -552,6 +563,9 @@ const App = ({ forCafe = true, cafeId = -1,
|
||||
percentage={roundToInteger(analytics?.growth?.transactionGrowth)}
|
||||
invert={false}
|
||||
loading={loading}
|
||||
marginBottom={'10px'}
|
||||
backgroundColor={'white'}
|
||||
color={'black'}
|
||||
/>
|
||||
{((analytics?.itemSales &&
|
||||
analytics?.itemSales.length > 0) || (!analytics?.itemSales && segments.length > 0)) ? (
|
||||
@@ -560,6 +574,9 @@ const App = ({ forCafe = true, cafeId = -1,
|
||||
value={analytics?.itemSales?.length > 0 && analytics?.itemSales[0] != undefined ? analytics?.itemSales[0]?.itemName
|
||||
: segments[0].itemName}
|
||||
loading={loading}
|
||||
marginBottom={'10px'}
|
||||
backgroundColor={'white'}
|
||||
color={'black'}
|
||||
/>
|
||||
)
|
||||
:
|
||||
@@ -568,24 +585,29 @@ const App = ({ forCafe = true, cafeId = -1,
|
||||
title={"Item favorit"}
|
||||
value={"-"}
|
||||
loading={loading}
|
||||
marginBottom={'10px'}
|
||||
backgroundColor={'white'}
|
||||
color={'black'}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{selectedCafeId != -1 && (
|
||||
{/* {selectedCafeId != -1 && (
|
||||
<RoundedRectangle
|
||||
title={"Total promo"}
|
||||
loading={loading}
|
||||
value={'Rp'+analytics?.currentTotals?.totalPromoSpend}
|
||||
width= {`calc(${!forCafe && selectedCafeId !== 0 ? '50%' : '100%'} - 10px)`}
|
||||
/>
|
||||
)}
|
||||
)} */}
|
||||
{!forCafe && selectedCafeId != -1 && selectedCafeId != 0 && (
|
||||
<RoundedRectangle
|
||||
title={"Kunjungi"}
|
||||
value={"bisnis"}
|
||||
loading={loading}
|
||||
width= {`calc(${selectedCafeId !== 0 ? '50%' : '100%'} - 10px)`}
|
||||
title={"Kunjungi bisnis"}
|
||||
width= {`calc(${'100%'} - 10px)`}
|
||||
height='10px'
|
||||
onClick={() => window.location.href = window.location.origin + '/' + otherCafes.find(item => item.cafeId === selectedCafeId).cafeIdentifyName}
|
||||
marginBottom={'0px'}
|
||||
backgroundColor={'#f4f0e6'}
|
||||
color={'#b39969'}
|
||||
/>
|
||||
)}
|
||||
<div
|
||||
|
||||
@@ -11,7 +11,7 @@ import { getTables } from "../helpers/tableHelper";
|
||||
import TableCanvas from "../components/TableCanvas";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
|
||||
export default function Transactions({ propsShopId, sendParam, deviceType, handleMoveToTransaction, shopImg }) {
|
||||
export default function Transactions({ propsShopId, sendParam, deviceType, handleMoveToTransaction, depth, shopImg }) {
|
||||
const { shopId, tableId } = useParams();
|
||||
if (sendParam) sendParam({ shopId, tableId });
|
||||
|
||||
@@ -160,7 +160,9 @@ export default function Transactions({ propsShopId, sendParam, deviceType, handl
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div className={styles.circle}>1</div>
|
||||
{depth > 0 &&
|
||||
<div className={styles.circle}>{depth}</div>
|
||||
}
|
||||
</div>
|
||||
<div className={styles['line']} ></div>
|
||||
<div className={styles['circle-right']} onClick={() => handleMoveToTransaction('next', transaction.transactionId)}>
|
||||
|
||||
Reference in New Issue
Block a user