From 7329a5f7d85b724964dc3e7aa035a590e539b6ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Pocrnji=C4=8D?= Date: Thu, 14 Nov 2024 22:01:43 +0100 Subject: [PATCH] Bug fixes and Action / Decision seeder --- database/seeders/ActionSeeder.php | 114 +++++++++++++++++++++++++++- database/seeders/DatabaseSeeder.php | 3 +- resources/js/Layouts/AppLayout.vue | 12 +-- routes/breadcrumbs.php | 8 +- 4 files changed, 125 insertions(+), 12 deletions(-) diff --git a/database/seeders/ActionSeeder.php b/database/seeders/ActionSeeder.php index f41858f..30ba77f 100644 --- a/database/seeders/ActionSeeder.php +++ b/database/seeders/ActionSeeder.php @@ -2,6 +2,8 @@ namespace Database\Seeders; +use App\Models\Action; +use App\Models\Decision; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; @@ -12,6 +14,116 @@ class ActionSeeder extends Seeder */ public function run(): void { - // + Action::create([ + 'name' => 'KLIC - IZHODNI', + 'color_tag' => '', + 'segment_id' => 1 + ]); + + Action::create([ + 'name' => 'KLIC - VHODNI', + 'color_tag' => '', + 'segment_id' => 1 + ]); + + Action::create([ + 'name' => 'ePOŠTA', + 'color_tag' => '', + 'segment_id' => 1 + ]); + + Action::create([ + 'name' => 'VROČANJE', + 'color_tag' => '', + 'segment_id' => 1 + ]); + + Action::create([ + 'name' => 'SMS', + 'color_tag' => '', + 'segment_id' => 1 + ]); + + //------- 1 + Decision::create([ + 'name' => 'Obljuba', + 'color_tag' => '', + ]); + + \DB::table('action_decision')->insert([ + 'action_id' => 1, + 'decision_id' => 1 + ]); + + \DB::table('action_decision')->insert([ + 'action_id' => 2, + 'decision_id' => 1 + ]); + + //------- 2 + Decision::create([ + 'name' => 'Poslana', + 'color_tag' => '', + ]); + + \DB::table('action_decision')->insert([ + 'action_id' => 3, + 'decision_id' => 2 + ]); + + //-------- 3 + Decision::create([ + 'name' => 'Prejeta', + 'color_tag' => '', + ]); + + \DB::table('action_decision')->insert([ + 'action_id' => 3, + 'decision_id' => 3 + ]); + + //--------- 4 + Decision::create([ + 'name' => 'Neuspešna', + 'color_tag' => '', + ]); + + \DB::table('action_decision')->insert([ + 'action_id' => 4, + 'decision_id' => 4 + ]); + + //--------- 5 + Decision::create([ + 'name' => 'Uspešna', + 'color_tag' => '', + ]); + + \DB::table('action_decision')->insert([ + 'action_id' => 4, + 'decision_id' => 5 + ]); + + //--------- 6 + Decision::create([ + 'name' => 'Poslan SMS', + 'color_tag' => '', + ]); + + \DB::table('action_decision')->insert([ + 'action_id' => 5, + 'decision_id' => 6 + ]); + + //--------- 7 + Decision::create([ + 'name' => 'Prejet SMS', + 'color_tag' => '', + ]); + + \DB::table('action_decision')->insert([ + 'action_id' => 5, + 'decision_id' => 7 + ]); } } diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 5cf784f..c08aa3e 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -25,7 +25,8 @@ public function run(): void $this->call([ PersonSeeder::class, - SegmentSeeder::class + SegmentSeeder::class, + ActionSeeder::class ]); } } diff --git a/resources/js/Layouts/AppLayout.vue b/resources/js/Layouts/AppLayout.vue index 13211e5..7863eaa 100644 --- a/resources/js/Layouts/AppLayout.vue +++ b/resources/js/Layouts/AppLayout.vue @@ -142,16 +142,16 @@ const logout = () => {
- Dashboard + Nadzorna plošča - Clients + Naročniki - Cases + Primeri - Settings + Nastavitve
@@ -174,7 +174,7 @@ const logout = () => {
- Profile + Profil @@ -184,7 +184,7 @@ const logout = () => {
- Log Out + Izpis
diff --git a/routes/breadcrumbs.php b/routes/breadcrumbs.php index 519afec..e5eb8a8 100644 --- a/routes/breadcrumbs.php +++ b/routes/breadcrumbs.php @@ -12,13 +12,13 @@ // Dashboard Breadcrumbs::for('dashboard', function (BreadcrumbTrail $trail) { - $trail->push('Dashboard', route('dashboard')); + $trail->push('Nadzorna plošča', route('dashboard')); }); // Dashboard > Clients Breadcrumbs::for('client', function (BreadcrumbTrail $trail) { $trail->parent('dashboard'); - $trail->push('Clients', route('client')); + $trail->push('Naročniki', route('client')); }); // Dashboard > Clients > [Client] @@ -31,7 +31,7 @@ Breadcrumbs::for('clientCase', function (BreadcrumbTrail $trail) { $trail->parent('dashboard'); - $trail->push('Cases', route('clientCase')); + $trail->push('Primeri', route('clientCase')); }); // Dashboard > Cases > [Case] @@ -44,5 +44,5 @@ // Dashboard > Settings Breadcrumbs::for('settings', function (BreadcrumbTrail $trail) { $trail->parent('dashboard'); - $trail->push('Settings', route('settings')); + $trail->push('Nastavitve', route('settings')); }); \ No newline at end of file