diff --git a/app/View/Components/Table/Td.php b/app/View/Components/Table/Td.php index 4ff483b7b..ccf1fef7b 100644 --- a/app/View/Components/Table/Td.php +++ b/app/View/Components/Table/Td.php @@ -11,6 +11,7 @@ class Td extends Component public $override; public $kind; + public $hiddenMobile; /** * Create a new component instance. @@ -18,11 +19,12 @@ class Td extends Component * @return void */ public function __construct( - string $class = '', string $override = '', string $kind = '' + string $class = '', string $override = '', string $kind = '', bool $hiddenMobile = false, ) { $this->override = $this->getOverride($override); $this->kind = $kind; + $this->hiddenMobile = $hiddenMobile; $this->class = $this->getClass($class); } @@ -47,6 +49,10 @@ class Td extends Component return $class; } + if ($this->hiddenMobile) { + $class = $class . ' ' . 'hidden sm:table-cell'; + } + $default = 'py-4 whitespace-nowrap text-sm font-normal text-black truncate'; switch ($this->kind) { diff --git a/app/View/Components/Table/Th.php b/app/View/Components/Table/Th.php index a46be84dd..25ffee4a1 100644 --- a/app/View/Components/Table/Th.php +++ b/app/View/Components/Table/Th.php @@ -12,17 +12,20 @@ class Th extends Component public $kind; + public $hiddenMobile; + /** * Create a new component instance. * * @return void */ public function __construct( - string $class = '', string $override = '', string $kind = '' + string $class = '', string $override = '', string $kind = '', bool $hiddenMobile = false, ) { $this->override = $this->getOverride($override); $this->kind = $kind; + $this->hiddenMobile = $hiddenMobile; $this->class = $this->getClass($class); } @@ -47,6 +50,10 @@ class Th extends Component return $class; } + if ($this->hiddenMobile) { + $class = $class . ' ' . 'hidden sm:table-cell'; + } + $default = 'py-3 text-xs font-medium text-black tracking-wider'; switch ($this->kind) { diff --git a/app/View/Components/Table/Tr.php b/app/View/Components/Table/Tr.php index 29fc3ebf0..a781b208f 100644 --- a/app/View/Components/Table/Tr.php +++ b/app/View/Components/Table/Tr.php @@ -45,6 +45,10 @@ class Tr extends Component return 'relative flex items-center px-1 group border-b hover:bg-gray-100'; } + else if (array_key_exists('App\View\Components\Table\Thead', $values)) { + return 'flex items-center px-1'; + } + return ''; } } diff --git a/resources/views/auth/users/index.blade.php b/resources/views/auth/users/index.blade.php index b7d071a79..d00a4672f 100644 --- a/resources/views/auth/users/index.blade.php +++ b/resources/views/auth/users/index.blade.php @@ -25,7 +25,7 @@ - + diff --git a/resources/views/banking/accounts/index.blade.php b/resources/views/banking/accounts/index.blade.php index 3e53d8eeb..65ba75d90 100644 --- a/resources/views/banking/accounts/index.blade.php +++ b/resources/views/banking/accounts/index.blade.php @@ -26,7 +26,7 @@ - + diff --git a/resources/views/banking/accounts/show.blade.php b/resources/views/banking/accounts/show.blade.php index 6bc6858de..4c2954c2d 100644 --- a/resources/views/banking/accounts/show.blade.php +++ b/resources/views/banking/accounts/show.blade.php @@ -234,7 +234,7 @@ @if ($transactions->count()) - + @@ -334,7 +334,7 @@ @if ($transfers->count()) - +