Skip to content

Modernización de código en el plugin Proyectos#51

Merged
daniel89fg merged 8 commits into
FacturaScripts:masterfrom
abdedarghal111:tarea4862
Jul 23, 2026
Merged

Modernización de código en el plugin Proyectos#51
daniel89fg merged 8 commits into
FacturaScripts:masterfrom
abdedarghal111:tarea4862

Conversation

@abdedarghal111

@abdedarghal111 abdedarghal111 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Cambios

  • Reordena los docblocks de una línea de las propiedades de Model/EstadoProyecto.php, Model/NotaProyecto.php, Model/Proyecto.php, Model/StockProyecto.php y Model/TareaProyecto.php, que usaban el formato /** descripción @var tipo */, al formato canónico del código /** @var tipo descripción */.
  • Sustituye loadWhere([Where::eq(...)]) por loadWhereEq(...) en Model/StockProyecto.php y Model/TareaProyecto.php.
  • Sustituye loadFromCode($id) por load($id) en Extension/Controller/NewServicioAT.php.
  • Sustituye getMainViewName() y getViewModelValue() por mainTabName() y tabModelValue() en Controller/EditNotaProyecto.php, Controller/EditProyecto.php, Controller/EditTareaProyecto.php, Extension/Controller/EditCliente.php y Extension/Controller/EditProducto.php.
  • Sustituye $this->request->get() por $this->request->queryOrInput() en Controller/EditProyecto.php, Controller/EditTareaProyecto.php, Extension/Controller/NewServicioAT.php y Extension/Traits/ProjectControllerSalesPurchases.php.
  • Sustituye el acceso directo $this->views[$viewName] por tab($viewName)/listView($viewName) en Controller/ListProyecto.php, Controller/EditNotaProyecto.php, Controller/EditProyecto.php y Controller/EditTareaProyecto.php.
  • Sustituye addButton($viewName, ...) por tab($viewName)->addButton(...) en Controller/EditProyecto.php y Controller/EditTareaProyecto.php.
  • Sustituye primaryColumnValue() por id() en Controller/EditProyecto.php.

Se aconseja revisar el PR mirando la sección de commits de forma progresiva, para ver cómo se ha ido modificando cada cosa poco a poco.

Tarea: https://facturascripts.com/roadmap/4862

Las descripciones de las propiedades usaban el orden
/** descripción @var tipo */; se pasan al formato canónico
/** @var tipo descripción */.
@abdedarghal111 abdedarghal111 changed the title docs: ordenar los docblocks de propiedades a @var tipo descripción Modernización de código en el plugin Proyectos Jul 22, 2026
…::eq()

Simplifica las llamadas a loadWhere([Where::eq(...)]) por loadWhereEq()
en Model/StockProyecto.php y Model/TareaProyecto.php.
Simplifica las llamadas a loadFromCode($id) por load($id) en
Extension/Controller/NewServicioAT.php.
…ame() y getViewModelValue()

Sustituye las llamadas deprecadas getMainViewName() y getViewModelValue()
por sus reemplazos mainTabName() y tabModelValue() en Controller/EditNotaProyecto.php,
Controller/EditProyecto.php, Controller/EditTareaProyecto.php,
Extension/Controller/EditCliente.php y Extension/Controller/EditProducto.php.
Sustituye las llamadas deprecadas $this->request->get() por
$this->request->queryOrInput() en Controller/EditProyecto.php,
Controller/EditTareaProyecto.php, Extension/Controller/NewServicioAT.php
y Extension/Traits/ProjectControllerSalesPurchases.php.
Sustituye el acceso directo $this->views[$viewName] por tab($viewName)
para la vista principal o listView($viewName) para vistas de lista en
Controller/ListProyecto.php, Controller/EditNotaProyecto.php,
Controller/EditProyecto.php y Controller/EditTareaProyecto.php.
…ame, ...)

Sustituye las llamadas deprecadas addButton($viewName, $btnArray) por
tab($viewName)->addButton($btnArray) en Controller/EditProyecto.php
y Controller/EditTareaProyecto.php.
Sustituye la llamada deprecada primaryColumnValue() por el nuevo método
simplificado id() en Controller/EditProyecto.php.
@abdedarghal111
abdedarghal111 marked this pull request as ready for review July 23, 2026 07:42
@daniel89fg
daniel89fg merged commit 6f94149 into FacturaScripts:master Jul 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants