Compare commits
2 Commits
prevent-fo
...
add-approv
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83c1548994 | ||
|
|
a25844d777 |
@@ -1,9 +0,0 @@
|
||||
$(document).on("turbolinks:load", function() {
|
||||
$("#upload_directory_files").on('click', function(e){
|
||||
const newFilesCount = $('input[name = "directory[files][]"][type = "hidden"]').length;
|
||||
|
||||
if (newFilesCount === 0){
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -3,6 +3,6 @@
|
||||
<%= render "shared/files_dropzone_fields", form: form, directory: directory %>
|
||||
<% end %>
|
||||
<div class="pt-3">
|
||||
<%= form.submit t(".submit"), id: "upload_directory_files", class: "btn btn-block btn-success", data: { disable_with: t("shared.disable_with") } %>
|
||||
<%= form.submit t(".submit"), class: "btn btn-block btn-success", data: { disable_with: t("shared.disable_with") } %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<th><%= t(".table_headers.notes") %></th>
|
||||
<th><%= t(".table_headers.tags") %></th>
|
||||
<th><%= t(".table_headers.signed_at") %></th>
|
||||
<th></th>
|
||||
<th><%= t(".table_headers.amendment_signed") %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -789,6 +789,7 @@ en:
|
||||
empty: Location Releases will appear here
|
||||
table_headers:
|
||||
address: Address
|
||||
amendment_signed: Amendment
|
||||
approved: Approved
|
||||
name: Location Name
|
||||
notes: Notes
|
||||
|
||||
@@ -346,6 +346,7 @@ es:
|
||||
index:
|
||||
table_headers:
|
||||
address: Address (ES)
|
||||
amendment_signed: Amendment (ES)
|
||||
notes: Notes (ES)
|
||||
signed_at: Date Signed (ES)
|
||||
tags: Tags (ES)
|
||||
|
||||
@@ -51,13 +51,6 @@ RSpec.feature "User manages project custom folders", type: :feature do
|
||||
|
||||
expect(page).to have_content("UPLOAD NEW FILES")
|
||||
|
||||
expect do
|
||||
click_button "Upload Files"
|
||||
end.not_to raise_exception
|
||||
|
||||
expect(page).to have_content("UPLOAD NEW FILES")
|
||||
expect(page).not_to have_content("The folder has been updated")
|
||||
|
||||
drop_file Rails.root.join(file_fixture("person_photo.png")), type: :dropzone
|
||||
|
||||
click_button "Upload Files"
|
||||
|
||||
@@ -127,6 +127,14 @@ feature "User managing location releases" do
|
||||
sign_in current_user
|
||||
end
|
||||
|
||||
scenario "listing all releases, table have correct headers", js:true do
|
||||
ct = create(:contract_template, :with_amendment_clause, project: project)
|
||||
create(:location_release, :native, project: project, contract_template: ct)
|
||||
visit project_location_releases_path(project)
|
||||
|
||||
table_headers.each { |s| expect(page).to have_content s }
|
||||
end
|
||||
|
||||
scenario "creating a release", js: true do
|
||||
visit new_project_location_release_path(project)
|
||||
|
||||
@@ -729,4 +737,16 @@ feature "User managing location releases" do
|
||||
def amendment_signature_label
|
||||
t 'contracts.amendment_page.description_labels.amendment_signature'
|
||||
end
|
||||
|
||||
def table_headers
|
||||
[
|
||||
t('location_releases.index.table_headers.approved'),
|
||||
t('location_releases.index.table_headers.name'),
|
||||
t('location_releases.index.table_headers.address'),
|
||||
t('location_releases.index.table_headers.notes'),
|
||||
t('location_releases.index.table_headers.tags'),
|
||||
t('location_releases.index.table_headers.signed_at'),
|
||||
t('location_releases.index.table_headers.amendment_signed')
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user