8 Revīzijas 726623197a ... 139e18fe75

Autors SHA1 Ziņojums Datums
  ElPoteito 139e18fe75 Cambio de versión 10 mēneši atpakaļ
  ElPoteito a8749994c4 Ajuste título condicionantes detalle 10 mēneši atpakaļ
  ElPoteito c2374891a4 Cambio de versión 10 mēneši atpakaļ
  ElPoteito 28bb940d16 idSagarhpa multiple 10 mēneši atpakaļ
  ElPoteito d08c2b752d Cambio de versión 11 mēneši atpakaļ
  acampillo 279c249969 Merge branch 'acampillo' into desarrollo 11 mēneši atpakaļ
  ElPoteito b2d57cb5dc Cambio de versión 11 mēneši atpakaļ
  ElPoteito 110b3fa705 Excel municipios 11 mēneši atpakaļ

+ 1 - 2
.env.development.local

@@ -4,7 +4,6 @@ VITE_NOMBRE_PAGINA=
 #VITE_API_URL=http://localhost:8080
 #VITE_API_URL=http://localhost:8080
 VITE_API_URL=https://sagarhpa.api.edesarrollos.info
 VITE_API_URL=https://sagarhpa.api.edesarrollos.info
 VITE_USR_URL=http://127.0.0.1:5173/
 VITE_USR_URL=http://127.0.0.1:5173/
-VITE_API_VERSION=1.24.05.17+1
 
 
 VITE_API_MODULE=/v1/
 VITE_API_MODULE=/v1/
 VITE_API_MODULE_PDF=/pdf/
 VITE_API_MODULE_PDF=/pdf/
@@ -12,4 +11,4 @@ VITE_API_MODULE_EXCEL=/excel/
 VITE_API_MODULE_WORD=/word/
 VITE_API_MODULE_WORD=/word/
 VITE_API_MODULE_PUBLIC=/publico/
 VITE_API_MODULE_PUBLIC=/publico/
 
 
-VITE_API_VERSION=1.24.05.06+0
+VITE_API_VERSION=1.24.08.08+4

+ 1 - 1
.env.production.local

@@ -3,7 +3,7 @@ VITE_PROJECT=jwt
 VITE_NOMBRE_PAGINA=
 VITE_NOMBRE_PAGINA=
 VITE_API_URL=https://sagarhpa.api.edesarrollos.info
 VITE_API_URL=https://sagarhpa.api.edesarrollos.info
 VITE_USR_URL=https://sagarhpa.web.app/
 VITE_USR_URL=https://sagarhpa.web.app/
-VITE_API_VERSION=1.24.05.17+1
+VITE_API_VERSION=1.24.08.08+4
 
 
 VITE_API_MODULE=/v1/
 VITE_API_MODULE=/v1/
 VITE_API_MODULE_PDF=/pdf/
 VITE_API_MODULE_PDF=/pdf/

+ 3 - 3
src/components/layouts/SimpleTableLayout.jsx

@@ -29,7 +29,7 @@ const SimpleTableLayout = ({
     <>
     <>
       {Boolean(onSearch) && !Boolean(customRender) && (
       {Boolean(onSearch) && !Boolean(customRender) && (
         <div style={styles.container}>
         <div style={styles.container}>
-          <Row gutter={10}>
+          <Row gutter={10} justify={'space-between'}>
             {titulo && (<Col span={24}>{titulo}</Col>)}
             {titulo && (<Col span={24}>{titulo}</Col>)}
             <Col
             <Col
               xs={24}
               xs={24}
@@ -37,7 +37,7 @@ const SimpleTableLayout = ({
               md={11}
               md={11}
               lg={7}
               lg={7}
               xxl={7}
               xxl={7}
-              style={styles.inputSearch}
+              style={{...styles.inputSearch, border: '1px solid red'}}
             >
             >
               <Input.Search
               <Input.Search
                 enterButton
                 enterButton
@@ -46,7 +46,7 @@ const SimpleTableLayout = ({
               />
               />
             </Col>
             </Col>
             {Boolean(btnGroup) && (
             {Boolean(btnGroup) && (
-              <Col xs={24} sm={24} md={13} lg={17} xxl={17}>
+              <Col xs={24} sm={24} md={13} lg={17} xxl={17} style={{ border: '1px solid red'}}>
                 <ButtonGroup data={btnGroup} />
                 <ButtonGroup data={btnGroup} />
               </Col>
               </Col>
             )}
             )}

+ 11 - 4
src/views/catalogos/finMovilizaciones/FinMovilizacionDetalle.jsx

@@ -1,4 +1,4 @@
-import { Form, Input, Button, Spin, Row, Col } from 'antd'
+import { Form, Input, Button, Select as AntdSelect, Spin, Row, Col } from 'antd'
 import { useEffect, useMemo, useState } from 'react'
 import { useEffect, useMemo, useState } from 'react'
 import HttpService from '../../../services/httpService'
 import HttpService from '../../../services/httpService'
 import { respuestas } from '../../../utilities'
 import { respuestas } from '../../../utilities'
@@ -12,12 +12,14 @@ const endpoints = {
 };
 };
 
 
 const FinMovilizacionDetalleDetalle = () => {
 const FinMovilizacionDetalleDetalle = () => {
-  const [form] = Form.useForm()
   const navigate = useNavigate()
   const navigate = useNavigate()
-  const [loading, setLoading] = useState(false)
   const query = useQuery()
   const query = useQuery()
   const id = query.get("id")
   const id = query.get("id")
+
+  const [form] = Form.useForm()
+  
   const [request, setRequest] = useState({})
   const [request, setRequest] = useState({})
+  const [loading, setLoading] = useState(false)
 
 
   // const extraParams = useMemo(() => ({
   // const extraParams = useMemo(() => ({
   //   idAgenda: id,
   //   idAgenda: id,
@@ -121,7 +123,12 @@ const FinMovilizacionDetalleDetalle = () => {
               commonRules.requerido,
               commonRules.requerido,
             ]}
             ]}
           >
           >
-            <Input onKeyPress={handleKeyPress} maxLength={9}/>
+            {/* <Input onKeyPress={handleKeyPress} maxLength={9}/> */}
+            <AntdSelect
+              mode='tags'
+              style={{ width: '100%' }}
+              tokenSeparators={[',']}
+            />
           </Form.Item>
           </Form.Item>
         </Col>
         </Col>
         <Col span={24}>
         <Col span={24}>

+ 30 - 3
src/views/catalogos/finMovilizaciones/FinMovilizaciones.jsx

@@ -25,7 +25,7 @@ const FinMovilizaciones = () => {
       q: q ?? "",
       q: q ?? "",
       padre: true,
       padre: true,
     };
     };
-    setBuscarParams(params);    
+    setBuscarParams(params);
   };
   };
 
 
   const botones = [
   const botones = [
@@ -89,7 +89,34 @@ const FinMovilizaciones = () => {
       title: "ID Sagarhpa",
       title: "ID Sagarhpa",
       key: "idSagarhpa",
       key: "idSagarhpa",
       dataIndex: "idSagarhpa",
       dataIndex: "idSagarhpa",
-      render: linkText,
+      render: (item, row) => (
+        <Link
+          to={`/administracion/catalogos/finMovilizaciones/editar?id=${row.id}`}
+          style={{ color: "black" }}
+        >
+          {isEllipsis(columns, "idSagarhpa") ? (
+            <Tooltip title={item}>
+              {item?.map((i, index) => {
+                let v = `${i}`;
+                if (index !== (item?.length - 1)) {
+                  v += ', '
+                }
+
+                return v;
+              })}
+            </Tooltip>
+          ) : (
+            item?.map((i, index) => {
+              let v = `${i}`;
+              if (index !== (item?.length - 1)) {
+                v += ', '
+              }
+
+              return v;
+            })
+          )}
+        </Link>
+      ),
     },
     },
   ];
   ];
 
 
@@ -101,7 +128,7 @@ const FinMovilizaciones = () => {
     >
     >
       <Formulario
       <Formulario
         form={form}
         form={form}
-        onFinish={onFinish} 
+        onFinish={onFinish}
       />
       />
       <Tabla
       <Tabla
         columns={columns}
         columns={columns}

+ 50 - 20
src/views/catalogos/municipios/Formulario.jsx

@@ -10,6 +10,7 @@ import PropTypes from 'prop-types'
 const Formulario = ({
 const Formulario = ({
   form,
   form,
   onFinish,
   onFinish,
+  botones = []
 }) => {
 }) => {
   return (
   return (
     <Form
     <Form
@@ -21,28 +22,57 @@ const Formulario = ({
       onFinishFailed={() => { }}
       onFinishFailed={() => { }}
     >
     >
       <Row gutter={16}>
       <Row gutter={16}>
-        <Col span={6}>
-
-
-          <Form.Item
-            label="Búsqueda"
-            name="q"
-          >
-            <Input />
-          </Form.Item>
+        <Col span={12}>
+          <Row gutter={10}>
+            <Col span={12}>
+              <Form.Item
+                // label="Búsqueda"
+                name="q"
+              >
+                <Input />
+              </Form.Item>
+            </Col>
+            <Col span={4}>
+              <Form.Item>
+                <Button
+                  type="primary"
+                  htmlType="submit"
+                  // style={{ marginTop: "30px" }}
+                  block
+                >
+                  Buscar
+                </Button>
+              </Form.Item>
+            </Col>
+          </Row>
         </Col>
         </Col>
-        <Col span={6}>
-          <Form.Item>
-            <Button
-              type="primary"
-              htmlType="submit"
-              style={{ marginTop: "30px" }}
-            >
-              Buscar
-            </Button>
-          </Form.Item>
+        <Col span={12}>
+          <Row gutter={10} justify={'end'}>
+            {botones.map((i, index) => (
+              <Col>
+                {
+                  Boolean(i?.text) ? (
+                    <Button
+                      key={`btnGroup-${index}`}
+                      onClick={i.onClick}
+                      {...i.props}
+                    >
+                      {i.icon} {i.text}
+                    </Button>
+                  ) : (
+                    <Button
+                      key={`btnGroup-${index}`}
+                      onClick={i.onClick}
+                      icon={i.icon}
+                      {...i.props}
+                    />
+                  )
+                }
+              </Col>
+            ))}
+          </Row>
         </Col>
         </Col>
-      </Row>  
+      </Row>
     </Form>
     </Form>
   )
   )
 }
 }

+ 17 - 11
src/views/catalogos/municipios/Municipios.jsx

@@ -1,10 +1,10 @@
 import { useRef, useState } from "react";
 import { useRef, useState } from "react";
 import { Form, Modal, Tooltip, notification } from "antd";
 import { Form, Modal, Tooltip, notification } from "antd";
-import { DeleteOutlined, PlusOutlined } from "@ant-design/icons";
+import { DeleteOutlined, FileExcelOutlined, PlusOutlined } from "@ant-design/icons";
 import { Tabla } from "../../../components";
 import { Tabla } from "../../../components";
 import { SimpleTableLayout } from "../../../components/layouts";
 import { SimpleTableLayout } from "../../../components/layouts";
 import { ActionsButton } from "../../../components";
 import { ActionsButton } from "../../../components";
-import { isEllipsis, eliminarRegistro } from "../../../utilities";
+import { isEllipsis, eliminarRegistro, openInNewTab } from "../../../utilities";
 import { Link, useNavigate } from "react-router-dom";
 import { Link, useNavigate } from "react-router-dom";
 import Formulario from "./Formulario";
 import Formulario from "./Formulario";
 
 
@@ -25,7 +25,7 @@ const Municipios = () => {
       q: q ?? "",
       q: q ?? "",
       padre: true,
       padre: true,
     };
     };
-    setBuscarParams(params);    
+    setBuscarParams(params);
   };
   };
 
 
   const botones = [
   const botones = [
@@ -35,6 +35,12 @@ const Municipios = () => {
       text: "Nuevo",
       text: "Nuevo",
       icon: <PlusOutlined />,
       icon: <PlusOutlined />,
     },
     },
+    {
+      onClick: () => openInNewTab('/excel/municipio'),
+      props: { disabled: false, block: false },
+      text: "Excel",
+      icon: <FileExcelOutlined />,
+    },
   ];
   ];
 
 
   const linkText = (value, row, key) => (
   const linkText = (value, row, key) => (
@@ -87,21 +93,21 @@ const Municipios = () => {
     {
     {
       title: "Estado",
       title: "Estado",
       key: "estado",
       key: "estado",
-      dataIndex: ["estado", "nombre"], 
+      dataIndex: ["estado", "nombre"],
       render: (value) => value,
       render: (value) => value,
     },
     },
   ];
   ];
 
 
   return (
   return (
     <SimpleTableLayout
     <SimpleTableLayout
-      btnGroup={{
-        btnGroup: botones,
-      }}
+      customRender={
+        <Formulario
+          form={form}
+          onFinish={onFinish}
+          botones={botones}
+        />
+      }
     >
     >
-      <Formulario
-        form={form}
-        onFinish={onFinish} 
-      />
       <Tabla
       <Tabla
         columns={columns}
         columns={columns}
         nameURL={endPoint}
         nameURL={endPoint}

+ 17 - 4
src/views/condicionantes/CondicionanteDetalle.jsx

@@ -16,6 +16,10 @@ const selectores = {
     expand: "subproductos",
     expand: "subproductos",
     ordenar: "nombre-asc",
     ordenar: "nombre-asc",
   },
   },
+  niveles: {
+    name: "nivel",
+    ordenar: "nombre-asc",
+  }
 };
 };
 
 
 const endpoints = {
 const endpoints = {
@@ -191,9 +195,9 @@ const CondicionanteDetalle = () => {
   return (
   return (
     <DefaultLayout>
     <DefaultLayout>
       <Form layout="vertical" name="basic" form={form} onFinish={onFinish} onFinishFailed={() => { }}>
       <Form layout="vertical" name="basic" form={form} onFinish={onFinish} onFinishFailed={() => { }}>
-        <Row gutter={16}>
+        <Row gutter={[10, 10]}>
           <Col span={24}>
           <Col span={24}>
-            <h2>Información del Condicionante</h2>
+            <h1 style={{ marginTop: -10 }}>Información del Condicionante</h1>
           </Col>
           </Col>
           <Col md={8} xs={24}>
           <Col md={8} xs={24}>
             <Form.Item
             <Form.Item
@@ -245,7 +249,7 @@ const CondicionanteDetalle = () => {
             </Form.Item>
             </Form.Item>
           </Col>
           </Col>
           <Divider style={{ margin: '8px 0', borderColor: 'transparent' }} />
           <Divider style={{ margin: '8px 0', borderColor: 'transparent' }} />
-          <Col md={12} xs={24}>
+          <Col md={8} xs={24}>
             <Form.Item
             <Form.Item
               label={<Text strong>Fines de Movilización</Text>}
               label={<Text strong>Fines de Movilización</Text>}
               name="fines"
               name="fines"
@@ -264,7 +268,7 @@ const CondicionanteDetalle = () => {
               </Checkbox.Group>
               </Checkbox.Group>
             </Form.Item>
             </Form.Item>
           </Col>
           </Col>
-          <Col md={12} xs={24}>
+          <Col md={8} xs={24}>
             <Form.Item
             <Form.Item
               label={<Text strong>Tipo de Movilización</Text>}
               label={<Text strong>Tipo de Movilización</Text>}
               name="tipos"
               name="tipos"
@@ -283,6 +287,15 @@ const CondicionanteDetalle = () => {
               </Checkbox.Group>
               </Checkbox.Group>
             </Form.Item>
             </Form.Item>
           </Col>
           </Col>
+          <Col md={8} xs={24}>
+            <Form.Item
+              label={<Text strong>Nivel</Text>}
+              name="idNivel"
+              rules={[{ required: true, message: 'El nivel es obligatorio.' }]}
+            >
+              <Select modelsParams={selectores.niveles} labelProp="nombre" valueProp="id" />
+            </Form.Item>
+          </Col>
           <Divider style={{ margin: '8px 0', borderColor: 'transparent' }} />
           <Divider style={{ margin: '8px 0', borderColor: 'transparent' }} />
           <Col md={12} xs={24}>
           <Col md={12} xs={24}>
             <Form.Item
             <Form.Item