This commit is contained in:
zadit frontend
2024-08-04 23:44:40 +00:00
parent 6461279b06
commit 7426ccd61b
8 changed files with 112 additions and 86 deletions

View File

@@ -365,26 +365,27 @@ const TableCanvas = ({ shopId }) => {
}}
>
<ul style={{ listStyleType: "none", padding: 0, margin: 0 }}>
{tables.map((table) => (
<li
key={table.tableId}
style={{
backgroundColor: "white",
marginBottom: "10px",
padding: "10px",
borderRadius: "4px",
boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
}}
onClick={() => handleSelect(table)}
>
{
table.tableNo === 0
? "Clerk" // Display "Clerk" if tableNo is 0
: `Table ${table.tableNo}` // Display "Table {tableNo}" otherwise
}{" "}
- Position: ({table.xposition}, {table.yposition})
</li>
))}
{tables &&
tables.map((table) => (
<li
key={table.tableId}
style={{
backgroundColor: "white",
marginBottom: "10px",
padding: "10px",
borderRadius: "4px",
boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
}}
onClick={() => handleSelect(table)}
>
{
table.tableNo === 0
? "Clerk" // Display "Clerk" if tableNo is 0
: `Table ${table.tableNo}` // Display "Table {tableNo}" otherwise
}{" "}
- Position: ({table.xposition}, {table.yposition})
</li>
))}
</ul>
</div>
</div>