diff --git a/package.json b/package.json index 86552a3..3576ac4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "groovebrew-mockup", "version": "0.1.0", "private": true, - "homepage": "https://dev.kedaimaster.com", + "homepage": "https://kedaimaster.com", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", diff --git a/src/components/ButtonWithReplica.css b/src/components/ButtonWithReplica.css index 2b639a4..183ebd1 100644 --- a/src/components/ButtonWithReplica.css +++ b/src/components/ButtonWithReplica.css @@ -76,6 +76,7 @@ transition: all 0.5s ease-in-out; } .bussinessName h2 { + font-size: 18px; overflow-wrap: break-word; color: inherit; /* Ensures that it inherits the color from the parent */ } diff --git a/src/components/MusicPlayer.js b/src/components/MusicPlayer.js index 84ac216..754932f 100644 --- a/src/components/MusicPlayer.js +++ b/src/components/MusicPlayer.js @@ -108,7 +108,7 @@ export function MusicPlayer({ socket, shopId, user, shopOwnerId, isSpotifyNeedLo // setSubtitleColor("white"); // setSubtitleBG("black"); // } - const proxiedUrl = `https://dev.api.kedaimaster.com/image?url=${encodeURIComponent(modifyUrl(imageUrl))}`; // Use your proxy to fetch the image + const proxiedUrl = `https://api.kedaimaster.com/image?url=${encodeURIComponent(modifyUrl(imageUrl))}`; // Use your proxy to fetch the image setBackgroundImage(proxiedUrl); } catch (error) { diff --git a/src/components/PaymentOptions.js b/src/components/PaymentOptions.js index 72dfb5c..2743873 100644 --- a/src/components/PaymentOptions.js +++ b/src/components/PaymentOptions.js @@ -14,6 +14,7 @@ const SetPaymentQr = ({ shopId, const [qrPosition, setQrPosition] = useState([50, 50]); const [qrSize, setQrSize] = useState(50); const [qrPayment, setQrPayment] = useState(); + const [qrPaymentFile, setQrPaymentFile] = useState(); const [qrCodeDetected, setQrCodeDetected] = useState(false); const [isNeedConfirmationState, setIsNeedConfirmationState] = useState(0); const [isQRISavailable, setIsQRISavailable] = useState(0); @@ -57,6 +58,7 @@ const SetPaymentQr = ({ shopId, if (file) { const newqrPayment = URL.createObjectURL(file); setQrPayment(newqrPayment); + setQrPaymentFile(file); } }; @@ -83,13 +85,14 @@ const SetPaymentQr = ({ shopId, // Save cafe details const handleSave = async () => { - let qrPaymentFile; - if(qrPaymentInputRef?.current?.files[0]) - qrPaymentFile = qrPaymentInputRef.current.files[0]; + let qrPaymentFileCache; + if(qrPaymentFile != null) + qrPaymentFileCache = qrPaymentFile; + const details = { qrPosition, qrSize, - qrPaymentFile, + qrPaymentFile: qrPaymentFileCache, isQRISavailable: isQRISavailable === 1, isOpenBillAvailable: isOpenBillAvailable === 1, isNeedConfirmationState: isNeedConfirmationState === 1 diff --git a/src/config.js b/src/config.js index 6cf67cc..967c5ce 100644 --- a/src/config.js +++ b/src/config.js @@ -1,5 +1,5 @@ // src/config.js -const API_BASE_URL = 'https://dev.api.kedaimaster.com'; +const API_BASE_URL = 'https://api.kedaimaster.com'; export default API_BASE_URL; diff --git a/src/pages/Transaction_confirmed.js b/src/pages/Transaction_confirmed.js index 54097ca..1a82a53 100644 --- a/src/pages/Transaction_confirmed.js +++ b/src/pages/Transaction_confirmed.js @@ -190,12 +190,12 @@ export default function Transactions({ ))} - + {transaction.payment_type != 'paylater/cash' && transaction.payment_type != 'paylater/cashless' && -
{ - localStorage.setItem('lastTransaction', JSON.stringify(transaction)); - }} className={styles["addNewItem"]}>Tambah pesanan
+
{ + localStorage.setItem('lastTransaction', JSON.stringify(transaction)); + }} className={styles["addNewItem"]}>Tambah pesanan
}

@@ -269,28 +269,28 @@ export default function Transactions({ } - {transaction.payment_type == 'cash' ? - - : - (transaction.payment_type != 'paylater/cash' && transaction.payment_type != 'paylater/cashless' || isPaymentOpen && + {transaction.payment_type == 'cash' ? + + : + ((transaction.payment_type != 'paylater/cash' && transaction.payment_type != 'paylater/cashless' || isPaymentOpen) &&

@@ -301,8 +301,8 @@ export default function Transactions({ > {isPaymentOpen ? "kembali" : "batalkan"}
- ) - } + ) + } :