Vidados sends out lots of HTML newsletters. These feature different trips and hosts (the people that supply the holidays).
This web app generates newsletters.
There are 2 elements to this task. You should complete at least one - bonus points for both:
Task 1: Allow the order and quantity of trips and hosts to be specified. For example we might decide we want newsletters to have 3 trips followed by 2 hosts followed by 3 trips (TTTHHTTT).
It should be possible to a) enter this setting through the web interface b) have this setting persisted so that all generated emails use this setting until it is changed
Task 2: Make the allocation of trips and hosts fair.
In order to be fair to all hosts, we want it so that when a newsletter is generated, preference is given to those trips and hosts that have thus far featured on fewer newsletters.
- clone the repository
- open in Visual Studio 2015 (the community edition is free)
- build and run the app by pressing F5
- click on the Newsletters link to see the generated newsletters. Initially there will not be any.
- you can view a newsletter sample with randomly created trips and hosts
- back on the home page click on "Create entities" to create some test trips and hosts
- now you can generate newsletters
- there is also a delete button to delete all the newsletters you've created
There's no right way to achieve this. Please feel free to ask any questions. Unit tests would be great so that we can easily assess how well the code works, but mainly you should be able to justify whatever decisions you make - with respect to any stated assumptions.
Ideally a pull request but if you're not familiar with this then please zip up and send the repo back.
You can take as long as you want. It should be possible to get something useful done in around an hour. Please say if you feel this is not realistic.