edicion Incidencias infoPers
This commit is contained in:
@@ -62,6 +62,9 @@
|
|||||||
PaginationItemsTextFormat="{0} - {1} de {2} elementos">
|
PaginationItemsTextFormat="{0} - {1} de {2} elementos">
|
||||||
|
|
||||||
<GridColumns>
|
<GridColumns>
|
||||||
|
<GridColumn TItem="INCIDENCIAS" HeaderText="">
|
||||||
|
<button @onclick="@(() => abrirPopupModificacion(context, false))" class="btnOAAFAzul">Editar</button>
|
||||||
|
</GridColumn>
|
||||||
<GridColumn TItem="INCIDENCIAS" HeaderText="Nómina">
|
<GridColumn TItem="INCIDENCIAS" HeaderText="Nómina">
|
||||||
@context.IDNOMINANavigation.DESCRIPCION
|
@context.IDNOMINANavigation.DESCRIPCION
|
||||||
</GridColumn>
|
</GridColumn>
|
||||||
@@ -134,13 +137,48 @@
|
|||||||
}
|
}
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
|
||||||
|
<Modal @ref="popupGestionDatos" IsVerticallyCentered="true" UseStaticBackdrop="true" CloseOnEscape="false">
|
||||||
|
<BodyTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label for="txtEDesc" class="fw-bold">Sustituye concepto: </label>
|
||||||
|
<input class="" type="checkbox" id="chbSusConcepto" checked="@ItemEnEdicion.SUSTITUYECONCEPTO" />
|
||||||
|
<label for="txtEDesc" class="fw-bold">Cotiza seguridad social: </label>
|
||||||
|
<input class="" type="checkbox" id="chbCotizaSS" checked="@ItemEnEdicion.COTIZASEGURIDADSOCIAL" />
|
||||||
|
<label for="txtEDesc" class="fw-bold">Texto: </label>
|
||||||
|
<input class="form-control" type="text" @bind-value="@ItemEnEdicion.TEXTO" />
|
||||||
|
<label for="txtEDesc" class="fw-bold">Cantidad: </label>
|
||||||
|
<input class="form-control" type="number" @bind-value="@ItemEnEdicion.CANTIDAD" />
|
||||||
|
<label for="txtEDesc" class="fw-bold">Importe: </label>
|
||||||
|
<input class="form-control" type="number" @bind-value="@ItemEnEdicion.IMPORTE" />
|
||||||
|
<label for="txtEDesc" class="fw-bold">IRPF: </label>
|
||||||
|
<input class="" type="checkbox" id="chbIRPF" checked="@ItemEnEdicion.IRPF" />
|
||||||
|
<label for="txtEDesc" class="fw-bold">IRPF Ficha: </label>
|
||||||
|
<input class="" type="checkbox" id="chbIRPFficha" checked="@ItemEnEdicion.IRPFFICHA" />
|
||||||
|
<label for="txtEDesc" class="fw-bold">No para IRPF: </label>
|
||||||
|
<input class="" type="checkbox" id="chbNominaIRPF" checked="@ItemEnEdicion.NOPARAIRPF" />
|
||||||
|
<label for="txtEDesc" class="fw-bold">Nómina normal: </label>
|
||||||
|
<input class="" type="checkbox" id="chbNominaNormal" checked="@ItemEnEdicion.NOMINANORMAL" />
|
||||||
|
<label for="txtEDesc" class="fw-bold">Nómina seguridad social: </label>
|
||||||
|
<input class="" type="checkbox" id="chbNominaSS" checked="@ItemEnEdicion.NOMINASEGURIDADSOCIAL" />
|
||||||
|
<label for="txtEDesc" class="fw-bold">Apl. Presupuestaria: </label>
|
||||||
|
<input class="" type="checkbox" id="chbAplPresupuestria" checked="@ItemEnEdicion.APLICACIONPRESUPUESTARIA" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</BodyTemplate>
|
||||||
|
<FooterTemplate>
|
||||||
|
<Button Color="ButtonColor.Secondary" @onclick="cerrarPopupModificacion">Cerrar</Button>
|
||||||
|
<Button Type="ButtonType.Submit" Color="ButtonColor.Primary">Modificar</Button>
|
||||||
|
</FooterTemplate>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public PERSONAS Persona { get; set; } = new PERSONAS();
|
public PERSONAS Persona { get; set; } = new PERSONAS();
|
||||||
|
private Modal popupGestionDatos = default;
|
||||||
public int? idNom { get; set; }
|
public int? idNom { get; set; }
|
||||||
private string titulo { get; set; }
|
private string titulo { get; set; }
|
||||||
private HttpClient cliente = new HttpClient();
|
private HttpClient cliente = new HttpClient();
|
||||||
@@ -150,6 +188,7 @@
|
|||||||
// private List<int?> meses = new List<int?>();
|
// private List<int?> meses = new List<int?>();
|
||||||
private List<INCIDENCIAS> itmList = new List<INCIDENCIAS>();
|
private List<INCIDENCIAS> itmList = new List<INCIDENCIAS>();
|
||||||
private List<String> nombMeses = ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"];
|
private List<String> nombMeses = ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"];
|
||||||
|
private INCIDENCIAS ItemEnEdicion { get; set; } = new INCIDENCIAS();
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -186,4 +225,24 @@
|
|||||||
Console.WriteLine($"Error al obtener los datos: {e.Message}");
|
Console.WriteLine($"Error al obtener los datos: {e.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private async Task abrirPopupModificacion(INCIDENCIAS objeto, bool esNuevo)
|
||||||
|
{
|
||||||
|
ItemEnEdicion = objeto;
|
||||||
|
await popupGestionDatos.ShowAsync();
|
||||||
|
}
|
||||||
|
private async Task cerrarPopupModificacion()
|
||||||
|
{
|
||||||
|
await popupGestionDatos.HideAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
// GUARDAR
|
||||||
|
|
||||||
|
private async Task GestionarDatos(INCIDENCIAS inci)
|
||||||
|
{
|
||||||
|
|
||||||
|
var cliente = Utilidades.ObtenerCliente(UserState.Token, HttpClientFactory);
|
||||||
|
var response = await Utilidades.ActualizarObjeto(cliente, "/api/INCIDENCIAS/" + inci.IDINCIDENCIA, inci);
|
||||||
|
await cerrarPopupModificacion();
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user