this question is quite large, since what I would like to ask is how to add data to pd_procesos_acumulados.
I'm actually working on Symfony and Workbench (In case it helps). Basically, what I have is id_proceso (from pd_procesos_disciplinarios and will be saved to id_proceso_acumulado), and the user must input the id_acto (which will be saved into nro_interno_acum). An example of the URL where I get the id is this: "proceso/acumulacion/133"
Here is the Controller AcumulacionController:
/**
* @param ProcesoDisciplinario $proceso
*
* @Route("/proceso/acumular/{id}", name="acumular_proceso")
* @Method("POST")
* @ParamConverter("proceso", class="ProcesoBundle:ProcesoDisciplinario")
*
* @return JsonResponse
*/
public function AcumularAction(int $acumula,ProcesoDisciplinario $proceso){
$em = $this->getDoctrine()->getManager();
$repository = $em->getRepository('ProcesoBundle:ProcesoDisciplinario');
$procesado = $repository->findOneById($proceso); //el proceso al que se le atribuye
$procesoAcumula = $acumula->get('procesoAcumuladoInput'); //el proceso a atribuir
return array('procesados'=>$procesado, 'procesoAcumula'=>$procesoAcumula);
}
ProcesoDisciplinario $proceso is the id of the data I get from the website, and int $acumula is the id that the user must input. Basically, i need the user to add as many id as it can, and all of them will have one same id_proceso_acumulado.
Here is the html:
<div class="col-lg-6">
<div class="input-group">
<form id="procesoAcumuladoForm">
<input type="text" class="form-control" placeholder="Número de proceso" name="procesoAcumuladoInput" id="procesoAcumuladoInput">
<span class="input-group-btn">
<button class="btn btn-default btn-success" type="button" name="procesoAcumuladoGuardar" id="procesoAcumuladoGuardar" href="/proceso/acumulacion/{id}">Agregar Proceso</button>
</span>
</form>
</div>
</div>
Preferably I would like that when the data is added to the table, the page wouldn't need to refresh to show changes.
The id of aa_actos_administrativos (named ActoAdministrativo):
/**
* @var integer
*
* @ORM\Column(name="id_acto", type="bigint", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
the id of pd_procesos_disciplinarios (named ProcesoDisciplinario)
/**
* @var integer
*
* @ORM\Column(name="id_proceso", type="bigint", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
In case i skipped something, please let me know. I know this is a big question, so please I beg your pardon in case it's too much. Thanks in advance!