| 
									
										
										
										
											2024-10-29 20:11:51 +08:00
										 |  |  | @extends('layouts.simple') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @section('body') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <div class="container small"> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         <main class="card content-wrap auto-height mt-xxl"> | 
					
						
							| 
									
										
										
										
											2024-10-29 22:21:32 +08:00
										 |  |  |             <h1 class="list-heading">{{ trans('entities.import') }}</h1> | 
					
						
							| 
									
										
										
										
											2024-10-30 23:26:23 +08:00
										 |  |  |             <form action="{{ url('/import') }}" enctype="multipart/form-data" method="POST"> | 
					
						
							| 
									
										
										
										
											2024-10-29 20:11:51 +08:00
										 |  |  |                 {{ csrf_field() }} | 
					
						
							| 
									
										
										
										
											2024-10-29 22:21:32 +08:00
										 |  |  |                 <div class="flex-container-row justify-space-between wrap gap-x-xl gap-y-s"> | 
					
						
							| 
									
										
										
										
											2024-11-02 22:51:04 +08:00
										 |  |  |                     <p class="flex min-width-l text-muted mb-s">{{ trans('entities.import_desc') }}</p> | 
					
						
							| 
									
										
										
										
											2024-10-29 22:21:32 +08:00
										 |  |  |                     <div class="flex-none min-width-l flex-container-row justify-flex-end"> | 
					
						
							|  |  |  |                         <div class="mb-m"> | 
					
						
							| 
									
										
										
										
											2024-11-02 22:51:04 +08:00
										 |  |  |                             <label for="file">{{ trans('entities.import_zip_select') }}</label> | 
					
						
							| 
									
										
										
										
											2024-10-29 22:21:32 +08:00
										 |  |  |                             <input type="file" | 
					
						
							|  |  |  |                                    accept=".zip,application/zip,application/x-zip-compressed" | 
					
						
							|  |  |  |                                    name="file" | 
					
						
							|  |  |  |                                    id="file" | 
					
						
							|  |  |  |                                    class="custom-simple-file-input"> | 
					
						
							| 
									
										
										
										
											2024-10-30 23:26:23 +08:00
										 |  |  |                             @include('form.errors', ['name' => 'file']) | 
					
						
							| 
									
										
										
										
											2024-10-29 22:21:32 +08:00
										 |  |  |                         </div> | 
					
						
							| 
									
										
										
										
											2024-10-29 20:11:51 +08:00
										 |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-02 22:51:04 +08:00
										 |  |  |                 @if(count($zipErrors) > 0) | 
					
						
							|  |  |  |                     <p class="mb-xs"><strong class="text-neg">{{ trans('entities.import_zip_validation_errors') }}</strong></p> | 
					
						
							|  |  |  |                     <ul class="mb-m"> | 
					
						
							|  |  |  |                         @foreach($zipErrors as $key => $error) | 
					
						
							|  |  |  |                             <li><strong class="text-neg">[{{ $key }}]</strong>: {{ $error }}</li> | 
					
						
							|  |  |  |                         @endforeach | 
					
						
							|  |  |  |                     </ul> | 
					
						
							|  |  |  |                 @endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-29 20:11:51 +08:00
										 |  |  |                 <div class="text-right"> | 
					
						
							|  |  |  |                     <a href="{{ url('/books') }}" class="button outline">{{ trans('common.cancel') }}</a> | 
					
						
							| 
									
										
										
										
											2024-10-29 22:21:32 +08:00
										 |  |  |                     <button type="submit" class="button">{{ trans('entities.import_validate') }}</button> | 
					
						
							| 
									
										
										
										
											2024-10-29 20:11:51 +08:00
										 |  |  |                 </div> | 
					
						
							|  |  |  |             </form> | 
					
						
							|  |  |  |         </main> | 
					
						
							| 
									
										
										
										
											2024-11-03 22:13:05 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         <main class="card content-wrap auto-height mt-xxl"> | 
					
						
							|  |  |  |             <h2 class="list-heading">{{ trans('entities.import_pending') }}</h2> | 
					
						
							|  |  |  |             @if(count($imports) === 0) | 
					
						
							|  |  |  |                 <p>{{ trans('entities.import_pending_none') }}</p> | 
					
						
							|  |  |  |             @else | 
					
						
							|  |  |  |                 <div class="item-list my-m"> | 
					
						
							|  |  |  |                     @foreach($imports as $import) | 
					
						
							|  |  |  |                         @include('exports.parts.import', ['import' => $import]) | 
					
						
							|  |  |  |                     @endforeach | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             @endif | 
					
						
							|  |  |  |         </main> | 
					
						
							| 
									
										
										
										
											2024-10-29 20:11:51 +08:00
										 |  |  |     </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @stop |