Merge branch 'develop' into release

This commit is contained in:
2021-12-23 00:47:47 -03:00
11 changed files with 96 additions and 63 deletions

View File

@ -210,15 +210,13 @@ class TipoCategoria {
}
}
const cuentas = {
id: 'cuentas',
id: '#cuentas',
balance: 0,
tipos: [],
tipos_categorias: [],
get: function() {
build: function() {
return {
parent: () => {
let parent = $('#' + this.id)
if (parent.length === 0) {
parent: (segment) => {
const tr = $('<tr></tr>').append(
$('<th></th>').attr('colspan', 3).html('Cuenta')
)
@ -230,9 +228,20 @@ const cuentas = {
const table = $('<table></table>').attr('class', 'ui striped table').append(
$('<thead></thead>').append(tr)
)
parent = $('<tbody></tbody>').attr('id', this.id)
const parent = $('<tbody></tbody>')
table.append(parent)
$('h1.header').after(table)
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
},

View File

@ -90,9 +90,7 @@ const tipos_categorias = {
this.draw()
})
},
getParent: function() {
let parent = $(this.id).find('tbody')
if (parent.length === 0) {
buildParent: function(segment) {
const table = $('<table></table>').attr('class', 'ui table').append(
$('<thead></thead>').append(
$('<tr></tr>').append(
@ -115,7 +113,14 @@ const tipos_categorias = {
})
parent = $('<tbody></tbody>')
table.append(parent)
$(this.id).append(table)
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
},

View File

@ -55,6 +55,7 @@ class TipoCuenta {
const tipos_cuentas = {
id: '#tipos_cuentas',
tipos: [],
modal: null,
getTipos: function() {
this.tipos = []
return sendGet(_urls.api + '/tipos/cuentas').then((data) => {

View File

@ -57,11 +57,9 @@ const archivos = {
add: null,
edit: null
},
get: function() {
build: function() {
return {
parent: () => {
let parent = $(this.id).find('tbody')
if (parent.length === 0) {
parent: (segment) => {
const table = $('<table></table>').attr('class', 'ui striped table').append(
$('<thead></thead>').append(
$('<tr></tr>').append(
@ -79,9 +77,20 @@ const archivos = {
)
)
)
parent = $('<tbody></tbody>')
const parent = $('<tbody></tbody>')
table.append(parent)
$(this.id).append(table)
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
},

View File

@ -8,7 +8,7 @@
Categorías
@endif
</h1>
<div class="ui segment">
<div class="ui basic fitted segment">
@yield('categorias_content')
</div>
@endsection

View File

@ -8,7 +8,7 @@
Tipos Categoría
@endif
</h1>
<div class="ui segment">
<div class="ui basic fitted segment">
@yield('tipos_categorias_content')
</div>
@endsection

View File

@ -1 +1,8 @@
@extends('config.base')
@section('config_content')
<h3>Configuraciones Generales</h3>
<div class="ui basic segment">
</div>
@endsection

View File

@ -8,7 +8,7 @@
Cuentas
@endif
</h1>
<div class="ui segment">
<div class="ui basic fitted segment">
@yield('cuentas_content')
</div>
@endsection

View File

@ -4,6 +4,7 @@
<h1 class="ui header">
Contabilidad
</h1>
<div id="cuentas" class="ui basic fitted segment"></div>
@endsection
@push('scripts')

View File

@ -8,7 +8,7 @@
Archivos
@endif
</h1>
<div class="ui segment">
<div class="ui basic fitted segment">
@yield('uploads_content')
</div>
@endsection

View File

@ -1,6 +1,7 @@
@extends('uploads.base')
@section('uploads_content')
<div id="archivos"></div>
<table class="ui striped table" id="archivos"></table>
<div class="ui modal" id="add_modal">
<i class="close icon"></i>