develop (#45)
Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl> Reviewed-on: #45
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Base;
|
||||
|
||||
$app->group('/api', function($app) {
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'api']);
|
||||
if (file_exists($folder)) {
|
||||
@ -10,4 +12,5 @@ $app->group('/api', function($app) {
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
}
|
||||
$app->get('[/]', Base::class);
|
||||
})->add($app->getContainer()->get(Incoviba\Middleware\API::class));
|
||||
|
@ -2,5 +2,15 @@
|
||||
use Incoviba\Controller\Inmobiliarias;
|
||||
|
||||
$app->group('/inmobiliarias', function($app) {
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'inmobiliarias']);
|
||||
if (file_exists($folder)) {
|
||||
$files = new FilesystemIterator($folder);
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
}
|
||||
$app->get('[/]', Inmobiliarias::class);
|
||||
})->add($app->getContainer()->get(Incoviba\Middleware\Authentication::class));
|
||||
|
@ -2,6 +2,16 @@
|
||||
use Incoviba\Controller\Proyectos;
|
||||
|
||||
$app->group('/proyectos', function($app) {
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'proyectos']);
|
||||
if (file_exists($folder)) {
|
||||
$files = new FilesystemIterator($folder);
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
}
|
||||
$app->get('/unidades[/]', [Proyectos::class, 'unidades']);
|
||||
$app->get('[/]', Proyectos::class);
|
||||
})->add($app->getContainer()->get(Incoviba\Middleware\Authentication::class));
|
||||
|
@ -23,13 +23,23 @@ $app->group('/venta/{venta_id:[0-9]+}', function($app) {
|
||||
$app->get('[/]', [Ventas::class, 'propiedad']);
|
||||
});
|
||||
$app->group('/pie', function($app) {
|
||||
$app->get('/add[/]', [Ventas\Pies::class, 'add']);
|
||||
$app->group('/cuotas', function($app) {
|
||||
$app->get('[/]', [Ventas::class, 'cuotas']);
|
||||
});
|
||||
$app->get('[/]', [Ventas::class, 'pie']);
|
||||
});
|
||||
$app->group('/bono_pie', function($app) {
|
||||
$app->get('/edit[/]', [Ventas\Bonos::class, 'edit']);
|
||||
$app->get('/add[/]', [Ventas\Bonos::class, 'add']);
|
||||
$app->get('[/]', [Ventas\Bonos::class, 'edit']);
|
||||
});
|
||||
$app->group('/escritura', function($app) {
|
||||
$app->group('/cuotas', function($app) {
|
||||
$app->get('[/]', Ventas\Abono\Cuotas::class);
|
||||
});
|
||||
$app->get('/add[/]', [Ventas\Escrituras::class, 'add']);
|
||||
$app->get('[/]', [Ventas\Escrituras::class, 'show']);
|
||||
});
|
||||
$app->group('/credito', function($app) {
|
||||
$app->get('[/]', [Ventas\Creditos::class, 'show']);
|
||||
|
@ -7,4 +7,4 @@ $app->group('/contabilidad', function($app) {
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
});
|
||||
})->add($app->getContainer()->get(Incoviba\Middleware\Authentication::class));
|
||||
|
10
app/resources/routes/96_admin.php
Normal file
10
app/resources/routes/96_admin.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$app->group('/admin', function($app) {
|
||||
$files = new FilesystemIterator(implode(DIRECTORY_SEPARATOR, [__DIR__, 'admin']));
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
})->add($app->getContainer()->get(Incoviba\Middleware\Authentication::class));
|
6
app/resources/routes/admin/users.php
Normal file
6
app/resources/routes/admin/users.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
use Incoviba\Controller\Admin\Users;
|
||||
|
||||
$app->group('/users', function($app) {
|
||||
$app->get('[/]', Users::class);
|
||||
});
|
13
app/resources/routes/api/admin.php
Normal file
13
app/resources/routes/api/admin.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$app->group('/admin', function($app) {
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'admin']);
|
||||
if (file_exists($folder)) {
|
||||
$files = new FilesystemIterator($folder);
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
}
|
||||
});
|
10
app/resources/routes/api/admin/users.php
Normal file
10
app/resources/routes/api/admin/users.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Admin\Users;
|
||||
|
||||
$app->group('/users', function($app) {
|
||||
$app->post('/add[/]', [Users::class, 'add']);
|
||||
});
|
||||
$app->group('/user/{user_id}', function($app) {
|
||||
$app->post('/edit[/]', [Users::class, 'edit']);
|
||||
$app->delete('[/]', [Users::class, 'delete']);
|
||||
});
|
@ -3,6 +3,8 @@ use Incoviba\Controller\API\Contabilidad\Cartolas;
|
||||
|
||||
$app->group('/cartolas', function($app) {
|
||||
$app->post('/procesar[/]', [Cartolas::class, 'procesar']);
|
||||
$app->post('/importar[/]', [Cartolas::class, 'importar']);
|
||||
$app->get('/update[/]', [Cartolas::class, 'update']);
|
||||
});
|
||||
$app->group('/cartola', function($app) {
|
||||
$app->group('/diaria', function($app) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\CentrosCostos;
|
||||
|
||||
use Incoviba\Controller\API\Contabilidad\CentrosCostos;
|
||||
|
||||
$app->group('/centros_costos', function($app) {
|
||||
$app->post('/add[/]', [CentrosCostos::class, 'add']);
|
||||
|
@ -1,6 +1,13 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Contabilidad\Movimientos;
|
||||
|
||||
$app->group('/movimiento/{movimiento_id}', function($app) {
|
||||
$app->post('/detalles', [Movimientos::class, 'detalles']);
|
||||
$app->group('/movimientos', function($app) {
|
||||
$app->post('/sociedad/mes[/]', [Movimientos::class, 'sociedad']);
|
||||
$app->post('/edit[/]', [Movimientos::class, 'edit']);
|
||||
$app->post('/segment[/]', [Movimientos::class, 'segment']);
|
||||
$app->get('[/]', Movimientos::class);
|
||||
});
|
||||
$app->group('/movimiento/{movimiento_id}', function($app) {
|
||||
$app->post('/detalles[/]', [Movimientos::class, 'detalles']);
|
||||
$app->delete('[/]', [Movimientos::class, 'remove']);
|
||||
});
|
||||
|
@ -1,11 +1,14 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Nubox;
|
||||
use Incoviba\Controller\API\Contabilidad\Nubox;
|
||||
|
||||
$app->group('/nubox/{inmobiliaria_rut}', function($app) {
|
||||
$app->get('/token[/]', [Nubox::class, 'token']);
|
||||
$app->get('/sistemas[/]', [Nubox::class, 'sistemas']);
|
||||
$app->get('/cuentas[/]', [Nubox::class, 'cuentas']);
|
||||
$app->group('/libro', function($app) {
|
||||
$app->post('/mayor[/]', [Nubox::class, 'libroMayor']);
|
||||
$app->post('/diario[/]', [Nubox::class, 'libroDiario']);
|
||||
});
|
||||
$app->get('/facturas/{dia}[/]', [Nubox::class, 'facturas']);
|
||||
$app->post('/cuenta', [Nubox::class, 'cuenta']);
|
||||
});
|
||||
|
6
app/resources/routes/api/contabilidad/tesoreria.php
Normal file
6
app/resources/routes/api/contabilidad/tesoreria.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Contabilidad\Tesoreria;
|
||||
|
||||
$app->group('/tesoreria', function($app) {
|
||||
$app->post('/import[/]', [Tesoreria::class, 'import']);
|
||||
});
|
@ -9,3 +9,7 @@ $app->group('/direcciones', function($app) {
|
||||
$app->post('/find[/]', [Direcciones::class, 'findComunas']);
|
||||
});
|
||||
});
|
||||
$app->group('/direccion/{direccion_id:[0-9]+}', function($app) {
|
||||
$app->post('/edit[/]', [Direcciones::class, 'edit']);
|
||||
$app->get('[/]', [Direcciones::class, 'get']);
|
||||
});
|
||||
|
16
app/resources/routes/api/external.php
Normal file
16
app/resources/routes/api/external.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\External;
|
||||
|
||||
$app->group('/external', function($app) {
|
||||
$files = new FilesystemIterator(implode(DIRECTORY_SEPARATOR, [__DIR__, 'external']));
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
$app->group('/services', function($app) {
|
||||
$app->get('/check[/]', [External::class, 'check']);
|
||||
$app->get('/update[/]', [External::class, 'update']);
|
||||
});
|
||||
});
|
11
app/resources/routes/api/external/toku.php
vendored
Normal file
11
app/resources/routes/api/external/toku.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Ventas\MediosPago\Toku;
|
||||
|
||||
$app->group('/toku', function($app) {
|
||||
$app->post('/cuotas/{venta_id}[/]', [Toku::class, 'cuotas']);
|
||||
$app->post('/success[/]', [Toku::class, 'success']);
|
||||
$app->get('/test[/]', [Toku::class, 'test']);
|
||||
$app->delete('/reset[/]', [Toku::class, 'reset']);
|
||||
$app->post('/enqueue[/]', [Toku::class, 'enqueue']);
|
||||
$app->post('/update[/{type}[/]]', [Toku::class, 'update']);
|
||||
});
|
@ -2,9 +2,20 @@
|
||||
use Incoviba\Controller\API\Inmobiliarias;
|
||||
|
||||
$app->group('/inmobiliarias', function($app) {
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'inmobiliarias']);
|
||||
if (file_exists($folder)) {
|
||||
$files = new FilesystemIterator($folder);
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
}
|
||||
$app->get('[/]', Inmobiliarias::class);
|
||||
});
|
||||
$app->group('/inmobiliaria/{inmobiliaria_rut}', function($app) {
|
||||
$app->post('/proveedores', [Inmobiliarias::class, 'proveedores']);
|
||||
$app->get('/cuentas[/]', [Inmobiliarias::class, 'cuentas']);
|
||||
$app->get('/proyectos[/]', [Inmobiliarias::class, 'proyectos']);
|
||||
});
|
||||
|
13
app/resources/routes/api/inmobiliarias/proveedores.php
Normal file
13
app/resources/routes/api/inmobiliarias/proveedores.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Inmobiliarias\Proveedores;
|
||||
|
||||
$app->group('/proveedores', function($app) {
|
||||
$app->post('/add[/]', [Proveedores::class, 'add']);
|
||||
$app->post('/edit[/]', [Proveedores::class, 'edit']);
|
||||
//$app->post('/register[/]', [Proveedores::class, 'register']);
|
||||
$app->get('[/]', Proveedores::class);
|
||||
});
|
||||
$app->group('/proveedor/{proveedor_rut:[0-9]+}', function($app) {
|
||||
$app->delete('/delete[/]', [Proveedores::class, 'delete']);
|
||||
$app->get('[/]', [Proveedores::class, 'get']);
|
||||
});
|
7
app/resources/routes/api/inmobiliarias/sociedades.php
Normal file
7
app/resources/routes/api/inmobiliarias/sociedades.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Inmobiliarias\Sociedades;
|
||||
|
||||
$app->group('/sociedades', function($app) {
|
||||
$app->post('/add[/]', [Sociedades::class, 'add']);
|
||||
$app->get('[/]', Sociedades::class);
|
||||
});
|
4
app/resources/routes/api/login.php
Normal file
4
app/resources/routes/api/login.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Login;
|
||||
|
||||
$app->post('/login[/]', Login::class);
|
@ -4,5 +4,10 @@ use Incoviba\Controller\API\Money;
|
||||
$app->group('/money', function($app) {
|
||||
$app->post('/ipc[/]', [Money::class, 'ipc']);
|
||||
$app->post('/uf[/]', [Money::class, 'uf']);
|
||||
$app->group('/ufs', function($app) {
|
||||
$app->post('[/]', [Money::class, 'updateUfs']);
|
||||
$app->get('[/]', [Money::class, 'ufs']);
|
||||
});
|
||||
$app->post('/many[/]', [Money::class, 'getMany']);
|
||||
$app->post('[/]', [Money::class, 'get']);
|
||||
});
|
||||
|
7
app/resources/routes/api/personas.php
Normal file
7
app/resources/routes/api/personas.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Personas;
|
||||
|
||||
//$app->group('/personas', function($app) {});
|
||||
$app->group('/persona/{rut}', function($app) {
|
||||
$app->get('[/]', [Personas::class, 'get']);
|
||||
});
|
@ -3,6 +3,13 @@ use Incoviba\Controller\API\Proyectos;
|
||||
|
||||
$app->group('/proyectos', function($app) {
|
||||
$app->get('/escriturando[/]', [Proyectos::class, 'escriturando']);
|
||||
$files = new FilesystemIterator(implode(DIRECTORY_SEPARATOR, [__DIR__, 'proyectos']));
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
$app->get('[/]', [Proyectos::class, 'list']);
|
||||
});
|
||||
$app->group('/proyecto/{proyecto_id}', function($app) {
|
||||
@ -14,10 +21,14 @@ $app->group('/proyecto/{proyecto_id}', function($app) {
|
||||
$app->get('/vendible[/]', [Proyectos::class, 'superficies']);
|
||||
});
|
||||
$app->group('/unidades', function($app) {
|
||||
$app->post('/precios[/]', [Proyectos\Unidades::class, 'precios']);
|
||||
$app->post('/estados[/]', [Proyectos\Unidades::class, 'estados']);
|
||||
$app->get('/disponibles[/]', [Proyectos::class, 'disponibles']);
|
||||
$app->get('[/]', [Proyectos::class, 'unidades']);
|
||||
});
|
||||
$app->group('/terreno', function($app) {
|
||||
$app->post('/edit[/]', [Proyectos::class, 'terreno']);
|
||||
});
|
||||
$app->get('/brokers', [Proyectos::class, 'brokers']);
|
||||
$app->get('/promotions', [Proyectos::class, 'promotions']);
|
||||
});
|
||||
|
30
app/resources/routes/api/proyectos/brokers.php
Normal file
30
app/resources/routes/api/proyectos/brokers.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Proyectos\Brokers;
|
||||
use Incoviba\Controller\API\Proyectos\Brokers\Contracts;
|
||||
|
||||
$app->group('/brokers', function($app) {
|
||||
$app->group('/contracts', function($app) {
|
||||
$app->post('/add[/]', [Contracts::class, 'add']);
|
||||
$app->get('[/]', Contracts::class);
|
||||
});
|
||||
$app->group('/contract/{contract_id}', function($app) {
|
||||
$app->post('/edit[/]', [Contracts::class, 'edit']);
|
||||
$app->post('/inactive[/]', [Contracts::class, 'inactive']);
|
||||
$app->delete('[/]', [Contracts::class, 'delete']);
|
||||
$app->get('[/]', [Contracts::class, 'get']);
|
||||
});
|
||||
$app->post('/add[/]', [Brokers::class, 'add']);
|
||||
$app->post('/edit[/]', [Brokers::class, 'edit']);
|
||||
$app->get('[/]', Brokers::class);
|
||||
});
|
||||
$app->group('/broker/{broker_rut}', function($app) {
|
||||
$app->group('/contracts', function($app) {
|
||||
$app->post('/add[/]', [Contracts::class, 'add']);
|
||||
$app->get('[/]', [Contracts::class, 'getByBroker']);
|
||||
});
|
||||
$app->group('/contract/{contract_id}', function($app) {
|
||||
$app->post('/promotions[/]', [Contracts::class, 'promotions']);
|
||||
});
|
||||
$app->delete('[/]', [Brokers::class, 'delete']);
|
||||
$app->get('[/]', [Brokers::class, 'get']);
|
||||
});
|
10
app/resources/routes/api/queue.php
Normal file
10
app/resources/routes/api/queue.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Queues;
|
||||
|
||||
$app->group('/queue', function($app) {
|
||||
#$app->get('/jobs[/]', [Queues::class, 'jobs']);
|
||||
$app->group('/run', function($app) {
|
||||
#$app->get('/{job_id:[0-9]+}[/]', [Queues::class, 'run']);
|
||||
$app->get('[/]', Queues::class);
|
||||
});
|
||||
});
|
@ -2,7 +2,10 @@
|
||||
|
||||
use Incoviba\Controller\API\Regiones;
|
||||
|
||||
//$app->group('/regiones', function($app) {});
|
||||
$app->group('/regiones', function($app) {
|
||||
$app->get('[/]', Regiones::class);
|
||||
});
|
||||
$app->group('/region/{region_id}', function($app) {
|
||||
$app->get('/provincias[/]', [Regiones::class, 'provincias']);
|
||||
$app->get('/comunas[/]', [Regiones::class, 'comunas']);
|
||||
});
|
||||
|
17
app/resources/routes/api/sociedades.php
Normal file
17
app/resources/routes/api/sociedades.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Sociedades;
|
||||
|
||||
$app->group('/sociedades', function($app) {
|
||||
$app->group('/add', function($app) {
|
||||
$app->post('/one[/]', Sociedades::class . ':add');
|
||||
$app->post('[/]', Sociedades::class . ':addMany');
|
||||
});
|
||||
$app->post('/get[/]', [Sociedades::class, 'getMany']);
|
||||
$app->post('/edit[/]', [Sociedades::class, 'edit']);
|
||||
$app->post('/delete[/]', [Sociedades::class, 'delete']);
|
||||
$app->post('/asisgnar[/]', [Sociedades::class, 'asignar']);
|
||||
$app->get('[/]', Sociedades::class);
|
||||
});
|
||||
$app->group('/sociedad/{sociedad_rut}', function($app) {
|
||||
$app->get('[/]', Sociedades::class . ':get');
|
||||
});
|
6
app/resources/routes/api/tokens.php
Normal file
6
app/resources/routes/api/tokens.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Tokens;
|
||||
|
||||
$app->group('/tokens', function($app) {
|
||||
$app->get('/try[/]', Tokens::class . ':try');
|
||||
});
|
@ -21,14 +21,28 @@ $app->group('/ventas', function($app) {
|
||||
});
|
||||
$app->group('/by', function($app) {
|
||||
$app->get('/unidad/{unidad_id}', [Ventas::class, 'unidad']);
|
||||
$app->post('/unidades[/]', [Ventas::class, 'byUnidades']);
|
||||
});
|
||||
$app->post('/get[/]', [Ventas::class, 'getMany']);
|
||||
$app->post('[/]', [Ventas::class, 'proyecto']);
|
||||
});
|
||||
$app->group('/venta/{venta_id}', function($app) {
|
||||
$app->get('/unidades[/]', [Ventas::class, 'unidades']);
|
||||
$app->get('/comentarios[/]', [Ventas::class, 'comentarios']);
|
||||
$app->group('/comentarios', function($app) {
|
||||
$app->post('/add[/]', [Ventas::class, 'addComentario']);
|
||||
$app->get('[/]', [Ventas::class, 'comentarios']);
|
||||
});
|
||||
$app->group('/bono_pie', function($app) {
|
||||
$app->post('/edit[/]', [Ventas\Bonos::class, 'edit']);
|
||||
$app->post('/add[/]', [Ventas\Bonos::class, 'add']);
|
||||
});
|
||||
$app->group('/escritura', function($app) {
|
||||
$app->group('/cuotas', function($app) {
|
||||
$app->post('/add[/]', [Ventas\Abonos\Cuotas::class, 'add']);
|
||||
});
|
||||
$app->group('/cuota/{cuota_id:[0-9]+}', function($app) {
|
||||
$app->post('/edit[/]', [Ventas\Abonos\Cuotas::class, 'edit']);
|
||||
});
|
||||
$app->post('/add[/]', [Ventas\Escrituras::class, 'add']);
|
||||
});
|
||||
$app->group('/credito', function($app) {
|
||||
@ -39,6 +53,12 @@ $app->group('/venta/{venta_id}', function($app) {
|
||||
$app->get('/eliminar[/]', [Ventas::class, 'insistir']);
|
||||
$app->post('[/]', [Ventas::class, 'desistir']);
|
||||
});
|
||||
$app->group('/propietario', function($app) {
|
||||
$app->put('/edit[/]', [Ventas::class, 'propietario']);
|
||||
});
|
||||
$app->group('/pie', function($app) {
|
||||
$app->post('/add[/]', [Ventas\Pies::class, 'add']);
|
||||
});
|
||||
$app->post('[/]', [Ventas::class, 'edit']);
|
||||
$app->get('[/]', [Ventas::class, 'get']);
|
||||
});
|
||||
|
8
app/resources/routes/api/ventas/comentarios.php
Normal file
8
app/resources/routes/api/ventas/comentarios.php
Normal 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']);
|
||||
});
|
@ -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']);
|
||||
});
|
||||
|
9
app/resources/routes/api/ventas/facturas.php
Normal file
9
app/resources/routes/api/ventas/facturas.php
Normal 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']);
|
||||
});
|
@ -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']);
|
||||
});
|
||||
|
@ -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) {
|
||||
|
28
app/resources/routes/api/ventas/promotions.php
Normal file
28
app/resources/routes/api/ventas/promotions.php
Normal 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']);
|
||||
});
|
||||
});
|
||||
});
|
21
app/resources/routes/api/ventas/reservations.php
Normal file
21
app/resources/routes/api/ventas/reservations.php
Normal 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']);
|
||||
});
|
@ -3,4 +3,5 @@ use Incoviba\Controller\Contabilidad;
|
||||
|
||||
$app->group('/cartolas', function($app) {
|
||||
$app->get('/diaria[/]', [Contabilidad::class, 'diaria']);
|
||||
$app->get('/importar[/]', [Contabilidad::class, 'importar']);
|
||||
});
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
use Incoviba\Controller\CentrosCostos;
|
||||
|
||||
use Incoviba\Controller\Contabilidad\CentrosCostos;
|
||||
|
||||
$app->group('/centros_costos', function($app) {
|
||||
$app->get('/asignar[/]', [CentrosCostos::class, 'asignar']);
|
||||
|
4
app/resources/routes/contabilidad/cuadratura.php
Normal file
4
app/resources/routes/contabilidad/cuadratura.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
use Incoviba\Controller\Contabilidad;
|
||||
|
||||
$app->get('/cuadratura[/]', [Contabilidad::class, 'cuadratura']);
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
use Incoviba\Controller\Contabilidad;
|
||||
use Incoviba\Controller\Contabilidad\Tesoreria;
|
||||
|
||||
$app->group('/tesoreria', function($app) {
|
||||
$app->get('/import[/]', [Tesoreria::class, 'import']);
|
||||
$app->get('[/[{fecha}[/]]]', [Contabilidad::class, 'tesoreria']);
|
||||
});
|
||||
|
4
app/resources/routes/contabilidad/movimientos.php
Normal file
4
app/resources/routes/contabilidad/movimientos.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
use Incoviba\Controller\Contabilidad\Movimientos;
|
||||
|
||||
$app->get('/movimientos', Movimientos::class);
|
6
app/resources/routes/inmobiliarias/proveedores.php
Normal file
6
app/resources/routes/inmobiliarias/proveedores.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
use Incoviba\Controller\Inmobiliarias\Proveedores;
|
||||
|
||||
$app->group('/proveedores', function($app) {
|
||||
$app->get('[/]', Proveedores::class);
|
||||
});
|
12
app/resources/routes/proyectos/brokers.php
Normal file
12
app/resources/routes/proyectos/brokers.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
use Incoviba\Controller\Proyectos\Brokers;
|
||||
|
||||
$app->group('/brokers', function($app) {
|
||||
$app->get('[/]', Brokers::class);
|
||||
});
|
||||
$app->group('/broker/{broker_rut}', function($app) {
|
||||
$app->group('/contract/{contract_id}', function($app) {
|
||||
$app->get('[/]', [Brokers\Contracts::class, 'show']);
|
||||
});
|
||||
$app->get('[/]', [Brokers::class, 'show']);
|
||||
});
|
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
use Incoviba\Controller\Ventas\Cierres;
|
||||
//use Incoviba\Controller\Ventas\Cierres;
|
||||
use Incoviba\Controller\Ventas\Reservations as Cierres;
|
||||
|
||||
$app->group('/cierres', function($app) {
|
||||
$app->get('/project/{project_id}', Cierres::class);
|
||||
$app->get('[/]', Cierres::class);
|
||||
});
|
||||
$app->group('/cierre/{cierre_id}', function($app) {
|
||||
|
@ -10,4 +10,11 @@ $app->group('/pie/{pie_id}', function($app) {
|
||||
});
|
||||
$app->get('[/]', [Pies::class, 'cuotas']);
|
||||
});
|
||||
$files = new FilesystemIterator(implode(DIRECTORY_SEPARATOR, [__DIR__, 'pies']));
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
});
|
||||
|
8
app/resources/routes/ventas/pies/bonos.php
Normal file
8
app/resources/routes/ventas/pies/bonos.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
use Incoviba\Controller\Ventas\Bonos;
|
||||
|
||||
$app->group('/bono_pie', function($app) {
|
||||
$app->get('/edit[/]', [Bonos::class, 'edit']);
|
||||
$app->get('/add[/]', [Bonos::class, 'add']);
|
||||
$app->get('[/]', [Bonos::class, 'edit']);
|
||||
});
|
@ -2,5 +2,5 @@
|
||||
use Incoviba\Controller\Ventas\Precios;
|
||||
|
||||
$app->group('/precios', function($app) {
|
||||
$app->get('[/]', Precios::class);
|
||||
$app->get('[/{project_id}[/]]', Precios::class);
|
||||
});
|
||||
|
9
app/resources/routes/ventas/promotions.php
Normal file
9
app/resources/routes/ventas/promotions.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
use Incoviba\Controller\Ventas\Promotions;
|
||||
|
||||
$app->group('/promotions', function($app) {
|
||||
$app->get('[/]', Promotions::class);
|
||||
});
|
||||
$app->group('/promotion/{promotion_id}', function($app) {
|
||||
$app->get('[/]', [Promotions::class, 'show']);
|
||||
});
|
Reference in New Issue
Block a user