Browse Source

FD3-619 Se agrega campo comentarios y se quita campo mac en ONU

Espinoza Guillermo 7 years ago
parent
commit
2aa1a48332

+ 3 - 4
src/FTTHBundle/Admin/ONUAdmin.php

@@ -48,7 +48,6 @@ class ONUAdmin extends WorkflowBaseAdmin
             ->add('profile')
             ->add('nap')
             ->add('model')
-            ->add('mac')
             ->add('olt');
     }
 
@@ -60,7 +59,6 @@ class ONUAdmin extends WorkflowBaseAdmin
         $listMapper
             ->add('client', 'string', array('template' => 'FTTHBundle:ONU:base_list_field_client.html.twig'))
             ->add('ip')
-            ->add('mac')
             ->add('serialNumber', 'string', array('template' => 'FTTHBundle:ONU:base_list_field_upper.html.twig'))
             ->add('ponSerialNumber', 'string', array('template' => 'FTTHBundle:ONU:base_list_field_upper.html.twig'))
             ->add('profile')
@@ -70,6 +68,7 @@ class ONUAdmin extends WorkflowBaseAdmin
             ->add('model')
             ->add('olt')
             ->add('currentState', 'string', array('template' => 'WorkflowBundle:Workflow:base_list_field_current_state.html.twig'))
+            ->add('catv')
             ->add('created')
             ->add('_action', 'with-workflow-action', array(
                 'actions' => array(
@@ -122,13 +121,13 @@ class ONUAdmin extends WorkflowBaseAdmin
                     ->add('profile')
                     ->add('nap')
                     ->add('model')
+                    ->add('comments')
                 ->end()
             ->end()
             ->tab('Avanzado')
                 ->with('ONU')
                     ->add('serialNumber', null, array('attr' => array('style' => 'text-transform: uppercase;')))
                     ->add('ponSerialNumberAux', null, array('attr' => array('style' => 'text-transform: uppercase;')))
-                    ->add('mac')
                     ->add('olt')
                     ->add('position')
                 ->end()
@@ -304,6 +303,7 @@ class ONUAdmin extends WorkflowBaseAdmin
                     ->add('profile')
                     ->add('nap')
                     ->add('model')
+                    ->add('comments')
                     ->add('created')
                 ->end()
             ->end()
@@ -311,7 +311,6 @@ class ONUAdmin extends WorkflowBaseAdmin
                 ->with('ONU')
                     ->add('serialNumber')
                     ->add('ponSerialNumberAux')
-                    ->add('mac')
                     ->add('olt')
                     ->add('currentState')
                 ->end()

+ 27 - 1
src/FTTHBundle/Entity/ONU.php

@@ -208,6 +208,11 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
      * @ORM\Column(type="boolean", nullable=true, options={"default": true})
      */
     protected $catv = true;
+    
+    /**
+     * @ORM\Column(type="text", nullable=true)
+     */
+    protected $comments;
 
 
     /**
@@ -650,7 +655,8 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
     public function setPonSerialNumberAux($ponSerialNumberAux)
     {
         $this->ponSerialNumberAux = strtolower($ponSerialNumberAux);
-    return $this;
+        
+        return $this;
     }
     /**
      * Get ponSerialNumberAux
@@ -857,4 +863,24 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
         return $this;
     }
     
+    /**
+     * @return string
+     */
+    public function getComments()
+    {
+        return $this->comments;
+    }
+    
+    /**
+     * @param string $comments
+     *
+     * @return ONU
+     */
+    public function setComments($comments)
+    {
+        $this->comments = $comments;
+        
+        return $this;
+    }
+    
 }

+ 4 - 0
src/FTTHBundle/Resources/translations/FTTHBundle.es.yml

@@ -52,6 +52,7 @@ filter:
     label_files: Archivos
     label_capacity: Capacidad
     label_value: Valor
+    label_comments: Comentarios
 
 breadcrumb:
     link_t_cont_profile_list: Listado Perfiles tcon
@@ -149,6 +150,7 @@ form:
     label_tcontprofile: Perfil tcont
     label_used_by_default: Default
     label_vlans: VLans
+    label_comments: Comentarios
 
 list:
     label_id: Id
@@ -206,6 +208,7 @@ list:
     label_tcontprofile: Perfil tcont
     label_vlans: VLans
     label_base: Base
+    label_comments: Comentarios
 
 show:
     label_id: Id
@@ -267,6 +270,7 @@ show:
     label_wifi: Wifi
     label_value: Valor
     label_used_by_default: Default
+    label_comments: Comentarios
 
 helps:
     check_address: Verifique la dirección para el cálculo de distancias.