mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-22 08:56:39 -06:00
Fix some things in import routine.
This commit is contained in:
parent
3ce5ccb98a
commit
6b59b6de6e
@ -170,6 +170,7 @@ class FileConfigurator implements ConfiguratorInterface
|
||||
'column-roles-complete' => false, // not yet configured roles for columns
|
||||
'column-mapping-config' => [], // no mapping made yet.
|
||||
'column-mapping-complete' => false, // so mapping is not complete.
|
||||
'has-config-file' => true,
|
||||
'apply-rules' => true,
|
||||
'match-bills' => false,
|
||||
'auto-start' => false,
|
||||
|
@ -106,6 +106,10 @@ class Map implements ConfigurationInterface
|
||||
foreach ($setIndexes as $index) {
|
||||
$this->data[$index]['values'] = array_unique($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);
|
||||
|
||||
|
@ -103,6 +103,7 @@ return [
|
||||
'file_map_field_mapped_to' => 'Mapped to',
|
||||
'map_do_not_map' => '(do not map)',
|
||||
'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.
|
||||
'column__ignore' => '(ignore this column)',
|
||||
|
@ -17,6 +17,11 @@
|
||||
<p>
|
||||
{{ trans('import.file_map_text') }}
|
||||
</p>
|
||||
{% if data|length == 0 %}
|
||||
<p class="text-danger">
|
||||
{{ trans('import.file_nothing_to_map') }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -25,6 +30,8 @@
|
||||
<form action="{{ route('import.configure.post', job.key) }}" method="post">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
|
||||
|
||||
|
||||
{% for field in data %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
Loading…
Reference in New Issue
Block a user