diff --git a/app/controllers/stash_engine/resources_controller.rb b/app/controllers/stash_engine/resources_controller.rb index 4366fa68e5..09d086ffa3 100644 --- a/app/controllers/stash_engine/resources_controller.rb +++ b/app/controllers/stash_engine/resources_controller.rb @@ -153,6 +153,13 @@ def display_readme end def dpc_status + user_payer_aff = StashEngine::Tenant.find_by_ror_id(@resource.identifier&.submitter_affiliation&.ror_id)&.connect_list + aff_tenant = if @resource.tenant_id.in?(user_payer_aff.ids) + user_payer_aff.find_by(id: @resource.tenant_id) + else + user_payer_aff.first + end + @resource.check_add_readme_file @resource.check_add_cedar_json dpc_checks = { @@ -161,7 +168,7 @@ def dpc_status institution_will_pay: @resource.identifier.institution_will_pay?, funder_will_pay: @resource.identifier.funder_will_pay?, user_must_pay: @resource.identifier.user_must_pay?, - aff_tenant: StashEngine::Tenant.find_by_ror_id(@resource.identifier&.submitter_affiliation&.ror_id)&.connect_list&.first, + aff_tenant: aff_tenant, allow_review: @resource.identifier.allow_review?, automatic_ppr: @resource.identifier.automatic_ppr?, man_decision_made: @resource.identifier.has_accepted_manuscript? || @resource.identifier.has_rejected_manuscript? diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0f5982068d..eda95d0c3e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -70,7 +70,7 @@ def readme_render(content) end def ldf_pricing_tiers_options - [['No limit', '']] + FeeCalculator::BaseService::ESTIMATED_FILES_SIZE.map do |tier| + [['No limit', '']] + ESTIMATED_FILES_SIZE.map do |tier| ["#{filesize(tier[:range].max)} ($#{tier[:price]})", tier[:tier]] end end diff --git a/app/javascript/react/components/MetadataEntry/Agreements/Agreements.jsx b/app/javascript/react/components/MetadataEntry/Agreements/Agreements.jsx index cb8614b41f..9dda5292ad 100644 --- a/app/javascript/react/components/MetadataEntry/Agreements/Agreements.jsx +++ b/app/javascript/react/components/MetadataEntry/Agreements/Agreements.jsx @@ -104,6 +104,40 @@ export default function Agreements({

); } + + const TermsOfSubmission = () => { + if(!preview) return null; + if(resource.accepted_agreement) { + return ( +

+