Commit Graph

11 Commits

Author SHA1 Message Date
Régis Freyd a2172f0851 Add style CI (#503)
Hopefully this will result in slightly better code.
2017-07-26 21:02:55 -04:00
Daniel Lovatt 1c62d6be35 Fix name not appearing in latest actions (#404) 2017-06-27 23:22:54 -04:00
Régis Freyd 5b5b2da5f8 Add multi user support and subscriptions (#359)
This pull request adds support to multi users in one account. It also introduces the notion of subscriptions.

Accounts can now have multiple users.

Subscriptions are defined by a new env variable called REQUIRES_SUBSCRIPTION, and defaults to false. As promised, all the paid features on .com will be free if you download and host Monica on your own server.
2017-06-20 20:51:40 -04:00
Yamamoto Kadir 496d23e4a7 Separate PeopleController into smaller chunks (#253)
* Edit relation docblocks of Contact model
* Move activities to its own controller
* Move reminders to its own controller
* Move tasks to its own controller
* Refactor Gift in preparation for the move
* Move gifts into its own controller
* Fix failing tests
* Move debt to its own controllelr
* Fix tests failing on PHP7
* Move significant others to its own controller
* Move kids to its own controller
* Move notes to its own controller
* Some more adjustments & solving #277
And more query optimizations
2017-06-15 15:03:22 -04:00
Régis Freyd 690b0e50ba Add Export to SQL (#248) 2017-06-12 22:48:20 -04:00
Yamamoto Kadir 50005544ee Fix some relationship inconsistencies and reduce dashboard queries (#209)
This normalizes all relationships and adds relations to models to take advantage of laravel's eagerloading and reduce queries to the database.

This might go against the 'add any kind of complexities whatsoever' rule in the contribution guide, but I think adding relations would eventually simplify the code base. The amount of queries just on the dashboard fell from ~70 to 26. There's also a lot of boilerplate code in the Contact model to retrieve relationships and to maintain accurate count of them (fields like number_of_*). They can be greatly simplified with the addition of relations.

One other thing in the Contact model was the definition of the Contact-User relation. This definition uses the account_id field in the contacts table and and relates it to id in users. I'm not sure if this is the intention, since the id from accounts table is used when assigning account_id for a contact. This seems to have worked so far, because both a user and its associated account are created at the same time during registration and their ids match, but if there was any difference, this relationship would relate wrong contacts and users. I changed the relationship name to account. This makes the path to a user from a contact is $contact->account->user right now.
2017-06-11 23:01:23 -04:00
Vinay Kumar 7dc53c6dee Fixed gifts count issue (#186) 2017-06-10 09:20:41 -04:00
Régis 78db86f585 Better dashboard 2017-06-05 22:12:39 -04:00
Régis ed29243841 Reminders are working again 2017-05-29 21:27:00 -04:00
Régis 265f0ffbe3 Remove marketing material from the application 2017-02-20 22:53:30 -05:00
Regis Freyd 2e6760e7db Migrate to organization 2017-02-16 19:21:44 -05:00