UI
This commit is contained in:
5
ui/resources/views/home.blade.php
Normal file
5
ui/resources/views/home.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
@extends('layout.base')
|
||||
|
||||
@section('content')
|
||||
Welcome
|
||||
@endsection
|
31
ui/resources/views/layout/base.blade.php
Normal file
31
ui/resources/views/layout/base.blade.php
Normal file
@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>
|
||||
@if (isset($titulo))
|
||||
{{$titulo}} -
|
||||
@endif
|
||||
Incoviba S. A.</title>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.7.8/semantic.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/app.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/custom.css" />
|
||||
<link rel="icon" type="image/png" href="images/Isotipo 32.png" />
|
||||
<script type="text/javascript" src="js/app.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.7.8/semantic.min.js"></script>
|
||||
|
||||
@stack('styles')
|
||||
</head>
|
||||
<body>
|
||||
@include('layout.header')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@yield('content')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
@stack('scripts')
|
||||
</body>
|
||||
</html>
|
0
ui/resources/views/layout/footer.blade.php
Normal file
0
ui/resources/views/layout/footer.blade.php
Normal file
16
ui/resources/views/layout/header.blade.php
Normal file
16
ui/resources/views/layout/header.blade.php
Normal file
@ -0,0 +1,16 @@
|
||||
<header>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="logo_cabezal">
|
||||
<a href="."><img src="images/logo_cabezal.png" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@include('layout.menu')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
1
ui/resources/views/layout/icons/abonar.blade.php
Normal file
1
ui/resources/views/layout/icons/abonar.blade.php
Normal file
@ -0,0 +1 @@
|
||||
<span class="glyphicon glyphicon-piggy-bank small" title="Abonar"></span>
|
5
ui/resources/views/layout/icons/add.blade.php
Normal file
5
ui/resources/views/layout/icons/add.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<span class="glyphicon glyphicon-plus
|
||||
@if (isset($small) and $small)
|
||||
small
|
||||
@endif
|
||||
" title="Agregar"></span>
|
5
ui/resources/views/layout/icons/edit.blade.php
Normal file
5
ui/resources/views/layout/icons/edit.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<span class="glyphicon glyphicon-edit
|
||||
@if (isset($small) and $small)
|
||||
small
|
||||
@endif
|
||||
" title="Editar"></span>
|
1
ui/resources/views/layout/icons/pagar.blade.php
Normal file
1
ui/resources/views/layout/icons/pagar.blade.php
Normal file
@ -0,0 +1 @@
|
||||
<span class="glyphicon glyphicon-usd small" title="Pagar"></span>
|
5
ui/resources/views/layout/icons/remove.blade.php
Normal file
5
ui/resources/views/layout/icons/remove.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<span class="glyphicon glyphicon-remove
|
||||
@if (isset($small) and $small)
|
||||
small
|
||||
@endif
|
||||
" title="Eliminar"></span>
|
9
ui/resources/views/layout/icons/show.blade.php
Normal file
9
ui/resources/views/layout/icons/show.blade.php
Normal file
@ -0,0 +1,9 @@
|
||||
<span class="glyphicon glyphicon-{{$icon}}
|
||||
@if (isset($small) and $small)
|
||||
small
|
||||
@endif
|
||||
"
|
||||
@if (isset($title))
|
||||
title="{{$title}}"
|
||||
@endif
|
||||
></span>
|
53
ui/resources/views/layout/menu.blade.php
Normal file
53
ui/resources/views/layout/menu.blade.php
Normal file
@ -0,0 +1,53 @@
|
||||
<nav class="navbar navbar-default">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{{$urls->incoviba}}">Inicio</a></li>
|
||||
<li role="presentation" class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
Ventas <span class="caret"></span>
|
||||
</a>
|
||||
@include('layout.menu.ventas')
|
||||
</li>
|
||||
|
||||
<li role="presentation" class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
Proyectos <span class="caret"></span>
|
||||
</a>
|
||||
@include('layout.menu.proyectos')
|
||||
</li>
|
||||
<li><a href="{{$urls->incoviba}}?p=inmobiliarias&a=list">Inmobiliarias</a></li>
|
||||
|
||||
<li role="presentation" class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
Contabilidad <span class="caret"></span>
|
||||
</a>
|
||||
@include('layout.menu.informes')
|
||||
</li>
|
||||
|
||||
<li role="presentation" class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
Herramientas <span class="caret"></span>
|
||||
</a>
|
||||
@include('layout.menu.herramientas')
|
||||
</li>
|
||||
<li rol="presentation" class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
Operadores <span class="caret"></span>
|
||||
</a>
|
||||
@include('layout.menu.operadores')
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li role="presentation" class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
User <span class="caret"></span>
|
||||
</a>
|
||||
@include('layout.menu.login')
|
||||
</li>
|
||||
<li style="font-size: large; border-left: 1px solid #e7e7e7;">
|
||||
<a href="{{$urls->incoviba}}?p=buscar">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li style="margin-right: 15px;"> </li>
|
||||
</ul>
|
||||
</nav>
|
3
ui/resources/views/layout/menu/herramientas.blade.php
Normal file
3
ui/resources/views/layout/menu/herramientas.blade.php
Normal file
@ -0,0 +1,3 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="http://{{$urls->money}}">Valores Monetarios</a></li>
|
||||
</ul>
|
4
ui/resources/views/layout/menu/informes.blade.php
Normal file
4
ui/resources/views/layout/menu/informes.blade.php
Normal file
@ -0,0 +1,4 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{$urls->incoviba}}?p=informes&a=contabilidad">Pagos Mes</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=informes&a=resumen_contabilidad">Resumen</a></li>
|
||||
</ul>
|
3
ui/resources/views/layout/menu/inmobiliarias.blade.php
Normal file
3
ui/resources/views/layout/menu/inmobiliarias.blade.php
Normal file
@ -0,0 +1,3 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{$urls->incoviba}}?p=inmobiliarias&a=list">Listado</a></li>
|
||||
</ul>
|
5
ui/resources/views/layout/menu/login.blade.php
Normal file
5
ui/resources/views/layout/menu/login.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{$urls->incoviba}}?p=auth&a=change_pass">Cambiar Cláve</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=admin">Administración</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=auth&a=logout">Salir</a></li>
|
||||
</ul>
|
11
ui/resources/views/layout/menu/operadores.blade.php
Normal file
11
ui/resources/views/layout/menu/operadores.blade.php
Normal file
@ -0,0 +1,11 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="{{$urls->base}}/operadores">Listado</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{$urls->base}}/ventas">Ventas</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{$urls->base}}/informe">Informe</a>
|
||||
</li>
|
||||
</ul>
|
4
ui/resources/views/layout/menu/proyectos.blade.php
Normal file
4
ui/resources/views/layout/menu/proyectos.blade.php
Normal file
@ -0,0 +1,4 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{$urls->incoviba}}?p=proyectos&a=list">Listado</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=proyectos&a=unidades">Unidades</a></li>
|
||||
</ul>
|
24
ui/resources/views/layout/menu/ventas.blade.php
Normal file
24
ui/resources/views/layout/menu/ventas.blade.php
Normal file
@ -0,0 +1,24 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li class="dropdown-submenu"><a>Listado</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{$urls->incoviba}}?p=precios&a=listProyectos">Precios</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=cierres&a=list">Cierres</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=ventas&a=list">Ventas</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=cuotas&a=pendientes">Cuotas Pendientes</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=cuotas&a=para_abonar">Abonar Cuotas</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=pagos&a=pendientes">Pagos Pendientes</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=ventas&a=consolidacion">Consolidado Ventas</a>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown-submenu"><a>Informes</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{$urls->incoviba}}?p=informes&a=ventas">Ventas</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=informes&a=escrituras">Escrituras</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=informes&a=gantt_entregas">Gantt de Entregas</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=informes&a=resciliaciones">Resciliaciones</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="{{$urls->incoviba}}?p=precios&a=import">Importar Precios</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=cierres&a=evalue">Evaluar Cierre</a></li>
|
||||
<li><a href="{{$urls->incoviba}}?p=ventas&a=new">Nueva Venta <span class="glyphicon glyphicon-plus"></span></a></li>
|
||||
</ul>
|
5
ui/resources/views/layout2/base.blade.php
Normal file
5
ui/resources/views/layout2/base.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
@include('layout.head')
|
||||
@include('layout.body')
|
||||
</html>
|
5
ui/resources/views/layout2/body.blade.php
Normal file
5
ui/resources/views/layout2/body.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<body>
|
||||
@include('layout.body.header')
|
||||
@yield('page_content')
|
||||
@include('layout.body.footer')
|
||||
</body>
|
0
ui/resources/views/layout2/body/footer.blade.php
Normal file
0
ui/resources/views/layout2/body/footer.blade.php
Normal file
0
ui/resources/views/layout2/body/header.blade.php
Normal file
0
ui/resources/views/layout2/body/header.blade.php
Normal file
4
ui/resources/views/layout2/head.blade.php
Normal file
4
ui/resources/views/layout2/head.blade.php
Normal file
@ -0,0 +1,4 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Incoviba - Operadores</title>
|
||||
</head>
|
255
ui/resources/views/operadores/list.blade.php
Normal file
255
ui/resources/views/operadores/list.blade.php
Normal file
@ -0,0 +1,255 @@
|
||||
@extends('layout.base')
|
||||
|
||||
@section('content')
|
||||
<h1 class="header">
|
||||
Operadores
|
||||
</h1>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Operador
|
||||
</th>
|
||||
<th>
|
||||
Proyectos
|
||||
</th>
|
||||
<th class="text-right">
|
||||
<button class="btn btn-success" data-toggle="modal" data-target="#modal_general">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="operadores">
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="modal fade" id="modal_general" tabindex="-1" role="dialog" aria-labelledby="Agregar Operador">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Agregar Operador</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="rut" class="control-label">Rut</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="rut" class="form-control" maxlength="8" />
|
||||
<div class="input-group-addon">
|
||||
-
|
||||
</div>
|
||||
<input type="text" name="dv" class="form-control" maxlength="1" size="1" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="descripcion" class="control-label">Descripción</label>
|
||||
<input type="text" name="descripcion" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="abreviacion" class="control-label">Abreviación</label>
|
||||
<input type="text" name="abreviacion" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="representante" class="control-label">Representante</label>
|
||||
<input type="text" name="representante" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="telefono" class="control-label">Telefono</label>
|
||||
<input type="text" name="telefono" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="correo" class="control-label">Correo</label>
|
||||
<input type="text" name="correo" class="form-control" />
|
||||
</div>
|
||||
<button class="btn btn-default" data-dismiss="modal" id="cerrar_general">Agregar</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="modal_proyecto" tabindex="-1" role="dialog" aria-labelledby="Asignar Proyecto">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Asignar Proyecto</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<input type="hidden" name="operador" />
|
||||
<div class="form-group">
|
||||
<label for="proyecto" class="control-label">Proyecto</label>
|
||||
<select class="form-control" name="proyecto"></select>
|
||||
</div>
|
||||
<button class="btn btn-default" data-dismiss="modal" id="cerrar_proyecto">Asignar</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
const operadores = {
|
||||
id: '#operadores',
|
||||
data: [],
|
||||
get: function() {
|
||||
return {
|
||||
operadores: () => {
|
||||
return $.ajax({
|
||||
url: '{{$urls->api}}/operadores',
|
||||
method: 'get',
|
||||
dataType: 'json'
|
||||
}).then((data) => {
|
||||
if (data.operadores === null || data.operadores.length == 0) {
|
||||
return
|
||||
}
|
||||
this.data = data.operadores
|
||||
}).then(() => {
|
||||
this.draw()
|
||||
})
|
||||
},
|
||||
proyectos: () => {
|
||||
return $.ajax({
|
||||
url: '{{$urls->api}}/proyectos',
|
||||
method: 'get',
|
||||
dataType: 'json'
|
||||
}).then((data) => {
|
||||
if (data.proyectos === null || data.proyectos.length == 0) {
|
||||
return
|
||||
}
|
||||
const select = $("select[name='proyecto']")
|
||||
$.each(data.proyectos, (i, el) => {
|
||||
select.append(
|
||||
$('<option></option>').attr('value', el.id).html(el.descripcion + ' - ' + el.inmobiliaria.abreviacion)
|
||||
)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
draw: function() {
|
||||
const parent = $(this.id)
|
||||
$.each(this.data, (i, el) => {
|
||||
const row = $('<tr></tr>').append(
|
||||
$('<td></td>').html(el.descripcion)
|
||||
)
|
||||
const proyectos = $('<tbody></tbody>')
|
||||
row.append(
|
||||
$('<td></td>').append(
|
||||
$('<table></table>').attr('class', 'table').append(
|
||||
$('<thead></thead>').append(
|
||||
$('<tr></tr>').append(
|
||||
$('<th></th>').html('Proyecto')
|
||||
).append(
|
||||
$('<th></th>').html('Comisión')
|
||||
).append(
|
||||
$('<th></th>').attr('class', 'text-right').append(
|
||||
$('<button></button>').attr('class', 'btn btn-success').attr('data-toggle', 'modal').attr('data-target', '#modal_proyecto').attr('data-operador', el.id).append(
|
||||
$('<span></span>').attr('class', 'glyphicon glyphicon-plus')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
).append(proyectos)
|
||||
)
|
||||
).append(
|
||||
$('<td></td>').attr('class', 'text-right').append(
|
||||
$('<button></button>').attr('class', 'btn btn-info').attr('data-toggle', 'modal').attr('data-target', '#modal_edit').attr('data-operador', el.id).append(
|
||||
$('<span></span>').attr('class', 'glyphicon glyphicon-pencil')
|
||||
)
|
||||
).append(
|
||||
$('<button></button>').attr('class', 'btn btn-info').attr('data-toggle', 'modal').attr('data-target', '#modal_remove').attr('data-operador', el.id).append(
|
||||
$('<span></span>').attr('class', 'glyphicon glyphicon-remove')
|
||||
)
|
||||
)
|
||||
)
|
||||
if (el.comisiones.length > 0) {
|
||||
$.each(el.comisiones, (k, pe) => {
|
||||
proyectos.append(
|
||||
$('<tr></tr>').append(
|
||||
$('<td></td>').html(pe.proyecto.descripcion)
|
||||
).append(
|
||||
$('<td></td>').html(pe.comision + '%')
|
||||
)
|
||||
)
|
||||
})
|
||||
}
|
||||
parent.append(row)
|
||||
})
|
||||
},
|
||||
add: function() {
|
||||
return {
|
||||
operador: () => {
|
||||
const parent = $('#modal_general').find('form')
|
||||
const data = {
|
||||
rut: parent.find("[name='rut']").val(),
|
||||
descripcion: parent.find("[name='descripcion']").val(),
|
||||
abreviacion: parent.find("[name='abreviacion']").val(),
|
||||
representante: parent.find("[name='representante']").val(),
|
||||
telefono: parent.find("[name='telefono']").val(),
|
||||
correo: parent.find("[name='correo']").val()
|
||||
}
|
||||
return $.ajax({
|
||||
url: '{{$urls->api}}/operadores/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
dataType: 'json'
|
||||
}).then(() => {
|
||||
this.get().operadores()
|
||||
})
|
||||
},
|
||||
proyecto: () => {
|
||||
const parent = $('#modal_proyecto').find('form')
|
||||
const data = {
|
||||
operador: parent.find("[name='operador']").val(),
|
||||
proyecto: parent.find("[name='proyecto']").val()
|
||||
}
|
||||
console.debug(data)
|
||||
}
|
||||
}
|
||||
},
|
||||
setup: function() {
|
||||
this.get().operadores()
|
||||
this.get().proyectos()
|
||||
|
||||
$('#modal_general').find('#cerrar_general').click((e) => {
|
||||
$('#modal_general').find('form').trigger('submit')
|
||||
})
|
||||
$('#modal_general').find('form').submit((e) => {
|
||||
e.preventDefault()
|
||||
this.add().operador().then(() => {
|
||||
$(e.target).trigger('reset')
|
||||
$('#modal_general').modal('toggle')
|
||||
})
|
||||
return false
|
||||
})
|
||||
|
||||
$('#modal_proyecto').on('show.bs.modal', function(e) {
|
||||
const btn = $(e.relatedTarget)
|
||||
const operador = btn.data('operador')
|
||||
const modal = $(this)
|
||||
modal.find("[name='operador']").val(operador)
|
||||
})
|
||||
$('#modal_proyecto').find('#cerrar_proyecto').click((e) => {
|
||||
$('#modal_proyecto').find('form').trigger('submit')
|
||||
})
|
||||
$('#modal_proyecto').find('form').submit((e) => {
|
||||
e.preventDefault()
|
||||
this.add().proyecto().then(() => {
|
||||
$(e.target).trigger('reset')
|
||||
$('#modal_proyecto').modal('toggle')
|
||||
})
|
||||
return false
|
||||
})
|
||||
}
|
||||
}
|
||||
$(document).ready(() => {
|
||||
operadores.setup()
|
||||
})
|
||||
</script>
|
||||
@endpush
|
Reference in New Issue
Block a user