diff --git a/app/views/invitations/show.html.erb b/app/views/invitations/show.html.erb index 14c675b..e9ddf21 100644 --- a/app/views/invitations/show.html.erb +++ b/app/views/invitations/show.html.erb @@ -1,39 +1,35 @@ -
-
-
-

Convite

+

Convite

-
-
-
-

<%= @invitation.project_title %>

+
+
+
+

<%= @invitation.project_title %>

+ +

<%= @invitation.project_description %>

+

Categoria: <%= @invitation.project_category %>

+ <% if @invitation.message.present? %> +

Mensagem: <%= @invitation.message %>

+ <% end %> + <% if @invitation.expiration_date.present? %> +

Expira dia: <%= I18n.l(@invitation.expiration_date) %>

+ <% end %> -

<%= @invitation.project_description %>

-

Categoria: <%= @invitation.project_category %>

- - <% if @invitation.pending? %> -

Expira dia: <%= I18n.l(@invitation.expiration_date) %>

- -
-
- <%= link_to 'Aceitar', 'http://localhost:4000', method: :patch, class: 'btn btn-primary me-4' %> -
-
- <%= button_to 'Recusar', decline_invitation_path(@invitation), method: :patch, class: 'btn btn-secondary' %> -
-
- -

Mensagem: <%= @invitation.message %>

- <% end %> - -

<%= 'Aceito' if @invitation.accepted? %>

-

<%= 'Expirado' if @invitation.expired? %>

-

<%= 'Recusado' if @invitation.declined? %>

-

<%= 'Cancelado' if @invitation.cancelled? %>

-

<%= 'Processando' if @invitation.processing? %>

+ <% if @invitation.pending? %> +
+
+ <%= link_to 'Aceitar', 'http://localhost:3000', class: 'btn btn-primary me-4' %> +
+
+ <%= button_to 'Recusar', decline_invitation_path(@invitation), method: :patch, class: 'btn btn-secondary' %>
-
-
+ <% end %> + +

<%= 'Aceito' if @invitation.accepted? %>

+

<%= 'Expirado' if @invitation.expired? %>

+

<%= 'Recusado' if @invitation.declined? %>

+

<%= 'Cancelado' if @invitation.cancelled? %>

+

<%= 'Processando' if @invitation.processing? %>

+
- \ No newline at end of file + diff --git a/db/schema.rb b/db/schema.rb index 95de926..ad348c5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_02_12_172630) do +ActiveRecord::Schema[7.1].define(version: 2024_02_12_195603) do create_table "action_text_rich_texts", force: :cascade do |t| t.string "name", null: false t.text "body" @@ -133,7 +133,7 @@ t.integer "notifiable_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.boolean "read", default: false + t.integer "status", default: 0 t.index ["notifiable_type", "notifiable_id"], name: "index_notifications_on_notifiable" t.index ["profile_id"], name: "index_notifications_on_profile_id" end @@ -160,7 +160,7 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "pin", default: 0 - t.datetime "edited_at", default: "2024-02-12 20:48:52" + t.datetime "edited_at", default: "2024-02-12 12:29:41" t.integer "status", default: 0 t.datetime "published_at" t.string "old_status"