2024-06-18
This commit is contained in:
@ -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));
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
use Incoviba\Controller\API\Contabilidad\Nubox;
|
||||
|
||||
$app->group('/nubox/{inmobiliaria_rut}', function($app) {
|
||||
@ -10,5 +9,6 @@ $app->group('/nubox/{inmobiliaria_rut}', 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']);
|
||||
});
|
||||
|
@ -15,7 +15,7 @@ $app->group('/inmobiliarias', function($app) {
|
||||
$app->get('[/]', Inmobiliarias::class);
|
||||
});
|
||||
$app->group('/inmobiliaria/{inmobiliaria_rut}', function($app) {
|
||||
$app->post('/agentes', [Inmobiliarias::class, 'agentes']);
|
||||
$app->post('/proveedores', [Inmobiliarias::class, 'proveedores']);
|
||||
$app->get('/cuentas[/]', [Inmobiliarias::class, 'cuentas']);
|
||||
$app->get('/proyectos[/]', [Inmobiliarias::class, 'proyectos']);
|
||||
});
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Inmobiliarias\Agentes;
|
||||
|
||||
$app->group('/agentes', function($app) {
|
||||
$app->group('/proveedores', function($app) {
|
||||
$app->post('/add[/]', [Agentes::class, 'add']);
|
||||
$app->post('/register[/]', [Agentes::class, 'register']);
|
||||
$app->get('[/]', Agentes::class);
|
||||
});
|
||||
$app->group('/agente/{agente_id}', function($app) {
|
||||
$app->group('/proveedor/{agente_id}', function($app) {
|
||||
$app->post('/edit[/]', [Agentes::class, 'edit']);
|
||||
});
|
||||
|
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);
|
||||
});
|
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/ventas/facturas.php
Normal file
6
app/resources/routes/api/ventas/facturas.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Ventas\Facturas;
|
||||
|
||||
$app->group('/facturas', function($app) {
|
||||
$app->post('/add[/]', [Facturas::class, 'add']);
|
||||
});
|
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']);
|
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);
|
||||
});
|
Reference in New Issue
Block a user