mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							74 lines
						
					
					
						
							3.6 KiB
						
					
					
				
			
		
		
	
	
							74 lines
						
					
					
						
							3.6 KiB
						
					
					
				| <div class="card card-compact bg-base-200 md:card-normal">
 | |
|   <div class="card-body">
 | |
|     <div>
 | |
|       <h3 class="text-4xl font-bold leading-7 text-gray-900">Submission Information</h3>
 | |
|       <p class="mt-2 max-w-2xl text-sm leading-6 text-gray-500">Personal details</p>
 | |
|     </div>
 | |
|     <div class="mt-2 border-t border-gray-300">
 | |
|       <dl class="divide-y divide-gray-300">
 | |
|         <div class="py-6 sm:grid sm:grid-cols-3 sm:gap-4">
 | |
|           <dt class="text-sm font-medium leading-6 text-gray-900">Template</dt>
 | |
|           <dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
 | |
|             <%= link_to @submission.template.name, template_submissions_path(@submission.template), class: 'link link-hover'  %>
 | |
|           </dd>
 | |
|         </div>
 | |
|         <%- if @submission.completed_at.present? %>
 | |
|           <div class="py-6 sm:grid sm:grid-cols-3 sm:gap-4">
 | |
|             <dt class="text-sm font-medium leading-6 text-gray-900">Completed at</dt>
 | |
|             <dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
 | |
|               <%= l(@submission.completed_at, format: :long) %>
 | |
|             </dd>
 | |
|           </div>
 | |
|         <% end %>
 | |
|         <% @submission.template.fields.each do |field| %>
 | |
|           <div class="py-6 sm:grid sm:grid-cols-3 sm:gap-4">
 | |
|             <dt class="text-sm font-medium leading-6 text-gray-900">
 | |
|               <%= field['name'] %>
 | |
|             </dt>
 | |
|             <dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
 | |
|               <% if ['image', 'signature'].include?(field['type']) %>
 | |
|                 <ul role="list" class="divide-y divide-gray-100 rounded-md border border-gray-200">
 | |
|                   <% @submission.submitters.each do |submitter| %>
 | |
|                     <% Array.wrap(submitter.values[field['uuid']]).each do |uuid| %>
 | |
|                       <li class="py-4 pl-4 pr-5 text-sm leading-6">
 | |
|                         <div class="flex w-0 flex-1 items-center">
 | |
|                           <%= image_tag ActiveStorage::Attachment.find_by(uuid:).url %>
 | |
|                         </div>
 | |
|                       </li>
 | |
|                     <% end %>
 | |
|                   <% end %>
 | |
|                 </ul>
 | |
|               <% elsif ['attachment'].include?(field['type']) %>
 | |
|                 <ul role="list" class="divide-y divide-gray-100 rounded-md border border-gray-200">
 | |
|                   <% @submission.submitters.each do |submitter| %>
 | |
|                     <% Array.wrap(submitter.values[field['uuid']]).each do |uuid| %>
 | |
|                       <% attachment = ActiveStorage::Attachment.find_by(uuid:) %>
 | |
|                       <li class="flex items-center justify-between py-4 pl-4 pr-5 text-sm leading-6">
 | |
|                         <div class="flex w-0 flex-1 items-center">
 | |
|                           <%= svg_icon('paperclip', class: 'h-5 w-5 flex-shrink-0 text-gray-300') %>
 | |
|                           <div class="ml-4 flex min-w-0 flex-1 gap-2">
 | |
|                             <span class="truncate font-medium">
 | |
|                               <%= attachment.filename %>
 | |
|                             </span>
 | |
|                           </div>
 | |
|                         </div>
 | |
|                         <div class="ml-4 flex-shrink-0">
 | |
|                           <%= link_to 'Download', attachment.url, class: "font-medium text-indigo-600 hover:text-indigo-500" %>
 | |
|                         </div>
 | |
|                       </li>
 | |
|                     <% end %>
 | |
|                   <% end %>
 | |
|                 </ul>
 | |
|               <% else %>
 | |
|                 <% @submission.submitters.each do |submitter| %>
 | |
|                   <%= submitter.values[field['uuid']] %>
 | |
|                 <% end %>
 | |
|               <% end %>
 | |
|             </dt>
 | |
|           </div>
 | |
|         <% end %>
 | |
|       </dl>
 | |
|     </div>
 | |
|   </div>
 | |
| </div>
 |