-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
193 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class ConnectedAccountMailer < ApplicationMailer | ||
# default from: 'noreply@labelx.com' | ||
|
||
# Method to send an invitation confirmation email to existing artists | ||
def invitation_email(connected_account) | ||
@artist = connected_account.user | ||
@label = connected_account.parent | ||
@connected_account = connected_account | ||
mail(to: @artist.email, subject: "Welcome to Join Us at Label #{@label.username} on Rauversion.com!") | ||
end | ||
|
||
# Method to notify the label of a new artist account creation | ||
def new_account_notification_to_label(connected_account) | ||
@artist = connected_account.user | ||
@label = connected_account.parent | ||
mail(to: @label.email, subject: "New Artist Account Activation at Label #{@label.username}!") | ||
end | ||
|
||
def new_account_notification_to_artist(connected_account) | ||
@artist = connected_account.user | ||
@label = connected_account.parent | ||
mail(to: @label.email, subject: "New Artist Account Activation at Label #{@label.username}!") | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
|
||
|
||
|
||
<div class="bg-default"> | ||
<div class="mx-auto max-w-7xl py-24 sm:px-6 sm:py-32 lg:px-8"> | ||
<div class="relative isolate overflow-hidden bg-muted px-6 py-24 text-center shadow-2xl sm:rounded-3xl sm:px-16"> | ||
<h2 class="mx-auto max-w-2xl text-3xl font-bold tracking-tight text-default sm:text-4xl"> | ||
Be part of <%= @label.username %> label. | ||
</h2> | ||
<p class="mx-auto mt-6 max-w-xl text-lg leading-8 text-gray-300"> | ||
<%= @label.username %>, has extended an invitation to be part of their catalog. | ||
If you are agree please click on accept button, if not, just ignore the message | ||
</p> | ||
<div class="mt-10 flex items-center justify-center gap-x-6"> | ||
<%= button_to approve_account_connection_url(params[:id]), class: "button-sm-outline space-x-2" do %> | ||
Get started | ||
<% end %> | ||
|
||
<a href="#" class="text-sm font-semibold leading-6 text-default"> | ||
Learn more <span aria-hidden="true">→</span> | ||
</a> | ||
|
||
</div> | ||
</div> | ||
</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,19 @@ | ||
|
||
Dear <%= @artist.full_name %>, | ||
<br> | ||
|
||
We are delighted to extend an exclusive invitation for you to join Label <%= @label.username %>, on Rauversion platform. | ||
<br> | ||
Please confirm your interest by clicking on the following link: | ||
<br> | ||
<%= approve_account_connection_url(@connected_account.signed_id ) %> | ||
|
||
<br> | ||
As a member of Label <%= @label.username %>, you will have access to unique collaborative opportunities, | ||
promotional support, and the chance to connect with a network of talented artists and industry professionals. | ||
<br> | ||
If you have any questions or wish to discuss this exciting opportunity further, please do not hesitate to contact us. | ||
<br> | ||
Warm regards, | ||
<br> | ||
Rauversion team |
28 changes: 28 additions & 0 deletions
28
app/views/connected_account_mailer/new_account_notification_to_label.erb
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,28 @@ | ||
|
||
Dear <%= @label.username %>, <br/> | ||
|
||
We are excited to announce that a new artist account has been created on the your label, <%= @label.username%> on Rauversion. | ||
<br> | ||
This addition underscores our commitment to nurturing a diverse and vibrant artistic community. | ||
|
||
<br/> | ||
Artist Details: | ||
<br/> | ||
|
||
<br/> | ||
Name: <%= @artist.full_name %> | ||
<br/> | ||
<!--Genre: [Artist’s Genre]--> | ||
Account Created On: <%= l @artist.created_at, format: :short %> | ||
<br/> | ||
Please ensure that the artist’s onboarding process is seamless and engaging. | ||
For more information or to review their profile, please visit the link below: | ||
<br/> | ||
<%= user_url @artist.username %> | ||
<br/> | ||
Thank you for your cooperation and enthusiasm as we welcome our newest artist to the Label <%= @label.full_name%> family. | ||
|
||
<br/> | ||
Best regards, | ||
<br/> | ||
Rauversion Team |
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,35 @@ | ||
<div> | ||
<div class="group relative"> | ||
<%= link_to user_path(artist.username), data: {turbo_frame: "_top"} do %> | ||
<div class=" | ||
h-56- lg:h-72-- xl:h-80-- | ||
w-full | ||
rounded-full | ||
overflow-hidden | ||
bg-gray-200 group-hover:opacity-75"> | ||
<%= image_tag(artist.avatar_url, class: "h-full w-full object-cover object-center") %> | ||
</div> | ||
|
||
<h3 class="my-2 text-md text-default"> | ||
<span class="absolute- inset-0"></span> <%= artist.full_name.present? ? artist.full_name : artist.username %> | ||
</h3> | ||
<% end %> | ||
<% if @admin %> | ||
<div class="relative justify-end space-x-2 mb-2 hidden group-hover:flex"> | ||
|
||
<div class="flex absolute space-x-2 top-[-66px] left-[4.5em] p-2 bg-emphasis rounded-lg"> | ||
<%= link_to impersonate_account_connections_path(username: artist.username), data: {turbo_frame: "_top"} do %> | ||
<span class="absolute- inset-0"></span> Impersonate | ||
<% end %> | ||
<%= link_to account_connection_path(artist.id), data: {turbo_method: :destroy, turbo_confirm: "sure?"} do %> | ||
<span class="absolute- inset-0"></span> Disconnect | ||
<% end %> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> | ||
|
||
</div> |
Empty file.
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,5 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe ConnectedAccountMailer, type: :mailer do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
end |
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,14 @@ | ||
# Preview all emails at http://localhost:3000/rails/mailers/connected_account_mailer | ||
class ConnectedAccountMailerPreview < ActionMailer::Preview | ||
|
||
|
||
def new_account_notification_to_label | ||
connected_account = ConnectedAccount.last | ||
ConnectedAccountMailer.with(connected_account).new_account_notification_to_label(connected_account) | ||
end | ||
|
||
def invitation_email | ||
connected_account = ConnectedAccount.last | ||
ConnectedAccountMailer.with(connected_account).invitation_email(connected_account) | ||
end | ||
end |