From b89bcd68bb7ccee5ff7af407fba62bd4420fea2b Mon Sep 17 00:00:00 2001 From: Mariela Date: Sun, 31 Jul 2022 21:05:19 -0600 Subject: [PATCH 1/5] arreglar columnas del listar admin comunidad --- .../src/components/AdministradoresComunidad.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/web-ui/web-react/src/components/AdministradoresComunidad.js b/web-ui/web-react/src/components/AdministradoresComunidad.js index 37c4dae6..09c1fcf6 100644 --- a/web-ui/web-react/src/components/AdministradoresComunidad.js +++ b/web-ui/web-react/src/components/AdministradoresComunidad.js @@ -345,15 +345,7 @@ const AdministradoresComunidad = () => { ) - const headerOptions = ( - <> -

- {' '} - {' '} - -

- - ) + const onInputChange = (e, name) => { const val = (e.target && e.target.value) || ''; @@ -389,9 +381,9 @@ const AdministradoresComunidad = () => { - - - + + +
From 7fc01af71e9e8efa87f6562bd2116e76286f9e51 Mon Sep 17 00:00:00 2001 From: Mariela Date: Sun, 31 Jul 2022 21:06:50 -0600 Subject: [PATCH 2/5] arreglar columnas comunidad de viviendas --- .../src/components/ComunidadViviendas.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/web-ui/web-react/src/components/ComunidadViviendas.js b/web-ui/web-react/src/components/ComunidadViviendas.js index 706f9063..21b846e9 100644 --- a/web-ui/web-react/src/components/ComunidadViviendas.js +++ b/web-ui/web-react/src/components/ComunidadViviendas.js @@ -493,15 +493,6 @@ const Communities = () => { ); - const headerOptions = ( - <> -

- Opciones{' '} - -

- - ); - return (
@@ -537,21 +528,25 @@ const Communities = () => { > @@ -562,15 +557,16 @@ const Communities = () => { > - + Date: Sun, 31 Jul 2022 21:07:39 -0600 Subject: [PATCH 3/5] arreglar columnas del administrador del sistema --- .../src/components/AdministradoresSistema.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/web-ui/web-react/src/components/AdministradoresSistema.js b/web-ui/web-react/src/components/AdministradoresSistema.js index 5d007e38..6b609bcf 100644 --- a/web-ui/web-react/src/components/AdministradoresSistema.js +++ b/web-ui/web-react/src/components/AdministradoresSistema.js @@ -313,15 +313,6 @@ const AdministradoresSistema = () => { ); - const headerOptions = ( - <> -

- Opciones{' '} - -

- - ); - return (
@@ -402,7 +393,6 @@ const AdministradoresSistema = () => { > { }} > From 440c13018a2129464c9998785dbb1024e1ecf5f4 Mon Sep 17 00:00:00 2001 From: Mariela Date: Sun, 31 Jul 2022 21:09:57 -0600 Subject: [PATCH 4/5] arreglar columnas guardas de seguridad --- .../src/components/GuardasSeguridad.js | 110 ++++++++++-------- 1 file changed, 60 insertions(+), 50 deletions(-) diff --git a/web-ui/web-react/src/components/GuardasSeguridad.js b/web-ui/web-react/src/components/GuardasSeguridad.js index e7ff5192..a092910f 100644 --- a/web-ui/web-react/src/components/GuardasSeguridad.js +++ b/web-ui/web-react/src/components/GuardasSeguridad.js @@ -14,8 +14,8 @@ import { faIdCardAlt } from '@fortawesome/free-solid-svg-icons'; import { faEllipsis } from '@fortawesome/free-solid-svg-icons'; const GuardasSeguridad = () => { - const [listaGuardas,setListaGuardas]=useState([]); - const [urlFetch,setUrlFetch]=useState('http://localhost:4000/user/findGuards/62be68215692582bbfd77134'); + const [listaGuardas, setListaGuardas] = useState([]); + const [urlFetch, setUrlFetch] = useState('http://localhost:4000/user/findGuards/62be68215692582bbfd77134'); const [guarda, setGuarda] = useState(emptyGuarda); const [selectedGuardas, setSelectedGuardas] = useState(null); const [globalFilter, setGlobalFilter] = useState(null); @@ -37,14 +37,14 @@ const GuardasSeguridad = () => { - async function listaGuardasF(){ - let nombres=await fetch(urlFetch, {method:'GET'}); - let listaGuardasRes= await nombres.json(); - setListaGuardas(listaGuardasRes.message); - } - useEffect(()=>{ + async function listaGuardasF() { + let nombres = await fetch(urlFetch, { method: 'GET' }); + let listaGuardasRes = await nombres.json(); + setListaGuardas(listaGuardasRes.message); + } + useEffect(() => { listaGuardasF(); - },[]) + }, []) function registrarGuarda() { var data = { @@ -56,9 +56,9 @@ const GuardasSeguridad = () => { password: document.getElementById('correo_electronico').value, user_type: "4", //4 es guarda status: "1", - community_id:"62be68215692582bbfd77134" + community_id: "62be68215692582bbfd77134" }; - var data2={ + var data2 = { dni: "11979037", name: "Jorge", last_name: "Soto", @@ -67,35 +67,35 @@ const GuardasSeguridad = () => { password: "1203", user_type: "2", status: "4", - community_id:"62be68215692582bbfd77134" + community_id: "62be68215692582bbfd77134" } -console.log('ssss'); - fetch('http://localhost:4000/user/createGuard', { + console.log('ssss'); + fetch('http://localhost:4000/user/createGuard', { cache: 'no-cache', method: 'POST', - mode:'cors', + mode: 'cors', body: JSON.stringify(data2), headers: { 'Content-Type': 'application/json' } }) - .then( - function (response) { - if (response.status != 201) - console.log('Ocurrió un error con el servicio: ' + response.status); - else - return response.json(); - } - ) - .then( - function (response) { - console.log('fff'); - listaGuardasF(); - } - ) - .catch( - err => console.log('Ocurrió un error con el fetch', err) - ); + .then( + function (response) { + if (response.status != 201) + console.log('Ocurrió un error con el servicio: ' + response.status); + else + return response.json(); + } + ) + .then( + function (response) { + console.log('fff'); + listaGuardasF(); + } + ) + .catch( + err => console.log('Ocurrió un error con el fetch', err) + ); } const hideDeleteGuardaDialog = () => { @@ -218,48 +218,58 @@ console.log('ssss'); const headerName = ( <> -

Nombre

+

{' '} + {' '} + Nombre +

) const headerLastName = ( <> -

Apellidos

+

+ {' '} + {' '} + Apellido(s) +

) const headerDNI = ( - <> -

Identificación

- +

{' '} + {' '} + Identificación +

) const headerEmail = ( <> -

Correo Electrónico

+

{' '} + {' '} + Correo Electrónico +

) const headerPhone = ( <> -

Teléfono

+

+ {' '} + {' '} + Teléfono +

) - const headerOptions = ( - <> -

Opciones

- - ) return (
-
+
- + setSelectedGuardas(e.value)} - responsiveLayout="scroll" header={header} + responsiveLayout="scroll" header={header} rowsPerPageOptions={[5, 10, 25]} className="datatable-responsive mt-3" paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown" currentPageReportTemplate="Mostrando {first} a {last} de {totalRecords}" @@ -270,8 +280,8 @@ console.log('ssss'); - - + +
@@ -316,7 +326,7 @@ console.log('ssss');
- ); + ); }; export default React.memo(GuardasSeguridad); From 61ec6018eca6e766ac92e5c4960cf1919d27a808 Mon Sep 17 00:00:00 2001 From: Mariela Date: Sun, 31 Jul 2022 21:10:08 -0600 Subject: [PATCH 5/5] fix texto comunidad de vivienda --- web-ui/web-react/src/components/ComunidadViviendas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-ui/web-react/src/components/ComunidadViviendas.js b/web-ui/web-react/src/components/ComunidadViviendas.js index 21b846e9..c0d9a92c 100644 --- a/web-ui/web-react/src/components/ComunidadViviendas.js +++ b/web-ui/web-react/src/components/ComunidadViviendas.js @@ -432,7 +432,7 @@ const Communities = () => { icon={faMapLocationDot} style={{ color: '#D7A86E' }} />{' '} - Pronvincia + Provincia

);