ソースを参照

feat: top navigation subgroups

3.x
wallo 1年前
コミット
9281d42054
39個のファイルの変更1303行の追加452行の削除
  1. 10
    0
      app/Filament/Company/Pages/Service/LiveCurrency.php
  2. 10
    0
      app/Filament/Company/Pages/Setting/Appearance.php
  3. 10
    0
      app/Filament/Company/Pages/Setting/CompanyDefault.php
  4. 10
    0
      app/Filament/Company/Pages/Setting/CompanyProfile.php
  5. 10
    0
      app/Filament/Company/Pages/Setting/Invoice.php
  6. 10
    0
      app/Filament/Company/Pages/Setting/Localization.php
  7. 10
    0
      app/Filament/Company/Resources/Banking/AccountResource.php
  8. 10
    0
      app/Filament/Company/Resources/Core/DepartmentResource.php
  9. 10
    0
      app/Filament/Company/Resources/Setting/CategoryResource.php
  10. 10
    0
      app/Filament/Company/Resources/Setting/CurrencyResource.php
  11. 10
    0
      app/Filament/Company/Resources/Setting/DiscountResource.php
  12. 10
    0
      app/Filament/Company/Resources/Setting/TaxResource.php
  13. 0
    8
      app/Listeners/ConfigureCompanyDefault.php
  14. 95
    0
      app/Listeners/ConfigureCompanyNavigation.php
  15. 6
    0
      app/Providers/AppServiceProvider.php
  16. 2
    0
      app/Providers/EventServiceProvider.php
  17. 1
    4
      app/Providers/MacroServiceProvider.php
  18. 1
    1
      app/Providers/TranslationServiceProvider.php
  19. 532
    362
      composer.lock
  20. 25
    25
      package-lock.json
  21. 1
    0
      postcss.config.js
  22. 5
    1
      resources/css/filament/company/tailwind.config.js
  23. 123
    5
      resources/css/filament/company/theme.css
  24. 6
    2
      resources/css/filament/user/tailwind.config.js
  25. 20
    7
      resources/css/filament/user/theme.css
  26. 8
    3
      resources/data/lang/ar.json
  27. 8
    3
      resources/data/lang/de.json
  28. 7
    2
      resources/data/lang/en.json
  29. 8
    3
      resources/data/lang/es.json
  30. 8
    3
      resources/data/lang/fr.json
  31. 8
    3
      resources/data/lang/id.json
  32. 8
    3
      resources/data/lang/it.json
  33. 8
    3
      resources/data/lang/nl.json
  34. 8
    3
      resources/data/lang/pt.json
  35. 8
    3
      resources/data/lang/tr.json
  36. 8
    3
      resources/data/lang/zh.json
  37. 65
    0
      resources/js/top-navigation.js
  38. 0
    5
      resources/svg/currency-convert.svg
  39. 214
    0
      resources/views/vendor/filament-panels/components/topbar/index.blade.php

+ 10
- 0
app/Filament/Company/Pages/Service/LiveCurrency.php ファイルの表示

@@ -5,6 +5,7 @@ namespace App\Filament\Company\Pages\Service;
5 5
 use App\Facades\Forex;
6 6
 use App\Models\Service\CurrencyList;
7 7
 use App\Models\Setting\Currency;
8
+use Filament\Facades\Filament;
8 9
 use Filament\Pages\Page;
9 10
 use Illuminate\Contracts\Support\Htmlable;
10 11
 use Livewire\Attributes\Url;
@@ -34,6 +35,15 @@ class LiveCurrency extends Page
34 35
         return translate(static::$title);
35 36
     }
36 37
 
38
+    public static function getNavigationParentItem(): ?string
39
+    {
40
+        if (Filament::hasTopNavigation()) {
41
+            return translate('Banking');
42
+        }
43
+
44
+        return null;
45
+    }
46
+
37 47
     public static function shouldRegisterNavigation(): bool
38 48
     {
39 49
         return Forex::isEnabled();

+ 10
- 0
app/Filament/Company/Pages/Setting/Appearance.php ファイルの表示

@@ -11,6 +11,7 @@ use App\Enums\TableSortDirection;
11 11
 use App\Models\Setting\Appearance as AppearanceModel;
12 12
 use Filament\Actions\Action;
13 13
 use Filament\Actions\ActionGroup;
14
+use Filament\Facades\Filament;
14 15
 use Filament\Forms\Components\Component;
15 16
 use Filament\Forms\Components\Section;
16 17
 use Filament\Forms\Components\Select;
@@ -59,6 +60,15 @@ class Appearance extends Page
59 60
         return translate(static::$title);
60 61
     }
61 62
 
63
+    public static function getNavigationParentItem(): ?string
64
+    {
65
+        if (Filament::hasTopNavigation()) {
66
+            return translate('Personalization');
67
+        }
68
+
69
+        return null;
70
+    }
71
+
62 72
     public function mount(): void
63 73
     {
64 74
         $this->record = AppearanceModel::firstOrNew([

+ 10
- 0
app/Filament/Company/Pages/Setting/CompanyDefault.php ファイルの表示

@@ -10,6 +10,7 @@ use App\Models\Setting\Discount;
10 10
 use App\Models\Setting\Tax;
11 11
 use Filament\Actions\Action;
12 12
 use Filament\Actions\ActionGroup;
13
+use Filament\Facades\Filament;
13 14
 use Filament\Forms\Components\Component;
14 15
 use Filament\Forms\Components\Section;
15 16
 use Filament\Forms\Components\Select;
@@ -61,6 +62,15 @@ class CompanyDefault extends Page
61 62
         return translate(static::$title);
62 63
     }
63 64
 
65
+    public static function getNavigationParentItem(): ?string
66
+    {
67
+        if (Filament::hasTopNavigation()) {
68
+            return translate('Personalization');
69
+        }
70
+
71
+        return null;
72
+    }
73
+
64 74
     public function mount(): void
65 75
     {
66 76
         $this->record = CompanyDefaultModel::firstOrNew([

+ 10
- 0
app/Filament/Company/Pages/Setting/CompanyProfile.php ファイルの表示

@@ -9,6 +9,7 @@ use App\Models\Locale\State;
9 9
 use App\Models\Setting\CompanyProfile as CompanyProfileModel;
10 10
 use Filament\Actions\Action;
11 11
 use Filament\Actions\ActionGroup;
12
+use Filament\Facades\Filament;
12 13
 use Filament\Forms\Components\Component;
13 14
 use Filament\Forms\Components\FileUpload;
14 15
 use Filament\Forms\Components\Group;
@@ -63,6 +64,15 @@ class CompanyProfile extends Page
63 64
         return translate(static::$title);
64 65
     }
65 66
 
67
+    public static function getNavigationParentItem(): ?string
68
+    {
69
+        if (Filament::hasTopNavigation()) {
70
+            return translate('Company');
71
+        }
72
+
73
+        return null;
74
+    }
75
+
66 76
     public function mount(): void
67 77
     {
68 78
         $this->record = CompanyProfileModel::firstOrNew([

+ 10
- 0
app/Filament/Company/Pages/Setting/Invoice.php ファイルの表示

@@ -9,6 +9,7 @@ use App\Enums\Template;
9 9
 use App\Models\Setting\DocumentDefault as InvoiceModel;
10 10
 use Filament\Actions\Action;
11 11
 use Filament\Actions\ActionGroup;
12
+use Filament\Facades\Filament;
12 13
 use Filament\Forms\Components\Checkbox;
13 14
 use Filament\Forms\Components\ColorPicker;
14 15
 use Filament\Forms\Components\Component;
@@ -65,6 +66,15 @@ class Invoice extends Page
65 66
         return translate(static::$title);
66 67
     }
67 68
 
69
+    public static function getNavigationParentItem(): ?string
70
+    {
71
+        if (Filament::hasTopNavigation()) {
72
+            return translate('Personalization');
73
+        }
74
+
75
+        return null;
76
+    }
77
+
68 78
     public function mount(): void
69 79
     {
70 80
         $this->record = InvoiceModel::invoice()

+ 10
- 0
app/Filament/Company/Pages/Setting/Localization.php ファイルの表示

@@ -10,6 +10,7 @@ use App\Models\Setting\Localization as LocalizationModel;
10 10
 use App\Utilities\Localization\Timezone;
11 11
 use Filament\Actions\Action;
12 12
 use Filament\Actions\ActionGroup;
13
+use Filament\Facades\Filament;
13 14
 use Filament\Forms\Components\Component;
14 15
 use Filament\Forms\Components\DatePicker;
15 16
 use Filament\Forms\Components\Section;
@@ -60,6 +61,15 @@ class Localization extends Page
60 61
         return translate(static::$title);
61 62
     }
62 63
 
64
+    public static function getNavigationParentItem(): ?string
65
+    {
66
+        if (Filament::hasTopNavigation()) {
67
+            return translate('Company');
68
+        }
69
+
70
+        return null;
71
+    }
72
+
63 73
     public function mount(): void
64 74
     {
65 75
         $this->record = LocalizationModel::firstOrNew([

+ 10
- 0
app/Filament/Company/Resources/Banking/AccountResource.php ファイルの表示

@@ -9,6 +9,7 @@ use App\Filament\Company\Resources\Banking\AccountResource\Pages;
9 9
 use App\Models\Banking\Account;
10 10
 use App\Utilities\Currency\CurrencyAccessor;
11 11
 use App\Utilities\Currency\CurrencyConverter;
12
+use Filament\Facades\Filament;
12 13
 use Filament\Forms;
13 14
 use Filament\Forms\Form;
14 15
 use Filament\Notifications\Notification;
@@ -38,6 +39,15 @@ class AccountResource extends Resource
38 39
         return translate($modelLabel);
39 40
     }
40 41
 
42
+    public static function getNavigationParentItem(): ?string
43
+    {
44
+        if (Filament::hasTopNavigation()) {
45
+            return translate(static::$navigationGroup);
46
+        }
47
+
48
+        return null;
49
+    }
50
+
41 51
     public static function form(Form $form): Form
42 52
     {
43 53
         return $form

+ 10
- 0
app/Filament/Company/Resources/Core/DepartmentResource.php ファイルの表示

@@ -5,6 +5,7 @@ namespace App\Filament\Company\Resources\Core;
5 5
 use App\Filament\Company\Resources\Core\DepartmentResource\Pages;
6 6
 use App\Filament\Company\Resources\Core\DepartmentResource\RelationManagers\ChildrenRelationManager;
7 7
 use App\Models\Core\Department;
8
+use Filament\Facades\Filament;
8 9
 use Filament\Forms;
9 10
 use Filament\Forms\Form;
10 11
 use Filament\Resources\Resource;
@@ -31,6 +32,15 @@ class DepartmentResource extends Resource
31 32
         return translate($modelLabel);
32 33
     }
33 34
 
35
+    public static function getNavigationParentItem(): ?string
36
+    {
37
+        if (Filament::hasTopNavigation()) {
38
+            return 'HR';
39
+        }
40
+
41
+        return null;
42
+    }
43
+
34 44
     public static function form(Form $form): Form
35 45
     {
36 46
         return $form

+ 10
- 0
app/Filament/Company/Resources/Setting/CategoryResource.php ファイルの表示

@@ -8,6 +8,7 @@ use App\Models\Setting\Category;
8 8
 use App\Traits\NotifiesOnDelete;
9 9
 use Closure;
10 10
 use Exception;
11
+use Filament\Facades\Filament;
11 12
 use Filament\Forms;
12 13
 use Filament\Forms\Form;
13 14
 use Filament\Resources\Resource;
@@ -37,6 +38,15 @@ class CategoryResource extends Resource
37 38
         return translate($modelLabel);
38 39
     }
39 40
 
41
+    public static function getNavigationParentItem(): ?string
42
+    {
43
+        if (Filament::hasTopNavigation()) {
44
+            return translate('Finance');
45
+        }
46
+
47
+        return null;
48
+    }
49
+
40 50
     public static function form(Form $form): Form
41 51
     {
42 52
         return $form

+ 10
- 0
app/Filament/Company/Resources/Setting/CurrencyResource.php ファイルの表示

@@ -11,6 +11,7 @@ use App\Traits\ChecksForeignKeyConstraints;
11 11
 use App\Traits\NotifiesOnDelete;
12 12
 use App\Utilities\Currency\CurrencyAccessor;
13 13
 use Closure;
14
+use Filament\Facades\Filament;
14 15
 use Filament\Forms;
15 16
 use Filament\Forms\Form;
16 17
 use Filament\Resources\Resource;
@@ -42,6 +43,15 @@ class CurrencyResource extends Resource
42 43
         return translate($modelLabel);
43 44
     }
44 45
 
46
+    public static function getNavigationParentItem(): ?string
47
+    {
48
+        if (Filament::hasTopNavigation()) {
49
+            return translate('Finance');
50
+        }
51
+
52
+        return null;
53
+    }
54
+
45 55
     public static function form(Form $form): Form
46 56
     {
47 57
         return $form

+ 10
- 0
app/Filament/Company/Resources/Setting/DiscountResource.php ファイルの表示

@@ -12,6 +12,7 @@ use App\Models\Setting\Discount;
12 12
 use App\Models\Setting\Localization;
13 13
 use App\Traits\NotifiesOnDelete;
14 14
 use Closure;
15
+use Filament\Facades\Filament;
15 16
 use Filament\Forms;
16 17
 use Filament\Forms\Form;
17 18
 use Filament\Resources\Resource;
@@ -41,6 +42,15 @@ class DiscountResource extends Resource
41 42
         return translate($modelLabel);
42 43
     }
43 44
 
45
+    public static function getNavigationParentItem(): ?string
46
+    {
47
+        if (Filament::hasTopNavigation()) {
48
+            return translate('Finance');
49
+        }
50
+
51
+        return null;
52
+    }
53
+
44 54
     public static function form(Form $form): Form
45 55
     {
46 56
         return $form

+ 10
- 0
app/Filament/Company/Resources/Setting/TaxResource.php ファイルの表示

@@ -9,6 +9,7 @@ use App\Filament\Company\Resources\Setting\TaxResource\Pages;
9 9
 use App\Models\Setting\Tax;
10 10
 use App\Traits\NotifiesOnDelete;
11 11
 use Closure;
12
+use Filament\Facades\Filament;
12 13
 use Filament\Forms;
13 14
 use Filament\Forms\Form;
14 15
 use Filament\Resources\Resource;
@@ -38,6 +39,15 @@ class TaxResource extends Resource
38 39
         return translate($modelLabel);
39 40
     }
40 41
 
42
+    public static function getNavigationParentItem(): ?string
43
+    {
44
+        if (Filament::hasTopNavigation()) {
45
+            return translate('Finance');
46
+        }
47
+
48
+        return null;
49
+    }
50
+
41 51
     public static function form(Form $form): Form
42 52
     {
43 53
         return $form

+ 0
- 8
app/Listeners/ConfigureCompanyDefault.php ファイルの表示

@@ -17,7 +17,6 @@ use Filament\Facades\Filament;
17 17
 use Filament\Forms\Components\DatePicker;
18 18
 use Filament\Forms\Components\Section;
19 19
 use Filament\Forms\Components\Tabs\Tab;
20
-use Filament\Navigation\NavigationGroup;
21 20
 use Filament\Resources\Components\Tab as ResourcesTab;
22 21
 use Filament\Support\Facades\FilamentColor;
23 22
 use Filament\Tables\Table;
@@ -38,7 +37,6 @@ class ConfigureCompanyDefault
38 37
         $modalWidth = $company->appearance->modal_width->value ?? ModalWidth::DEFAULT;
39 38
         $maxContentWidth = $company->appearance->max_content_width->value ?? MaxContentWidth::DEFAULT;
40 39
         $defaultFont = $company->appearance->font->value ?? Font::DEFAULT;
41
-        $hasTopNavigation = $company->appearance->has_top_navigation ?? false;
42 40
         $default_language = $company->locale->language ?? config('transmatic.source_locale');
43 41
         $defaultTimezone = $company->locale->timezone ?? config('app.timezone');
44 42
         $dateFormat = $company->locale->date_format->value ?? DateFormat::DEFAULT;
@@ -73,8 +71,6 @@ class ConfigureCompanyDefault
73 71
         Filament::getPanel('company')
74 72
             ->font($defaultFont)
75 73
             ->brandName($company->name)
76
-            ->topNavigation($hasTopNavigation)
77
-            ->sidebarCollapsibleOnDesktop(! $hasTopNavigation)
78 74
             ->maxContentWidth($maxContentWidth);
79 75
 
80 76
         DatePicker::configureUsing(static function (DatePicker $component) use ($dateFormat, $weekStart) {
@@ -98,10 +94,6 @@ class ConfigureCompanyDefault
98 94
             $tab->localizeLabel();
99 95
         }, isImportant: true);
100 96
 
101
-        NavigationGroup::configureUsing(static function (NavigationGroup $group): void {
102
-            $group->localizeLabel();
103
-        }, isImportant: true);
104
-
105 97
         ConfigureCurrencies::syncCurrencies();
106 98
     }
107 99
 }

+ 95
- 0
app/Listeners/ConfigureCompanyNavigation.php ファイルの表示

@@ -0,0 +1,95 @@
1
+<?php
2
+
3
+namespace App\Listeners;
4
+
5
+use App\Events\CompanyConfigured;
6
+use App\Filament\Company\Pages\Service\LiveCurrency;
7
+use App\Filament\Company\Pages\Setting\Appearance;
8
+use App\Filament\Company\Pages\Setting\CompanyDefault;
9
+use App\Filament\Company\Pages\Setting\CompanyProfile;
10
+use App\Filament\Company\Pages\Setting\Invoice;
11
+use App\Filament\Company\Pages\Setting\Localization;
12
+use App\Filament\Company\Resources\Banking\AccountResource;
13
+use App\Filament\Company\Resources\Core\DepartmentResource;
14
+use App\Filament\Company\Resources\Setting\CategoryResource;
15
+use App\Filament\Company\Resources\Setting\CurrencyResource;
16
+use App\Filament\Company\Resources\Setting\DiscountResource;
17
+use App\Filament\Company\Resources\Setting\TaxResource;
18
+use Filament\Facades\Filament;
19
+use Filament\Navigation\NavigationBuilder;
20
+use Filament\Navigation\NavigationGroup;
21
+use Filament\Pages\Dashboard;
22
+
23
+class ConfigureCompanyNavigation
24
+{
25
+    /**
26
+     * Handle the event.
27
+     */
28
+    public function handle(CompanyConfigured $event): void
29
+    {
30
+        $company = $event->company;
31
+
32
+        $hasTopNavigation = $company->appearance->has_top_navigation ?? false;
33
+
34
+        Filament::getPanel('company')
35
+            ->topNavigation($hasTopNavigation)
36
+            ->sidebarCollapsibleOnDesktop(! $hasTopNavigation);
37
+
38
+        if (Filament::getPanel('company')->hasTopNavigation()) {
39
+            Filament::getPanel('company')->navigation(
40
+                $this->buildCompanyNavigation()
41
+            );
42
+        }
43
+
44
+        NavigationGroup::configureUsing(static function (NavigationGroup $group): void {
45
+            $group->localizeLabel();
46
+        }, isImportant: true);
47
+    }
48
+
49
+    /**
50
+     * Build the company navigation.
51
+     */
52
+    protected function buildCompanyNavigation(): callable
53
+    {
54
+        return function (NavigationBuilder $builder): NavigationBuilder {
55
+            return $builder
56
+                ->items(Dashboard::getNavigationItems())
57
+                ->groups([
58
+                    $this->buildSettingsGroup(),
59
+                    $this->buildResourcesGroup(),
60
+                ]);
61
+        };
62
+    }
63
+
64
+    /**
65
+     * Build the settings group.
66
+     */
67
+    protected function buildSettingsGroup(): NavigationGroup
68
+    {
69
+        return NavigationGroup::make(translate('Settings'))
70
+            ->items([
71
+                ...CategoryResource::getNavigationItems(),
72
+                ...CurrencyResource::getNavigationItems(),
73
+                ...DiscountResource::getNavigationItems(),
74
+                ...TaxResource::getNavigationItems(),
75
+                ...Appearance::getNavigationItems(),
76
+                ...CompanyDefault::getNavigationItems(),
77
+                ...Invoice::getNavigationItems(),
78
+                ...CompanyProfile::getNavigationItems(),
79
+                ...Localization::getNavigationItems(),
80
+            ]);
81
+    }
82
+
83
+    /**
84
+     * Build the resources group.
85
+     */
86
+    protected function buildResourcesGroup(): NavigationGroup
87
+    {
88
+        return NavigationGroup::make(translate('Resources'))
89
+            ->items([
90
+                ...LiveCurrency::getNavigationItems(),
91
+                ...AccountResource::getNavigationItems(),
92
+                ...DepartmentResource::getNavigationItems(),
93
+            ]);
94
+    }
95
+}

+ 6
- 0
app/Providers/AppServiceProvider.php ファイルの表示

@@ -4,7 +4,9 @@ namespace App\Providers;
4 4
 
5 5
 use BezhanSalleh\PanelSwitch\PanelSwitch;
6 6
 use Filament\Notifications\Livewire\Notifications;
7
+use Filament\Support\Assets\Js;
7 8
 use Filament\Support\Enums\Alignment;
9
+use Filament\Support\Facades\FilamentAsset;
8 10
 use Illuminate\Support\ServiceProvider;
9 11
 
10 12
 class AppServiceProvider extends ServiceProvider
@@ -25,6 +27,10 @@ class AppServiceProvider extends ServiceProvider
25 27
         Notifications::alignment(Alignment::Center);
26 28
 
27 29
         $this->configurePanelSwitch();
30
+
31
+        FilamentAsset::register([
32
+            Js::make('top-navigation-script', __DIR__ . '/../../resources/js/top-navigation.js'),
33
+        ]);
28 34
     }
29 35
 
30 36
     /**

+ 2
- 0
app/Providers/EventServiceProvider.php ファイルの表示

@@ -9,6 +9,7 @@ use App\Events\CompanyGenerated;
9 9
 use App\Events\CurrencyRateChanged;
10 10
 use App\Events\DefaultCurrencyChanged;
11 11
 use App\Listeners\ConfigureCompanyDefault;
12
+use App\Listeners\ConfigureCompanyNavigation;
12 13
 use App\Listeners\CreateCompanyDefaults;
13 14
 use App\Listeners\SyncAssociatedModels;
14 15
 use App\Listeners\SyncWithCompanyDefaults;
@@ -41,6 +42,7 @@ class EventServiceProvider extends ServiceProvider
41 42
         ],
42 43
         CompanyConfigured::class => [
43 44
             ConfigureCompanyDefault::class,
45
+            ConfigureCompanyNavigation::class,
44 46
         ],
45 47
         CompanyGenerated::class => [
46 48
             CreateCompanyDefaults::class,

+ 1
- 4
app/Providers/MacroServiceProvider.php ファイルの表示

@@ -57,10 +57,7 @@ class MacroServiceProvider extends ServiceProvider
57 57
                 $currency = $column->evaluate($currency);
58 58
                 $convert = $column->evaluate($convert);
59 59
 
60
-                $formatted = money($state, $currency, $convert);
61
-                $currencyCode = currency($currency)->getCurrency();
62
-
63
-                return "{$formatted} {$currencyCode}";
60
+                return money($state, $currency, $convert)->formatWithCode();
64 61
             });
65 62
 
66 63
             return $this;

+ 1
- 1
app/Providers/TranslationServiceProvider.php ファイルの表示

@@ -64,7 +64,7 @@ class TranslationServiceProvider extends ServiceProvider
64 64
         NavigationGroup::macro('localizeLabel', function () {
65 65
             $label = $this->getLabel();
66 66
 
67
-            if (filled($label)) {
67
+            if ($label !== 'HR' && filled($label)) {
68 68
                 $this->label(translate($label));
69 69
             }
70 70
 

+ 532
- 362
composer.lock
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 25
- 25
package-lock.json ファイルの表示

@@ -606,9 +606,9 @@
606 606
             }
607 607
         },
608 608
         "node_modules/browserslist": {
609
-            "version": "4.22.1",
610
-            "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz",
611
-            "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==",
609
+            "version": "4.22.2",
610
+            "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz",
611
+            "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==",
612 612
             "dev": true,
613 613
             "funding": [
614 614
                 {
@@ -625,9 +625,9 @@
625 625
                 }
626 626
             ],
627 627
             "dependencies": {
628
-                "caniuse-lite": "^1.0.30001541",
629
-                "electron-to-chromium": "^1.4.535",
630
-                "node-releases": "^2.0.13",
628
+                "caniuse-lite": "^1.0.30001565",
629
+                "electron-to-chromium": "^1.4.601",
630
+                "node-releases": "^2.0.14",
631 631
                 "update-browserslist-db": "^1.0.13"
632 632
             },
633 633
             "bin": {
@@ -647,9 +647,9 @@
647 647
             }
648 648
         },
649 649
         "node_modules/caniuse-lite": {
650
-            "version": "1.0.30001564",
651
-            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz",
652
-            "integrity": "sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==",
650
+            "version": "1.0.30001566",
651
+            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz",
652
+            "integrity": "sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==",
653 653
             "dev": true,
654 654
             "funding": [
655 655
                 {
@@ -766,9 +766,9 @@
766 766
             "dev": true
767 767
         },
768 768
         "node_modules/electron-to-chromium": {
769
-            "version": "1.4.594",
770
-            "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.594.tgz",
771
-            "integrity": "sha512-xT1HVAu5xFn7bDfkjGQi9dNpMqGchUkebwf1GL7cZN32NSwwlHRPMSDJ1KN6HkS0bWUtndbSQZqvpQftKG2uFQ==",
769
+            "version": "1.4.605",
770
+            "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.605.tgz",
771
+            "integrity": "sha512-V52j+P5z6cdRqTjPR/bYNxx7ETCHIkm5VIGuyCy3CMrfSnbEpIlLnk5oHmZo7gYvDfh2TfHeanB6rawyQ23ktg==",
772 772
             "dev": true
773 773
         },
774 774
         "node_modules/esbuild": {
@@ -1208,9 +1208,9 @@
1208 1208
             }
1209 1209
         },
1210 1210
         "node_modules/node-releases": {
1211
-            "version": "2.0.13",
1212
-            "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",
1213
-            "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==",
1211
+            "version": "2.0.14",
1212
+            "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
1213
+            "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",
1214 1214
             "dev": true
1215 1215
         },
1216 1216
         "node_modules/normalize-path": {
@@ -1310,9 +1310,9 @@
1310 1310
             }
1311 1311
         },
1312 1312
         "node_modules/postcss": {
1313
-            "version": "8.4.31",
1314
-            "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
1315
-            "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
1313
+            "version": "8.4.32",
1314
+            "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz",
1315
+            "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==",
1316 1316
             "dev": true,
1317 1317
             "funding": [
1318 1318
                 {
@@ -1329,7 +1329,7 @@
1329 1329
                 }
1330 1330
             ],
1331 1331
             "dependencies": {
1332
-                "nanoid": "^3.3.6",
1332
+                "nanoid": "^3.3.7",
1333 1333
                 "picocolors": "^1.0.0",
1334 1334
                 "source-map-js": "^1.0.2"
1335 1335
             },
@@ -1625,9 +1625,9 @@
1625 1625
             }
1626 1626
         },
1627 1627
         "node_modules/tailwindcss": {
1628
-            "version": "3.3.5",
1629
-            "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz",
1630
-            "integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==",
1628
+            "version": "3.3.6",
1629
+            "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.6.tgz",
1630
+            "integrity": "sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==",
1631 1631
             "dev": true,
1632 1632
             "dependencies": {
1633 1633
                 "@alloc/quick-lru": "^5.2.0",
@@ -1750,9 +1750,9 @@
1750 1750
             "dev": true
1751 1751
         },
1752 1752
         "node_modules/vite": {
1753
-            "version": "4.5.0",
1754
-            "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz",
1755
-            "integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==",
1753
+            "version": "4.5.1",
1754
+            "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz",
1755
+            "integrity": "sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==",
1756 1756
             "dev": true,
1757 1757
             "dependencies": {
1758 1758
                 "esbuild": "^0.18.10",

+ 1
- 0
postcss.config.js ファイルの表示

@@ -1,5 +1,6 @@
1 1
 export default {
2 2
     plugins: {
3
+        'tailwindcss/nesting': {},
3 4
         tailwindcss: {},
4 5
         autoprefixer: {},
5 6
     },

+ 5
- 1
resources/css/filament/company/tailwind.config.js ファイルの表示

@@ -17,7 +17,11 @@ export default {
17 17
                 white: '#F6F5F3',
18 18
                 platinum: '#E8E9EB',
19 19
                 moonlight: '#F6F5F3',
20
-                translucent: 'rgba(54, 54, 52, 0.06)',
20
+                'translucent': {
21
+                    light: 'rgba(255, 255, 255, 0.5)',
22
+                    DEFAULT: 'rgba(255, 255, 255, 0.5)',
23
+                    dark: 'rgba(25, 25, 25, 0.5)',
24
+                },
21 25
             },
22 26
         }
23 27
     }

+ 123
- 5
resources/css/filament/company/theme.css ファイルの表示

@@ -6,12 +6,132 @@
6 6
     @apply bg-platinum;
7 7
 }
8 8
 
9
+.fi-topbar > nav, .fi-sidebar-header {
10
+    @apply bg-transparent ring-0 shadow-none !important;
11
+    transition: background-color 0.3s, top 0.3s;
12
+}
13
+
9 14
 .fi-topbar > nav {
10
-    @apply bg-translucent;
15
+    @apply relative flex justify-center;
16
+
17
+    > ul {
18
+        @apply absolute -translate-x-2/4 gap-x-0 left-2/4;
19
+    }
20
+
21
+    > div {
22
+        @apply static;
23
+    }
24
+}
25
+
26
+.fi-topbar > nav.topbar-hovered, .fi-sidebar-header.topbar-hovered {
27
+    @apply bg-translucent dark:bg-translucent-dark !important;
11 28
 }
12 29
 
13
-.fi-sidebar-header {
14
-    @apply bg-translucent;
30
+.fi-dropdown.fi-topbar-dropdown .fi-dropdown-panel {
31
+    transition: max-width 0.3s linear 0.1s, opacity 0.1s linear 0.1s;
32
+    @apply absolute -translate-x-1/2 left-1/2 !important;
33
+}
34
+
35
+.fi-topbar-item > * {
36
+    @apply h-16 rounded-none !bg-transparent border-b-2 border-transparent;
37
+}
38
+
39
+.fi-topbar-item > button > svg {
40
+    transition: transform 0.1s ease-in-out, color 0.1s ease-in-out;
41
+}
42
+
43
+.fi-topbar-item-active {
44
+    & > a, & > button {
45
+        @apply border-primary-600 dark:border-primary-400;
46
+    }
47
+
48
+    > button {
49
+        @apply text-gray-700 dark:text-gray-200;
50
+    }
51
+
52
+    > button > svg {
53
+        @apply text-gray-400 dark:text-gray-500;
54
+    }
55
+}
56
+
57
+.fi-topbar-item > a:hover, a:focus-visible {
58
+    @apply text-primary-600 dark:text-primary-400 border-primary-600 dark:border-primary-400;
59
+
60
+    > svg {
61
+        @apply text-primary-500;
62
+    }
63
+}
64
+
65
+.fi-topbar-dropdown[aria-expanded="true"], .fi-topbar-dropdown[aria-expanded="false"] .fi-dropdown-trigger[aria-expanded="true"] {
66
+    .fi-topbar-item > button {
67
+        @apply text-primary-600 dark:text-primary-400 border-primary-600 dark:border-primary-400 !important;
68
+
69
+        > svg {
70
+            @apply rotate-180 text-primary-500;
71
+        }
72
+    }
73
+}
74
+
75
+.menu-groups {
76
+    @apply flex flex-row relative transition-[unset] m-0 px-12 py-9;
77
+
78
+    .menu-group {
79
+        @apply flex flex-col justify-between relative z-[3] mx-2.5 my-0 p-0;
80
+    }
81
+}
82
+
83
+.submenu-wrap {
84
+    .submenu {
85
+        @apply flex flex-wrap m-0 p-0;
86
+    }
87
+
88
+    .submenu.cols-1 {
89
+        @apply w-60;
90
+    }
91
+
92
+    .menu-label, .menu-label-invisible-spacer {
93
+        @apply text-gray-700 dark:text-gray-200 text-base font-medium mb-4 pb-4 border-b border-gray-200 dark:border-gray-700 min-h-[2.5625rem];
94
+    }
95
+
96
+    .menu-label-invisible-spacer {
97
+        @apply invisible;
98
+    }
99
+}
100
+
101
+.menu-item {
102
+    @apply cursor-pointer -left-4 leading-tight relative w-[calc(100%_-_10px)] p-2;
103
+}
104
+
105
+.fi-topbar-dropdown-list-item {
106
+    @apply flex justify-between relative transition-[left] duration-200 z-[2] rounded-none left-0;
107
+
108
+    &:after {
109
+        @apply bg-primary-600 dark:bg-primary-400 content-[''] block h-0 left-[-1rem] absolute transition-all duration-300 w-px top-[calc(100%_+_0.5rem)];
110
+    }
111
+
112
+    &:hover {
113
+        @apply left-4 !bg-transparent;
114
+    }
115
+
116
+    &:hover > span {
117
+        @apply text-primary-600 dark:text-primary-400;
118
+    }
119
+
120
+    &:hover:after {
121
+        @apply -top-2 h-[calc(100%+1rem)];
122
+    }
123
+
124
+    &:hover .bg {
125
+        @apply w-full;
126
+    }
127
+
128
+    > span {
129
+        @apply flex flex-col relative z-[1] font-medium;
130
+    }
131
+
132
+    .bg {
133
+        @apply h-[calc(100%+1rem)] -left-4 absolute -top-2 transition-[width] duration-200 delay-100 bg-gradient-to-r from-primary-600/10 dark:from-primary-400/10;
134
+    }
15 135
 }
16 136
 
17 137
 .choices__inner {
@@ -21,5 +141,3 @@
21 141
 .fi-badge {
22 142
     display: inline-flex;
23 143
 }
24
-
25
-

+ 6
- 2
resources/css/filament/user/tailwind.config.js ファイルの表示

@@ -15,8 +15,12 @@ export default {
15 15
                 white: '#F6F5F3',
16 16
                 platinum: '#E8E9EB',
17 17
                 moonlight: '#F6F5F3',
18
-                translucent: 'rgba(54, 54, 52, 0.06)',
19
-            }
18
+                'translucent': {
19
+                    light: 'rgba(255, 255, 255, 0.5)',
20
+                    DEFAULT: 'rgba(255, 255, 255, 0.5)',
21
+                    dark: 'rgba(25, 25, 25, 0.5)',
22
+                },
23
+            },
20 24
         }
21 25
     }
22 26
 }

+ 20
- 7
resources/css/filament/user/theme.css ファイルの表示

@@ -6,18 +6,31 @@
6 6
     @apply bg-platinum;
7 7
 }
8 8
 
9
+.fi-topbar > nav, .fi-sidebar-header {
10
+    @apply bg-transparent ring-0 shadow-none !important;
11
+    transition: background-color 0.3s, top 0.3s;
12
+}
13
+
9 14
 .fi-topbar > nav {
10
-    @apply bg-translucent;
15
+    @apply relative flex justify-center;
16
+
17
+    > ul {
18
+        @apply absolute -translate-x-2/4 gap-x-0 left-2/4;
19
+    }
20
+
21
+    > div {
22
+        @apply static;
23
+    }
11 24
 }
12 25
 
13
-.fi-sidebar-header {
14
-    @apply bg-translucent;
26
+.fi-topbar > nav.topbar-hovered, .fi-sidebar-header.topbar-hovered {
27
+    @apply bg-translucent dark:bg-translucent-dark !important;
15 28
 }
16 29
 
17
-.fi-icon-btn.bg-gray-100.\!rounded-full.dark\:bg-custom-500\/20 {
18
-    @apply bg-translucent;
30
+.fi-dropdown.fi-topbar-dropdown .fi-dropdown-panel {
31
+    @apply absolute -translate-x-1/2 left-1/2 !important;
19 32
 }
20 33
 
21
-.panel-switch-card-section {
22
-    @apply bg-platinum;
34
+.fi-icon-btn.bg-gray-100.\!rounded-full.dark\:bg-custom-500\/20 {
35
+    @apply bg-translucent;
23 36
 }

+ 8
- 3
resources/data/lang/ar.json ファイルの表示

@@ -46,7 +46,6 @@
46 46
     "Side Navigation": "التنقل الجانبي",
47 47
     "Disabled": "معاق",
48 48
     "Discount": "خصم",
49
-    "HR": "HR",
50 49
     "Striped Tables": "طاولات مخططة",
51 50
     "Identification": "تحديد",
52 51
     "fuchsia": "فوشيا",
@@ -224,5 +223,11 @@
224 223
     "Action Denied": "تم رفض الإجراء",
225 224
     "The rate must be between 0 and 100.": "يجب أن يكون المعدل بين 0 و 100.",
226 225
     "The rate must be greater than 0.": "يجب أن يكون المعدل أكبر من 0.",
227
-    "Parent Department": "قسم أولياء الأمور"
228
-}
226
+    "Parent Department": "قسم أولياء الأمور",
227
+    "Company": "الشركة",
228
+    "Management": "الإدارة",
229
+    "Website": "الموقع الإلكتروني",
230
+    "Resources": "الموارد",
231
+    "Finance": "التمويل",
232
+    "Personalization": "التخصيص"
233
+}

+ 8
- 3
resources/data/lang/de.json ファイルの表示

@@ -29,7 +29,6 @@
29 29
     "State \/ Province": "Bundesland\/Provinz",
30 30
     "Categories": "Kategorien",
31 31
     "Layout": "Raumaufteilung",
32
-    "HR": "HR",
33 32
     "sky": "Himmel",
34 33
     "stone": "Stein",
35 34
     "Settings": "Einstellungen",
@@ -224,5 +223,11 @@
224 223
     "Parent Department": "Elternabteilung",
225 224
     "Action Denied": "Aktion verweigert",
226 225
     "Live Rate": "Live-Rate",
227
-    "Entity": "Entität"
228
-}
226
+    "Entity": "Entität",
227
+    "Website": "Webseite",
228
+    "Resources": "Ressourcen",
229
+    "Management": "Verwaltung",
230
+    "Finance": "Finanzen",
231
+    "Company": "Firma",
232
+    "Personalization": "Personalisierung"
233
+}

+ 7
- 2
resources/data/lang/en.json ファイルの表示

@@ -67,7 +67,6 @@
67 67
     "Tax": "Tax",
68 68
     "Settings": "Settings",
69 69
     "Banking": "Banking",
70
-    "HR": "HR",
71 70
     "Taxes & Discounts": "Taxes & Discounts",
72 71
     "Sales Tax": "Sales Tax",
73 72
     "Purchase Tax": "Purchase Tax",
@@ -224,5 +223,11 @@
224 223
     "Currencies": "Currencies",
225 224
     "Live Rate": "Live Rate",
226 225
     "Currency List": "Currency List",
227
-    "Company Currencies": "Company Currencies"
226
+    "Company Currencies": "Company Currencies",
227
+    "Website": "Website",
228
+    "Management": "Management",
229
+    "Resources": "Resources",
230
+    "Finance": "Finance",
231
+    "Personalization": "Personalization",
232
+    "Company": "Company"
228 233
 }

+ 8
- 3
resources/data/lang/es.json ファイルの表示

@@ -50,7 +50,6 @@
50 50
     "slate": "pizarra",
51 51
     "Banking": "Banca",
52 52
     "Settings": "Ajustes",
53
-    "HR": "HORA",
54 53
     "Currency": "Divisa",
55 54
     "Ascending": "Ascendente",
56 55
     "Localization": "Localización",
@@ -224,5 +223,11 @@
224 223
     "Live Currency": "Divisa en vivo",
225 224
     "The :Type :record \":name\" already exists.": "El :Type :record \":name\" ya existe.",
226 225
     "Currency Rate": "Tipo de cambio",
227
-    "The rate must be between 0 and 100.": "La tasa debe estar entre 0 y 100."
228
-}
226
+    "The rate must be between 0 and 100.": "La tasa debe estar entre 0 y 100.",
227
+    "Resources": "Recursos",
228
+    "Company": "Empresa",
229
+    "Website": "Sitio web",
230
+    "Management": "Administración",
231
+    "Finance": "Finanzas",
232
+    "Personalization": "Personalización"
233
+}

+ 8
- 3
resources/data/lang/fr.json ファイルの表示

@@ -53,7 +53,6 @@
53 53
     "Identification": "Identification",
54 54
     "Limited Partnership (LP)": "Société en commandite (LP)",
55 55
     "Accent Color": "Couleur d'accent",
56
-    "HR": "HR",
57 56
     "Number Digits": "Chiffres numériques",
58 57
     "Navigation Layout": "Disposition de navigation",
59 58
     "Content": "Contenu",
@@ -224,5 +223,11 @@
224 223
     "Action Denied": "Action refusée",
225 224
     "Parent Department": "Département parent",
226 225
     "The rate must be between 0 and 100.": "Le taux doit être compris entre 0 et 100.",
227
-    "The rate must be greater than 0.": "Le taux doit être supérieur à 0."
228
-}
226
+    "The rate must be greater than 0.": "Le taux doit être supérieur à 0.",
227
+    "Management": "Gestion",
228
+    "Website": "Site Web",
229
+    "Resources": "Ressources",
230
+    "Finance": "Finances",
231
+    "Company": "Entreprise",
232
+    "Personalization": "Personnalisation"
233
+}

+ 8
- 3
resources/data/lang/id.json ファイルの表示

@@ -17,7 +17,6 @@
17 17
     "cyan": "biru kehijau-hijauan",
18 18
     "Descending": "Menurun",
19 19
     "red": "merah",
20
-    "HR": "SDM",
21 20
     "Income Category": "Kategori Pendapatan",
22 21
     "Ascending": "Menaik",
23 22
     "Department": "Departemen",
@@ -224,5 +223,11 @@
224 223
     "Company Currencies": "Mata Uang Perusahaan",
225 224
     "Action Denied": "Tindakan Ditolak",
226 225
     "The rate must be between 0 and 100.": "Tarifnya harus antara 0 dan 100.",
227
-    "The :Type :record \":name\" already exists.": ":Type :record \":name\" sudah ada."
228
-}
226
+    "The :Type :record \":name\" already exists.": ":Type :record \":name\" sudah ada.",
227
+    "Company": "Perusahaan",
228
+    "Management": "Manajemen",
229
+    "Website": "Situs Web",
230
+    "Resources": "Sumber daya",
231
+    "Finance": "Keuangan",
232
+    "Personalization": "Personalisasi"
233
+}

+ 8
- 3
resources/data/lang/it.json ファイルの表示

@@ -46,7 +46,6 @@
46 46
     "Font": "Font",
47 47
     "Large": "Grande",
48 48
     "Account": "Account",
49
-    "HR": "RISORSE UMANE",
50 49
     "Other": "Altro",
51 50
     "Items": "Oggetti",
52 51
     "Rate": "Tariffa",
@@ -224,5 +223,11 @@
224 223
     "Action Denied": "Azione negata",
225 224
     "The rate must be between 0 and 100.": "La tariffa deve essere compresa tra 0 e 100.",
226 225
     "The rate must be greater than 0.": "La tariffa deve essere maggiore di 0.",
227
-    "Parent Department": "Dipartimento dei genitori"
228
-}
226
+    "Parent Department": "Dipartimento dei genitori",
227
+    "Resources": "Risorse",
228
+    "Company": "Azienda",
229
+    "Website": "Sito Web",
230
+    "Finance": "Finanza",
231
+    "Personalization": "Personalizzazione",
232
+    "Management": "Direzione"
233
+}

+ 8
- 3
resources/data/lang/nl.json ファイルの表示

@@ -18,7 +18,6 @@
18 18
     "pink": "roze",
19 19
     "rose": "roos",
20 20
     "Layout": "Indeling",
21
-    "HR": "HR",
22 21
     "violet": "paars",
23 22
     "Categories": "Categorieën",
24 23
     "Account": "Account",
@@ -224,5 +223,11 @@
224 223
     "Action Denied": "Actie afgewezen",
225 224
     "Parent Department": "Ouderafdeling",
226 225
     "The rate must be greater than 0.": "De snelheid moet groter zijn dan 0.",
227
-    "The rate must be between 0 and 100.": "Het tarief moet tussen 0 en 100 liggen."
228
-}
226
+    "The rate must be between 0 and 100.": "Het tarief moet tussen 0 en 100 liggen.",
227
+    "Personalization": "Personalisatie",
228
+    "Website": "Website",
229
+    "Resources": "Hulpbronnen",
230
+    "Finance": "Financiën",
231
+    "Company": "Bedrijf",
232
+    "Management": "Management"
233
+}

+ 8
- 3
resources/data/lang/pt.json ファイルの表示

@@ -35,7 +35,6 @@
35 35
     "Account": "Conta",
36 36
     "Items": "Itens",
37 37
     "Street Address": "Endereço da rua",
38
-    "HR": "RH",
39 38
     "City \/ Town": "Cidade\/ Cidade",
40 39
     "Country": "País",
41 40
     "Quantity": "Quantidade",
@@ -224,5 +223,11 @@
224 223
     "Live Currency": "Moeda ao vivo",
225 224
     "Parent Department": "Departamento de pais",
226 225
     "The rate must be between 0 and 100.": "A taxa deve estar entre 0 e 100.",
227
-    "The rate must be greater than 0.": "A taxa deve ser maior que 0."
228
-}
226
+    "The rate must be greater than 0.": "A taxa deve ser maior que 0.",
227
+    "Website": "Site",
228
+    "Personalization": "Personalização",
229
+    "Management": "Gestão",
230
+    "Resources": "Recursos",
231
+    "Finance": "Finanças",
232
+    "Company": "Companhia"
233
+}

+ 8
- 3
resources/data/lang/tr.json ファイルの表示

@@ -26,7 +26,6 @@
26 26
     "Small": "Küçük",
27 27
     "Rate": "Oranı",
28 28
     "Large": "Büyük",
29
-    "HR": "İK",
30 29
     "Layout": "Düzen",
31 30
     "Invoice": "Fatura",
32 31
     "Terms": "Şartlar",
@@ -224,5 +223,11 @@
224 223
     "The rate must be greater than 0.": "Oranın 0'dan büyük olması gerekir.",
225 224
     "Live Rate": "Canlı Oran",
226 225
     "The rate must be between 0 and 100.": "Oranın 0 ile 100 arasında olması gerekir.",
227
-    "Action Denied": "Eylem Reddedildi"
228
-}
226
+    "Action Denied": "Eylem Reddedildi",
227
+    "Website": "İnternet sitesi",
228
+    "Management": "Yönetim",
229
+    "Resources": "Kaynaklar",
230
+    "Personalization": "Kişiselleştirme",
231
+    "Company": "ŞİRKETİ",
232
+    "Finance": "Finans"
233
+}

+ 8
- 3
resources/data/lang/zh.json ファイルの表示

@@ -46,7 +46,6 @@
46 46
     "Quantity": "数量",
47 47
     "Large": "大",
48 48
     "Item Name": "物品名",
49
-    "HR": "HR",
50 49
     "Content": "内容",
51 50
     "Phone Number": "电话号码",
52 51
     "State \/ Province": "州\/省",
@@ -224,5 +223,11 @@
224 223
     "Action Denied": "操作被拒绝",
225 224
     "Parent Department": "家长部门",
226 225
     "The rate must be between 0 and 100.": "速率必须介于 0 和 100 之间。",
227
-    "The rate must be greater than 0.": "速率必须大于 0。"
228
-}
226
+    "The rate must be greater than 0.": "速率必须大于 0。",
227
+    "Finance": "财务",
228
+    "Website": "网站",
229
+    "Personalization": "个性化",
230
+    "Management": "管理",
231
+    "Company": "公司",
232
+    "Resources": "资源"
233
+}

+ 65
- 0
resources/js/top-navigation.js ファイルの表示

@@ -0,0 +1,65 @@
1
+document.addEventListener('DOMContentLoaded', () => {
2
+    for (const dropdown of document.querySelectorAll('.fi-topbar-dropdown, .fi-topbar-dropdown .fi-dropdown-trigger')) {
3
+        const observer = new MutationObserver((mutations) => {
4
+            for (const { attributeName } of mutations) {
5
+                if (attributeName === 'aria-expanded') {
6
+                    updateBorder(dropdown);
7
+                }
8
+            }
9
+        });
10
+
11
+        observer.observe(dropdown, { attributes: true });
12
+    }
13
+
14
+    document.querySelectorAll('.fi-topbar-item > a').forEach(item => {
15
+        item.addEventListener('mouseenter', () => updateBorderOnHover(true, item));
16
+        item.addEventListener('mouseleave', () => updateBorderOnHover(false, item));
17
+    });
18
+
19
+    insertBgDiv();
20
+
21
+    handleTopbarAndSidebarHover();
22
+});
23
+
24
+const updateBorder = (dropdown) => {
25
+    const activeItem = document.querySelector('.fi-topbar-item-active > *');
26
+    const hoveredItem = dropdown.querySelector('.fi-topbar-item > *');
27
+
28
+    if (activeItem && hoveredItem !== activeItem) {
29
+        activeItem.style.borderBottomColor = dropdown.getAttribute('aria-expanded') === 'true' ? 'transparent' : '';
30
+    }
31
+};
32
+
33
+const updateBorderOnHover = (isHovered, hoveredItem) => {
34
+    const activeItem = document.querySelector('.fi-topbar-item-active > *');
35
+    if (activeItem && hoveredItem !== activeItem) {
36
+        activeItem.style.borderBottomColor = isHovered ? 'transparent' : '';
37
+    }
38
+};
39
+
40
+const insertBgDiv = () => {
41
+    document.querySelectorAll('a.fi-topbar-dropdown-list-item').forEach(anchor => {
42
+        anchor.insertAdjacentHTML('beforeend', '<div class="bg"></div>');
43
+    });
44
+};
45
+
46
+const handleTopbarAndSidebarHover = () => {
47
+    const topbarNav = document.querySelector('.fi-topbar > nav');
48
+    const sidebarHeader = document.querySelector('.fi-sidebar-header');
49
+
50
+    const addHoveredClass = () => {
51
+        topbarNav.classList.add('topbar-hovered');
52
+        sidebarHeader.classList.add('topbar-hovered');
53
+    };
54
+
55
+    const removeHoveredClass = () => {
56
+        topbarNav.classList.remove('topbar-hovered');
57
+        sidebarHeader.classList.remove('topbar-hovered');
58
+    };
59
+
60
+    topbarNav.addEventListener('mouseenter', addHoveredClass);
61
+    sidebarHeader.addEventListener('mouseenter', addHoveredClass);
62
+    topbarNav.addEventListener('mouseleave', removeHoveredClass);
63
+    sidebarHeader.addEventListener('mouseleave', removeHoveredClass);
64
+};
65
+

+ 0
- 5
resources/svg/currency-convert.svg ファイルの表示

@@ -1,5 +0,0 @@
1
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
2
-    <path d="M10.25 7a.75.75 0 0 1 .75-.75h3.69l-.72-.72a.75.75 0 0 1 1.06-1.06l2 2a.75.75 0 0 1 0 1.06l-2 2a.75.75 0 1 1-1.06-1.06l.72-.72h-3.69a.75.75 0 0 1-.75-.75Z" fill="currentColor"/>
3
-    <path d="M7.25 5.25a.75.75 0 0 0-1.5 0v.75h-.375a2.375 2.375 0 0 0 0 4.75h1.28a.875.875 0 1 1 0 1.75h-2.905a.75.75 0 0 0 0 1.5h1v.75a.75.75 0 0 0 1.5 0v-.75h.404a2.375 2.375 0 0 0 0-4.75h-1.279a.875.875 0 0 1 0-1.75h2.904a.75.75 0 1 0 0-1.5h-1.029v-.75Z" fill="currentColor"/>
4
-    <path d="M12.81 13.75h3.69a.75.75 0 0 0 0-1.5h-3.69l.72-.72a.75.75 0 1 0-1.06-1.06l-2 2a.75.75 0 0 0 0 1.06l2 2a.75.75 0 1 0 1.06-1.06l-.72-.72Z" fill="currentColor"/>
5
-</svg>

+ 214
- 0
resources/views/vendor/filament-panels/components/topbar/index.blade.php ファイルの表示

@@ -0,0 +1,214 @@
1
+@props([
2
+    'navigation',
3
+])
4
+
5
+<div
6
+    {{
7
+        $attributes->class([
8
+            'fi-topbar sticky top-0 z-20 overflow-x-clip',
9
+            'fi-topbar-with-navigation' => filament()->hasTopNavigation(),
10
+        ])
11
+    }}
12
+>
13
+    <nav
14
+        class="flex h-16 items-center gap-x-4 bg-white px-4 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10 md:px-6 lg:px-8"
15
+    >
16
+        {{ \Filament\Support\Facades\FilamentView::renderHook('panels::topbar.start') }}
17
+
18
+        <x-filament::icon-button
19
+            color="gray"
20
+            icon="heroicon-o-bars-3"
21
+            icon-alias="panels::topbar.open-sidebar-button"
22
+            icon-size="lg"
23
+            :label="__('filament-panels::layout.actions.sidebar.expand.label')"
24
+            x-cloak
25
+            x-data="{}"
26
+            x-on:click="$store.sidebar.open()"
27
+            x-show="! $store.sidebar.isOpen"
28
+            @class([
29
+                'lg:hidden' => (! filament()->isSidebarFullyCollapsibleOnDesktop()) || filament()->isSidebarCollapsibleOnDesktop(),
30
+            ])
31
+        />
32
+
33
+        <x-filament::icon-button
34
+            color="gray"
35
+            icon="heroicon-o-x-mark"
36
+            icon-alias="panels::topbar.close-sidebar-button"
37
+            icon-size="lg"
38
+            :label="__('filament-panels::layout.actions.sidebar.collapse.label')"
39
+            x-cloak
40
+            x-data="{}"
41
+            x-on:click="$store.sidebar.close()"
42
+            x-show="$store.sidebar.isOpen"
43
+            class="lg:hidden"
44
+        />
45
+
46
+        @if (filament()->hasTopNavigation())
47
+            <div class="me-6 hidden lg:flex">
48
+                @if ($homeUrl = filament()->getHomeUrl())
49
+                    <a {{ \Filament\Support\generate_href_html($homeUrl) }}>
50
+                        <x-filament-panels::logo />
51
+                    </a>
52
+                @else
53
+                    <x-filament-panels::logo />
54
+                @endif
55
+            </div>
56
+
57
+            @if (filament()->hasTenancy())
58
+                <x-filament-panels::tenant-menu class="hidden lg:block" />
59
+            @endif
60
+
61
+            @if (filament()->hasNavigation())
62
+                <ul class="me-4 hidden items-center gap-x-4 lg:flex">
63
+                    @foreach($navigation as $group)
64
+                        @if ($group->getLabel() === null)
65
+                            @foreach ($group->getItems() as $item)
66
+                                <x-filament-panels::topbar.item
67
+                                    :active="$item->isActive()"
68
+                                    :active-icon="$item->getActiveIcon()"
69
+                                    :badge="$item->getBadge()"
70
+                                    :badge-color="$item->getBadgeColor()"
71
+                                    :icon="$item->getIcon()"
72
+                                    :should-open-url-in-new-tab="$item->shouldOpenUrlInNewTab()"
73
+                                    :url="$item->getUrl()"
74
+                                >
75
+                                    {{ $item->getLabel() }}
76
+                                </x-filament-panels::topbar.item>
77
+                            @endforeach
78
+                        @endif
79
+                    @endforeach
80
+
81
+                    @foreach ($navigation as $group)
82
+                        @php
83
+                            $groupLabel = $group->getLabel();
84
+                            $groupItems = collect($group->getItems());
85
+                            $subgroups = $groupItems->groupBy(fn(\Filament\Navigation\NavigationItem $item) => $item->getParentItem())->filter(fn($subgroup, $key) => filled($key));
86
+                            $standaloneItems = $groupItems->reject(fn(\Filament\Navigation\NavigationItem $item) => filled($item->getParentItem()));
87
+                            $itemsCount = $groupItems->count();
88
+                        @endphp
89
+
90
+                        @if ($groupLabel)
91
+                            <x-filament::dropdown
92
+                                offset="0"
93
+                                width="max-w-fit"
94
+                                placement="bottom-start"
95
+                                teleport
96
+                                x-on:mouseenter="open"
97
+                                x-on:mouseleave="close"
98
+                                :attributes="
99
+                                    \Filament\Support\prepare_inherited_attributes($attributes)
100
+                                    ->class(['fi-topbar-dropdown'])
101
+                                "
102
+                            >
103
+                                <x-slot name="trigger">
104
+                                    <x-filament-panels::topbar.item
105
+                                        :active="$group->isActive()"
106
+                                        :icon="$group->getIcon()"
107
+                                    >
108
+                                        {{ $groupLabel }}
109
+                                    </x-filament-panels::topbar.item>
110
+                                </x-slot>
111
+
112
+                                <x-filament::dropdown.list>
113
+                                    @if($subgroups->isNotEmpty() || $standaloneItems->isNotEmpty())
114
+                                        <ul class="menu-groups">
115
+                                            @foreach($subgroups as $subgroupTitle => $subgroupItems)
116
+                                                <li class="menu-group cols-1">
117
+                                                    <div class="submenu-wrap">
118
+                                                        <div class="menu-label">{{ $subgroupTitle }}</div>
119
+                                                        <ul class="submenu cols-1">
120
+                                                            @foreach($subgroupItems as $item)
121
+                                                                <li class="menu-item cols-1">
122
+                                                                    <x-filament::dropdown.list.item
123
+                                                                        @class(['fi-topbar-dropdown-list-item' => $itemsCount > 1])
124
+                                                                        :badge="$item->getBadge()"
125
+                                                                        :badge-color="$item->getBadgeColor()"
126
+                                                                        :href="$item->getUrl()"
127
+                                                                        :icon="$item->isActive() ? ($item->getActiveIcon() ?? $item->getIcon()) : $item->getIcon()"
128
+                                                                        tag="a"
129
+                                                                        :target="$item->shouldOpenUrlInNewTab() ? '_blank' : null"
130
+                                                                    >
131
+                                                                        {{ $item->getLabel() }}
132
+                                                                    </x-filament::dropdown.list.item>
133
+                                                                </li>
134
+                                                            @endforeach
135
+                                                        </ul>
136
+                                                    </div>
137
+                                                </li>
138
+                                            @endforeach
139
+                                            @if($standaloneItems->isNotEmpty())
140
+                                                <li class="menu-group cols-1">
141
+                                                    <div class="submenu-wrap">
142
+                                                        <div class="menu-label-invisible-spacer"></div>
143
+                                                        <ul class="submenu cols-1">
144
+                                                            @foreach($itemsWithoutSubgroup as $item)
145
+                                                                <li class="menu-item cols-1">
146
+                                                                    <x-filament::dropdown.list.item
147
+                                                                        @class([
148
+                                                                            'fi-topbar-dropdown-list-item' => $itemsCount > 1,
149
+                                                                        ])
150
+                                                                        :badge="$item->getBadge()"
151
+                                                                        :badge-color="$item->getBadgeColor()"
152
+                                                                        :href="$item->getUrl()"
153
+                                                                        :icon="$item->isActive() ? ($item->getActiveIcon() ?? $item->getIcon()) : $item->getIcon()"
154
+                                                                        tag="a"
155
+                                                                        :target="$item->shouldOpenUrlInNewTab() ? '_blank' : null"
156
+                                                                    >
157
+                                                                        {{ $item->getLabel() }}
158
+                                                                    </x-filament::dropdown.list.item>
159
+                                                                </li>
160
+                                                            @endforeach
161
+                                                        </ul>
162
+                                                    </div>
163
+                                                </li>
164
+                                            @endif
165
+                                        </ul>
166
+                                    @else
167
+                                        @foreach ($group->getItems() as $item)
168
+                                            <x-filament::dropdown.list.item
169
+                                                @class([
170
+                                                    'fi-topbar-dropdown-list-item' => $itemsCount > 1,
171
+                                                ])
172
+                                                :badge="$item->getBadge()"
173
+                                                :badge-color="$item->getBadgeColor()"
174
+                                                :href="$item->getUrl()"
175
+                                                :icon="$item->isActive() ? ($item->getActiveIcon() ?? $item->getIcon()) : $item->getIcon()"
176
+                                                tag="a"
177
+                                                :target="$item->shouldOpenUrlInNewTab() ? '_blank' : null"
178
+                                            >
179
+                                                {{ $item->getLabel() }}
180
+                                            </x-filament::dropdown.list.item>
181
+                                        @endforeach
182
+                                    @endif
183
+                                </x-filament::dropdown.list>
184
+                            </x-filament::dropdown>
185
+                        @endif
186
+                    @endforeach
187
+                </ul>
188
+            @endif
189
+        @endif
190
+
191
+        <div
192
+            x-persist="topbar.end"
193
+            class="ms-auto flex items-center gap-x-4"
194
+        >
195
+            {{ \Filament\Support\Facades\FilamentView::renderHook('panels::global-search.before') }}
196
+
197
+            @if (filament()->isGlobalSearchEnabled())
198
+                @livewire(Filament\Livewire\GlobalSearch::class, ['lazy' => true])
199
+            @endif
200
+
201
+            {{ \Filament\Support\Facades\FilamentView::renderHook('panels::global-search.after') }}
202
+
203
+            @if (filament()->auth()->check())
204
+                @if (filament()->hasDatabaseNotifications())
205
+                    @livewire(Filament\Livewire\DatabaseNotifications::class, ['lazy' => true])
206
+                @endif
207
+
208
+                <x-filament-panels::user-menu />
209
+            @endif
210
+        </div>
211
+
212
+        {{ \Filament\Support\Facades\FilamentView::renderHook('panels::topbar.end') }}
213
+    </nav>
214
+</div>

読み込み中…
キャンセル
保存