浏览代码

agregar campo etiqueta https://prnt.sc/wrPI5n_oZu3H

ElPoteito 7 月之前
父节点
当前提交
e211b65fdc
共有 1 个文件被更改,包括 21 次插入 和 5 次删除
  1. 21 5
      src/views/administracion/eventos/EventosDetalle.js

+ 21 - 5
src/views/administracion/eventos/EventosDetalle.js

@@ -200,7 +200,7 @@ const EventosDetalle = () => {
     const storage = getStorage();
     const desertRef = refStorage(storage, fileRoute);
     deleteObject(desertRef)
-      .then((e) => {})
+      .then((e) => { })
       .catch((error) => {
         console.log(error);
       });
@@ -358,6 +358,7 @@ const EventosDetalle = () => {
           ...body,
           redSocial: redes[i]?.redSocial,
           url: redes[i]?.url,
+          etiqueta: redes[i]?.etiqueta,
         };
 
         if (!editando) {
@@ -408,6 +409,7 @@ const EventosDetalle = () => {
 
     const url = form.getFieldValue("url");
     const red = form.getFieldValue("redSocial");
+    const etiqueta = form.getFieldValue("etiqueta");
 
     if (!url) {
       message.warning({
@@ -440,12 +442,14 @@ const EventosDetalle = () => {
       key: key,
       url: url,
       redSocial: red,
+      etiqueta: etiqueta
     });
 
     setRedes(datos);
     form.setFieldsValue({
       url: null,
       redSocial: null,
+      etiqueta: null,
     });
   };
 
@@ -829,8 +833,8 @@ const EventosDetalle = () => {
             className="gutter-row"
             xs={{ span: 24 }}
             sm={{ span: 24 }}
-            md={{ span: editando ? 12 : 9 }}
-            lg={{ span: editando ? 12 : 9 }}
+            md={{ span: editando ? 6 : 5 }}
+            lg={{ span: editando ? 6 : 5 }}
           >
             <Form.Item label="Red social" name="redSocial">
               <Select style={{ width: "100%" }} placeholder="Selecciona">
@@ -843,13 +847,25 @@ const EventosDetalle = () => {
             </Form.Item>
           </Col>
 
+          <Col
+            className="gutter-row"
+            xs={{ span: 24 }}
+            sm={{ span: 24 }}
+            md={{ span: editando ? 6 : 5 }}
+            lg={{ span: editando ? 6 : 5 }}
+          >
+            <Form.Item label="Etiqueta" name="etiqueta">
+              <Input />
+            </Form.Item>
+          </Col>
+
           {!editando && (
             <Col
               className="gutter-row"
               xs={{ span: 24 }}
               sm={{ span: 24 }}
-              md={{ span: 3 }}
-              lg={{ span: 3 }}
+              md={{ span: 2 }}
+              lg={{ span: 2 }}
             >
               <Form.Item label="&nbsp;">
                 <Button