From 3d592780821ee2f268f8fcdcdcb74fa2d1ed9167 Mon Sep 17 00:00:00 2001 From: ygbanzato Date: Tue, 31 Oct 2023 12:44:14 +0000 Subject: [PATCH] Updating pages, with the structure of multiple languages. --- resources/lang/en/messages.php | 116 +++++++++++++++++- resources/lang/pt/messages.php | 109 +++++++++++++++- .../Admin/CrudUsers/listCompany.blade.php | 8 +- .../views/Admin/CrudUsers/listUsers.blade.php | 26 ++-- .../DataManagement/manageassets.blade.php | 25 ++-- resources/views/Admin/profile.blade.php | 51 ++++---- .../views/Templates/templateAdmin.blade.php | 83 ++++++++++--- resources/views/email/pendingUsers.blade.php | 19 ++- .../projectsClients/createProject.blade.php | 70 ++++++----- 9 files changed, 398 insertions(+), 109 deletions(-) diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php index 9f1f0cef..187668f5 100644 --- a/resources/lang/en/messages.php +++ b/resources/lang/en/messages.php @@ -2,9 +2,12 @@ return [ - + // Tudo relacionado ao dashboard, tanto a pagina como o navbarMenu 'dashboard' => [ + //navbarMenu + 'dashboard' => 'Dashboard', + 'planning' => [ 'description' => 'In planning', 'text' => 'In planning for 2023' @@ -21,7 +24,116 @@ 'description' => 'Finished.', 'text' => 'Last projects 2023.' ], - + ], + + //alterar na view Portfolio + 'portfolio' => [ + 'top_view_part' => [ + 'management_assets' => 'Management assets', + 'portfolio' => 'portfolio', + 'managing_assets' => 'Managing Assets', + ], + 'change_buttons' => [ + 'create_assets' => 'Create assets', + 'asset_table' => 'Asset table', + ], + 'asset_table' => [ + ''=> '', + ], + 'users_table' => [ + 'id' => 'ID', + 'name' => 'Name', + 'email' => 'Email', + 'user_type' => 'User type', + 'actions' => [ + 'actions' => 'Actions', + 'details' => 'Details', + 'edit'=> 'Edit', + 'delete' => 'Delete' + ], + ], + ], + + 'users_listUsers' => [ + //Navbar + 'users' => 'Users', + 'companies' => 'Companies', + 'create_users' => 'Create users', + + 'top_view_part' => [ + 'companies' => 'Companies', + 'administration' => 'Administration', + 'users_table' => 'Users table', + 'companies_table' => 'Companies Table', + ], + ], + + // View : Create Users + 'pendingUsers' => [ + 'create_users' => 'Create Users', + 'administration' => 'Administration', + 'submit_form' => 'Submit Form', + 'pending_users' => 'Pending Users', + 'submit' => 'Submit', + 'table_pending_user' => [ + 'name' => 'Name', + 'email' => 'Email', + 'verify' => 'Verify' + ], + ], + + // View : createProject + 'createProject' => [ + //NavbarMenu + "create_project"=> "Create a project", + + 'project_work_details' => 'Project Work Details', + 'project_identification' => 'Project identification', + 'ispt_project_number' => 'ISPT Project Number', + 'ispt_project_manager' => 'ISPT Project Manager', + 'compan_project_manager' => 'Company Project Manager', + //Selecionar uma empresa. + 'select_company' => [ + 'contracting_company' => 'Contracting Company', + 'select_company' => 'Select a contracting Company', + ], + //Selecionar ou criar uma instalacao + 'select_plant' => [ + 'plant' => 'Select Plant', + 'create_new_plant' => 'Create a new plant', + 'new_plant' => 'New plant', + 'plant_address' => 'Plant address', + 'select_plant' => 'Select Plant', + ], + 'company_project_number' => 'Company Project Number', + 'project_start_date' => 'Project Start Date', + ], + + + 'profile' => [ + 'show_profile' => [ + 'profile' => 'Profile', + 'full_name' => 'Full Name', + 'nif' => 'Nif', + 'email_address' => 'Email address', + 'user_type' => 'User type', + 'mobile_phone' => 'Mobile phone', + 'account_creation_date' => 'account_creation_date' + ], + 'edit_profile' => [ + 'edit_profile'=> 'Edit profile', + 'update_your_logo' => 'Update your logo', + 'image' => 'Image', + 'full_name'=> 'Full name', + 'nif' => 'Nif', + 'email_address' => 'Email address', + 'mobile_phone' => 'mobile_phone', + ], + ], + + //Botoes gerais ISPT4.0 + 'buttons' => [ + 'save' => 'save', ], 'welcome' => 'Welcome to our application!', diff --git a/resources/lang/pt/messages.php b/resources/lang/pt/messages.php index c3be677a..f1b642fc 100644 --- a/resources/lang/pt/messages.php +++ b/resources/lang/pt/messages.php @@ -4,6 +4,9 @@ return [ 'dashboard' => [ + //navbarMenu + 'dashboard' => 'Dashboard', + 'planning' => [ 'description' => 'Em planeamento', 'text' => 'Em planeamento de 2023' @@ -23,7 +26,111 @@ ], + 'portfolio' => [ + 'top_view_part' => [ + 'management_assets' => 'Gestão de ativos', + 'portfolio' => 'Portefólio', + 'managing_assets' => 'Gerir ativos', + ], + 'change_buttons' => [ + 'create_assets' => 'Criar ativos', + 'asset_table' => 'Tabela de ativos', + ], + 'users_table' => [ + 'id' => 'ID', + 'name' => 'Nome', + 'email' => 'Email', + 'user_type' => 'Tipo de Utilizador', + 'actions' => [ + 'actions' => 'Ações', + 'details' => 'Detalhes', + 'edit' => 'Editar', + 'delete' => 'Excluir' + ], + + ], + ], + + 'users_listUsers' => [ + //Navbar + 'users' => 'Utilizadores', + 'companies' => 'Clientes', + 'create_users' => 'Criar Utilizadores', + + 'top_view_part' => [ + 'companies' => 'Empresas', + 'administration' => 'Administração', + 'users_table' => 'Tabela Utilizadores', + 'companies_table' => 'Tabela Empresas', + ], + ], + + // View : Create Users + 'pendingUsers' => [ + 'create_users' => 'Criar Utilizadores', + 'administration' => 'Administração', + 'submit_form' => 'Enviar Formulário', + 'pending_users' => 'Utilizadores Pendentes', + 'submit' => 'Enviar', + 'table_pending_user' => [ + 'name' => 'Nome', + 'email' => 'Email', + 'verify' => 'Verificar' + ], + ], + + // View : createProject + 'createProject' => [ + //NavbarMenu + "create_project" => "Criar obra", + + 'project_work_details' => 'Detalhes Técnicos do Projeto', + 'project_identification' => 'Identificação do projecto', + 'ispt_project_number' => 'Número do Projeto ISPT', + 'ispt_project_manager' => 'Gestor de Projeto ISPT', + 'compan_project_manager' => 'Gestor de Projeto da Empresa', + //Selecionar uma empresa. + 'select_company' => [ + 'contracting_company' => 'Empresa Contratante', + 'select_company' => 'Selecionar uma Empresa', + ], + //Selecionar ou criar uma instalacao + 'select_plant' => [ + 'plant' => 'Instalação', + 'create_new_plant' => 'Criar uma nova Instalacao', + 'new_plant' => 'Nova Instalação', + 'plant_address' => 'Morada Instalação', + 'select_plant' => 'Selecione uma Instalação', + ], + 'company_project_number' => 'Número do Projeto da Empresa', + 'project_start_date' => 'Data de Início do Projeto', + ], + + //view: usersProfiles + 'profile' => [ + 'show_profile' => [ + 'profile' => 'Perfil', + 'full_name' => 'Nome e Apelido', + 'nif' => 'Nif', + 'email_address' => 'Email', + 'user_type' => 'Tipo de utilizador', + 'mobile_phone' => 'Telemóvel', + 'account_creation_date' => 'Conta Criada em' + ], + 'edit_profile' => [ + 'update_your_logo' => 'Actualizar o seu logótipo', + 'image' => 'Imagem', + 'full_name'=> 'Nome e Apelido', + 'nif' => 'Nif', + 'email_address' => 'Email', + 'mobile_phone' => 'Telemóvel', + ], + ], + + 'buttons' => [ + 'save' => 'Guardar', + ], 'welcome' => 'Bem-vindo à nossa aplicação!', // outras traduções -]; \ No newline at end of file +]; diff --git a/resources/views/Admin/CrudUsers/listCompany.blade.php b/resources/views/Admin/CrudUsers/listCompany.blade.php index 7fff767a..51a3ce1e 100755 --- a/resources/views/Admin/CrudUsers/listCompany.blade.php +++ b/resources/views/Admin/CrudUsers/listCompany.blade.php @@ -11,12 +11,12 @@
-

Empresas

+

{{__('messages.users_listUsers.top_view_part.companies')}}

@@ -27,7 +27,7 @@
-

Tabela Empresas

+

{{__('messages.users_listUsers.top_view_part.companies_table')}}

{{-- ./card-header --}}
diff --git a/resources/views/Admin/CrudUsers/listUsers.blade.php b/resources/views/Admin/CrudUsers/listUsers.blade.php index c233fe89..d343169e 100755 --- a/resources/views/Admin/CrudUsers/listUsers.blade.php +++ b/resources/views/Admin/CrudUsers/listUsers.blade.php @@ -11,12 +11,12 @@
-

Empresas

+

{{__('messages.users_listUsers.top_view_part.companies')}}

@@ -27,7 +27,7 @@
-

Tabela Utilizadores

+

{{__('messages.users_listUsers.top_view_part.users_table')}}

@@ -35,12 +35,12 @@ - - - - - - Empresas + + + + + + @foreach ($users as $user) @@ -59,12 +59,12 @@ class="actions-btn btn btn-light circle "> - Detalhes + {{__('messages.portfolio.users_table.actions.details')}} - Editar + {{__('messages.portfolio.users_table.actions.edit')}} @method('DELETE') diff --git a/resources/views/Admin/DataManagement/manageassets.blade.php b/resources/views/Admin/DataManagement/manageassets.blade.php index aff9ae2e..f6157b6b 100755 --- a/resources/views/Admin/DataManagement/manageassets.blade.php +++ b/resources/views/Admin/DataManagement/manageassets.blade.php @@ -6,12 +6,14 @@
-

Gestão de ativos

+

{{ __('messages.portfolio.top_view_part.management_assets') }}

+ {{-- {{__('messages.dashboard.text')}} --}} +
@@ -28,13 +30,10 @@
@@ -43,10 +42,10 @@
-

Tabela de Ativos

+

{{ __('messages.portfolio.change_buttons.asset_table') }}

-
+ {{--
IDNomeEmailTipo de UtilizadorAções
{{__('messages.portfolio.users_table.id')}}{{__('messages.portfolio.users_table.name')}}{{__('messages.portfolio.users_table.email')}}{{__('messages.portfolio.users_table.user_type')}}{{__('messages.portfolio.users_table.actions.actions')}}
@@ -73,7 +72,7 @@
-
+
--}}
@@ -89,7 +88,7 @@ @endsection @section('scriptsTemplateAdmin') - + --}} {{-- + + @@ -210,16 +218,33 @@ class="fas fa-bars"> -
- @csrf - -
- - @@ -308,7 +334,7 @@ class="d-block">{{ Auth::user()->userType?->type_user }} @@ -446,4 +472,27 @@ class="d-block">{{ Auth::user()->userType?->type_user }} + +{{-- Script para as bandeiras --}} + + + diff --git a/resources/views/email/pendingUsers.blade.php b/resources/views/email/pendingUsers.blade.php index 7cca6878..ecc0962c 100755 --- a/resources/views/email/pendingUsers.blade.php +++ b/resources/views/email/pendingUsers.blade.php @@ -11,13 +11,12 @@
-

Criar Utilizadores

+

{{__('messages.pendingUsers.create_users')}}

@@ -30,7 +29,7 @@
-

Enviar Formulário:

+

{{__('messages.pendingUsers.submit_form')}}

@@ -55,7 +54,7 @@
- +
@@ -66,7 +65,7 @@
-

Utilizadores Pendentes :

+

{{__('messages.pendingUsers.pending_users')}}:

@@ -74,9 +73,9 @@ id="tableReceiveAllPendingUsers"> - Nome - Email - Verificar + {{__('messages.pendingUsers.table_pending_user.name')}} + {{__('messages.pendingUsers.table_pending_user.email')}} + {{__('messages.pendingUsers.table_pending_user.verify')}} diff --git a/resources/views/projectsClients/createProject.blade.php b/resources/views/projectsClients/createProject.blade.php index 8c384eb8..de62af3d 100755 --- a/resources/views/projectsClients/createProject.blade.php +++ b/resources/views/projectsClients/createProject.blade.php @@ -30,7 +30,7 @@
-

Detalhes da Obra

+

{{ __('messages.createProject.project_work_details') }}

@@ -41,34 +41,39 @@
- + + placeholder="{{ __('messages.createProject.project_identification') }}…" required>
- + + placeholder="{{ __('messages.createProject.ispt_project_number') }}…" required>
- + + placeholder="{{ __('messages.createProject.ispt_project_manager') }}…" required>
- + + placeholder="{{ __('messages.createProject.compan_project_manager') }}…" required>
- + @@ -88,35 +94,37 @@
- + + name="new_company_name" placeholder="{{ __('messages.createProject.select_plant.new_plant') }}…">
- + + placeholder="{{ __('messages.createProject.select_plant.plant_address') }}…">
-
+ {{--
-
+
--}}
- + + placeholder="{{ __('messages.createProject.company_project_number') }}…" required>
- +
{{--
@@ -134,7 +142,8 @@ class="form-control float-right" required> @@ -174,13 +183,19 @@ class="form-control float-right" required> var select = $('#installationSelect'); select.empty(); - // Adicione as opções fixas aqui - select.append(''); - select.append( - ''); + var translations = { + selectInstallation: @json(__('messages.createProject.select_plant.select_plant')), + createNewInstallation: @json(__('messages.createProject.select_plant.new_plant')) + }; - // Agora você pode adicionar suas opções dinâmicas. + var select = $('#installationSelect'); + select.empty(); + select.append(''); + select.append(''); + $.each(data, function(index, installation) { select.append('