Commit 141d2187 authored by huriarte's avatar huriarte

Cambios modal file upload

parent 9c75512d
......@@ -216,15 +216,13 @@ const channels = [
];
const fileOK = {
"uuid" : "6850b631-5cb1-4614-8f0e-e43441d7bd35",
"data" : {
"id" : 100,
"name" : "vacaciones-preguntas.xls",
"description" : "Preguntas Vacaciones",
"status" : "PS",
"user" : "",
"uploadDate" : ""
}
"uuid": "6850b631-5cb1-4614-8f0e-e43441d7bd35",
"id": 100,
"fileName": "vacaciones-preguntas.xls",
"description": "Preguntas Vacaciones",
"status": "PS",
"user": "",
"uploadDate": ""
};
@Injectable()
......
......@@ -8,6 +8,7 @@ import { MatDialogRef } from '@angular/material';
export class FileUploadModel {
id: number;
uuid: string;
filename: string;
status: string;
user: string;
......@@ -86,15 +87,18 @@ export class CaFileUploadModalComponent implements OnInit {
})
).subscribe((event: any) => {
if (typeof (event) === 'object') {
let info = event.body.data;
let info = event.body;
this.fileInfo = new FileUploadModel();
if (info) {
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.user = info.user;
this.fileInfo.uploadDate = info.uploadDate;
} else {
this.fileInfo.id = null;
this.fileInfo.uuid = null;
this.fileInfo.filename = null;
this.fileInfo.status = 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