Add survey template preview in edit survey template

This commit is contained in:
Pablo Bonilla 2021-08-11 20:16:23 -06:00
parent a39ad439a5
commit 25e38f1945
No known key found for this signature in database
GPG Key ID: 46877262B8DE47E2
3 changed files with 4 additions and 3 deletions

View File

@ -91,7 +91,7 @@
<td>{{ plantilla.categoria?.nombre }}</td> <td>{{ plantilla.categoria?.nombre }}</td>
<td class="text-right"> <td class="text-right">
<div class="btn-group"> <div class="btn-group">
<button <!-- <button
type="submit" type="submit"
[routerLink]="['/plantilla', plantilla.id, 'view']" [routerLink]="['/plantilla', plantilla.id, 'view']"
class="ds-btn ds-btn--secondary btn-sm" class="ds-btn ds-btn--secondary btn-sm"
@ -99,7 +99,7 @@
> >
<fa-icon icon="eye"></fa-icon> <fa-icon icon="eye"></fa-icon>
<span class="d-none d-md-inline">Vista previa</span> <span class="d-none d-md-inline">Vista previa</span>
</button> </button> -->
<button <button
type="submit" type="submit"
[routerLink]="['/plantilla', plantilla.id, 'edit']" [routerLink]="['/plantilla', plantilla.id, 'edit']"

View File

@ -4,6 +4,7 @@
<p class="ds-title ds-contenteditable" contenteditable="true" spellcheck="false" (blur)="updateTemplateName($event)"> <p class="ds-title ds-contenteditable" contenteditable="true" spellcheck="false" (blur)="updateTemplateName($event)">
{{ plantilla!.nombre }} {{ plantilla!.nombre }}
</p> </p>
&nbsp;&nbsp;<fa-icon class="ds-info--icon" [icon]="faEye" (click)="openPreview()"></fa-icon>
</div> </div>
<p class="ds-subtitle">Creada el día {{ plantilla!.fechaCreacion | formatShortDatetime | lowercase }}</p> <p class="ds-subtitle">Creada el día {{ plantilla!.fechaCreacion | formatShortDatetime | lowercase }}</p>

View File

@ -186,7 +186,7 @@ export class PlantillaUpdateComponent implements OnInit, AfterViewChecked {
openPreview() { openPreview() {
const surveyId = this.plantilla?.id; const surveyId = this.plantilla?.id;
this.router.navigate(['/plantilla', surveyId, 'preview']); this.router.navigate(['/plantilla', surveyId, 'view']);
} }
resetForm(event: any): void { resetForm(event: any): void {