Commit Graph

22 Commits

Author SHA1 Message Date
Adam Shimali
b73a5d8710 Pass selected template id to api when creating job.
Moved query params for original file name and template id
to session.
2016-02-01 11:28:36 +00:00
Adam Shimali
4ea50499c3 List and individual job pages now fetch data from api.
Few bug fixes around job uuid.
2016-01-29 15:35:35 +00:00
Adam Shimali
5196436645 Better bucket name pending possible change to uuid for service primary
key.

Also small bugfix around file name and original file name
2016-01-29 12:19:50 +00:00
Adam Shimali
0995cd2e3c Uploading csv creates job via api 2016-01-29 10:30:02 +00:00
Chris Hill-Scott
3a864ad132 Use real templates when sending text messages
Sets the value of `template` to the ID of the chosen template when submitting
the form.
2016-01-26 17:17:46 +00:00
Nicholas Staples
a9fead0d82 Merge with master. 2016-01-19 09:49:01 +00:00
Nicholas Staples
4e2019c949 Work in progress, all tests passing and implemented mocks for services_dao. 2016-01-15 17:46:09 +00:00
Adam Shimali
494e49ee45 Changed flow to upload directly to s3 if non empty file.
Then on check page file read back from s3 and checked.
2016-01-14 16:07:06 +00:00
Chris Hill-Scott
75c92c12c1 Add a prototype email template
If the templates page contains text messages and emails then there’s two ways it
could be structured:
- into two sections, all text messages first, then all emails
- emails and text messages interleaved, sorted by date

I think the second one is better. Imagine a situation where you mostly do emails
but have a few text messages. You’d have to scroll past the text messages to get
to your emails. Every time.

I reckon that the most commonly accessed templates will be the most recent ones.
2016-01-14 10:59:51 +00:00
Chris Hill-Scott
c7f635be4a Add some SMS messages to the choose template page 2016-01-14 10:55:30 +00:00
Adam Shimali
a0e5ae59ea Added abort 400 in case of recipients param being missing. 2016-01-14 10:26:18 +00:00
Adam Shimali
2f802e3183 Tests pass locally and fail on travis. This is attempt to improve situation 2016-01-13 22:54:11 +00:00
Adam Shimali
c729f0a29f fix up tests 2016-01-13 22:34:36 +00:00
Adam Shimali
4dcb180da1 Changed page flow to first save file and then redirect to check.
On check numbers in file are validated.

Posting to check then uploads file to s3
2016-01-13 17:32:40 +00:00
Chris Hill-Scott
de1c0e36c8 Add /services prefix to all service-related URLs
The URLs will be easier to parse if the parts are clearly labelled.

This is a precursor to making a blueprint for all service-related URLs.
2016-01-13 13:25:06 +00:00
Chris Hill-Scott
b4a8c2732d Add stubbed job_id
So that we can get a better sense of what the URLs look like.

Leaving unsigned for now because we don’t know if the ID will be a string or int
or…
2016-01-13 13:25:06 +00:00
Chris Hill-Scott
04b9c120d4 Add mocked service ID to all service-specific pages 2016-01-13 12:44:12 +00:00
Adam Shimali
584533eb11 First slice of csv upload of phone numbers for sending messages.
At the moment the file contents are not persisted by checked in
memory.

The first and last three records are show if all are valid.

If there are invalid rows, they are reported and the user is
prompted to go back and sort out upload file.

The storing of upload result (i.e. validation of file) in session
will be removed in next story which is about persisting of file
for later processing.
2016-01-11 15:00:51 +00:00
Nicholas Staples
4fcc4efea2 Small comments. 2016-01-05 17:11:44 +00:00
Chris Hill-Scott
d2562889b8 Replace CSV preview with rendered messages
If there are less than 7 messages, show them all.

If there are more than 7, show the first and last three, and a link to the
remaining x.
2015-12-11 14:02:42 +00:00
Chris Hill-Scott
4c14e273c2 Try out previewing messages 2015-12-11 12:02:21 +00:00
Chris Hill-Scott
8a34fa7e0a Use Flask for routing
This commit:
- replaces links that look like buttons with forms and submit buttons
- splits the view code for SMS into its own file
- moves the routing into the Python by adding handling for `post` requests
- uses Flask’s `url_for` to generate URLs, rather than hard coding them (so that
  it’s easier to change the URLs)
- chages the URLs for sending text messages
2015-12-11 09:49:38 +00:00