Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl>
Reviewed-on: #45
This commit is contained in:
2025-10-04 11:40:52 -03:00
parent 6ddc48ec60
commit 742de657c5
815 changed files with 62089 additions and 3287 deletions

View File

@ -0,0 +1,8 @@
<?php
use Incoviba\Controller\API\Ventas\Comentarios;
$app->group('/comentario/{comentario_id}', function($app) {
$app->post('/edit[/]', [Comentarios::class, 'edit']);
$app->delete('/remove[/]', [Comentarios::class, 'remove']);
//$app->get('[/]', [Comentarios::class, 'get']);
});

View File

@ -3,4 +3,5 @@ use Incoviba\Controller\API\Ventas\Facturacion;
$app->group('/facturacion', function($app) {
$app->get('/proyecto/{proyecto_id}[/]', [Facturacion::class, 'proyecto']);
$app->post('/get[/]', [Facturacion::class, 'ventas']);
});

View File

@ -0,0 +1,9 @@
<?php
use Incoviba\Controller\API\Ventas\Facturas;
$app->group('/facturas', function($app) {
$app->post('/add[/]', [Facturas::class, 'add']);
});
$app->group('/facturas/{factura_id}', function($app) {
$app->post('/edit[/]', [Facturas::class, 'edit']);
});

View File

@ -11,5 +11,6 @@ $app->group('/pago/{pago_id:[0-9]+}', function($app) {
$app->post('/abonar[/]', [Pagos::class, 'abonar']);
$app->post('/devolver[/]', [Pagos::class, 'devolver']);
$app->get('/anular[/]', [Pagos::class, 'anular']);
$app->post('/estado[/]', [Pagos::class, 'estado']);
$app->post('[/]', [Pagos::class, 'edit']);
});

View File

@ -2,6 +2,7 @@
use Incoviba\Controller\API\Ventas\Precios;
$app->group('/precios', function($app) {
$app->post('/import[/]', [Precios::class, 'import']);
$app->post('[/]', [Precios::class, 'proyecto']);
});
$app->group('/precio', function($app) {

View File

@ -0,0 +1,28 @@
<?php
use Incoviba\Controller\API\Ventas\Promotions;
$app->group('/promotions', function($app) {
$app->post('/add[/]', [Promotions::class, 'add']);
$app->post('/edit[/]', [Promotions::class, 'edit']);
});
$app->group('/promotion/{promotion_id}', function($app) {
$app->delete('/remove[/]', [Promotions::class, 'remove']);
$app->group('/connections', function($app) {
$app->post('/add[/]', [Promotions::class, 'addConnections']);
$app->group('/project/{project_id}', function($app) {
$app->delete('[/]', [Promotions::class, 'removeProject']);
$app->group('/unit-type/{unit_type_id}', function($app) {
$app->delete('[/]', [Promotions::class, 'removeUnitType']);
});
});
$app->group('/broker/{broker_rut}', function($app) {
$app->delete('[/]', [Promotions::class, 'removeBroker']);
});
$app->group('/unit-line/{unit_line_id}', function($app) {
$app->delete('[/]', [Promotions::class, 'removeUnitLine']);
});
$app->group('/unit/{unit_id}', function($app) {
$app->delete('[/]', [Promotions::class, 'removeUnit']);
});
});
});

View File

@ -0,0 +1,21 @@
<?php
use Incoviba\Controller\API\Ventas\Reservations;
$app->group('/reservations', function($app) {
$app->post('/add[/]', [Reservations::class, 'add']);
$app->group('/project/{project_id}', function($app) {
$app->get('/active[/]', [Reservations::class, 'active']);
$app->get('/pending[/]', [Reservations::class, 'pending']);
$app->get('/rejected[/]', [Reservations::class, 'rejected']);
});
$app->get('[/]', Reservations::class);
});
$app->post('/reservation/add[/]', [Reservations::class, 'addOne']);
$app->group('/reservation/{reservation_id}', function($app) {
$app->get('/approve[/]', [Reservations::class, 'approve']);
$app->get('/reject[/]', [Reservations::class, 'reject']);
$app->post('/edit[/]', [Reservations::class, 'edit']);
$app->delete('/remove[/]', [Reservations::class, 'remove']);
$app->delete('[/]', [Reservations::class, 'delete']);
$app->get('[/]', [Reservations::class, 'get']);
});