table isDeleted issues Fixed
This commit is contained in:
parent
78d753c65a
commit
214ce43ff9
@ -458,7 +458,10 @@ const DineInInner = () => {
|
||||
|
||||
const handleDelete = async () => {
|
||||
try {
|
||||
await client.put(`/Dine360 Table/${deleteConfirm.id}`);
|
||||
const body = {
|
||||
isdeleted: deleteConfirm?.isDeleted == 0 ? 1 : 0
|
||||
}
|
||||
await client.put(`/Dine360 Table/${deleteConfirm.id}`, body);
|
||||
setDeleteConfirm({ show: false, id: null, isDeleted: null });
|
||||
getTableData(selectedRoom);
|
||||
} catch (error) {
|
||||
@ -702,6 +705,7 @@ const DineInInner = () => {
|
||||
// onClick={() => handleTableClick(table)}
|
||||
>
|
||||
<div style={{ position: 'relative', paddingTop: "20px", width: "150px" }}>
|
||||
|
||||
<img
|
||||
src={`/assets/images/seat/${(() => {
|
||||
if (table?.totalcapacity <= 2) return 'seating-24.png';
|
||||
@ -717,6 +721,12 @@ const DineInInner = () => {
|
||||
{ 'grayscale': table.status === 'booked' }
|
||||
)}
|
||||
/>
|
||||
{
|
||||
table?.isdeleted == 1 && (<Icon icon="mdi:block-helper" style={{
|
||||
color: "red", position: "absolute", top: "28%",
|
||||
left: "15%", zIndex: 1
|
||||
}} />)
|
||||
}
|
||||
|
||||
<h6
|
||||
className={`position-absolute text-xs translate-middle text-white fw-bold text-center d-flex align-items-center justify-content-center ${table?.status === "Available" ? "bg-success-500" : table?.status === "Booked" ? "bg-warning-500" : "bg-secondary-500"}`}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user