-
-
- {!! trans('import.sample_file', ['download_link' => $sample_file]) !!}
+
+
+
+
+
+
error_outline
+
+
+ {!! trans('import.sample_file_and_document', [
+ 'download_link' => $sample_file,
+ 'document_link' => $document_link
+ ]) !!}
+
-
-
+
+
@@ -58,4 +76,5 @@
-
\ No newline at end of file
+
+
diff --git a/resources/views/components/form/group/import.blade.php b/resources/views/components/form/group/import.blade.php
new file mode 100644
index 000000000..fb7b4a169
--- /dev/null
+++ b/resources/views/components/form/group/import.blade.php
@@ -0,0 +1,59 @@
+@stack($name . '_input_start')
+
$required,
+ 'readonly' => $readonly,
+ 'disabled' => $disabled,
+ ])
+
+ @if (isset($attributes['v-show']))
+ v-if="{{ $attributes['v-show'] }}"
+ @endif
+
+ @if (isset($attributes['v-disabled']) || isset($attributes['v-bind:disabled']))
+ :class="[
+ {'disabled' : {{ (isset($attributes['v-disabled'])) ? $attributes['v-disabled'] : $attributes['v-bind:disabled'] }}},
+ {'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}}
+ ]"
+ @else
+ :class="[
+ {'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}}
+ ]"
+ @endif
+ >
+ @if (! $attributes->has('label') && ! empty($label->contents))
+ {!! $label ?? '' !!}
+ @elseif (! empty($label))
+
{!! $label !!}
+ @endif
+
+
+ @if (! $attributes->has('icon') && ! empty($icon->contents))
+ {!! $icon ?? '' !!}
+ @elseif (! empty($icon))
+
+ @endif
+
+ merge($custom_attributes) }}
+ />
+
+
+ @if (! $attributes->has('error') && ! empty($error->contents))
+ {!! $error ?? '' !!}
+ @else
+
+ @endif
+
+@stack($name . '_input_end')
diff --git a/resources/views/components/form/input/import.blade.php b/resources/views/components/form/input/import.blade.php
new file mode 100644
index 000000000..dbfd262c8
--- /dev/null
+++ b/resources/views/components/form/input/import.blade.php
@@ -0,0 +1,75 @@
+
$attachment->id,
+ 'name' => $attachment->filename . '.' . $attachment->extension,
+ 'path' => route('uploads.get', $attachment->id),
+ 'type' => $attachment->mime_type,
+ 'size' => $attachment->size,
+ 'downloadPath' => route('uploads.download', $attachment->id),
+ ];
+ @endphp
+ @endforeach
+ @elseif ($value instanceof \Plank\Mediable\Media)
+ @php
+ $attachments[] = [
+ 'id' => $value->id,
+ 'name' => $value->filename . '.' . $value->extension,
+ 'path' => route('uploads.get', $value->id),
+ 'type' => $value->mime_type,
+ 'size' => $value->size,
+ 'downloadPath' => false,
+ ];
+ @endphp
+ @else
+ @php
+ $attachment = \Plank\Mediable\Media::find($value);
+
+ if (! empty($attachment)) {
+ $attachments[] = [
+ 'id' => $attachment->id,
+ 'name' => $attachment->filename . '.' . $attachment->extension,
+ 'path' => route('uploads.get', $attachment->id),
+ 'type' => $attachment->mime_type,
+ 'size' => $attachment->size,
+ 'downloadPath' => false,
+ ];
+ }
+ @endphp
+ @endif
+
+ :attachments="{{ json_encode($attachments) }}"
+ @endif
+
+ v-model="{{ ! empty($attributes['v-model']) ? $attributes['v-model'] : (! empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name) }}"
+>