Editar Brokers y sus contratos
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
<label>Nombre</label>
|
||||
<input type="text" name="name" placeholder="Nombre" required />
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="six wide field">
|
||||
<label>Razón Social</label>
|
||||
<input type="text" name="legal_name" placeholder="Razón Social" required />
|
||||
</div>
|
||||
@ -55,19 +55,19 @@
|
||||
@include('layout.body.scripts.rut')
|
||||
@push('page_scripts')
|
||||
<script>
|
||||
class AddModal
|
||||
{
|
||||
class AddModal {
|
||||
ids
|
||||
modal
|
||||
handler
|
||||
constructor(handler)
|
||||
{
|
||||
constructor(handler) {
|
||||
this.handler = handler
|
||||
this.ids = {
|
||||
modal: handler.ids.modals.add,
|
||||
form: handler.ids.forms.add.base,
|
||||
digit: handler.ids.forms.add.digit
|
||||
modal: 'add_broker_modal',
|
||||
form: 'add_broker_form',
|
||||
digit: 'digit'
|
||||
}
|
||||
$(`#${this.ids.modal}`).modal({
|
||||
this.modal = $(`#${this.ids.modal}`)
|
||||
this.modal.modal({
|
||||
onApprove: () => {
|
||||
const form = document.getElementById(this.ids.form)
|
||||
const data = {
|
||||
@ -82,6 +82,7 @@
|
||||
this.handler.execute().add(data)
|
||||
}
|
||||
})
|
||||
this.modal.modal('hide')
|
||||
const value = document.querySelector(`#${this.ids.form} input[name="rut"]`).value
|
||||
this.update().digit(value)
|
||||
this.watch().rut()
|
||||
@ -105,6 +106,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
show() {
|
||||
this.modal.modal('show')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
Reference in New Issue
Block a user