Agregar y editar abono cuotas.
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
<th>UF</th>
|
||||
<th rowspan="2">Estado</th>
|
||||
<th class="right aligned">
|
||||
<button class="ui green icon button" id="add_button">
|
||||
<button class="ui tertiary green icon button" id="add_button">
|
||||
<i class="plus icon"></i>
|
||||
</button>
|
||||
</th>
|
||||
@ -50,13 +50,13 @@
|
||||
$(document).ready(function () {
|
||||
const addModal = new AddModal({
|
||||
modal: '#add_cuota_modal',
|
||||
form: '#add_cuota_form',
|
||||
form: 'add_cuota_form',
|
||||
fecha: '#add_fecha',
|
||||
})
|
||||
const editModal = new EditModal({
|
||||
table: 'cuotas',
|
||||
modal: '#edit_cuota_modal',
|
||||
form: '#edit_cuota_form',
|
||||
form: 'edit_cuota_form',
|
||||
fecha: '#edit_fecha',
|
||||
estado: '#edit_estado'
|
||||
})
|
||||
|
@ -4,7 +4,7 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<form class="ui form" id="add_cuota_form">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="venta_id" value="{{$venta->id}}" />
|
||||
<div class="two wide field">
|
||||
<label>Número</label>
|
||||
<input type="text" name="numero" />
|
||||
|
@ -36,11 +36,11 @@
|
||||
<label>Estado</label>
|
||||
<div class="ui selection search dropdown" id="edit_estado">
|
||||
<i class="dropdown icon"></i>
|
||||
<input type="hidden" name="estado" />
|
||||
<input type="hidden" name="tipo_estado_id" />
|
||||
<div class="default text">Estado</div>
|
||||
<div class="menu">
|
||||
@foreach($estados as $estado)
|
||||
<div class="item" data-value="{{$estado->id}}">{{$estado->nombre}}</div>
|
||||
<div class="item" data-value="{{$estado->id}}">{{$estado->descripcion}}</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@ -100,7 +100,7 @@
|
||||
const body = new FormData(form)
|
||||
const fecha = $(this.props.fecha).calendar('get date')
|
||||
body.set('fecha', fecha.getFullYear() + '-' + (fecha.getMonth() + 1).toString().padStart(2, '0') + '-' + fecha.getDate().toString().padStart(2, '0'))
|
||||
body.set('estado', $(this.props.estado).dropdown('get value'))
|
||||
body.set('tipo_estado_id', $(this.props.estado).dropdown('get value'))
|
||||
const url = `{{$urls->api}}/venta/{{$venta->id}}/escritura/cuota/${this.data.id}/edit`
|
||||
const method = 'post'
|
||||
APIClient.fetch(url, {method, body}).then(response => {
|
||||
|
Reference in New Issue
Block a user