Merge branch 'develop' into release
This commit is contained in:
@ -210,29 +210,38 @@ class TipoCategoria {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const cuentas = {
|
const cuentas = {
|
||||||
id: 'cuentas',
|
id: '#cuentas',
|
||||||
balance: 0,
|
balance: 0,
|
||||||
tipos: [],
|
tipos: [],
|
||||||
tipos_categorias: [],
|
tipos_categorias: [],
|
||||||
|
build: function() {
|
||||||
|
return {
|
||||||
|
parent: (segment) => {
|
||||||
|
const tr = $('<tr></tr>').append(
|
||||||
|
$('<th></th>').attr('colspan', 3).html('Cuenta')
|
||||||
|
)
|
||||||
|
$.each(this.tipos, (i, el) => {
|
||||||
|
tr.append(
|
||||||
|
$('<th></th>').attr('class', 'right aligned').css('color', '#' + el.color).html(el.descripcion)
|
||||||
|
)
|
||||||
|
})
|
||||||
|
const table = $('<table></table>').attr('class', 'ui striped table').append(
|
||||||
|
$('<thead></thead>').append(tr)
|
||||||
|
)
|
||||||
|
const parent = $('<tbody></tbody>')
|
||||||
|
table.append(parent)
|
||||||
|
segment.append(table)
|
||||||
|
return parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
get: function() {
|
get: function() {
|
||||||
return {
|
return {
|
||||||
parent: () => {
|
parent: () => {
|
||||||
let parent = $('#' + this.id)
|
const segment = $(this.id)
|
||||||
|
let parent = segment.find('tbody')
|
||||||
if (parent.length === 0) {
|
if (parent.length === 0) {
|
||||||
const tr = $('<tr></tr>').append(
|
parent = this.build().parent(segment)
|
||||||
$('<th></th>').attr('colspan', 3).html('Cuenta')
|
|
||||||
)
|
|
||||||
$.each(this.tipos, (i, el) => {
|
|
||||||
tr.append(
|
|
||||||
$('<th></th>').attr('class', 'right aligned').css('color', '#' + el.color).html(el.descripcion)
|
|
||||||
)
|
|
||||||
})
|
|
||||||
const table = $('<table></table>').attr('class', 'ui striped table').append(
|
|
||||||
$('<thead></thead>').append(tr)
|
|
||||||
)
|
|
||||||
parent = $('<tbody></tbody>').attr('id', this.id)
|
|
||||||
table.append(parent)
|
|
||||||
$('h1.header').after(table)
|
|
||||||
}
|
}
|
||||||
return parent
|
return parent
|
||||||
},
|
},
|
||||||
|
@ -90,32 +90,37 @@ const tipos_categorias = {
|
|||||||
this.draw()
|
this.draw()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getParent: function() {
|
buildParent: function(segment) {
|
||||||
let parent = $(this.id).find('tbody')
|
const table = $('<table></table>').attr('class', 'ui table').append(
|
||||||
if (parent.length === 0) {
|
$('<thead></thead>').append(
|
||||||
const table = $('<table></table>').attr('class', 'ui table').append(
|
$('<tr></tr>').append(
|
||||||
$('<thead></thead>').append(
|
$('<th></th>').attr('class', 'twelve wide').html('Tipo Categoría')
|
||||||
$('<tr></tr>').append(
|
).append(
|
||||||
$('<th></th>').attr('class', 'twelve wide').html('Tipo Categoría')
|
$('<th></th>').attr('class', 'two wide').html('Activo')
|
||||||
).append(
|
).append(
|
||||||
$('<th></th>').attr('class', 'two wide').html('Activo')
|
$('<th></th>').attr('class', 'two wide right aligned').append(
|
||||||
).append(
|
$('<button></button>').attr('class', 'ui tiny green circular icon button').append(
|
||||||
$('<th></th>').attr('class', 'two wide right aligned').append(
|
$('<i></i>').attr('class', 'plus icon')
|
||||||
$('<button></button>').attr('class', 'ui tiny green circular icon button').append(
|
|
||||||
$('<i></i>').attr('class', 'plus icon')
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
table.find('.ui.button').click((e) => {
|
)
|
||||||
e.preventDefault()
|
table.find('.ui.button').click((e) => {
|
||||||
this.add()
|
e.preventDefault()
|
||||||
return false
|
this.add()
|
||||||
})
|
return false
|
||||||
parent = $('<tbody></tbody>')
|
})
|
||||||
table.append(parent)
|
parent = $('<tbody></tbody>')
|
||||||
$(this.id).append(table)
|
table.append(parent)
|
||||||
|
segment.append(table)
|
||||||
|
return parent
|
||||||
|
},
|
||||||
|
getParent: function() {
|
||||||
|
const segment = $(this.id)
|
||||||
|
let parent = segment.find('tbody')
|
||||||
|
if (parent.length === 0) {
|
||||||
|
parent = this.buildParent(segment)
|
||||||
}
|
}
|
||||||
return parent
|
return parent
|
||||||
},
|
},
|
||||||
|
@ -55,6 +55,7 @@ class TipoCuenta {
|
|||||||
const tipos_cuentas = {
|
const tipos_cuentas = {
|
||||||
id: '#tipos_cuentas',
|
id: '#tipos_cuentas',
|
||||||
tipos: [],
|
tipos: [],
|
||||||
|
modal: null,
|
||||||
getTipos: function() {
|
getTipos: function() {
|
||||||
this.tipos = []
|
this.tipos = []
|
||||||
return sendGet(_urls.api + '/tipos/cuentas').then((data) => {
|
return sendGet(_urls.api + '/tipos/cuentas').then((data) => {
|
||||||
|
@ -57,31 +57,40 @@ const archivos = {
|
|||||||
add: null,
|
add: null,
|
||||||
edit: null
|
edit: null
|
||||||
},
|
},
|
||||||
get: function() {
|
build: function() {
|
||||||
return {
|
return {
|
||||||
parent: () => {
|
parent: (segment) => {
|
||||||
let parent = $(this.id).find('tbody')
|
const table = $('<table></table>').attr('class', 'ui striped table').append(
|
||||||
if (parent.length === 0) {
|
$('<thead></thead>').append(
|
||||||
const table = $('<table></table>').attr('class', 'ui striped table').append(
|
$('<tr></tr>').append(
|
||||||
$('<thead></thead>').append(
|
$('<th></th>').html('Archivo')
|
||||||
$('<tr></tr>').append(
|
).append(
|
||||||
$('<th></th>').html('Archivo')
|
$('<th></th>').attr('class', 'right aligned').append(
|
||||||
).append(
|
$('<button></button>').attr('class', 'ui tiny green circular icon button').append(
|
||||||
$('<th></th>').attr('class', 'right aligned').append(
|
$('<i></i>').attr('class', 'plus icon')
|
||||||
$('<button></button>').attr('class', 'ui tiny green circular icon button').append(
|
).click((e) => {
|
||||||
$('<i></i>').attr('class', 'plus icon')
|
e.preventDefault()
|
||||||
).click((e) => {
|
this.add()
|
||||||
e.preventDefault()
|
return false
|
||||||
this.add()
|
})
|
||||||
return false
|
|
||||||
})
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
parent = $('<tbody></tbody>')
|
)
|
||||||
table.append(parent)
|
const parent = $('<tbody></tbody>')
|
||||||
$(this.id).append(table)
|
table.append(parent)
|
||||||
|
segment.append(table)
|
||||||
|
return parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
get: function() {
|
||||||
|
return {
|
||||||
|
parent: () => {
|
||||||
|
const segment = $(this.id)
|
||||||
|
let parent = segment.find('tbody')
|
||||||
|
if (parent.length === 0) {
|
||||||
|
parent = this.build().parent(segment)
|
||||||
}
|
}
|
||||||
return parent
|
return parent
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
Categorías
|
Categorías
|
||||||
@endif
|
@endif
|
||||||
</h1>
|
</h1>
|
||||||
<div class="ui segment">
|
<div class="ui basic fitted segment">
|
||||||
@yield('categorias_content')
|
@yield('categorias_content')
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
Tipos Categoría
|
Tipos Categoría
|
||||||
@endif
|
@endif
|
||||||
</h1>
|
</h1>
|
||||||
<div class="ui segment">
|
<div class="ui basic fitted segment">
|
||||||
@yield('tipos_categorias_content')
|
@yield('tipos_categorias_content')
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -1 +1,8 @@
|
|||||||
@extends('config.base')
|
@extends('config.base')
|
||||||
|
|
||||||
|
@section('config_content')
|
||||||
|
<h3>Configuraciones Generales</h3>
|
||||||
|
<div class="ui basic segment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
Cuentas
|
Cuentas
|
||||||
@endif
|
@endif
|
||||||
</h1>
|
</h1>
|
||||||
<div class="ui segment">
|
<div class="ui basic fitted segment">
|
||||||
@yield('cuentas_content')
|
@yield('cuentas_content')
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<h1 class="ui header">
|
<h1 class="ui header">
|
||||||
Contabilidad
|
Contabilidad
|
||||||
</h1>
|
</h1>
|
||||||
|
<div id="cuentas" class="ui basic fitted segment"></div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
Archivos
|
Archivos
|
||||||
@endif
|
@endif
|
||||||
</h1>
|
</h1>
|
||||||
<div class="ui segment">
|
<div class="ui basic fitted segment">
|
||||||
@yield('uploads_content')
|
@yield('uploads_content')
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
@extends('uploads.base')
|
@extends('uploads.base')
|
||||||
|
|
||||||
@section('uploads_content')
|
@section('uploads_content')
|
||||||
|
<div id="archivos"></div>
|
||||||
<table class="ui striped table" id="archivos"></table>
|
<table class="ui striped table" id="archivos"></table>
|
||||||
<div class="ui modal" id="add_modal">
|
<div class="ui modal" id="add_modal">
|
||||||
<i class="close icon"></i>
|
<i class="close icon"></i>
|
||||||
|
Reference in New Issue
Block a user