new style now ist more little
This commit is contained in:
@@ -23,7 +23,8 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
const [bitacora, setBitacora] = useState<any>(null);
|
||||
const [tiempoRestante, setTiempoRestante] = useState<string>("");
|
||||
const [minutos, setMinutos] = useState<number>();
|
||||
const [error, setError] = useState()
|
||||
const [errorMesa, setErrorMesa] = useState()
|
||||
const [errorCount, setErrorCount] = useState()
|
||||
const [loading, setLoading] = useState<boolean>(false)
|
||||
|
||||
const router = useRouter();
|
||||
@@ -32,18 +33,18 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
const result = await getMesaByCount(idCuenta);
|
||||
|
||||
if (result?.error) {
|
||||
setError(result.error);
|
||||
setErrorCount(result.error);
|
||||
setBitacora(null);
|
||||
} else {
|
||||
setBitacora(result);
|
||||
}
|
||||
};
|
||||
|
||||
const fetchByEquipo = async (idEquipo: number) => {
|
||||
const fetchByMesa = async (idEquipo: number) => {
|
||||
const result = await getTableByCount(idEquipo);
|
||||
|
||||
if (result?.error) {
|
||||
setError(result.error);
|
||||
setErrorMesa(result.error);
|
||||
setBitacora(null);
|
||||
} else {
|
||||
setBitacora(result);
|
||||
@@ -63,7 +64,7 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
const idEquipo = table;
|
||||
if (isNaN(idEquipo)) return;
|
||||
|
||||
fetchByEquipo(idEquipo);
|
||||
fetchByMesa(idEquipo);
|
||||
}, [table]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -114,8 +115,9 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
}
|
||||
|
||||
if (modo === "Mesa" && table) {
|
||||
fetchByEquipo(table);
|
||||
fetchByMesa(table);
|
||||
}
|
||||
|
||||
router.refresh();
|
||||
setLoading(true)
|
||||
};
|
||||
@@ -146,10 +148,18 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{modo === "Cuenta" && <SearchUser value={numAcount ?? null} />}
|
||||
{modo === "Mesa" && <SearchMesa />}
|
||||
|
||||
<h2 style={{ marginTop: "10px" }}>{error}</h2>
|
||||
{modo === "Cuenta" &&
|
||||
<>
|
||||
<SearchUser value={numAcount ?? null} />
|
||||
<h2 style={{ marginTop: "10px" }}>{errorCount}</h2>
|
||||
</>
|
||||
}
|
||||
{modo === "Mesa" &&
|
||||
<>
|
||||
<SearchMesa />
|
||||
<h2 style={{ marginTop: "10px" }}>{errorMesa}</h2>
|
||||
</>
|
||||
}
|
||||
|
||||
{bitacora && tiempoRestante !== "agotado" && (
|
||||
<>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
padding: 5px 5px;
|
||||
cursor: pointer;
|
||||
border-radius: 10px 10px 0 0;
|
||||
font-size: 14px;
|
||||
font-size: 1.4rem;
|
||||
font-weight: 600;
|
||||
transition: background 0.2s ease;
|
||||
min-width: 50px;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
.buttonLock{
|
||||
padding: 0.8rem;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
right: 100px;
|
||||
background-color: #d32f2f;
|
||||
}
|
||||
|
||||
@@ -61,4 +61,10 @@
|
||||
filter: invert(1);
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
@media(max-height:800px) {
|
||||
.buttonLock {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,13 @@
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@media(max-width: 1000px){
|
||||
.session{
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.button-logout {
|
||||
color: transparent;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
transition:
|
||||
background-color 0.3s ease,
|
||||
border 0.3s ease;
|
||||
font-size: 1.5rem;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.barNavigation li:hover {
|
||||
@@ -107,12 +107,12 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #545454;
|
||||
font-size: 1.5rem;
|
||||
font-size: 1.4rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.subMenu:hover > span,
|
||||
.subMenu > a:hover > span {
|
||||
.subMenu:hover>span,
|
||||
.subMenu>a:hover>span {
|
||||
color: black;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
color: white;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 1.5rem;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
thead,
|
||||
@@ -158,7 +158,7 @@ tbody {
|
||||
}
|
||||
|
||||
.barNavigation {
|
||||
font-size: 15px;
|
||||
font-size: 1.4rem;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
@@ -235,13 +235,13 @@ tbody {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.subMenu.open ul a{
|
||||
.subMenu.open ul a {
|
||||
display: flex;
|
||||
pointer-events:auto;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user