diff --git a/app/Associate.php b/app/Associate.php index 27427a9..f08779a 100644 --- a/app/Associate.php +++ b/app/Associate.php @@ -56,13 +56,29 @@ class Associate extends Authenticatable // /** - * Get the associate's category + * Get the associate's category. */ public function category() { return $this->belongsTo(AssociateCategory::class, 'associate_category_id'); } + /** + * Get the associate's nature. + */ + public function nature() + { + return $this->belongsTo(AssociateNature::class, 'associate_nature_id'); + } + + /** + * Get the associate's type. + */ + public function type() + { + return $this->belongsTo(AssociateType::class, 'associate_type_id'); + } + // // // ===================================================================== diff --git a/app/AssociateCategory.php b/app/AssociateCategory.php index 17cac60..20e6f78 100644 --- a/app/AssociateCategory.php +++ b/app/AssociateCategory.php @@ -10,21 +10,9 @@ class AssociateCategory extends Model use Sushi; protected $rows = [ - [ - 'key' => 'individual', - 'name' => 'Associado Indivíduo', - ], - [ - 'key' => 'supporting-institution', - 'name' => 'Associada Instituição Apoiadora', - ], - [ - 'key' => 'acting-institution', - 'name' => 'Associada Instituição Atuante', - ], - [ - 'key' => 'company', - 'name' => 'Associada Empresa Apoiadora', - ], + ['key' => 'individual'], + ['key' => 'supporting-institution'], + ['key' => 'acting-institution'], + ['key' => 'company'], ]; } diff --git a/app/Http/Livewire/Collaborators/Associates/Show.php b/app/Http/Livewire/Collaborators/Associates/Show.php new file mode 100644 index 0000000..6c545d6 --- /dev/null +++ b/app/Http/Livewire/Collaborators/Associates/Show.php @@ -0,0 +1,27 @@ +associate = $associate; + } + + public function render() + { + return view('livewire.collaborators.associates.show'); + } +} diff --git a/resources/lang/pt-BR.json b/resources/lang/pt-BR.json new file mode 100644 index 0000000..7131c2b --- /dev/null +++ b/resources/lang/pt-BR.json @@ -0,0 +1,5 @@ +{ + "Search:": "Buscar:", + "Show": "Mostrar", + "entries": "registros" +} diff --git a/resources/lang/pt-BR/associate_natures.php b/resources/lang/pt-BR/associate_natures.php new file mode 100644 index 0000000..8314f11 --- /dev/null +++ b/resources/lang/pt-BR/associate_natures.php @@ -0,0 +1,7 @@ + 'Pessoa Física', + 'informal' => 'Coletivo Informal', + 'company' => 'Pessoa Jurídica', +]; diff --git a/resources/lang/pt-BR/associate_types.php b/resources/lang/pt-BR/associate_types.php new file mode 100644 index 0000000..7129d73 --- /dev/null +++ b/resources/lang/pt-BR/associate_types.php @@ -0,0 +1,8 @@ + 'Indivíduo', + 'collective' => 'Coletivo Informal', + 'association' => 'Associação Formal', + 'company' => 'Empresa Privada', +]; diff --git a/resources/lang/pt-BR/associates.php b/resources/lang/pt-BR/associates.php index e6af50d..a461557 100644 --- a/resources/lang/pt-BR/associates.php +++ b/resources/lang/pt-BR/associates.php @@ -4,6 +4,8 @@ return [ 'model' => 'Associados', 'attributes' => [ 'category' => 'Categoria', + 'nature' => 'Natureza', + 'type' => 'Tipo', 'name' => 'Nome completo', 'birthday' => 'Data de nascimento', 'document' => [ diff --git a/resources/views/components/input/select.blade.php b/resources/views/components/input/select.blade.php index b8fa48b..b4f0180 100644 --- a/resources/views/components/input/select.blade.php +++ b/resources/views/components/input/select.blade.php @@ -2,11 +2,17 @@ 'state' => null, ]) +@php + $class = 'block w-full px-3 py-2 border border-gray-300 rounded-md placeholder-gray-400 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 transition duration-150 ease-in-out sm:text-sm sm:leading-5'; + + if ($state === false) { + $class .= ' border-red-300 text-red-900 placeholder-red-300 focus:border-red-300 focus:shadow-outline-red'; + } +@endphp +
+ {{ $associate->email }} +
+