-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into no-file-alert-1221
- Loading branch information
Showing
26 changed files
with
280 additions
and
221 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class CsvImportJob < ApplicationJob | ||
queue_as :default | ||
|
||
def perform(blob_signed_id, current_user_id) | ||
blob = ActiveStorage::Blob.find_signed(blob_signed_id) | ||
|
||
Organizations::Importers::CsvImportService.new(blob, current_user_id).call | ||
ensure | ||
blob.purge_later | ||
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
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
56 changes: 28 additions & 28 deletions
56
app/views/organizations/adopter_fosterer/external_form/index.html.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 |
---|---|---|
@@ -1,32 +1,32 @@ | ||
<div class="d-flex flex-column align-items-center mb-4"> | ||
<div class="my-4 mx-8"> | ||
<% if params[:dashboard] %> | ||
|
||
<% if current_user.person.latest_form_submission.present? %> | ||
<p class="fw-bold mb-0"><%= t('organizations.adopter_fosterer.form_instructions.previous_answers') %> <%= link_to t('general.here'), adopter_fosterer_form_answers_path %>.</p> | ||
<p><%= t('organizations.adopter_fosterer.form_instructions.update_form_answers') %></p> | ||
<section class="container d-flex flex-column py-6"> | ||
<div class="row justify-content-center gap-6"> | ||
<div class="col-8"> | ||
<% if params[:dashboard] %> | ||
<% if current_user.person.latest_form_submission.present? %> | ||
<p class="fw-bold mb-0"><%= t('organizations.adopter_fosterer.form_instructions.previous_answers') %> <%= link_to t('general.here'), adopter_fosterer_form_answers_path %>.</p> | ||
<p><%= t('organizations.adopter_fosterer.form_instructions.update_form_answers') %></p> | ||
<% else %> | ||
<p><%= t("organizations.adopter_fosterer.form_instructions.dashboard", user_email: current_user.email) %></p> | ||
<% end %> | ||
<% else %> | ||
<p><%= t("organizations.adopter_fosterer.form_instructions.dashboard", user_email: current_user.email) %></p> | ||
<% end %> | ||
|
||
<% else %> | ||
<p><%= t( | ||
"organizations.adopter_fosterer.form_instructions.index", | ||
organization_name: Current.tenant.name, | ||
) %></p> | ||
<div> | ||
<p class="fw-bold"><%= t( | ||
"organizations.adopter_fosterer.form_instructions.index", | ||
organization_name: Current.tenant.name, | ||
email: current_user.email | ||
) %></p> | ||
<%= link_to "Go to my dashboard", adopter_fosterer_dashboard_index_path, class: "btn btn-primary" %> | ||
</div> | ||
<% end %> | ||
<div class="d-flex justify-content-end gap-2 pb-2"> | ||
<%= link_to " #{t("general.view")} #{t("general.dogs")}", | ||
adoptable_pets_path(species: "dog"), | ||
class: "btn btn-primary" %> | ||
<%= link_to " #{t("general.view")} #{t("general.cats")}", | ||
adoptable_pets_path(species: "cat"), | ||
class: "btn btn-primary" %> | ||
</div> | ||
|
||
<div class="row"> | ||
<iframe id="external-form" | ||
src=<%= @form_url%> | ||
width="90%" | ||
height="645" | ||
>Loading…</iframe> | ||
</div> | ||
|
||
</div> | ||
<iframe id="external-form" | ||
src=<%= @form_url%> | ||
width="90%" | ||
height="645" | ||
>Loading…</iframe> | ||
</div> | ||
</section> |
5 changes: 5 additions & 0 deletions
5
app/views/organizations/staff/external_form_upload/_upload_in_progress.html.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,5 @@ | ||
<div id="results" class="d-flex justify-content-center"> | ||
<div class="spinner-border text-primary" role="status"> | ||
<span class="visually-hidden">Loading...</span> | ||
</div> | ||
</div> |
Oops, something went wrong.