From 3c9638db58ba579753f5c7fad0aa27c54d59cd58 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Tue, 31 Oct 2023 13:59:47 +0100 Subject: [PATCH 01/11] fix: fix default timezone can't be empty (#6992) --- app/Helpers/CountriesHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Helpers/CountriesHelper.php b/app/Helpers/CountriesHelper.php index 5e4e31c7acb..a88de923dc5 100644 --- a/app/Helpers/CountriesHelper.php +++ b/app/Helpers/CountriesHelper.php @@ -198,6 +198,6 @@ public static function getDefaultTimezone($country): string break; } - return $timezone; + return $timezone ?? config('app.timezone'); } } From ff296c8ed9fa6fad89b32d6ccf0d04647f890bbe Mon Sep 17 00:00:00 2001 From: Monica bot <40141970+MonicaBot@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:56:41 +0100 Subject: [PATCH 02/11] chore(i8n): update translations (#6879) --- resources/lang/he/app.php | 14 +++++++------- resources/lang/he/settings.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/lang/he/app.php b/resources/lang/he/app.php index 4929107b682..5605183f74b 100644 --- a/resources/lang/he/app.php +++ b/resources/lang/he/app.php @@ -180,10 +180,10 @@ 'relationship_type_lovedby_female_with_name' => 'מאהבת סודית של :name', 'relationship_type_lovedby_male_with_name' => 'מאהב סודי של :name', - 'relationship_type_ex' => 'ex-partner', + 'relationship_type_ex' => 'שותף לשעבר לחיים', 'relationship_type_ex_female' => 'חברה לשעבר', 'relationship_type_ex_male' => 'חבר לשעבר', - 'relationship_type_ex_with_name' => ':name’s ex-partner', + 'relationship_type_ex_with_name' => 'שותף לחיים לשעבר של :name', 'relationship_type_ex_female_with_name' => 'חברה לשעבר של :name', 'relationship_type_ex_male_with_name' => 'חבר לשעבר של :name', @@ -222,17 +222,17 @@ 'relationship_type_sibling_female_with_name' => 'אחות של :name', 'relationship_type_sibling_male_with_name' => 'אח של :name', - 'relationship_type_grandparent' => 'grandparent', + 'relationship_type_grandparent' => 'סב', 'relationship_type_grandparent_female' => 'סבתא', 'relationship_type_grandparent_male' => 'סבא', - 'relationship_type_grandparent_with_name' => ':name’s grandparent', + 'relationship_type_grandparent_with_name' => 'הסבא או הסבתא של :name', 'relationship_type_grandparent_female_with_name' => 'סבתא של :name', 'relationship_type_grandparent_male_with_name' => 'סבא של :name', 'relationship_type_grandchild' => 'נכד/ה', 'relationship_type_grandchild_female' => 'נכדה', 'relationship_type_grandchild_male' => 'נכד', - 'relationship_type_grandchild_with_name' => ':name’s grandchild', + 'relationship_type_grandchild_with_name' => 'הנכד או הנכדה של :name', 'relationship_type_grandchild_female_with_name' => 'נכדה של :name', 'relationship_type_grandchild_male_with_name' => 'נכד של :name', @@ -257,10 +257,10 @@ 'relationship_type_cousin_female_with_name' => 'בת דודה של :name', 'relationship_type_cousin_male_with_name' => 'בן דוד של :name', - 'relationship_type_godfather' => 'godparent', + 'relationship_type_godfather' => 'אפוטרופוס', 'relationship_type_godfather_female' => 'סנדקית', 'relationship_type_godfather_male' => 'סנדק', - 'relationship_type_godfather_with_name' => ':name’s godparent', + 'relationship_type_godfather_with_name' => 'האפוטרופוס/ית של :name', 'relationship_type_godfather_female_with_name' => 'הסנדקית של :name', 'relationship_type_godfather_male_with_name' => 'הסנדק של :name', diff --git a/resources/lang/he/settings.php b/resources/lang/he/settings.php index 60cabc650a0..6beab18117b 100644 --- a/resources/lang/he/settings.php +++ b/resources/lang/he/settings.php @@ -42,7 +42,7 @@ 'export_title_json' => 'ייצוא ל־Json', 'export_submitted' => 'הייצוא שלך הוגש, הוא יהיה זמין בעוד מספר רגעים…', 'export_json_explanation' => 'הנתונים שלך מיוצאים בתצורת Json למטרות גיבוי.', - 'export_json_beta' => 'Json export is in preview mode. Tell us what you think about it:', + 'export_json_beta' => 'ייצוא Json הוא במצב תצוגה מקדימה. נא לספר לנו מה דעתך עליו:', 'export_json_cta' => 'ייצוא ל־Json', 'export_header_type' => 'סוג', 'export_header_timestamp' => 'מועד יצירה', From 7f72437dfc72cbf7fd495127515b7862059cebb9 Mon Sep 17 00:00:00 2001 From: bbrendon Date: Tue, 31 Oct 2023 11:58:58 -0700 Subject: [PATCH 03/11] feat: allow disabling smtp server cert verification (#6608) Co-authored-by: Alexis Saettler --- config/mail.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/mail.php b/config/mail.php index b7e2accf1fd..7547756b577 100644 --- a/config/mail.php +++ b/config/mail.php @@ -41,6 +41,7 @@ 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), + 'verify_peer' => env('MAIL_VERIFY_PEER', true), ], 'ses' => [ From 3ecf57be1d5e6cba54209712906d7ba137706083 Mon Sep 17 00:00:00 2001 From: Anas Ouda <80410191+ANAS29-CODER@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:26:52 +0200 Subject: [PATCH 04/11] feat: add the number of contacts not tagged (#6761) Co-authored-by: Alexis Saettler --- app/Http/Controllers/ContactsController.php | 5 ++++- resources/sass/people.scss | 6 +++++- resources/views/people/index.blade.php | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ContactsController.php b/app/Http/Controllers/ContactsController.php index f5e830fa994..ee51d890d9f 100644 --- a/app/Http/Controllers/ContactsController.php +++ b/app/Http/Controllers/ContactsController.php @@ -85,6 +85,8 @@ private function contacts(Request $request, bool $active) } $tagsCount = Tag::contactsCount(); + $contactsWithoutTagsCount = $contacts->doesntHave('tags')->count(); + $tags = null; $url = null; $count = 1; @@ -134,7 +136,8 @@ private function contacts(Request $request, bool $active) ->withTagsCount($tagsCount) ->withUrl($url) ->withTagCount($count) - ->withTagLess($request->input('no_tag') ?? false); + ->withTagLess($request->input('no_tag') ?? false) + ->with('contactsWithoutTagsCount', $contactsWithoutTagsCount); } /** diff --git a/resources/sass/people.scss b/resources/sass/people.scss index 1321115c45a..3e3bc6f03da 100644 --- a/resources/sass/people.scss +++ b/resources/sass/people.scss @@ -41,7 +41,8 @@ position: absolute; } - .number-contacts-per-tag { + .number-contacts-per-tag, + .number-contacts-without-tag { @if $htmldir == ltr { float: right; } @else { @@ -49,6 +50,9 @@ } } } + .number-contacts-without-tag{ + font-size: 1rem; + } } .list { diff --git a/resources/views/people/index.blade.php b/resources/views/people/index.blade.php index d388a329a09..5eadb192eb2 100644 --- a/resources/views/people/index.blade.php +++ b/resources/views/people/index.blade.php @@ -144,6 +144,7 @@ @if ($tagsCount->count() != 0)
  • {{ trans('people.people_list_untagged') }} + {{ trans_choice('people.people_list_contacts_per_tags', $contactsWithoutTagsCount) }}
  • @endif From 0f636e49e94212a83d5369e91544a1bd756e8464 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Wed, 1 Nov 2023 13:19:40 +0100 Subject: [PATCH 05/11] fix: fix contact tags count (#6994) --- .github/workflows/tests.yml | 2 +- app/Http/Controllers/ContactsController.php | 4 ++-- composer.json | 2 +- composer.lock | 21 ++++++++++++--------- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 48cc1e2e73f..5f8e3ee2c3f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -250,7 +250,7 @@ jobs: # Test - name: Upgrade Chrome Driver - run: php artisan dusk:chrome-driver $(google-chrome -version | awk '{ print $3 }' | cut -d . -f 1) + run: php artisan dusk:chrome-driver --detect - name: Start Chrome Driver run: | chmod -R 0755 vendor/laravel/dusk/bin/ diff --git a/app/Http/Controllers/ContactsController.php b/app/Http/Controllers/ContactsController.php index ee51d890d9f..4011c014b9c 100644 --- a/app/Http/Controllers/ContactsController.php +++ b/app/Http/Controllers/ContactsController.php @@ -85,8 +85,8 @@ private function contacts(Request $request, bool $active) } $tagsCount = Tag::contactsCount(); - $contactsWithoutTagsCount = $contacts->doesntHave('tags')->count(); - + $contactsWithoutTagsCount = (clone $contacts)->doesntHave('tags')->count(); + $tags = null; $url = null; $count = 1; diff --git a/composer.json b/composer.json index 255babfb749..d75cb05b848 100644 --- a/composer.json +++ b/composer.json @@ -66,7 +66,7 @@ "barryvdh/laravel-debugbar": "^3", "fakerphp/faker": "^1.10", "khanamiryan/qrcode-detector-decoder": "^2.0", - "laravel/dusk": "^7.0", + "laravel/dusk": "^7.11", "laravel/legacy-factories": "^1.0", "laravel/tinker": "^2.6", "matthiasnoback/live-code-coverage": "^1", diff --git a/composer.lock b/composer.lock index 1c92f14a84f..80ce1325b91 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "97cdf44688f77f53c96285c17f322f1b", + "content-hash": "8c2a9ddbec63b22cf6bb27edd741f02d", "packages": [ { "name": "asbiin/laravel-adorable", @@ -13729,21 +13729,22 @@ }, { "name": "laravel/dusk", - "version": "v7.4.0", + "version": "v7.11.3", "source": { "type": "git", "url": "https://github.com/laravel/dusk.git", - "reference": "c15e0e2d2d7fe3281c015e6172df9288c6597cbb" + "reference": "ef474f54ab24989f480c77ba92dc39d07d499dee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/dusk/zipball/c15e0e2d2d7fe3281c015e6172df9288c6597cbb", - "reference": "c15e0e2d2d7fe3281c015e6172df9288c6597cbb", + "url": "https://api.github.com/repos/laravel/dusk/zipball/ef474f54ab24989f480c77ba92dc39d07d499dee", + "reference": "ef474f54ab24989f480c77ba92dc39d07d499dee", "shasum": "" }, "require": { "ext-json": "*", "ext-zip": "*", + "guzzlehttp/guzzle": "^7.2", "illuminate/console": "^9.0|^10.0", "illuminate/support": "^9.0|^10.0", "nesbot/carbon": "^2.0", @@ -13756,8 +13757,10 @@ }, "require-dev": { "mockery/mockery": "^1.4.2", - "orchestra/testbench": "^7.0|^8.0", - "phpunit/phpunit": "^9.0" + "orchestra/testbench": "^7.33|^8.13", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.5.10|^10.0.1", + "psy/psysh": "^0.11.12" }, "suggest": { "ext-pcntl": "Used to gracefully terminate Dusk when tests are running." @@ -13796,9 +13799,9 @@ ], "support": { "issues": "https://github.com/laravel/dusk/issues", - "source": "https://github.com/laravel/dusk/tree/v7.4.0" + "source": "https://github.com/laravel/dusk/tree/v7.11.3" }, - "time": "2023-01-06T16:04:32+00:00" + "time": "2023-10-17T13:53:17+00:00" }, { "name": "laravel/legacy-factories", From 4612bb1de367fa8bfc43936e80a0f92bb7df55bc Mon Sep 17 00:00:00 2001 From: Simon Van Accoleyen Date: Wed, 1 Nov 2023 13:26:35 +0100 Subject: [PATCH 06/11] fix: render markdown in notes on the dashboard (#6576) Co-authored-by: Alexis Saettler --- resources/js/components/dashboard/DashboardLog.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/js/components/dashboard/DashboardLog.vue b/resources/js/components/dashboard/DashboardLog.vue index b11df919525..6ce17db1496 100644 --- a/resources/js/components/dashboard/DashboardLog.vue +++ b/resources/js/components/dashboard/DashboardLog.vue @@ -99,9 +99,7 @@ {{ note.name }} -

    - {{ note.body }} -

    +

    @@ -449,7 +447,11 @@ export default { .then(response => { this.tasks.splice(this.tasks.indexOf(task), 1); }); - } + }, + + compiledMarkdown (text) { + return text !== undefined && text !== null ? marked(text, { sanitize: true }) : ''; + }, } }; From a24704d6ab7a90309104ad264c5b2c0343eab030 Mon Sep 17 00:00:00 2001 From: "Ismail A. Amassi" <32588971+IsmailAAmassi@users.noreply.github.com> Date: Wed, 1 Nov 2023 14:29:34 +0200 Subject: [PATCH 07/11] fix: selected sort not updated first time selected (#6709) Co-authored-by: Alexis Saettler --- app/Http/Controllers/ContactsController.php | 1 + app/Models/Contact/Contact.php | 8 ++++---- resources/views/people/index.blade.php | 12 ++++++------ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/ContactsController.php b/app/Http/Controllers/ContactsController.php index 4011c014b9c..d2bc8215a7d 100644 --- a/app/Http/Controllers/ContactsController.php +++ b/app/Http/Controllers/ContactsController.php @@ -133,6 +133,7 @@ private function contacts(Request $request, bool $active) ->withHasArchived($nbArchived > 0) ->withArchivedContacts($nbArchived) ->withTags($tags) + ->withSort($sort) ->withTagsCount($tagsCount) ->withUrl($url) ->withTagCount($count) diff --git a/app/Models/Contact/Contact.php b/app/Models/Contact/Contact.php index 48c6f9687d3..a1e1de7d11e 100644 --- a/app/Models/Contact/Contact.php +++ b/app/Models/Contact/Contact.php @@ -496,13 +496,13 @@ public function scopeSortedBy(Builder $builder, string $criteria): Builder { switch ($criteria) { case 'firstnameAZ': - return $builder->orderBy('first_name', 'asc'); + return $builder->orderBy('first_name'); case 'firstnameZA': - return $builder->orderBy('first_name', 'desc'); + return $builder->orderByDesc('first_name'); case 'lastnameAZ': - return $builder->orderBy('last_name', 'asc'); + return $builder->orderBy('last_name'); case 'lastnameZA': - return $builder->orderBy('last_name', 'desc'); + return $builder->orderByDesc('last_name'); case 'lastactivitydateNewtoOld': return $this->sortedByLastActivity($builder, 'desc'); case 'lastactivitydateOldtoNew': diff --git a/resources/views/people/index.blade.php b/resources/views/people/index.blade.php index 5eadb192eb2..5eb0e0d5073 100644 --- a/resources/views/people/index.blade.php +++ b/resources/views/people/index.blade.php @@ -76,27 +76,27 @@