Commit 141d2187 authored by huriarte's avatar huriarte

Cambios modal file upload

parent 9c75512d
...@@ -216,15 +216,13 @@ const channels = [ ...@@ -216,15 +216,13 @@ const channels = [
]; ];
const fileOK = { const fileOK = {
"uuid" : "6850b631-5cb1-4614-8f0e-e43441d7bd35", "uuid": "6850b631-5cb1-4614-8f0e-e43441d7bd35",
"data" : { "id": 100,
"id" : 100, "fileName": "vacaciones-preguntas.xls",
"name" : "vacaciones-preguntas.xls", "description": "Preguntas Vacaciones",
"description" : "Preguntas Vacaciones", "status": "PS",
"status" : "PS", "user": "",
"user" : "", "uploadDate": ""
"uploadDate" : ""
}
}; };
@Injectable() @Injectable()
......
...@@ -8,6 +8,7 @@ import { MatDialogRef } from '@angular/material'; ...@@ -8,6 +8,7 @@ import { MatDialogRef } from '@angular/material';
export class FileUploadModel { export class FileUploadModel {
id: number; id: number;
uuid: string;
filename: string; filename: string;
status: string; status: string;
user: string; user: string;
...@@ -86,15 +87,18 @@ export class CaFileUploadModalComponent implements OnInit { ...@@ -86,15 +87,18 @@ export class CaFileUploadModalComponent implements OnInit {
}) })
).subscribe((event: any) => { ).subscribe((event: any) => {
if (typeof (event) === 'object') { if (typeof (event) === 'object') {
let info = event.body.data; let info = event.body;
this.fileInfo = new FileUploadModel();
if (info) { if (info) {
this.fileInfo.id = info.id; this.fileInfo.id = info.id;
this.fileInfo.filename = info.name; this.fileInfo.uuid = info.uuid;
this.fileInfo.filename = info.fileName;
this.fileInfo.status = info.status; this.fileInfo.status = info.status;
this.fileInfo.user = info.user; this.fileInfo.user = info.user;
this.fileInfo.uploadDate = info.uploadDate; this.fileInfo.uploadDate = info.uploadDate;
} else { } else {
this.fileInfo.id = null; this.fileInfo.id = null;
this.fileInfo.uuid = null;
this.fileInfo.filename = null; this.fileInfo.filename = null;
this.fileInfo.status = null; this.fileInfo.status = null;
this.fileInfo.user = null; this.fileInfo.user = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment