From 69ef122f9c0184c592ec021764d0148ddbea54ad Mon Sep 17 00:00:00 2001 From: Pasq G Date: Fri, 10 Jan 2025 10:44:13 +0100 Subject: [PATCH] WIP push --- imports/ui/Codis.jsx | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/imports/ui/Codis.jsx b/imports/ui/Codis.jsx index b22ce5f..9eb3bfd 100644 --- a/imports/ui/Codis.jsx +++ b/imports/ui/Codis.jsx @@ -2,17 +2,15 @@ import React, { Suspense, useEffect, useState, useRef, lazy } from 'react'; import { Meteor } from 'meteor/meteor';; import { NecessitatsCollection } from '/imports/api/necessitats.js'; import { PoblesCollection } from '../api/pobles'; -import { TipusCollection } from '../api/tipus'; +// import { TipusCollection } from '../api/tipus'; import { useSubscribe, useTracker, useFind } from 'meteor/react-meteor-data/suspense'; import { Roles } from 'meteor/roles'; // import { useUserId } from 'meteor/react-meteor-accounts'; import Select from 'react-select'; import CreatableSelect from 'react-select/creatable'; -import AsyncCreatableSelect from 'react-select/async-creatable'; -import { BarraNav } from "./BarraNav/BarraNav"; - - +// import AsyncCreatableSelect from 'react-select/async-creatable'; +// import { BarraNav } from "./BarraNav/BarraNav"; export const Codis = () => { @@ -30,7 +28,7 @@ export const Codis = () => { // console.log("isAdmin: ", isAdmin) ; - let ambitSeleccionat = null; + const [ambitSeleccionat, setAmbitSeleccionat] = useState(null); useSubscribe('necessitats'); const necessitats = useTracker("necessitats", () => NecessitatsCollection.find().fetchAsync()); @@ -55,16 +53,19 @@ export const Codis = () => { // i.toLowerCase().includes(inputValue.toLowerCase()) // ); // }; + // const [ambitGeneral, setAmbitGeneral] = useState(ambitSeleccionat === "GENERAL"); + + const SelectorDeRol = () => { - const SelectorDeRol = ({ambitSeleccionat}) => { return <> + +

- - - ({value: v._id, label: v.nomPoble})) } /> + + + {/*