Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
89bfd2b
composer update
djaiss Mar 4, 2018
2692ec5
wip
djaiss Mar 4, 2018
5aa5143
wip
djaiss Mar 4, 2018
c0a3215
wip
djaiss Mar 5, 2018
f2d6ac8
wip
djaiss Mar 14, 2018
e28d17b
wip
djaiss Mar 15, 2018
1d05bb2
wip
djaiss Mar 16, 2018
ea24eff
wip
djaiss Mar 16, 2018
8feb259
merge master
djaiss Mar 16, 2018
63b2c78
wip
djaiss Mar 17, 2018
a616fea
wip
djaiss Mar 18, 2018
e9658ef
wip
djaiss Mar 18, 2018
4a772a9
wip
djaiss Mar 19, 2018
3480bb3
wip
djaiss Mar 20, 2018
3cb1e73
wip
djaiss Mar 20, 2018
cc9b3fa
wip
djaiss Mar 21, 2018
a167d84
Merge branch 'replace-relationships' of github.com:monicahq/monica in…
djaiss Mar 22, 2018
e6d6a85
wip
djaiss Mar 22, 2018
1f03697
far from being over... depressing
djaiss Mar 22, 2018
7fb1f20
fix stupid mistake I made while freaking tired
djaiss Mar 22, 2018
4ade29d
wip
djaiss Mar 23, 2018
dd7622b
wip
djaiss Mar 23, 2018
99f8f3a
Add better design for displaying a relationship
djaiss Mar 24, 2018
4cf1c10
wip
djaiss Mar 25, 2018
15bc1dd
tests
djaiss Mar 25, 2018
91a6501
final test
djaiss Mar 25, 2018
941f5ee
api
djaiss Mar 26, 2018
1671a86
wip
djaiss Mar 26, 2018
f9d4595
merge master
djaiss Mar 26, 2018
55aae4b
styleci
djaiss Mar 26, 2018
a2edbeb
styleci
djaiss Mar 26, 2018
0b128cc
bump files
djaiss Mar 26, 2018
beb7ecc
tests
djaiss Mar 27, 2018
f855158
merge master
djaiss Mar 27, 2018
a405ea3
fix styleci
djaiss Mar 27, 2018
7f5b09b
wip api
djaiss Mar 28, 2018
eae3fb1
wip api
djaiss Mar 28, 2018
82da42a
wip
djaiss Mar 30, 2018
c558111
wip
djaiss Mar 30, 2018
5f8a665
wip
djaiss Mar 30, 2018
f5e899a
wip
djaiss Mar 30, 2018
2727011
wip
djaiss Mar 30, 2018
bf0dd02
fix tests
djaiss Mar 30, 2018
91ec824
styleci
djaiss Mar 30, 2018
1c63734
merge master
djaiss Mar 31, 2018
1ad5764
fix bug
djaiss Mar 31, 2018
d7ffd47
fix test
djaiss Mar 31, 2018
b9ee161
remove useless test
djaiss Apr 1, 2018
df2e51a
Merge branch 'master' into replace-relationships
djaiss Apr 1, 2018
d0d5441
optimization
djaiss Apr 1, 2018
66b1965
Merge branch 'master' into replace-relationships
djaiss Apr 1, 2018
e7a7087
fix stuff
djaiss Apr 1, 2018
35020f1
Merge branch 'replace-relationships' of github.com:monicahq/monica in…
djaiss Apr 1, 2018
afaae90
fix dashboard
djaiss Apr 2, 2018
4e49981
merge mastr
djaiss Apr 2, 2018
916107c
styleci
djaiss Apr 2, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge master
  • Loading branch information
djaiss committed Mar 26, 2018
commit f9d4595e58c59e55f5bc1660db7564f2b8a58324
4 changes: 4 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
coverage:
precision: 1
round: up
range: 50..80
ignore:
- bootstrap/cache/*
- public/storage/*
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ APP_EMAIL_NEW_USERS_NOTIFICATION=EmailThatWillSendNotificationsForNewUser
# https://github.com/monicahq/monica/blob/master/resources/views/settings/index.blade.php#L70
APP_DEFAULT_TIMEZONE=US/Eastern

# Default locale used in the application.
APP_DEFAULT_LOCALE=en

# Ability to disable signups on your instance.
# Can be true or false. Default to false.
APP_DISABLE_SIGNUP=true
Expand Down
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ install:
- travis_retry composer install --no-interaction --no-suggest --ignore-platform-reqs

# Build js and css assets
- php artisan vue-i18n:generate
- npm install
- npm run production

Expand Down Expand Up @@ -126,6 +127,7 @@ jobs:
# Get packages without require-dev
- travis_retry composer install --no-interaction --no-suggest --ignore-platform-reqs --no-dev
# Build js and css assets
- php artisan vue-i18n:generate
- npm install
- npm run production

Expand All @@ -142,14 +144,14 @@ jobs:
deploy:
provider: bintray
file: .travis.deploy.json
skip_cleanup: true
user: $BINTRAY_USER
key: $BINTRAY_APIKEY
on:
all_branches: true

- stage: Deploy
if: tag IS present
skip_cleanup: true
before_install:
- cp scripts/tests/.env.mysql.travis .env
- docker-compose --version
Expand All @@ -166,7 +168,6 @@ jobs:

- stage: Deploy
if: tag IS present
skip_cleanup: true
before_install:
- scripts/vagrant/install-vagrant.sh

Expand All @@ -182,6 +183,7 @@ jobs:
deploy:
provider: bintray
file: .travis.deploy.json
skip_cleanup: true
user: $BINTRAY_USER
key: $BINTRAY_APIKEY
on:
Expand Down
Binary file modified .travis.yml.sig
Binary file not shown.
23 changes: 19 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
UNRELEASED CHANGES:

* Redirect to registration page if there is no account
* Improve heroku integration
* Add bullet points to lists in call log
* Fix called_at field in the Call object returned by the API
* Add Linkedin URL in the Contact object returned by the API
* Improve localization: add plural forms, localize every needed messages

RELEASED VERSIONS:

v1.8.2 - 2018-03-20
-------------------

* Add a Vagrantfile to run Monica on Vagrant
* Add support for Hebrew and Chinese Simplified
* Add bullet points to call lists when rendered from markdown
* Require debugbar on dev only
* Improve heroku integration
* Open register page after a clean installation
* API: Add ability to sort tasks by completed_at attribute
* API: Add sorting capabilities to most models
* Update Czech, Italian, Portuguese, Russian, German, French language files
* Fix docker image creating wrong storage directories
* Fix notification messages

v1.8.1 - 2018-03-02
-------------------

Expand Down Expand Up @@ -139,7 +154,7 @@ v1.0.0 - 2017-11-09
* Add a button to `Save and add another contact` straight from the Add contact screen
* Add the ability to indicate how you've met someone
* Replace former front-end build system by mix (which is the new default with Laravel 5.5)
* Add a first part of the API
* Add the first part of the API
* Fix the access to upgrade account view
* Add security.txt file
* Upgrade codebase to Laravel 5.5
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ docker_push_bintray: .travis.deploy.json
build: build-dev

build-prod:
composer install --no-interaction --no-suggest --no-dev
composer install --no-interaction --no-suggest --ignore-platform-reqs --no-dev
php artisan vue-i18n:generate
npm install
npm run production

build-dev:
composer install --no-interaction --no-suggest
composer install --no-interaction --no-suggest --ignore-platform-reqs
php artisan vue-i18n:generate
npm install
npm run dev

Expand Down
75 changes: 71 additions & 4 deletions app/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,8 @@ public function isSubscribed()
public function hasInvoices()
{
$query = DB::table('subscriptions')->where('account_id', $this->id)->count();
if ($query > 0) {
return true;
}

return false;
return $query > 0;
}

/**
Expand Down Expand Up @@ -677,4 +674,74 @@ public function getRelationshipTypeGroupByType(string $relationshipTypeGroupName
{
return $this->relationshipTypeGroups->where('name', $relationshipTypeGroupName)->first();
}

/**
* Get the statistics of the number of calls grouped by year.
*
* @return json
*/
public function getYearlyCallStatistics()
{
$callsStatistics = collect([]);
$calls = $this->calls()->latest('called_at')->get();
$years = [];

// Create a table that contains the combo year/number of
foreach ($calls as $call) {
$yearStatistic = $call->called_at->format('Y');
$foundInYear = false;

foreach ($years as $year => $number) {
if ($year == $yearStatistic) {
$years[$year] = $number + 1;
$foundInYear = true;
}
}

if (! $foundInYear) {
$years[$yearStatistic] = 1;
}
}

foreach ($years as $year => $number) {
$callsStatistics->put($year, $number);
}

return $callsStatistics;
}

/**
* Get the statistics of the number of activities grouped by year.
*
* @return json
*/
public function getYearlyActivitiesStatistics()
{
$activitiesStatistics = collect([]);
$activities = $this->activities()->latest('date_it_happened')->get();
$years = [];

// Create a table that contains the combo year/number of
foreach ($activities as $call) {
$yearStatistic = $call->date_it_happened->format('Y');
$foundInYear = false;

foreach ($years as $year => $number) {
if ($year == $yearStatistic) {
$years[$year] = $number + 1;
$foundInYear = true;
}
}

if (! $foundInYear) {
$years[$yearStatistic] = 1;
}
}

foreach ($years as $year => $number) {
$activitiesStatistics->put($year, $number);
}

return $activitiesStatistics;
}
}
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.