Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
Front-NG
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
José Alejandro Cáceres López
Front-NG
Commits
df84a952
Commit
df84a952
authored
Aug 27, 2023
by
José Alejandro Cáceres López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
validaciones en convocatoria prueba
parent
039bd996
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
+26
-8
convocatorias-agregar.component.ts
.../convocatorias-agregar/convocatorias-agregar.component.ts
+9
-4
convocatorias-listar.component.ts
...as/convocatorias-listar/convocatorias-listar.component.ts
+17
-4
No files found.
src/app/modules/main/pages/convocatorias/convocatorias-agregar/convocatorias-agregar.component.ts
View file @
df84a952
...
...
@@ -110,19 +110,21 @@ export class ConvocatoriasAgregarComponent implements OnInit {
idPDF
:
null
,
filename
:
''
};
throw
error
;
}
}
async
onSubmit
()
{
this
.
verificarCheckbox
();
if
(
this
.
myForm
.
valid
&&
!
this
.
enviarSolicitud
)
{
this
.
enviarSolicitud
=
true
;
try
{
const
pdfData
=
await
this
.
enviarPDF
();
if
(
pdfData
===
null
||
pdfData
===
undefined
)
{
//this.openModalError('¡No se completo la Solicitud!');
}
else
{
if
(
pdfData
!==
null
||
pdfData
!==
undefined
)
{
this
.
convocatoria
.
uzytavconvoca_id_file
=
pdfData
.
idPDF
;
this
.
convocatoria
.
uzytavconvoca_digital_nombre
=
pdfData
.
filename
;
this
.
convocatoria
.
uzytavconvoca_estado
=
this
.
checkboxValue
;
...
...
@@ -143,6 +145,9 @@ export class ConvocatoriasAgregarComponent implements OnInit {
}
);
}
}
catch
(
error
)
{
this
.
openModalError
(
'Error al enviar el PDF'
);
}
}
}
...
...
src/app/modules/main/pages/convocatorias/convocatorias-listar/convocatorias-listar.component.ts
View file @
df84a952
...
...
@@ -2,7 +2,7 @@ import { Component, OnInit, Input, ViewChild } from '@angular/core';
import
{
Router
}
from
'@angular/router'
;
import
{
Convocatoria
}
from
'../../../Models/convocatoria'
;
import
{
ConvocatoriaService
}
from
'../../../services/convocatoria/convocatoria.service'
;
import
{
Subscription
}
from
'rxjs'
;
import
{
Observable
,
Subscription
}
from
'rxjs'
;
import
{
HttpClient
,
HttpResponse
}
from
'@angular/common/http'
;
import
{
format
}
from
'date-fns'
;
import
{
MostrarOcultarService
}
from
'../../../services/mostrar-ocultar.service'
;
...
...
@@ -10,6 +10,8 @@ import { saveAs } from 'file-saver';
import
{
MatTableDataSource
}
from
'@angular/material/table'
;
import
{
MatPaginator
}
from
'@angular/material/paginator'
;
import
{
MatSort
}
from
'@angular/material/sort'
;
import
{
ConfirmacionEliminacionComponent
}
from
'../../programa/opciones/ConfirmacionEliminacion/ConfirmacionEliminacion.component'
;
import
{
MatDialog
}
from
'@angular/material/dialog'
;
@
Component
({
selector
:
'vex-convocatorias-listar'
,
...
...
@@ -45,7 +47,8 @@ export class ConvocatoriasListarComponent implements OnInit {
private
router
:
Router
,
private
ConvocatoriaService
:
ConvocatoriaService
,
private
httpClient
:
HttpClient
,
public
mostrarOcultarService
:
MostrarOcultarService
public
mostrarOcultarService
:
MostrarOcultarService
,
private
dialog
:
MatDialog
)
{
this
.
dataSource
=
new
MatTableDataSource
<
Convocatoria
>
([]);
}
...
...
@@ -180,8 +183,8 @@ export class ConvocatoriasListarComponent implements OnInit {
eliminarParametro
(
id
:
number
)
{
const
confirmacion
=
confirm
(
'¿Estás seguro de que quieres eliminar este parámetro?'
);
if
(
confirmacion
)
{
this
.
openModalDelete
(
'¿Está seguro de eliminar la Convocatoria?'
).
subscribe
(
result
=>
{
if
(
result
)
{
this
.
ConvocatoriaService
.
eliminarConvocatoria
(
id
).
subscribe
(
()
=>
{
// Manejar la eliminación exitosa
...
...
@@ -196,6 +199,16 @@ export class ConvocatoriasListarComponent implements OnInit {
}
);
}
});
}
formularioEnviado
:
boolean
;
openModalDelete
(
mensaje
:
string
):
Observable
<
string
>
{
const
dialogRef
=
this
.
dialog
.
open
(
ConfirmacionEliminacionComponent
,
{
disableClose
:
true
,
data
:
{
mensaje
:
mensaje
}
});
return
dialogRef
.
afterClosed
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment