ok
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"name": "groovebrew-mockup",
|
"name": "groovebrew-mockup",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://dev.kedaimaster.com",
|
"homepage": "https://kedaimaster.com",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.13.3",
|
"@emotion/react": "^11.13.3",
|
||||||
"@emotion/styled": "^11.13.0",
|
"@emotion/styled": "^11.13.0",
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
transition: all 0.5s ease-in-out;
|
transition: all 0.5s ease-in-out;
|
||||||
}
|
}
|
||||||
.bussinessName h2 {
|
.bussinessName h2 {
|
||||||
|
font-size: 18px;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
color: inherit; /* Ensures that it inherits the color from the parent */
|
color: inherit; /* Ensures that it inherits the color from the parent */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export function MusicPlayer({ socket, shopId, user, shopOwnerId, isSpotifyNeedLo
|
|||||||
// setSubtitleColor("white");
|
// setSubtitleColor("white");
|
||||||
// setSubtitleBG("black");
|
// 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);
|
setBackgroundImage(proxiedUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const SetPaymentQr = ({ shopId,
|
|||||||
const [qrPosition, setQrPosition] = useState([50, 50]);
|
const [qrPosition, setQrPosition] = useState([50, 50]);
|
||||||
const [qrSize, setQrSize] = useState(50);
|
const [qrSize, setQrSize] = useState(50);
|
||||||
const [qrPayment, setQrPayment] = useState();
|
const [qrPayment, setQrPayment] = useState();
|
||||||
|
const [qrPaymentFile, setQrPaymentFile] = useState();
|
||||||
const [qrCodeDetected, setQrCodeDetected] = useState(false);
|
const [qrCodeDetected, setQrCodeDetected] = useState(false);
|
||||||
const [isNeedConfirmationState, setIsNeedConfirmationState] = useState(0);
|
const [isNeedConfirmationState, setIsNeedConfirmationState] = useState(0);
|
||||||
const [isQRISavailable, setIsQRISavailable] = useState(0);
|
const [isQRISavailable, setIsQRISavailable] = useState(0);
|
||||||
@@ -57,6 +58,7 @@ const SetPaymentQr = ({ shopId,
|
|||||||
if (file) {
|
if (file) {
|
||||||
const newqrPayment = URL.createObjectURL(file);
|
const newqrPayment = URL.createObjectURL(file);
|
||||||
setQrPayment(newqrPayment);
|
setQrPayment(newqrPayment);
|
||||||
|
setQrPaymentFile(file);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -83,13 +85,14 @@ const SetPaymentQr = ({ shopId,
|
|||||||
|
|
||||||
// Save cafe details
|
// Save cafe details
|
||||||
const handleSave = async () => {
|
const handleSave = async () => {
|
||||||
let qrPaymentFile;
|
let qrPaymentFileCache;
|
||||||
if(qrPaymentInputRef?.current?.files[0])
|
if(qrPaymentFile != null)
|
||||||
qrPaymentFile = qrPaymentInputRef.current.files[0];
|
qrPaymentFileCache = qrPaymentFile;
|
||||||
|
|
||||||
const details = {
|
const details = {
|
||||||
qrPosition,
|
qrPosition,
|
||||||
qrSize,
|
qrSize,
|
||||||
qrPaymentFile,
|
qrPaymentFile: qrPaymentFileCache,
|
||||||
isQRISavailable: isQRISavailable === 1,
|
isQRISavailable: isQRISavailable === 1,
|
||||||
isOpenBillAvailable: isOpenBillAvailable === 1,
|
isOpenBillAvailable: isOpenBillAvailable === 1,
|
||||||
isNeedConfirmationState: isNeedConfirmationState === 1
|
isNeedConfirmationState: isNeedConfirmationState === 1
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// src/config.js
|
// 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;
|
export default API_BASE_URL;
|
||||||
|
|||||||
@@ -190,12 +190,12 @@ export default function Transactions({
|
|||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{transaction.payment_type != 'paylater/cash' && transaction.payment_type != 'paylater/cashless' &&
|
{transaction.payment_type != 'paylater/cash' && transaction.payment_type != 'paylater/cashless' &&
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
localStorage.setItem('lastTransaction', JSON.stringify(transaction));
|
localStorage.setItem('lastTransaction', JSON.stringify(transaction));
|
||||||
}} className={styles["addNewItem"]}>Tambah pesanan</div>
|
}} className={styles["addNewItem"]}>Tambah pesanan</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2 className={styles["Transactions-detail"]}>
|
<h2 className={styles["Transactions-detail"]}>
|
||||||
@@ -269,28 +269,28 @@ export default function Transactions({
|
|||||||
</ButtonWithReplica>
|
</ButtonWithReplica>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
{transaction.payment_type == 'cash' ?
|
{transaction.payment_type == 'cash' ?
|
||||||
<button
|
<button
|
||||||
className={styles.PayButton}
|
className={styles.PayButton}
|
||||||
onClick={() => handleDecline(transaction.transactionId)}
|
onClick={() => handleDecline(transaction.transactionId)}
|
||||||
disabled={
|
disabled={
|
||||||
transaction.confirmed === -1 ||
|
transaction.confirmed === -1 ||
|
||||||
transaction.confirmed === 3 ||
|
transaction.confirmed === 3 ||
|
||||||
isPaymentLoading
|
isPaymentLoading
|
||||||
} // Disable button if confirmed (1) or declined (-1) or
|
} // Disable button if confirmed (1) or declined (-1) or
|
||||||
>
|
>
|
||||||
{isPaymentLoading ? (
|
{isPaymentLoading ? (
|
||||||
<ColorRing height="50" width="50" color="white" />
|
<ColorRing height="50" width="50" color="white" />
|
||||||
) : transaction.confirmed === -1 ? (
|
) : transaction.confirmed === -1 ? (
|
||||||
"Ditolak" // Display "Declined" if the transaction is declined (-1)
|
"Ditolak" // Display "Declined" if the transaction is declined (-1)
|
||||||
) : transaction.confirmed === -2 ? (
|
) : transaction.confirmed === -2 ? (
|
||||||
"Dibatalkan" // Display "Declined" if the transaction is declined (-1)
|
"Dibatalkan" // Display "Declined" if the transaction is declined (-1)
|
||||||
) : (
|
) : (
|
||||||
"Batalkan" // Display "Confirm availability" if the transaction is not confirmed (0)
|
"Batalkan" // Display "Confirm availability" if the transaction is not confirmed (0)
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
:
|
:
|
||||||
(transaction.payment_type != 'paylater/cash' && transaction.payment_type != 'paylater/cashless' || isPaymentOpen &&
|
((transaction.payment_type != 'paylater/cash' && transaction.payment_type != 'paylater/cashless' || isPaymentOpen) &&
|
||||||
<h5
|
<h5
|
||||||
className={`${styles.DeclineButton}`}
|
className={`${styles.DeclineButton}`}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
@@ -301,8 +301,8 @@ export default function Transactions({
|
|||||||
>
|
>
|
||||||
{isPaymentOpen ? "kembali" : "batalkan"}
|
{isPaymentOpen ? "kembali" : "batalkan"}
|
||||||
</h5>
|
</h5>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
:
|
:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user