Commit Graph

41 Commits

Author SHA1 Message Date
00c382e1cc
Avoiding issues and refactoring code
I made the code more passive, avoiding issued at taking, returning,
storing alerts or removing alerts from an item.

Now they all check if it is with you before returning/deleting
alert etc. I am not sure if all cases are covered, but they are
better than before. I had one only issued on this on that time,
but I prefer to prioritize safety/security.

I took the opportunitie to move some code from Controllers to
the model itself, as they were changing with the DB.
2018-10-21 13:09:06 -03:00
2bc2792a24
Bug Fixed: avoiding item waiting_user across take/return
It happend once: a user asked to be added to the waiting
list at the same time other user was returning the item.

So the user ended up waiting for the user he was already
using.
2018-10-21 11:57:23 -03:00
3d6b0dbeca
Fixed bug causing error 500 on production
Some PHP version or configuration were causing this error.

On app.blade.php of local branch, I could use "$usedItems ? :"
even if $usedItems were null, but I had to check an "isset" to the production.

On HomecController, I had to change the "object" parameter of getUsername
to "\Illuminate\Database\Eloquent\Collection" to make it work.

I took the chance to just show the number of itens in use
if it were greater than 0.
2018-10-16 20:28:59 -03:00
52223676dc
Trying to fix an 500 error on production 2018-10-16 20:18:10 -03:00
7a8d5ccaff
Refreshing and Including number of used items on Title
It was necessary to keep refreshing the page to
check if an item was returned when we did not
want to be alerted. So, now, the page refresh
itself every 2 minutes (while I do not know how
to use Laravel broadcasting) and the title shows
the number of items in use (including when used
by you).
2018-10-16 15:15:05 -03:00
8c4fe0a489
Refactoring
Including some use for classes;
REfactoring the HomeController, to make it cleaner
and avoid repeating code.
2018-10-10 00:46:28 -03:00
69f0722c79
Let me know if anyone subscribed during alpha
As the project is still alpha, I just want to know if someone
subscribed at it using a dummy e-mail address.
2018-10-03 19:42:35 -03:00
954820f46b
Added: language to User profile (DB)
The language were set only on session. But now it is
stored with user profile, on DB.

It is important as now I can send alert e-mails to each
user on their own languages and not the activer
user language.

Also, wherever the user logs out and logs in again,
it will see the same site locale.
2018-10-02 23:53:35 -03:00
528d3b4caf
Refactoring: TakeController returned item Mail moved to a listener
The TakeController was manually sending the email message
as well as dealing with item return, so I moved the email message
to it's own listener, I created an event for it and moved the
return part to the item model.
2018-09-30 21:37:44 -03:00
f6ab437889
Added PTB Translation of emails and some pages
Now the main page, item page and e-mails are translated
into Brazilian Portuguese
2018-09-27 20:13:14 -03:00
0cd807169e
Groups HOME itesm by Product 2018-09-21 00:45:06 -03:00
b99f6a5b68
Including FlashMessage Model 2018-09-20 00:18:30 -03:00
1f23753f70
Invalid product now redirect to Products.index page 2018-09-19 21:12:48 -03:00
1fd78fe94a
Including messages on registering and invalid product 2018-09-19 21:07:40 -03:00
116981b08b
Fixed: error message when opening other user product
The user can only open their own products.
If the user tried to open a product that belongs to
other person, the site were returning an error message.

Now it just go back to the last page.
2018-09-19 15:11:30 -03:00
092281a228
Including authenticaed user on models: Items, Product and User 2018-09-19 15:00:49 -03:00
3b03b400c8
Fixed: 2 people were able to Take the same item at the same time
Now there is a verification before take an item.
2018-09-17 11:45:05 -03:00
a2d0bf6c15
Added Delete PRODUCT with Items and dettaching from users 2018-09-17 00:51:41 -03:00
0edbfa0fdb
Including Edit Product 2018-09-16 20:43:21 -03:00
be39b48dc3
Adding URL to PRODUCT 2018-09-16 20:32:32 -03:00
af0c05f42c
Including a findOrFail to Edit ITEM 2018-09-16 20:31:27 -03:00
78330f4d57
Adding edit function to ITEM
Now an item can be renamed.
2018-09-16 16:43:03 -03:00
29f130b710
Included: alert the active user someone is waiting for the item 2018-09-15 02:33:21 -03:00
c2907c3a0f
Including Alert me! 2018-09-15 02:09:07 -03:00
6fd0164197
Joining Take and Return controllers on just Take (store and delete) 2018-09-15 00:22:57 -03:00
c6f27882da
Refactoring HomeController
Avoiding requests to DB
2018-09-15 00:05:24 -03:00
aa46622a14
Adding a Welcome Mail 2018-09-14 17:00:28 -03:00
882609fed0
Including occupied username and renaming DB field
Now it shows the username of who is using an item.
Item db field 'usedBy' was renamed to 'used_by' to keep consistence.
2018-09-14 12:52:07 -03:00
bb4cc93723
Included: remove user from Item 2018-09-13 23:50:36 -03:00
e3669914fd
Including the option to add users to items 2018-09-13 21:16:16 -03:00
842976c77f
Adding Take and Return controllers 2018-09-12 21:27:35 -03:00
1408e558d7
Including Item Delete 2018-09-12 21:27:04 -03:00
c1b4ac419d
Refactoring homeController code 2018-09-12 21:25:48 -03:00
9f67cbcbeb
Adding product name with the item name on the Home page 2018-09-12 18:24:56 -03:00
a905d98304
Creating relationships between users/items/products 2018-09-12 02:31:03 -03:00
0f15e60c95
Imrpoving Item, Product and Users 2018-09-11 20:48:09 -03:00
2845e7501d
Including item and product form validation 2018-09-10 21:29:32 -03:00
25cff75c48
Including Items and Products views and controllers 2018-09-10 01:23:51 -03:00
112d3dc44e
Adding User login and registration 2018-09-09 01:03:41 -03:00
e8c6717fe1
Including Item and Product migration, controllers and models 2018-09-09 00:26:57 -03:00
5c8b8d93f5
Init 2018-09-07 20:12:34 -03:00