Aplicación para gestionar el WiFi y punto de luz en puertos.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.8 KiB

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Admin;
  4. use Sonata\AdminBundle\Admin\AbstractAdmin;
  5. use Sonata\AdminBundle\Datagrid\DatagridMapper;
  6. use Sonata\AdminBundle\Datagrid\ListMapper;
  7. use Sonata\AdminBundle\Form\FormMapper;
  8. use Sonata\AdminBundle\Show\ShowMapper;
  9. final class FacturasAdmin extends AbstractAdmin
  10. {
  11. protected function configureDatagridFilters(DatagridMapper $filter): void
  12. {
  13. $filter
  14. ->add('id')
  15. ->add('fecha')
  16. ->add('estado')
  17. ->add('numerofactura')
  18. ->add('filepdf')
  19. ->add('precio')
  20. ->add('impuestos')
  21. ->add('total')
  22. ;
  23. }
  24. protected function configureListFields(ListMapper $list): void
  25. {
  26. $list
  27. ->add('id')
  28. ->add('fecha')
  29. ->add('estado')
  30. ->add('numerofactura')
  31. ->add('filepdf')
  32. ->add('precio')
  33. ->add('impuestos')
  34. ->add('total')
  35. ->add(ListMapper::NAME_ACTIONS, null, [
  36. 'actions' => [
  37. 'show' => [],
  38. 'edit' => [],
  39. 'delete' => [],
  40. ],
  41. ]);
  42. }
  43. protected function configureFormFields(FormMapper $form): void
  44. {
  45. $form
  46. ->add('id')
  47. ->add('fecha')
  48. ->add('estado')
  49. ->add('numerofactura')
  50. ->add('filepdf')
  51. ->add('precio')
  52. ->add('impuestos')
  53. ->add('total')
  54. ;
  55. }
  56. protected function configureShowFields(ShowMapper $show): void
  57. {
  58. $show
  59. ->add('id')
  60. ->add('fecha')
  61. ->add('estado')
  62. ->add('numerofactura')
  63. ->add('filepdf')
  64. ->add('precio')
  65. ->add('impuestos')
  66. ->add('total')
  67. ;
  68. }
  69. }