mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Mainly layout improvements.
This commit is contained in:
parent
1658c666ab
commit
13bda0a264
@ -126,14 +126,13 @@ class Importer
|
||||
|
||||
}
|
||||
// post processing and validating.
|
||||
$data = $this->postProcess($data, $row);
|
||||
$result = $this->validateData($data);
|
||||
$data = $this->postProcess($data, $row);
|
||||
$result = $this->validateData($data);
|
||||
$journal = null;
|
||||
if ($result === true) {
|
||||
$result = $this->createTransactionJournal($data);
|
||||
} else {
|
||||
Log::error('Validator: ' . $result);
|
||||
$journal = $this->createTransactionJournal($data);
|
||||
}
|
||||
if ($result instanceof TransactionJournal) {
|
||||
if ($journal instanceof TransactionJournal) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -20,13 +20,15 @@ class AnyAccount implements MapperInterface
|
||||
{
|
||||
$result = Auth::user()->accounts()->with('accountType')->orderBy('accounts.name', 'ASC')->get(['accounts.*']);
|
||||
|
||||
$list = [];
|
||||
$list = [];
|
||||
/** @var Account $account */
|
||||
foreach ($result as $account) {
|
||||
$list[$account->id] = $account->name . ' (' . $account->accountType->type . ')';
|
||||
}
|
||||
asort($list);
|
||||
|
||||
array_unshift($list, trans('firefly.csv_do_not_map'));
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
@ -26,13 +26,20 @@ class AssetAccount implements MapperInterface
|
||||
)->accountTypeIn(['Default account', 'Asset account'])->orderBy('accounts.name', 'ASC')->get(['accounts.*']);
|
||||
|
||||
$list = [];
|
||||
|
||||
/** @var Account $account */
|
||||
foreach ($result as $account) {
|
||||
$list[$account->id] = $account->name;
|
||||
$name = $account->name;
|
||||
if (strlen($account->iban) > 0) {
|
||||
$name .= ' (' . $account->iban . ')';
|
||||
}
|
||||
$list[$account->id] = $name;
|
||||
}
|
||||
|
||||
asort($list);
|
||||
|
||||
array_unshift($list, trans('firefly.csv_do_not_map'));
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
@ -27,6 +27,8 @@ class Bill implements MapperInterface
|
||||
}
|
||||
asort($list);
|
||||
|
||||
array_unshift($list, trans('firefly.csv_do_not_map'));
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
@ -27,6 +27,8 @@ class Budget implements MapperInterface
|
||||
}
|
||||
asort($list);
|
||||
|
||||
array_unshift($list, trans('firefly.csv_do_not_map'));
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
@ -27,6 +27,8 @@ class Category implements MapperInterface
|
||||
}
|
||||
asort($list);
|
||||
|
||||
array_unshift($list, trans('firefly.csv_do_not_map'));
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
@ -27,6 +27,8 @@ class Tag implements MapperInterface
|
||||
}
|
||||
asort($list);
|
||||
|
||||
array_unshift($list, trans('firefly.csv_do_not_map'));
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
@ -23,6 +23,10 @@ class TransactionCurrency implements MapperInterface
|
||||
$list[$currency->id] = $currency->name . ' (' . $currency->code . ')';
|
||||
}
|
||||
|
||||
asort($list);
|
||||
|
||||
array_unshift($list, trans('firefly.csv_do_not_map'));
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
@ -25,7 +25,8 @@ return [
|
||||
'csv_index_title' => 'Upload and import a CSV file',
|
||||
'csv_index_text' =>
|
||||
'This form allows you to import a CSV file with transactions into Firefly. It is based on the excellent CSV importer made by' .
|
||||
' the folks at <a href="https://www.atlassian.com/">Atlassian</a>. Simply upload your CSV file and follow the instructions.',
|
||||
' the folks at <a href="https://www.atlassian.com/">Atlassian</a>. Simply upload your CSV file and follow the instructions.' .
|
||||
' If you would like to learn more, please click on the <i class="fa fa-question-circle"></i> button at the top of this page.',
|
||||
'csv_index_beta_warning' => 'This tool is very much in beta. Please proceed with caution',
|
||||
'csv_header_help' => 'Check this box when your CSV file\'s first row consists of column names, not actual data',
|
||||
'csv_date_help' => 'Date time format in your CSV. Follow the format like <a href="https://secure.' .
|
||||
@ -70,6 +71,7 @@ return [
|
||||
'csv_error_see_logs' => 'Check the log files to see details.',
|
||||
'csv_start_over' => 'Import again',
|
||||
'csv_to_index' => 'Back home',
|
||||
'csv_do_not_map' => 'Do not map this value',
|
||||
// 'csv_index_text' => 'Here be explanation.',
|
||||
// 'csv_upload_form' => 'Upload form',
|
||||
// 'upload_csv_file' => 'Upload CSV file',
|
||||
|
@ -28,6 +28,7 @@ return [
|
||||
'categories-delete' => 'categories.delete',
|
||||
'categories-show' => 'categories.show',
|
||||
'categories-noCategory' => 'categories.noCategory',
|
||||
'csv-index' => 'Upload and import a CSV file',
|
||||
'currency-index' => 'currency.index',
|
||||
'currency-create' => 'currency.create',
|
||||
'currency-edit' => 'currency.edit',
|
||||
|
@ -45,17 +45,17 @@
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<th>{{ 'cvs_column_name'|_ }}</th>
|
||||
<th>{{ 'cvs_column_example'|_ }}</th>
|
||||
<th>{{ 'cvs_column_role'|_ }}</th>
|
||||
<th>{{ 'csv_do_map_value'|_ }}</th>
|
||||
<th style="width:20%;">{{ 'cvs_column_name'|_ }}</th>
|
||||
<th style="width:40%;">{{ 'cvs_column_example'|_ }}</th>
|
||||
<th style="width:30%;">{{ 'cvs_column_role'|_ }}</th>
|
||||
<th style="width:10%;">{{ 'csv_do_map_value'|_ }}</th>
|
||||
</thead>
|
||||
{% for index,header in headers %}
|
||||
<tr>
|
||||
<td>{{ header }}</td>
|
||||
<td>{{ example[index] }}</td>
|
||||
<td><code>{{ example[index] }}</code></td>
|
||||
<td>
|
||||
{{ Form.select(('role['~index~']'), availableRoles,roles[index]) }}
|
||||
{{ Form.select(('role['~index~']'), availableRoles,roles[index],{class: 'form-control'}) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form.checkbox(('map['~index~']'),1,map[index]) }}
|
||||
|
@ -61,6 +61,8 @@
|
||||
|
||||
{{ ExpandedForm.file('csv_config',{helpText: 'csv_csv_config_file_help'|_}) }}
|
||||
|
||||
<!-- ExpandedForm.multiCheckbox('specifix',Config.get('csv.specifix')) -->
|
||||
|
||||
{% if not uploadPossible %}
|
||||
<div class="form-group" id="csv_holder">
|
||||
<div class="col-sm-4">
|
||||
|
@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ 'csv_map_text'|_ }}
|
||||
{{ 'csv_map_text'|_ }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -45,18 +45,18 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table">
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<th>{{ 'cvs_field_value'|_ }}</th>
|
||||
<th style="width:50%;">{{ 'cvs_field_value'|_ }}</th>
|
||||
<th>{{ 'csv_field_mapped_to'|_ }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for value in values[index] %}
|
||||
<tr>
|
||||
<td>{{ value }}</td>
|
||||
<td><code>{{ value }}</code></td>
|
||||
<td>
|
||||
{{ Form.select('mapping['~index~']['~value~']',options[index], mapped[index][value]) }}
|
||||
{{ Form.select('mapping['~index~']['~value~']',options[index], mapped[index][value], {class: 'form-control'}) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user