This commit is contained in:
zadit
2025-02-03 07:27:48 +07:00
parent fa5bab4d5f
commit 50de8d7961

View File

@@ -630,7 +630,7 @@ const App = ({ forCafe = true, cafeId = -1,
padding: "20px", padding: "20px",
}} }}
> >
{user.roleId == 0 ? {user?.roleId == 0 ?
<RoundedRectangle <RoundedRectangle
title={"Masukkan nama bisnis"} title={"Masukkan nama bisnis"}
width="calc(100% - 10px)" width="calc(100% - 10px)"
@@ -666,14 +666,14 @@ const App = ({ forCafe = true, cafeId = -1,
} }
<RoundedRectangle <RoundedRectangle
title={user.roleId === 0 ? "Buat Voucher" : "Buat Bisnis"} title={user?.roleId === 0 ? "Buat Voucher" : "Buat Bisnis"}
width="calc(100% - 10px)" width="calc(100% - 10px)"
onClick={() => (user.roleId === 0 ? createCoupon(itemName) : createCafe(itemName))} onClick={() => (user?.roleId === 0 ? createCoupon(itemName) : createCafe(itemName))}
/> />
</div> </div>
</div> </div>
} }
{user.roleId == 1 && {user?.roleId == 1 &&
<> <>
<div className={`${styles.couponContainer}`}> <div className={`${styles.couponContainer}`}>
{forCafe && <div style={{ marginTop: '49px', marginRight: '10px' }} onClick={handleClose}><svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 512 512"><path d="M48,256c0,114.87,93.13,208,208,208s208-93.13,208-208S370.87,48,256,48,48,141.13,48,256Zm212.65-91.36a16,16,0,0,1,.09,22.63L208.42,240H342a16,16,0,0,1,0,32H208.42l52.32,52.73A16,16,0,1,1,238,347.27l-79.39-80a16,16,0,0,1,0-22.54l79.39-80A16,16,0,0,1,260.65,164.64Z" /></svg></div>} {forCafe && <div style={{ marginTop: '49px', marginRight: '10px' }} onClick={handleClose}><svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 512 512"><path d="M48,256c0,114.87,93.13,208,208,208s208-93.13,208-208S370.87,48,256,48,48,141.13,48,256Zm212.65-91.36a16,16,0,0,1,.09,22.63L208.42,240H342a16,16,0,0,1,0,32H208.42l52.32,52.73A16,16,0,1,1,238,347.27l-79.39-80a16,16,0,0,1,0-22.54l79.39-80A16,16,0,0,1,260.65,164.64Z" /></svg></div>}