diff --git a/app/services/imports/create.rb b/app/services/imports/create.rb index a6675c92..9b5417d0 100644 --- a/app/services/imports/create.rb +++ b/app/services/imports/create.rb @@ -22,6 +22,7 @@ class Imports::Create import.source end + import.update!(source: source) importer(source).new(import, user.id, temp_file_path).call schedule_stats_creating(user.id) diff --git a/app/views/imports/index.html.erb b/app/views/imports/index.html.erb index f86c2c5d..cfcf0bef 100644 --- a/app/views/imports/index.html.erb +++ b/app/views/imports/index.html.erb @@ -36,7 +36,7 @@
| Name | @@ -55,7 +55,8 @@ <% @imports.each do |import| %>||
|---|---|---|
| <%= link_to import.name, import, class: 'underline hover:no-underline' %> (<%= import.source %>) @@ -72,9 +73,9 @@ | <%= human_datetime(import.created_at) %> | <% if import.file.present? %> - <%= link_to 'Download', rails_blob_path(import.file, disposition: 'attachment'), class: "px-4 py-2 bg-blue-500 text-white rounded-md", download: import.name %> + <%= link_to 'Download', rails_blob_path(import.file, disposition: 'attachment'), class: "btn btn-outline btn-sm btn-info", download: import.name %> <% end %> - <%= link_to 'Delete', import, data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?", turbo_method: :delete }, method: :delete, class: "px-4 py-2 bg-red-500 text-white rounded-md" %> + <%= link_to 'Delete', import, data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?", turbo_method: :delete }, method: :delete, class: "btn btn-outline btn-sm btn-error" %> |