ok
This commit is contained in:
@@ -24,6 +24,7 @@ import { unsubscribeUser } from "../helpers/subscribeHelpers.js";
|
||||
import WelcomePage from "./WelcomePage.js";
|
||||
|
||||
function CafePage({
|
||||
shopId,
|
||||
table,
|
||||
sendParam,
|
||||
welcomePageConfig,
|
||||
@@ -44,9 +45,9 @@ function CafePage({
|
||||
const location = useLocation();
|
||||
const [searchParams] = useSearchParams();
|
||||
const token = searchParams.get("token");
|
||||
const { shopId, tableCode } = useParams();
|
||||
sendParam({ shopId, tableCode });
|
||||
|
||||
const { shopIdentifier, tableCode } = useParams();
|
||||
sendParam({ shopIdentifier, tableCode });
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [screenMessage, setScreenMessage] = useState("");
|
||||
|
||||
@@ -13,9 +13,9 @@ import {
|
||||
|
||||
import { getItemsByCafeId } from "../helpers/cartHelpers.js";
|
||||
|
||||
export default function Invoice({ table, sendParam, deviceType, socket }) {
|
||||
const { shopId, tableCode } = useParams();
|
||||
sendParam({ shopId, tableCode });
|
||||
export default function Invoice({ shopId, table, sendParam, deviceType, socket }) {
|
||||
const { shopIdentifier, tableCode } = useParams();
|
||||
sendParam({ shopIdentifier, tableCode });
|
||||
|
||||
const [cartItems, setCartItems] = useState([]);
|
||||
const [totalPrice, setTotalPrice] = useState(0);
|
||||
|
||||
@@ -11,9 +11,9 @@ import {
|
||||
handlePaymentFromGuestDevice,
|
||||
} from "../helpers/transactionHelpers";
|
||||
|
||||
export default function Invoice({ table, sendParam, deviceType, socket }) {
|
||||
const { shopId, tableCode } = useParams();
|
||||
sendParam({ shopId, tableCode });
|
||||
export default function Invoice({ shopId, table, sendParam, deviceType, socket }) {
|
||||
const { shopIdentifier, tableCode } = useParams();
|
||||
sendParam({ shopIdentifier, tableCode });
|
||||
|
||||
const location = useLocation(); // Use useLocation hook instead of useSearchParams
|
||||
const searchParams = new URLSearchParams(location.search); // Pass location.search directly
|
||||
|
||||
@@ -176,7 +176,7 @@ export default function Transactions({
|
||||
transaction.Table ? transaction.Table.tableNo : "N/A"
|
||||
}`}
|
||||
</h2>
|
||||
{(transaction.notes !== "" || isPaymentOpen) && (
|
||||
{(transaction.notes !== "") && (
|
||||
<>
|
||||
<div
|
||||
className={styles.NoteContainer}
|
||||
@@ -233,9 +233,7 @@ export default function Transactions({
|
||||
</ButtonWithReplica>
|
||||
</div>
|
||||
<h5
|
||||
className={`${styles.DeclineButton} ${
|
||||
isPaymentOpen ? styles.active : ""
|
||||
}`}
|
||||
className={`${styles.DeclineButton}`}
|
||||
onClick={() =>
|
||||
isPaymentOpen
|
||||
? setIsPaymentOpen(false)
|
||||
|
||||
@@ -11,9 +11,9 @@ import {
|
||||
import { getTables } from "../helpers/tableHelper";
|
||||
import TableCanvas from "../components/TableCanvas";
|
||||
|
||||
export default function Transactions({ propsShopId, sendParam, deviceType }) {
|
||||
const { shopId, tableId } = useParams();
|
||||
if (sendParam) sendParam({ shopId, tableId });
|
||||
export default function Transactions({ shopId, propsShopId, sendParam, deviceType }) {
|
||||
const { shopIdentifier, tableId } = useParams();
|
||||
if (sendParam) sendParam({ shopIdentifier, tableId });
|
||||
|
||||
const [tables, setTables] = useState([]);
|
||||
const [selectedTable, setSelectedTable] = useState(null);
|
||||
|
||||
@@ -98,6 +98,8 @@
|
||||
}
|
||||
.DeclineButton {
|
||||
font-family: "Plus Jakarta Sans", sans-serif;
|
||||
z-index: 201;
|
||||
position: relative;
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
font-size: 15px;
|
||||
|
||||
Reference in New Issue
Block a user