ok
This commit is contained in:
@@ -219,7 +219,7 @@ const Child = styled.div`
|
|||||||
|
|
||||||
const Header = ({
|
const Header = ({
|
||||||
HeaderText,
|
HeaderText,
|
||||||
HeaderSize = '6vw',
|
HeaderSize = '5vw',
|
||||||
shopId,
|
shopId,
|
||||||
shopName,
|
shopName,
|
||||||
shopImage,
|
shopImage,
|
||||||
|
|||||||
@@ -25,13 +25,6 @@ const Item = ({
|
|||||||
const [itemPrice, setItemPrice] = useState(initialPrice);
|
const [itemPrice, setItemPrice] = useState(initialPrice);
|
||||||
const fileInputRef = useRef(null);
|
const fileInputRef = useRef(null);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if(!isBeingEdit) {
|
|
||||||
setPreviewUrl(imageUrl)
|
|
||||||
fileInputRef.current.value = null; // Clear the input value
|
|
||||||
}
|
|
||||||
}, [isBeingEdit]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log(imageUrl);
|
console.log(imageUrl);
|
||||||
console.log(selectedImage);
|
console.log(selectedImage);
|
||||||
@@ -120,7 +113,7 @@ const Item = ({
|
|||||||
{(isBeingEdit || blank) && (
|
{(isBeingEdit || blank) && (
|
||||||
<div className={styles.overlay} onClick={handleImageClick}>
|
<div className={styles.overlay} onClick={handleImageClick}>
|
||||||
<span>
|
<span>
|
||||||
{previewUrl ? "Ganti" : "Ganti"}
|
{previewUrl ? "Click To Change Image" : "Click To Add Image"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -55,11 +55,11 @@
|
|||||||
|
|
||||||
.overlay {
|
.overlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 30px;
|
top: 0;
|
||||||
left: 10px;
|
left: 0;
|
||||||
right: 10px;
|
right: 0;
|
||||||
bottom: 30px;
|
bottom: 0;
|
||||||
background-color: rgba(0, 0, 0, 0.2);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
color: white;
|
color: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -756,8 +756,8 @@ const ItemLister = ({
|
|||||||
)}
|
)}
|
||||||
{(isEdit && !isFirstStep || !isEdit) &&
|
{(isEdit && !isFirstStep || !isEdit) &&
|
||||||
<>
|
<>
|
||||||
{isEdit && <div style={{ display: 'flex', justifyContent: 'flex-start' }}><div style={{marginTop: '49px', marginRight: '10px', marginLeft: '10px'}} onClick={()=>setIsFirstStep(true)}><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>
|
{isEdit && <div style={{ display: 'flex', justifyContent: 'flex-start' }}><div style={{ marginTop: '49px', marginRight: '10px', marginLeft: '10px' }} onClick={() => setIsFirstStep(true)}><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>
|
||||||
<h2 className={styles["item-list-title"]}>{items && items.length < 1 ? 'Buat item' :'Daftar item'}</h2></div>}
|
<h2 className={styles["item-list-title"]}>{items && items.length < 1 ? 'Buat item' : 'Daftar item'}</h2></div>}
|
||||||
<div className={styles["item-list"]}>
|
<div className={styles["item-list"]}>
|
||||||
{user && (
|
{user && (
|
||||||
user.userId == shopOwnerId || user.cafeId == shopId) &&
|
user.userId == shopOwnerId || user.cafeId == shopId) &&
|
||||||
@@ -885,6 +885,7 @@ const ItemLister = ({
|
|||||||
<div className={styles["itemWrapper"]}>
|
<div className={styles["itemWrapper"]}>
|
||||||
{isEditMode && isEditItem != item.itemId && (
|
{isEditMode && isEditItem != item.itemId && (
|
||||||
<div className={styles["editModeLayout"]}>
|
<div className={styles["editModeLayout"]}>
|
||||||
|
<div style={{display: 'flex', alignItems: 'center'}}>
|
||||||
{isEditMode && (
|
{isEditMode && (
|
||||||
<Switch
|
<Switch
|
||||||
onChange={() => handleChange(item.itemId)}
|
onChange={() => handleChange(item.itemId)}
|
||||||
@@ -892,8 +893,11 @@ const ItemLister = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<h3>
|
<h3>
|
||||||
{item.availability ? "tersedia" : "tidak tersedia"}
|
{item.availability ? "tersedia" : "tidak tersedia"}
|
||||||
</h3>
|
</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{display: 'flex', alignItems: 'center'}}>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: '32px',
|
width: '32px',
|
||||||
@@ -923,6 +927,8 @@ const ItemLister = ({
|
|||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
|
<h3>Edit item</h3>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -143,9 +143,11 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
top: 7px;
|
top: 7px;
|
||||||
bottom: -4px;
|
bottom: -4px;
|
||||||
display: flex;
|
display: flex
|
||||||
|
;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.PaymentOption {
|
.PaymentOption {
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ export default function Transaction_pending({ setModal }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.Transaction}>
|
<div className={styles.Transaction}>
|
||||||
<div style={{ marginTop: "30px", textAlign: "center", padding: '10px' }}>
|
<div style={{ textAlign: "center", padding: '10px' }}>
|
||||||
|
|
||||||
<img
|
{/* <img
|
||||||
className={styles.expression}
|
className={styles.expression}
|
||||||
src="https://i.imgur.com/sgvMI02.png"
|
src="https://i.imgur.com/sgvMI02.png"
|
||||||
alt="Success"
|
alt="Success"
|
||||||
/>
|
/> */}
|
||||||
<h2>Notifikasi tidak aktif</h2>
|
<h2>Notifikasi tidak aktif</h2>
|
||||||
<p style={{ marginTop: "20px", color: "black" }}>
|
<p style={{ marginTop: "20px", color: "black" }}>
|
||||||
Aktifkan notifikasi supaya kamu tetap dapat info pesanan, meski sedang buka aplikasi lain.
|
Aktifkan notifikasi supaya kamu tetap dapat info pesanan, meski sedang buka aplikasi lain.
|
||||||
|
|||||||
Reference in New Issue
Block a user