Show the first line of the address from the to field.

Now persisting the address to the "to" field of the Notification, after the notification has been validated.
If the letter is pending validation, then "Checking..." will appear as the identifier for the letter.
If the letter has passed validation, then the first line of the address (now persisted in the "to" field) will be displayed, with the client reference underneath.
If the letter has failed validation the "Provided as PDF" will show be displayed, which is now the initial value of the "to" field.
This commit is contained in:
Rebecca Law
2020-01-02 16:35:54 +00:00
parent 47ec4912db
commit f8e7635a1d
9 changed files with 69 additions and 51 deletions

View File

@@ -59,11 +59,12 @@ class NotificationApiClient(NotifyAdminAPIClient):
data = _attach_current_user(data)
return self.post(url='/service/{}/send-notification'.format(service_id), data=data)
def send_precompiled_letter(self, service_id, filename, file_id, postage):
def send_precompiled_letter(self, service_id, filename, file_id, postage, recipient_address):
data = {
'filename': filename,
'file_id': file_id,
'postage': postage,
'recipient_address': recipient_address
}
data = _attach_current_user(data)
return self.post(url='/service/{}/send-pdf-letter'.format(service_id), data=data)