mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05:00
Use PDF link renderer to preview letters
Depends on and implements: - [x] https://github.com/alphagov/notifications-utils/pull/84 - [ ] https://github.com/alphagov/notifications-utils/pull/86
This commit is contained in:
@@ -20,6 +20,7 @@ from flask_login import login_required, current_user
|
||||
from notifications_utils.columns import Columns
|
||||
from notifications_utils.template import Template
|
||||
from notifications_utils.recipients import RecipientCSV, first_column_headings, validate_and_format_phone_number
|
||||
from notifications_utils.renderers import EmailPreview, SMSPreview, LetterPDFLink
|
||||
|
||||
from app.main import main
|
||||
from app.main.forms import CsvUploadForm, ChooseTimeForm, get_next_days_until, get_furthest_possible_scheduled_time
|
||||
|
||||
@@ -8,7 +8,7 @@ import unicodedata
|
||||
from flask import (abort, current_app, session, request, redirect, url_for)
|
||||
from flask_login import current_user
|
||||
|
||||
from notifications_utils.renderers import SMSPreview, EmailPreview, LetterPreview
|
||||
from notifications_utils.renderers import SMSPreview, EmailPreview, LetterPDFLink
|
||||
|
||||
import pyexcel
|
||||
import pyexcel.ext.io
|
||||
@@ -233,5 +233,5 @@ def get_renderer(template_type, service, show_recipient, expand_emails=False):
|
||||
sender=service['sms_sender'],
|
||||
show_recipient=show_recipient
|
||||
),
|
||||
'letter': LetterPreview(),
|
||||
'letter': LetterPDFLink(service['id']),
|
||||
}[template_type]
|
||||
|
||||
@@ -22,4 +22,4 @@ wand==0.4.4
|
||||
|
||||
git+https://github.com/alphagov/notifications-python-client.git@3.0.1#egg=notifications-python-client==3.0.1
|
||||
|
||||
git+https://github.com/alphagov/notifications-utils.git@11.0.2#egg=notifications-utils==11.0.2
|
||||
git+https://github.com/alphagov/notifications-utils.git@11.1.0#egg=notifications-utils==11.1.0
|
||||
|
||||
Reference in New Issue
Block a user