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

View File

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

View File

@ -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) => {

View File

@ -57,11 +57,9 @@ 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')
if (parent.length === 0) {
const table = $('<table></table>').attr('class', 'ui striped table').append( const table = $('<table></table>').attr('class', 'ui striped table').append(
$('<thead></thead>').append( $('<thead></thead>').append(
$('<tr></tr>').append( $('<tr></tr>').append(
@ -79,9 +77,20 @@ const archivos = {
) )
) )
) )
parent = $('<tbody></tbody>') const parent = $('<tbody></tbody>')
table.append(parent) 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 return parent
}, },

View File

@ -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

View File

@ -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

View File

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

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -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>