mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix some things in import routine.
This commit is contained in:
@@ -170,6 +170,7 @@ class FileConfigurator implements ConfiguratorInterface
|
|||||||
'column-roles-complete' => false, // not yet configured roles for columns
|
'column-roles-complete' => false, // not yet configured roles for columns
|
||||||
'column-mapping-config' => [], // no mapping made yet.
|
'column-mapping-config' => [], // no mapping made yet.
|
||||||
'column-mapping-complete' => false, // so mapping is not complete.
|
'column-mapping-complete' => false, // so mapping is not complete.
|
||||||
|
'has-config-file' => true,
|
||||||
'apply-rules' => true,
|
'apply-rules' => true,
|
||||||
'match-bills' => false,
|
'match-bills' => false,
|
||||||
'auto-start' => false,
|
'auto-start' => false,
|
||||||
|
@@ -106,6 +106,10 @@ class Map implements ConfigurationInterface
|
|||||||
foreach ($setIndexes as $index) {
|
foreach ($setIndexes as $index) {
|
||||||
$this->data[$index]['values'] = array_unique($this->data[$index]['values']);
|
$this->data[$index]['values'] = array_unique($this->data[$index]['values']);
|
||||||
asort($this->data[$index]['values']);
|
asort($this->data[$index]['values']);
|
||||||
|
// if the count of this array is zero, there is nothing to map.
|
||||||
|
if(count($this->data[$index]['values']) === 0) {
|
||||||
|
unset($this->data[$index]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
unset($setIndexes);
|
unset($setIndexes);
|
||||||
|
|
||||||
|
@@ -103,6 +103,7 @@ return [
|
|||||||
'file_map_field_mapped_to' => 'Mapped to',
|
'file_map_field_mapped_to' => 'Mapped to',
|
||||||
'map_do_not_map' => '(do not map)',
|
'map_do_not_map' => '(do not map)',
|
||||||
'file_map_submit' => 'Start the import',
|
'file_map_submit' => 'Start the import',
|
||||||
|
'file_nothing_to_map' => 'There is no data present in your file that you can map to existing values. Please press "Start the import" to continue.',
|
||||||
|
|
||||||
// map things.
|
// map things.
|
||||||
'column__ignore' => '(ignore this column)',
|
'column__ignore' => '(ignore this column)',
|
||||||
|
@@ -17,6 +17,11 @@
|
|||||||
<p>
|
<p>
|
||||||
{{ trans('import.file_map_text') }}
|
{{ trans('import.file_map_text') }}
|
||||||
</p>
|
</p>
|
||||||
|
{% if data|length == 0 %}
|
||||||
|
<p class="text-danger">
|
||||||
|
{{ trans('import.file_nothing_to_map') }}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -25,6 +30,8 @@
|
|||||||
<form action="{{ route('import.configure.post', job.key) }}" method="post">
|
<form action="{{ route('import.configure.post', job.key) }}" method="post">
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% for field in data %}
|
{% for field in data %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
|
Reference in New Issue
Block a user