diff --git a/.gitignore b/.gitignore index 8d350e1..a9638db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/packages /.phpunit.cache /node_modules /public/build diff --git a/app/Models/User.php b/app/Models/User.php index eaf85d7..be58b82 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -32,6 +32,7 @@ class User extends Authenticatable implements MustVerifyEmail ]; protected $hidden = [ + 'admin', 'password', 'remember_token', 'two_factor_recovery_codes', diff --git a/database/migrations/2024_11_05_000001_add_user_admin_column.php b/database/migrations/2024_11_05_000001_add_user_admin_column.php new file mode 100644 index 0000000..101a8d3 --- /dev/null +++ b/database/migrations/2024_11_05_000001_add_user_admin_column.php @@ -0,0 +1,28 @@ +boolean('admin')->nullable()->after('profile_photo_path'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('admin'); + }); + } +}; diff --git a/resources/views/livewire/ai-chat-window.blade.php b/resources/views/livewire/ai-chat-window.blade.php index a5f59bc..d6fe035 100644 --- a/resources/views/livewire/ai-chat-window.blade.php +++ b/resources/views/livewire/ai-chat-window.blade.php @@ -121,7 +121,7 @@ new class extends Component { "properties" => [ "text" => [ "type" => "string", - "description" => "The prompt question (no more than 5 words)" + "description" => "The suggested prompt question (no more than 5 words)" ], "value" => [ "type" => "string", @@ -140,20 +140,21 @@ new class extends Component { ], 'messages' => [ ['role' => 'system', 'content' => " - Your role is to assist investors in asking thoughtful questions to their investment advisors. + Your role is to assist investors in asking thoughtful questions of their investment advisors. - When you help investors ask good questions, you should ensure the questions are based on the - provided context. Be sure to keep the questions short! + When you help investors ask good questions, you should ensure the you questions you recommend + are based on the provided context. Be sure to keep the questions short! The questions you recommend might be based on natural follow up from the given context, requests - to clarify undefined terms, common decision frameworks, possible risks or benefits, or commonly - understood investing concepts. + to further refine a previous response, clarify undefined terms, common decision frameworks, + possible risks or benefits, or commonly understood investing concepts that may require additional + explanation. Your response should only include valid JSON. "], ['role' => 'user', 'content' => " - Generate a list of ". rand(1,5) ." follow up questions a savvy investor might ask their advisor - based on the following conversation: + Generate between 1 and 5 (no more than 5) follow up questions a savvy investor might ask their + advisor based on the following conversation: \n\n ".json_encode(array_slice($this->messages, -4)) ], @@ -366,7 +367,7 @@ new class extends Component {
-

{{ __('Advice generateCompletiond by AI may contain errors. Use at your own risk. Always consult a licensed investment advisor.') }}

+

{{ __('Advice generated by AI may contain errors. Use at your own risk. Always consult a licensed investment advisor.') }}

diff --git a/resources/views/livewire/manage-portfolio-form.blade.php b/resources/views/livewire/manage-portfolio-form.blade.php index 5899952..7dc9e20 100644 --- a/resources/views/livewire/manage-portfolio-form.blade.php +++ b/resources/views/livewire/manage-portfolio-form.blade.php @@ -5,9 +5,11 @@ use Illuminate\Support\Collection; use Livewire\Attributes\Rule; use Livewire\Volt\Component; use Mary\Traits\Toast; +use App\Traits\WithTrimStrings; new class extends Component { use Toast; + use WithTrimStrings; // props public ?Portfolio $portfolio; diff --git a/resources/views/livewire/manage-transaction-form.blade.php b/resources/views/livewire/manage-transaction-form.blade.php index b18a937..0d9850f 100644 --- a/resources/views/livewire/manage-transaction-form.blade.php +++ b/resources/views/livewire/manage-transaction-form.blade.php @@ -9,9 +9,11 @@ use Livewire\Attributes\{Computed}; use Livewire\Volt\Component; use Mary\Traits\Toast; use Illuminate\Validation\Rule; +use App\Traits\WithTrimStrings; new class extends Component { use Toast; + use WithTrimStrings; // props public ?Portfolio $portfolio; diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php deleted file mode 100644 index 8fca232..0000000 --- a/resources/views/welcome.blade.php +++ /dev/null @@ -1,105 +0,0 @@ -@extends('layouts.main-layout', ['attributes' => null]) - -@section('body') -
-
-
- -
- @auth - Dashboard - @endauth - -
-
-
-

A better portfolio

-
-
- d - h - m - s -
-
-
-
-

- Investbrain is a smart open-source platform that consolidates your portfolios from different brokerages, - tracks market performance across your portfolios, and gives you an AI-powered investment best friend. -

-
-

Stay up to date on our progress!

-
- - -
- - -
- - -
-
-
- - - -
-
-
- -
- - -@endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index aaee97e..0c120b9 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,5 +1,6 @@ group(function () {