ok
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
}
|
||||
|
||||
.bussinessName.active {
|
||||
top: -700%;
|
||||
top: -1000%;
|
||||
position: absolute;
|
||||
color: rgb(0, 0, 0);
|
||||
width: 60vw;
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
.bussinessQR.active {
|
||||
position: absolute;
|
||||
top: -250%;
|
||||
top: -321%;
|
||||
transform: translate(-50%, -80%);
|
||||
|
||||
transition: all 0.5s ease-in-out;
|
||||
|
||||
@@ -378,7 +378,7 @@ const Header = ({
|
||||
Desain kafe
|
||||
</Child>
|
||||
<Child onClick={() => setModal("edit_tables")}>
|
||||
QR kedai dan meja
|
||||
QR kedai
|
||||
</Child>
|
||||
<Child onClick={() => setModal("payment_option")}>
|
||||
Metode pembayaran
|
||||
|
||||
@@ -141,6 +141,12 @@ const SetPaymentQr = ({ shop }) => {
|
||||
|
||||
if (!node) return;
|
||||
|
||||
// Save the original background color
|
||||
const originalBackgroundColor = node.style.backgroundColor;
|
||||
|
||||
// Temporarily remove the background color
|
||||
node.style.backgroundColor = 'transparent';
|
||||
|
||||
const isTableSelected = selectedTable != null;
|
||||
|
||||
toPng(node, { pixelRatio: 2 }) // Adjust pixel ratio for higher resolution
|
||||
@@ -158,27 +164,35 @@ const SetPaymentQr = ({ shop }) => {
|
||||
.catch((err) => {
|
||||
console.error('Could not download the image', err);
|
||||
})
|
||||
.finally(() => {
|
||||
// Restore the original background color after the download
|
||||
node.style.backgroundColor = originalBackgroundColor;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div style={styles.container}>
|
||||
<h3 style={styles.title}>QR kedai dan meja</h3>
|
||||
<h3 style={styles.title}>QR kedai</h3>
|
||||
|
||||
<div
|
||||
id="qr-code-container"
|
||||
style={{
|
||||
background: `center center / contain no-repeat url(${bgImageUrl})`,
|
||||
backgroundSize: "contain",
|
||||
border: "1px solid #ddd",
|
||||
|
||||
...styles.qrCodeContainer,
|
||||
backgroundImage: `url(${bgImageUrl})`,
|
||||
backgroundPosition: "center",
|
||||
backgroundRepeat: "no-repeat",
|
||||
backgroundSize: "contain",
|
||||
backgroundColor: '#cdcdcd'
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={bgImageUrl}
|
||||
alt="QR Code"
|
||||
style={{
|
||||
position: "absolute",
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
objectFit: 'contain',
|
||||
transform: "translate(-50%, 0%)",
|
||||
}} />
|
||||
<img
|
||||
src={generateQRCodeUrl(selectedTable?.tableCode || null)}
|
||||
alt="QR Code"
|
||||
@@ -221,16 +235,16 @@ const SetPaymentQr = ({ shop }) => {
|
||||
<p>Klik untuk ganti background</p>
|
||||
</div>
|
||||
<div style={styles.resultMessage}>
|
||||
<p onClick={() => {setIsConfig(!isConfig); setIsConfigQR(false); setIsConfigFont(false)}}> {isConfig ? '˅' : '˃'} Konfigurasi</p>
|
||||
<p onClick={() => {setIsConfig(!isConfig); setIsConfigQR(!isConfigQR); setIsConfigFont(false)}}> {isConfig ? '˅' : '˃'} Konfigurasi QR</p>
|
||||
<div
|
||||
onClick={() => qrBackgroundInputRef.current.click()} style={styles.changeButton}>Ganti</div>
|
||||
</div>
|
||||
<div style={styles.switchContainer}>
|
||||
{isConfig &&
|
||||
<div style={{ marginLeft: '15px' }}>
|
||||
<p style={styles.description} onClick={() => { setIsConfigQR(!isConfigQR); setIsConfigFont(false) }}>
|
||||
{/* <p style={styles.description} onClick={() => { setIsConfigQR(!isConfigQR); setIsConfigFont(false) }}>
|
||||
{isConfigQR ? '˅' : '˃'} Konfigurasi QR
|
||||
</p>
|
||||
</p> */}
|
||||
{isConfigQR && <>
|
||||
<div style={styles.sliderContainer}>
|
||||
<label style={styles.label}>
|
||||
@@ -290,9 +304,9 @@ const SetPaymentQr = ({ shop }) => {
|
||||
</div>
|
||||
</>}
|
||||
|
||||
<p style={styles.description} onClick={() => { setIsConfigFont(!isConfigFont); setIsConfigQR(false) }}>
|
||||
{/* <p style={styles.description} onClick={() => { setIsConfigFont(!isConfigFont); setIsConfigQR(false) }}>
|
||||
{isConfigFont ? '˅' : '˃'} Konfigurasi nomor
|
||||
</p>
|
||||
</p> */}
|
||||
{isConfigFont && (
|
||||
<>
|
||||
<div style={styles.sliderContainer}>
|
||||
@@ -371,9 +385,9 @@ const SetPaymentQr = ({ shop }) => {
|
||||
|
||||
</div>
|
||||
}
|
||||
<p style={styles.description} onClick={() => setIsViewTables(!isViewTables)}>
|
||||
{/* <p style={styles.description} onClick={() => setIsViewTables(!isViewTables)}>
|
||||
{isViewTables ? '˅' : '˃'} Daftar meja
|
||||
</p>
|
||||
</p> */}
|
||||
|
||||
{isViewTables &&
|
||||
<div style={{marginTop: '34px', marginLeft: '15px'}}>
|
||||
@@ -421,7 +435,8 @@ const SetPaymentQr = ({ shop }) => {
|
||||
</> :
|
||||
<>
|
||||
<div style={styles.uploadMessage}>
|
||||
<p>QR ini akan menjadi identifikasi bahwa pelanggan memesan dari {selectedTable? `(${selectedTable?.tableNo})` : 'link kafe ini. Untuk mengantarkan pelanggan ke meja yang teridentifikasi, anda perlu membuat meja.'}</p>
|
||||
<p>Ini adalah QR yang dapat di scan oleh tamu untuk memesan </p>
|
||||
{/* <p>QR ini akan menjadi identifikasi bahwa pelanggan memesan dari {selectedTable? `(${selectedTable?.tableNo})` : 'link kafe ini. Untuk mengantarkan pelanggan ke meja yang teridentifikasi, anda perlu membuat meja.'}</p> */}
|
||||
</div>
|
||||
<div style={styles.buttonContainer}>
|
||||
<button onClick={()=>downloadQrCodeContainer({selectedTable, shop})} style={styles.saveButton}>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -132,7 +132,6 @@ export default function Transactions({
|
||||
onClick={() =>
|
||||
setSelectedTable(transaction.Table || { tableId: 0 })
|
||||
}
|
||||
style={{ overflow: "hidden" }}
|
||||
>
|
||||
|
||||
<div className={styles['receipt-header']}>
|
||||
|
||||
Reference in New Issue
Block a user