Skip to content

Commit 44d77d3

Browse files
committed
improvements
1 parent bfff770 commit 44d77d3

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# EasyPractice Technical Challenge
22

3-
Welcome to the EasyPractice tech challenge! Below you'll find a list of tasks to complete on this project. Make sure you're familiar with Git before starting. This challenge should take no more than 2 hours.
3+
Welcome to the EasyPractice tech challenge! Below you'll find a list of tasks to complete on this project. Make sure you're familiar with Git, Laravel and Vue.js before starting. This challenge should take no more than 3 hours.
44

55
## Working on the challenge
66

@@ -9,8 +9,9 @@ Welcome to the EasyPractice tech challenge! Below you'll find a list of tasks to
99
3. Update the `.env` file to include the correct database connection details
1010
4. Run `composer install`, `php artisan key:generate`, `php artisan migrate`, `npm install` and `npm run dev` (ignore the build warnings)
1111
5. Open up the project in the browser and click on "Register" to create a new user. All the work will be done while logged in.
12-
5. Work through the tasks. Commit as often as you like.
13-
6. Once you have completed the tasks, create a new [Pull Request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) and send us the link to it.
12+
6. Code indentation should be set up at 4 spaces in both PHP and JS files.
13+
7. Work through the tasks. Commit as often as you like.
14+
8. Once you have completed the tasks, create a new [Pull Request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) and send us the link to it.
1415

1516
## The tasks
1617

@@ -26,15 +27,15 @@ Complete as many as you can. If you got some time left, there's some BONUS tasks
2627
- [ ] (BUG) When trying to delete a client, the front-end does not update. Can you improve the experience, so the user knows the client was actually deleted? (tip: use `php artisan db:seed --class=ClientSeeder` to generate some clients if you have none)
2728
- [ ] (FEATURE) We noticed users started entering random data when creating clients. We should include some validation. Make sure that, when creating a client:
2829
- The `name` is up to 190 characters and it's required
29-
- The `email` is an actual valid email address
30+
- The `email` is an actual valid email address. Hint: "arunas@example" is NOT a valid email address in our case.
3031
- The `phone` can only contain digits, spaces and a plus sign
3132
- At least one of (phone/email) is required
3233
- [ ] (FEATURE) The client bookings are currently displayed in random order. Please display them in chronological order, newest first.
3334
- [ ] (FEATURE) Users want a quick way to see future and past bookings. When viewing client bookings, can you make a dropdown with three values - "All bookings", "Future bookings only" and "Past bookings only". Make it so that selecting an item from the dropdown would only show bookings that apply to the selected filter. When the page loads, default to "All bookings".
3435

3536
**BONUS TASKS!**
3637
- [ ] *BONUS:* (FEATURE) Users have requested the ability to write journals for their clients. A Journal should have a date field (without hours/minutes) and a text field (unlimited length). A client can have many journals. A user should be able to view, create and delete journals.
37-
- [ ] *BONUS:* (REFACTOR) We strive for fast and readable code that follows Laravel's/Vue.js style. Do you have any suggestions to the code quality/performance? Review the existing code and feel free to improve it any way you see fit.
38+
- [ ] *BONUS:* (REFACTOR) We strive for fast and readable code that follows Laravel's/Vue.js style and best practices. Take the time remaining and refactor any code you think can be improved, including ours. The goal is to leave the code better than you found it ;)
3839

3940
## Thank You!
4041

database/seeds/BookingSeeder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function run()
1616
$clients = Client::all();
1717

1818
foreach ($clients as $client) {
19-
$numberOfBookings = rand(0, 20);
19+
$numberOfBookings = rand(0, 30);
2020

2121
factory(Booking::class, $numberOfBookings)->create([
2222
'client_id' => $client->id,

database/seeds/ClientSeeder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function run()
1515
{
1616
// $user = User::first() ?? factory(User::class)->create();
1717

18-
factory(Client::class, 100)->create([
18+
factory(Client::class, 150)->create([
1919
// 'user_id' => $user->id,
2020
]);
2121
}

0 commit comments

Comments
 (0)