-
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 #56 from TreinaDev/feature/usuario-ve-convites
Adiciona fluxo interno de resposta ao convite Co-authored-by: Lucas Aguilar <lucasaguilar835@gmail.com>
- Loading branch information
Showing
21 changed files
with
705 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<h1><%= Invitation.model_name.human(count: 2) %></h1> | ||
<div class="container"> | ||
<div class="row"> | ||
<% if @invitations.any? %> | ||
<% @invitations.each do |invitation| %> | ||
<div class="col-sm-6 mb-3" > | ||
<div class="card" style="height: 100%"> | ||
<div class="card-body"> | ||
<h4 class="card-title"> | ||
<%= link_to invitation.project.title, invitation_path(invitation) %> | ||
</h4> | ||
<h6 class="card-subtitle mb-2 text-muted "> | ||
<%= Project.human_attribute_name :category %>: <%= invitation.project.category %> | ||
</h6> | ||
<p class="card-text"> | ||
<%= invitation.message %> | ||
</p> | ||
<p class="card-text"> | ||
<%= Invitation.human_attribute_name :expiration_date %>: | ||
<%= invitation.expiration_date ? l(invitation.expiration_date) : I18n.t('invitations.no_expiration_date') %> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
<% else %> | ||
<h3><%= t('invitations.empty_state') %></h3> | ||
<% end %> | ||
</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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<p> | ||
<strong><%= @invitation.project.title %>: </strong> | ||
<%= @invitation.project.description %> | ||
</p> | ||
<p> | ||
<strong><%= Project.human_attribute_name :category %>: </strong> | ||
<%= @invitation.project.category %> | ||
</p> | ||
<p> | ||
<% unless @invitation.message.blank? %> | ||
<strong><%= Invitation.human_attribute_name :message %>: </strong> | ||
<%= @invitation.message %> | ||
<% end %> | ||
</p> | ||
<p> | ||
<strong><%= Invitation.human_attribute_name :expiration_date %>: </strong> | ||
<%= @invitation.expiration_date ? l(@invitation.expiration_date) : I18n.t('invitations.no_expiration_date') %> | ||
</p> | ||
|
||
<% if @invitation.pending? %> | ||
<div class="d-flex mb-3"> | ||
<%= button_to I18n.t('invitations.accept_btn'), | ||
accept_invitation_path(@invitation), method: :patch, | ||
class: 'btn btn-success me-2' %> | ||
<%= button_to I18n.t('invitations.decline_btn'), | ||
decline_invitation_path(@invitation), method: :patch, | ||
class: 'btn btn-danger me-2' %> | ||
</div> | ||
<% end %> | ||
|
||
<%= t('invitations.cancelled') if @invitation.cancelled? %> | ||
<%= t('invitations.expired') if @invitation.expired? %> | ||
<%= t('invitations.accepted') if @invitation.accepted? %> | ||
<%= t('invitations.declined') if @invitation.declined? %> |
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
Oops, something went wrong.