-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from TreinaDev/feature/adiciona-user-role-a-ta…
…refa Feature/adiciona user role a tarefa
- Loading branch information
Showing
29 changed files
with
269 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,43 @@ | ||
<%= render 'shared/project_header', project: @task.project %> | ||
|
||
<h1><%= Task.model_name.human %>: <%= @task.title %></h1> | ||
<dl> | ||
<dt><%= Task.human_attribute_name :description %></dt> | ||
<dd><%= @task.description %></dd> | ||
|
||
<dt><%= Task.human_attribute_name :author %></dt> | ||
<dd><%= @task.author.email %></dd> | ||
|
||
<dt><%= Task.human_attribute_name :user_role %></dt> | ||
<dd><%= @task.user_role.user.email %></dd> | ||
<dt><%= Task.human_attribute_name :status %></dt> | ||
<dd><%= I18n.t(@task.status) %></dd> | ||
|
||
<dt><%= Task.human_attribute_name :assigned %></dt> | ||
<% if @task.assigned %> | ||
<dd><%= @task.assigned.email %></dd> | ||
<% else %> | ||
<dd><%= I18n.t('tasks.no_assigned') %></dd> | ||
<% end %> | ||
|
||
<dt><%= Task.human_attribute_name :due_date %></dt> | ||
<% if @task.due_date %> | ||
<dd><%= I18n.l @task.due_date %></dd> | ||
<% else %> | ||
<dd><%= I18n.t('tasks.no_due_date') %></dd> | ||
<% end %> | ||
</dl> | ||
|
||
<br> | ||
<div class="d-flex mb-3"> | ||
<%= button_to I18n.t('tasks.start_task'), | ||
start_task_path(@task), | ||
start_project_task_path(@project, @task), method: :patch, | ||
class: 'btn btn-primary me-2' if @task.uninitialized? %> | ||
<%= button_to I18n.t('tasks.finish_task'), | ||
finish_task_path(@task), | ||
finish_project_task_path(@task), method: :patch, | ||
class: 'btn btn-primary me-2' if @task.in_progress? %> | ||
<%= button_to I18n.t('tasks.cancel_task'), | ||
cancel_task_path(@task), | ||
cancel_project_task_path(@project, @task), method: :patch, | ||
data: { turbo_confirm: t(:task_cancel_confirmation) }, | ||
class: 'btn btn-danger me-2' if @task.uninitialized? || @task.in_progress?%> | ||
class: 'btn btn-danger me-2' if @task.uninitialized? || @task.in_progress? %> | ||
<%= link_to I18n.t('tasks.edit_task'), | ||
edit_task_path(@task), | ||
edit_project_task_path(@project, @task), | ||
class: 'btn btn-secondary' unless @task.finished? || @task.cancelled? %> | ||
</div> | ||
|
||
<div> | ||
<%= link_to I18n.t('.back'), | ||
project_tasks_path(@task.project), | ||
class: 'btn btn-secondary' %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
pt-BR: | ||
uninitialized: Não iniciada | ||
in_progress: Em andamento | ||
task_empty_state: Sem tarefas registradas | ||
finished: Finalizada | ||
expired: Expirada | ||
cancelled: Cancelada | ||
task_cancel_confirmation: Cancelar tarefa? | ||
activerecord: | ||
models: | ||
task: | ||
one: Tarefa | ||
other: Tarefas | ||
attributes: | ||
task: | ||
title: Título | ||
description: Descrição | ||
due_date: Prazo | ||
project_id: Projeto | ||
author_id: Autor | ||
author: Autor | ||
assigned_id: Responsável | ||
assigned: Responsável | ||
status: Status | ||
tasks: | ||
create: | ||
success: Tarefa criada com sucesso. | ||
fail: Não foi possível criar a tarefa. | ||
update: | ||
success: Tarefa editada com sucesso. | ||
fail: Não foi possível editar a tarefa. | ||
start: | ||
success: Tarefa iniciada. | ||
finish: | ||
success: Tarefa finalizada. | ||
cancel: | ||
success: Tarefa cancelada. | ||
check_user: | ||
fails: 'Você não possui acesso a esta tarefa.' | ||
edit_task: Editar Tarefa | ||
start_task: Iniciar Tarefa | ||
finish_task: Finalizar Tarefa | ||
cancel_task: Cancelar Tarefa | ||
new_task: Nova Tarefa | ||
create_task: Criar Tarefa | ||
no_due_date: Sem prazo | ||
no_assigned: Sem responsável | ||
save: Salvar | ||
uninitialized: Não iniciada | ||
in_progress: Em andamento | ||
task_empty_state: Sem tarefas registradas | ||
finished: Finalizada | ||
expired: Expirada | ||
cancelled: Cancelada | ||
task_cancel_confirmation: Cancelar tarefa? | ||
activerecord: | ||
models: | ||
task: | ||
one: Tarefa | ||
other: Tarefas | ||
attributes: | ||
task: | ||
title: Título | ||
description: Descrição | ||
due_date: Prazo | ||
project_id: Projeto | ||
user_role_id: Autor | ||
user_role: Autor | ||
assigned_id: Responsável | ||
assigned: Responsável | ||
status: Status | ||
tasks: | ||
create: | ||
success: Tarefa criada com sucesso. | ||
fail: Não foi possível criar a tarefa. | ||
update: | ||
success: Tarefa editada com sucesso. | ||
fail: Não foi possível editar a tarefa. | ||
start: | ||
success: Tarefa iniciada. | ||
finish: | ||
success: Tarefa finalizada. | ||
cancel: | ||
success: Tarefa cancelada. | ||
check_user: | ||
fails: "Você não possui acesso a esta tarefa." | ||
edit_task: Editar Tarefa | ||
start_task: Iniciar Tarefa | ||
finish_task: Finalizar Tarefa | ||
cancel_task: Cancelar Tarefa | ||
new_task: Nova Tarefa | ||
create_task: Criar Tarefa | ||
no_due_date: Sem prazo | ||
no_assigned: Sem responsável | ||
save: Salvar |
Oops, something went wrong.