Hugo %!s(int64=4) %!d(string=hai) anos
pai
achega
656ceccdd9
Modificáronse 3 ficheiros con 24 adicións e 21 borrados
  1. 3 3
      views/inicio/index.php
  2. 18 14
      views/site/asignar-descarga.php
  3. 3 4
      views/site/consulta.php

+ 3 - 3
views/inicio/index.php

@@ -1,7 +1,7 @@
 <style>
   .site-card {
-    height: 100vh;
-    width: 100vw;
+    min-height: 100vh;
+    width: 100%;
     padding: 20px;
     background: #ececec;
   }
@@ -24,7 +24,7 @@
       <div className="site-card">
         <Card>
           <a href="/site/consulta">
-            <Card.Grid className="grid">Consultas</Card.Grid>
+            <Card.Grid className="grid">Consulta de Descarga</Card.Grid>
           </a>
           <a href="/site/asignar-descarga">
             <Card.Grid className="grid">Asignar Descarga</Card.Grid>

+ 18 - 14
views/site/asignar-descarga.php

@@ -1,7 +1,7 @@
 <style>
   .site-card {
     min-height: 100vh;
-    width: 100vw;
+    width: 100%;
     padding: 20px;
     background: #ececec;
   }
@@ -13,6 +13,11 @@
   .full-width {
     width: 100%;
   }
+  .codigo {
+    width: 50%;
+    height: 500px;
+    background: #fff;
+  }
 </style>
 <script type="text/babel">
   const url = "https://api.fourier.audio";
@@ -107,9 +112,8 @@
       });
 
       setDebug(cuerpo);
-
-      // form.setFieldsValue({ idPc: '' });
-      // setData([]);
+      form.setFieldsValue({ idPc: '' });
+      setData([]);
     }
 
     const agregarEstacion = () => {
@@ -203,7 +207,7 @@
                 onFinish={confirmar}
                 >
                 <Row gutter={8}>
-                  <Col span={6}>
+                  <Col md={8}>
                     <Form.Item
                       label="ID PC"
                       name="idPc"
@@ -212,7 +216,7 @@
                       <Input size="large" />
                     </Form.Item>
                   </Col>
-                  <Col span={6}>
+                  <Col md={8}>
                     <Form.Item
                       label="Rango de Fechas"
                       name="fechas"
@@ -228,7 +232,7 @@
                         />
                     </Form.Item>
                   </Col>
-                  <Col span={6}>
+                  <Col md={8}>
                     <Form.Item
                       label="&nbsp;"
                       name="reiniciar"
@@ -240,7 +244,7 @@
                   </Col>
                 </Row>
                 <Row gutter={8}>
-                  <Col span={6}>
+                  <Col md={8}>
                     <Form.Item
                       label="Ciudad"
                       name="idCiudad"
@@ -260,7 +264,7 @@
                       </Select>
                     </Form.Item>
                   </Col>
-                  <Col span={6}>
+                  <Col md={8}>
                     <Form.Item
                       label="Estación"
                       name="idEstacion"
@@ -281,22 +285,22 @@
                       </Select>
                     </Form.Item>
                   </Col>
-                  <Col span={3}>
+                  <Col md={3}>
                     <Form.Item label="&nbsp;" >
                       <Button className="full-width" size="large" onClick={agregarEstacion}>Agregar</Button>
                     </Form.Item>
                   </Col>
                 </Row>
                 <Row gutter={8}>
-                  <Col span={12}>
+                  <Col md={16}>
                     <Table className="full-width" dataSource={data} columns={columnas} />
                   </Col>
-                  <Col span={3}>
+                  <Col md={3}>
                     <Button className="full-width" size="large" onClick={obtenerEstacionDelPC}>Estaciones del PC</Button>
                   </Col>
                 </Row>
                 <Row>
-                  <Col span={6}>
+                  <Col md={8}>
                     <Form.Item label="&nbsp;" >
                       <Button type="primary" htmlType="submit" size="large" style={{width: '100%'}}>Guardar</Button>
                     </Form.Item>
@@ -305,7 +309,7 @@
               </Form>
               <Row>
                 <Col className="full-width">
-                  {debug && <pre className="full-width">{JSON.stringify(debug)}</pre>}
+                  {debug && <pre className="codigo"><code>{JSON.stringify(debug)}</code></pre>}
                 </Col>
               </Row>
             </Card>

+ 3 - 4
views/site/consulta.php

@@ -2,14 +2,13 @@
 
 <style>
   .site-card {
-    height: 100vh;
-    width: 100vw;
+    min-height: 100vh;
+    width: 100%;
     padding: 20px;
     background: #ececec;
   }
   .content {
     width: 100%;
-    height: 100%;
   }
   .grid {
     width: 25%;
@@ -35,7 +34,7 @@
     const onFinish = async (data) => {
       setCargando(true);
       const idPc = data.idPc;
-      const estacion = data.estacion;
+      const estacion = data.estacion || "";
       const fi = data.fechas[0].format("YYYY-MM-DD HH:mm:ss");
       const ff = data.fechas[1].format("YYYY-MM-DD HH:mm:ss");