table isDeleted issues Fixed
This commit is contained in:
parent
78d753c65a
commit
214ce43ff9
@ -458,7 +458,10 @@ const DineInInner = () => {
|
|||||||
|
|
||||||
const handleDelete = async () => {
|
const handleDelete = async () => {
|
||||||
try {
|
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 });
|
setDeleteConfirm({ show: false, id: null, isDeleted: null });
|
||||||
getTableData(selectedRoom);
|
getTableData(selectedRoom);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -702,6 +705,7 @@ const DineInInner = () => {
|
|||||||
// onClick={() => handleTableClick(table)}
|
// onClick={() => handleTableClick(table)}
|
||||||
>
|
>
|
||||||
<div style={{ position: 'relative', paddingTop: "20px", width: "150px" }}>
|
<div style={{ position: 'relative', paddingTop: "20px", width: "150px" }}>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
src={`/assets/images/seat/${(() => {
|
src={`/assets/images/seat/${(() => {
|
||||||
if (table?.totalcapacity <= 2) return 'seating-24.png';
|
if (table?.totalcapacity <= 2) return 'seating-24.png';
|
||||||
@ -717,6 +721,12 @@ const DineInInner = () => {
|
|||||||
{ 'grayscale': table.status === 'booked' }
|
{ 'grayscale': table.status === 'booked' }
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
{
|
||||||
|
table?.isdeleted == 1 && (<Icon icon="mdi:block-helper" style={{
|
||||||
|
color: "red", position: "absolute", top: "28%",
|
||||||
|
left: "15%", zIndex: 1
|
||||||
|
}} />)
|
||||||
|
}
|
||||||
|
|
||||||
<h6
|
<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"}`}
|
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