{"__symbolic":"module","version":4,"metadata":{"InovaCoreVisitModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":15,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"AnnexesViewComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":20,"character":4},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/table","name":"MatTableModule","line":22,"character":4},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsModule","line":23,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":24,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/material/progress-spinner","name":"MatProgressSpinnerModule","line":26,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":27,"character":4},{"__symbolic":"reference","module":"@angular/material/sort","name":"MatSortModule","line":28,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":29,"character":4},{"__symbolic":"reference","module":"@angular/flex-layout","name":"FlexLayoutModule","line":30,"character":4}],"providers":[{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"AnnexesViewComponent"}]}]}],"members":{}},"AnnexesViewComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"inova-visit-annexes-view","template":"<div *ngIf=\"loadingDialog\" class=\"view-annexes-spinner\">\n    <mat-spinner [diameter]=\"40\"></mat-spinner>\n</div>\n<div class=\"fixActionRow\" *ngIf=\"!loadingDialog\">\n    <h1 mat-dialog-title class=\"title-modal\">{{'visit_data.annexes-modal.annexes' | translate}}</h1>\n    <div mat-dialog-content>\n        <mat-tab-group selectedIndex=\"0\" (focusChange)=\"getAnnexesTab($event.index)\"\n                       style=\"margin-top: 2px; font-family: Montserrat, sans-serif !important;\">\n            <mat-tab>\n                <ng-template mat-tab-label>\n                    <img src=\"assets/images/images.svg\" alt=\"\" class=\"svg-icon\">\n                    <span class=\"tab__label\">{{'visit_data.annexes-modal.images' | translate}}</span>\n                </ng-template>\n                <ng-template matTabContent>\n                    <div *ngIf=\"hasAnnexes\" class=\"full-width table-container\">\n                        <table mat-table [dataSource]=\"dataSource\" class=\"full-width\" matSort\n                               style=\"background-color: transparent;\">\n                            <ng-container matColumnDef=\"fileName\">\n                                <th mat-header-cell *matHeaderCellDef> {{'visit_data.annexes-modal.name' | translate}} </th>\n                                <td mat-cell *matCellDef=\"let element; let index = index\">\n                                    <span *ngIf=\"element.fileName\">{{ element.displayName }}</span>\n                                    <span *ngIf=\"!element.fileName\">{{'visit_data.annexes-modal.img' | translate}} {{index+1}}</span>\n                                </td>\n                            </ng-container>\n\n                            <ng-container matColumnDef=\"actions\">\n                                <th mat-header-cell *matHeaderCellDef class=\"header-align-right\"> <span class=\"header__padding-right\">\n                    {{'visit_data.annexes-modal.action' | translate}}\n                  </span></th>\n                                <td mat-cell *matCellDef=\"let element; let index=index\" class=\"header-align-right\">\n                                    <button (click)=\"viewFile(element, index+1)\" mat-icon-button\n                                            matTooltip=\"{{'visit_data.annexes-modal.see_img' | translate}}\" color=\"accent\">\n                                        <mat-icon>remove_red_eye</mat-icon>\n                                    </button>\n                                    <button (click)=\"downloadFile(element,element.displayName || 'imagen_'+ (index+1))\" mat-icon-button\n                                            matTooltip=\"{{'visit_data.annexes-modal.download_img' | translate}}\" color=\"accent\">\n                                        <mat-icon>cloud_download</mat-icon>\n                                    </button>\n                                </td>\n                            </ng-container>\n                            <tr mat-header-row *matHeaderRowDef=\"columnsToDisplay; sticky: true\"></tr>\n                            <tr mat-row *matRowDef=\"let row; columns: columnsToDisplay;\"></tr>\n                        </table>\n                    </div>\n                    <div fxFlex=\"100\" class=\"align-center\" *ngIf=\"!hasAnnexes\">\n                        <p>{{noAnnexes}}</p>\n                    </div>\n                </ng-template>\n            </mat-tab>\n\n            <mat-tab>\n                <ng-template mat-tab-label>\n                    <img src=\"assets/images/file-pdf.svg\" alt=\"\" class=\"svg-icon\">\n                    <span class=\"tab__label\">PDF</span>\n                </ng-template>\n                <ng-template matTabContent>\n                    <div *ngIf=\"hasAnnexes\" class=\"full-width table-container\">\n                        <table mat-table [dataSource]=\"dataSource\" class=\"full-width\" matSort>\n                            <ng-container matColumnDef=\"fileName\">\n                                <th mat-header-cell *matHeaderCellDef> {{'visit_data.annexes-modal.name' | translate}} </th>\n                                <td mat-cell *matCellDef=\"let element; let index = index\">\n                                    <span *ngIf=\"element.fileName\">{{ element.displayName }}</span>\n                                    <span *ngIf=\"!element.fileName\">PDF {{index+1}}</span>\n                                </td>\n                            </ng-container>\n\n                            <ng-container matColumnDef=\"actions\">\n                                <th mat-header-cell *matHeaderCellDef class=\"header-align-right\">\n                                    {{'visit_data.annexes-modal.action' | translate}} </th>\n                                <td mat-cell *matCellDef=\"let element; let index = index\" class=\"header-align-right\">\n                                    <button (click)=\"downloadFile(element,element.displayName || 'pdf_'+ (index+1))\" mat-icon-button\n                                            matTooltip=\"{{'visit_data.annexes-modal.download' | translate}} PDF\" color=\"accent\">\n                                        <mat-icon>cloud_download</mat-icon>\n                                    </button>\n                                </td>\n                            </ng-container>\n                            <tr mat-header-row *matHeaderRowDef=\"columnsToDisplay; sticky: true\"></tr>\n                            <tr mat-row *matRowDef=\"let row; columns: columnsToDisplay;\"></tr>\n                        </table>\n                    </div>\n                    <div fxFlex=\"100\" class=\"align-center\" *ngIf=\"!hasAnnexes\">\n                        <p>{{noAnnexes}}</p>\n                    </div>\n                </ng-template>\n            </mat-tab>\n\n            <mat-tab>\n                <ng-template mat-tab-label>\n                    <img src=\"assets/images/file-excel.svg\" alt=\"\" class=\"svg-icon\">\n                    <span class=\"tab__label\">Excel</span>\n                </ng-template>\n                <ng-template matTabContent>\n                    <div *ngIf=\"hasAnnexes\" class=\"full-width table-container\">\n                        <table mat-table [dataSource]=\"dataSource\" class=\"full-width\" matSort>\n                            <ng-container matColumnDef=\"fileName\">\n                                <th mat-header-cell *matHeaderCellDef> {{'visit_data.annexes-modal.name' | translate}} </th>\n                                <td mat-cell *matCellDef=\"let element; let index = index\">\n                                    <span *ngIf=\"element.fileName\">{{ element.displayName }}</span>\n                                    <span *ngIf=\"!element.fileName\">Excel {{index+1}}</span>\n                                </td>\n                            </ng-container>\n\n                            <ng-container matColumnDef=\"actions\">\n                                <th mat-header-cell *matHeaderCellDef class=\"header-align-right\"> {{'visit_data.annexes-modal.action' |\n                                    translate}} </th>\n                                <td mat-cell *matCellDef=\"let element; let index=index\" class=\"header-align-right\">\n                                    <button (click)=\"downloadFile(element,element.displayName || 'excel_'+ (index+1))\" mat-icon-button\n                                            matTooltip=\"{{'visit_data.annexes-modal.download' | translate}} excel\" color=\"accent\">\n                                        <mat-icon>cloud_download</mat-icon>\n                                    </button>\n                                </td>\n                            </ng-container>\n                            <tr mat-header-row *matHeaderRowDef=\"columnsToDisplay; sticky: true\"></tr>\n                            <tr mat-row *matRowDef=\"let row; columns: columnsToDisplay;\"></tr>\n                        </table>\n                    </div>\n                    <div fxFlex=\"100\" class=\"align-center\" *ngIf=\"!hasAnnexes\">\n                        <p>{{noAnnexes}}</p>\n                    </div>\n                </ng-template>\n            </mat-tab>\n            <mat-tab>\n                <ng-template mat-tab-label>\n                    <img src=\"assets/images/file-word.svg\" alt=\"\" class=\"svg-icon\">\n                    <span class=\"tab__label\">Docs</span>\n                </ng-template>\n                <ng-template matTabContent>\n                    <div *ngIf=\"hasAnnexes\" class=\"full-width table-container\">\n                        <table mat-table [dataSource]=\"dataSource\" class=\"full-width\" matSort>\n                            <ng-container matColumnDef=\"fileName\">\n                                <th mat-header-cell *matHeaderCellDef> {{'visit_data.annexes-modal.name' | translate}} </th>\n                                <td mat-cell *matCellDef=\"let element; let index = index\">\n                                    <span *ngIf=\"element.fileName\">{{ element.displayName }}</span>\n                                    <span *ngIf=\"!element.fileName\">{{'visit_data.annexes-modal.doc' | translate}} {{index+1}}</span>\n                                </td>\n                            </ng-container>\n\n                            <ng-container matColumnDef=\"actions\">\n                                <th mat-header-cell *matHeaderCellDef class=\"header-align-right\"> {{'visit_data.annexes-modal.action' |\n                                    translate}} </th>\n                                <td mat-cell *matCellDef=\"let element; let index= index\" class=\"header-align-right\">\n                                    <button (click)=\"downloadFile(element,element.displayName || 'documento_'+ (index+1))\" mat-icon-button\n                                            matTooltip=\"{{'visit_data.annexes-modal.download_doc' | translate}}\" color=\"accent\">\n                                        <mat-icon>cloud_download</mat-icon>\n                                    </button>\n                                </td>\n                            </ng-container>\n                            <tr mat-header-row *matHeaderRowDef=\"columnsToDisplay; sticky: true\"></tr>\n                            <tr mat-row *matRowDef=\"let row; columns: columnsToDisplay;\"></tr>\n                        </table>\n                    </div>\n                    <div fxFlex=\"100\" class=\"align-center\" *ngIf=\"!hasAnnexes\">\n                        <p>{{noAnnexes}}</p>\n                    </div>\n                </ng-template>\n            </mat-tab>\n        </mat-tab-group>\n    </div>\n    <div class=\"spacer\"></div>\n    <div mat-dialog-actions align=\"end\" class=\"actions\">\n        <div *ngIf=\"generatingZip\" class=\"align-center spinner-container__width\">\n            <mat-spinner [diameter]=\"30\"></mat-spinner>\n        </div>\n        <button mat-raised-button (click)=\"cancel()\" class=\"button-cancel\">{{'visit_data.annexes-modal.close' | translate}}</button>\n        <button *ngIf=\"!generatingZip\" mat-raised-button matTooltip=\"{{'visit_data.annexes-modal.download_zip' | translate}}\"\n                (click)=\"downloadAll()\" class=\"button-accept\">{{'visit_data.annexes-modal.download_all' | translate}}</button>\n    </div>\n</div>\n","styles":[".fixActionRow{height:100%;display:flex;flex-direction:column}.full-width{width:100%!important}.align-center{text-align:center;display:flex;justify-content:center}.tab__label{padding-left:10px}.header-align-right{text-align:right;padding-right:15px 0}.table-container{height:auto;overflow-y:auto}.header__padding-right{padding-right:15px}.spinner-container__width{min-width:100px}.view-annexes-spinner{display:flex;justify-content:center}.actions{display:flex;flex-direction:row;flex-wrap:nowrap;gap:5px}.button-accept{width:auto!important}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0!important}.svg-icon{display:inline-block;font-size:inherit;height:1em;overflow:visible;vertical-align:-.125em;width:1.125em}"]}]}],"members":{"sort":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":28,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/material/sort","name":"MatSort","line":28,"character":13},{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":30,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MAT_DIALOG_DATA","line":30,"character":22}]}],null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"MatDialogRef","module":"@angular/material/dialog","arguments":[{"__symbolic":"reference","name":"AnnexesViewComponent"}]},{"__symbolic":"reference","name":"ɵa"}]}],"ngOnInit":[{"__symbolic":"method"}],"cancel":[{"__symbolic":"method"}],"getAnnexesTab":[{"__symbolic":"method"}],"groupAnnexes":[{"__symbolic":"method"}],"viewFile":[{"__symbolic":"method"}],"downloadFile":[{"__symbolic":"method"}],"downloadAll":[{"__symbolic":"method"}],"mapAnnexes":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":11,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"apollo-angular","name":"Apollo","line":13,"character":30},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":14,"character":28},{"__symbolic":"reference","module":"ngx-filesaver","name":"FileSaverService","line":15,"character":40}]}],"generateZippedAnnexes":[{"__symbolic":"method"}],"getVisit":[{"__symbolic":"method"}],"downloadAnnexes":[{"__symbolic":"method"}]}}},"origins":{"InovaCoreVisitModule":"./visit.module","AnnexesViewComponent":"./components/annexes-view/annexes-view.component","ɵa":"./services/visit-api.service"},"importAs":"inova-front-core/visit"}