From 6efa6956d7ea7145a8281354edc5b32a70f77bd0 Mon Sep 17 00:00:00 2001 From: Pasq G Date: Wed, 8 Jan 2025 01:32:40 +0100 Subject: [PATCH] =?UTF-8?q?Resolt=20problema=20amb=20versi=C3=B3=20s=C3=AD?= =?UTF-8?q?ncrona?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- imports/ui/Usuaris.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/imports/ui/Usuaris.jsx b/imports/ui/Usuaris.jsx index 0dece71..0e7929f 100644 --- a/imports/ui/Usuaris.jsx +++ b/imports/ui/Usuaris.jsx @@ -212,7 +212,7 @@ const U = ({u, esAdministrador, setUsrSeleccionat}) => { // zIndex: `200` // }} // // onMouseLeave={ev => { - // // setMostraMenu(false); + // // setMostraMenu(false);p // // }} // > // {/* */} @@ -453,20 +453,21 @@ export const Usuaris = () => { // const [ambitsUSel, setAmbitsUSel] = useState([]); // (async () => { - let ambitsUSel = []; + // let ambitsUSel = []; useEffect(() => { (async () => { const comprovaAdmin = await Roles.userIsInRoleAsync(userId, ["admin"]); setEsEditor(comprovaAdmin); - const ambits = await Roles.getScopesForUserAsync(usrSeleccionat?._id); - setAmbitsUSel(ambits); // console.log("ambitsUSel: ", ambitsUSel); })(); }, []); + const ambitsUSel = Roles.getScopesForUser(usrSeleccionat?._id); + // setAmbitsUSel(ambits); + const rols = useTracker("rols", async () => { return await Roles.getRolesForUserAsync(usrSeleccionat?._id);