mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 18:54:58 +00:00 
			
		
		
		
	Small edit and show updates
This commit is contained in:
		| @@ -32,9 +32,13 @@ export function parseDownloadedSplits(downloads) { | |||||||
|  |  | ||||||
|             // meta data |             // meta data | ||||||
|             current.bill_id = download.bill_id; |             current.bill_id = download.bill_id; | ||||||
|  |             current.bill_name = download.bill_name; | ||||||
|             current.budget_id = download.budget_id; |             current.budget_id = download.budget_id; | ||||||
|  |             current.budget_name = download.budget_name; | ||||||
|             current.category_name = download.category_name; |             current.category_name = download.category_name; | ||||||
|  |             current.category_id = download.category_id; | ||||||
|             current.piggy_bank_id = download.piggy_bank_id; |             current.piggy_bank_id = download.piggy_bank_id; | ||||||
|  |             current.piggy_bank_name = download.piggy_bank_name; | ||||||
|  |  | ||||||
|             // meta dates |             // meta dates | ||||||
|             current.book_date = download.book_date; |             current.book_date = download.book_date; | ||||||
|   | |||||||
| @@ -44,9 +44,10 @@ let show = function () { | |||||||
|             transactionType: '', |             transactionType: '', | ||||||
|             transactionTypeTranslated: '', |             transactionTypeTranslated: '', | ||||||
|             title: '', |             title: '', | ||||||
|             totalAmount: 0, |  | ||||||
|             date: new Date, |             date: new Date, | ||||||
|         }, |         }, | ||||||
|  |         dateFields: ["book_date", "due_date", "interest_date", "invoice_date", "payment_date", "process_date"], | ||||||
|  |         metaFields: ['external_id','internal_reference','sepa_batch_id','sepa_ct_id','sepa_ct_op','sepa_db','sepa_country','sepa_cc','sepa_ep','sepa_ci','external_url'], | ||||||
|  |  | ||||||
|         // parse amounts per currency |         // parse amounts per currency | ||||||
|         amounts: {}, |         amounts: {}, | ||||||
| @@ -72,7 +73,6 @@ let show = function () { | |||||||
|                 this.groupProperties.transactionType = data.attributes.transactions[0].type; |                 this.groupProperties.transactionType = data.attributes.transactions[0].type; | ||||||
|                 this.groupProperties.transactionTypeTranslated = i18next.t('firefly.' + data.attributes.transactions[0].type); |                 this.groupProperties.transactionTypeTranslated = i18next.t('firefly.' + data.attributes.transactions[0].type); | ||||||
|                 this.groupProperties.title = data.attributes.title ?? data.attributes.transactions[0].description; |                 this.groupProperties.title = data.attributes.title ?? data.attributes.transactions[0].description; | ||||||
|                 this.groupProperties.totalAmount = 0; |  | ||||||
|                 this.entries = parseDownloadedSplits(data.attributes.transactions); |                 this.entries = parseDownloadedSplits(data.attributes.transactions); | ||||||
|                 // remove waiting thing. |                 // remove waiting thing. | ||||||
|                 this.notifications.wait.show = false; |                 this.notifications.wait.show = false; | ||||||
| @@ -90,8 +90,6 @@ let show = function () { | |||||||
|                             this.amounts[foreignCurrencyCode] = 0; |                             this.amounts[foreignCurrencyCode] = 0; | ||||||
|                             this.amounts[foreignCurrencyCode] += parseFloat(this.entries[i].foreign_amount); |                             this.amounts[foreignCurrencyCode] += parseFloat(this.entries[i].foreign_amount); | ||||||
|                         } |                         } | ||||||
|  |  | ||||||
|                         this.groupProperties.totalAmount = this.groupProperties.totalAmount + parseFloat(this.entries[i].amount); |  | ||||||
|                         if(0 === parseInt(i)) { |                         if(0 === parseInt(i)) { | ||||||
|                             this.groupProperties.date = this.entries[i].date; |                             this.groupProperties.date = this.entries[i].date; | ||||||
|                         } |                         } | ||||||
|   | |||||||
| @@ -90,7 +90,9 @@ | |||||||
|                                     </th> |                                     </th> | ||||||
|                                     <td> |                                     <td> | ||||||
|                                         <template x-for="entry in entries"> |                                         <template x-for="entry in entries"> | ||||||
|                                             <a :href="'./accounts/show/' + entry.source_account.id" :title="entry.source_account.name" x-text="entry.source_account.name"></a> |                                             <a :href="'./accounts/show/' + entry.source_account.id" | ||||||
|  |                                                :title="entry.source_account.name" | ||||||
|  |                                                x-text="entry.source_account.name"></a> | ||||||
|                                         </template> |                                         </template> | ||||||
|                                     </td> |                                     </td> | ||||||
|                                 </tr> |                                 </tr> | ||||||
| @@ -101,7 +103,9 @@ | |||||||
|                                     </th> |                                     </th> | ||||||
|                                     <td> |                                     <td> | ||||||
|                                         <template x-for="entry in entries"> |                                         <template x-for="entry in entries"> | ||||||
|                                             <a :href="'./accounts/show/' + entry.destination_account.id" :title="entry.destination_account.name" x-text="entry.destination_account.name"></a> |                                             <a :href="'./accounts/show/' + entry.destination_account.id" | ||||||
|  |                                                :title="entry.destination_account.name" | ||||||
|  |                                                x-text="entry.destination_account.name"></a> | ||||||
|                                         </template> |                                         </template> | ||||||
|                                     </td> |                                     </td> | ||||||
|                                 </tr> |                                 </tr> | ||||||
| @@ -117,89 +121,161 @@ | |||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
|             <div class="row"> |             <div class="row"> | ||||||
|                 <div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-xs-12"> |                 <template x-for="(entry, index) in entries"> | ||||||
|                     <div class="card mb-3"> |                     <div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-xs-12"> | ||||||
|                         <div class="card-header"> |                         <div class="card mb-3"> | ||||||
|                             <h3 class="card-title">Description (X from X)</h3> |                             <div class="card-header"> | ||||||
|  |                                 <h3 class="card-title"> | ||||||
|  |                                     <span x-text="entry.description"></span> | ||||||
|  |                                     <template x-if="entries.length > 1"> | ||||||
|  |                                     <span class="badge bg-secondary"> | ||||||
|  |                                         <span x-text="index + 1"></span> / <span x-text="entries.length"></span> | ||||||
|  |                                     </span> | ||||||
|  |                                     </template> | ||||||
|  |                                 </h3> | ||||||
|  |                             </div> | ||||||
|  |                             <div class="card-body p-0"> | ||||||
|  |                                 <table class="table table-x table-hover"> | ||||||
|  |                                     <tbody> | ||||||
|  |                                     <tr> | ||||||
|  |                                         <td colspan="2" class="text-center"> | ||||||
|  |                                             <a :href="'./accounts/show/' + entry.source_account.id" | ||||||
|  |                                                :title="entry.source_account.name" | ||||||
|  |                                                x-text="entry.source_account.name"></a> | ||||||
|  |                                             → | ||||||
|  |                                             <template x-if="'Withdrawal' === groupProperties.transactionType"> | ||||||
|  |                                                 <span class="text-danger" | ||||||
|  |                                                       x-text="formatMoney(entry.amount*-1, entry.currency_code)"></span> | ||||||
|  |                                             </template> | ||||||
|  | 
 | ||||||
|  |                                             <template x-if="'Deposit' === groupProperties.transactionType"> | ||||||
|  |                                                 <span class="text-success" | ||||||
|  |                                                       x-text="formatMoney(entry.amount, entry.currency_code)"></span> | ||||||
|  |                                             </template> | ||||||
|  | 
 | ||||||
|  |                                             <template x-if="'Transfer' === groupProperties.transactionType"> | ||||||
|  |                                                 <span class="text-info" | ||||||
|  |                                                       x-text="formatMoney(entry.amount, entry.currency_code)"></span> | ||||||
|  |                                             </template> | ||||||
|  |                                             <template | ||||||
|  |                                                 x-if="null !== entry.foreign_currency_code && 'Withdrawal' === groupProperties.transactionType"> | ||||||
|  |                                                 <span class="text-muted" | ||||||
|  |                                                       x-text="formatMoney(entry.foreign_amount*-1, entry.foreign_currency_code)"></span> | ||||||
|  |                                             </template> | ||||||
|  |                                             <template | ||||||
|  |                                                 x-if="null !== entry.foreign_currency_code && 'Withdrawal' !== groupProperties.transactionType"> | ||||||
|  |                                                 <span class="text-muted" | ||||||
|  |                                                       x-text="formatMoney(entry.foreign_amount, entry.foreign_currency_code)"></span> | ||||||
|  |                                             </template> | ||||||
|  | 
 | ||||||
|  |                                             <template | ||||||
|  |                                                 x-if="'Transfer' !== groupProperties.transactionType && 'Deposit' !== groupProperties.transactionType && 'Withdrawal' !== groupProperties.transactionType"> | ||||||
|  |                                                 <span>TODO PARSE MISSING AMOUNT</span> | ||||||
|  |                                             </template> | ||||||
|  |                                             → | ||||||
|  |                                             <a :href="'./accounts/show/' + entry.destination_account.id" | ||||||
|  |                                                :title="entry.destination_account.name" | ||||||
|  |                                                x-text="entry.destination_account.name"></a> | ||||||
|  |                                         </td> | ||||||
|  |                                     </tr> | ||||||
|  |                                     <template x-if="null !== entry.category_name"> | ||||||
|  |                                         <tr> | ||||||
|  |                                             <th style="width:10%;"> | ||||||
|  |                                                 <em title="{{ __('firefly.category') }}" | ||||||
|  |                                                     class="fa-solid fa-bookmark"></em> | ||||||
|  |                                             </th> | ||||||
|  |                                             <td><a :href="'./categories/show/' + entry.category_id" | ||||||
|  |                                                    :title="entry.category_name" x-text="entry.category_name"></a></td> | ||||||
|  |                                         </tr> | ||||||
|  |                                     </template> | ||||||
|  |                                     <template x-if="null !== entry.budget_name"> | ||||||
|  |                                         <tr> | ||||||
|  |                                             <th><em title="{{ __('firefly.budget') }}" | ||||||
|  |                                                     class="fa-solid fa-chart-pie"></em></th> | ||||||
|  |                                             <td> | ||||||
|  |                                                 <a :href="'./budgets/show/' + entry.budget_id" | ||||||
|  |                                                    :title="entry.budget_name" x-text="entry.budget_name"></a></td> | ||||||
|  |                                         </tr> | ||||||
|  |                                     </template> | ||||||
|  |                                     <template x-if="null !== entry.bill_name"> | ||||||
|  |                                         <tr> | ||||||
|  |                                             <td><em title="{{ __('firefly.subscription') }}" | ||||||
|  |                                                     class="fa-solid fa-calendar"></em></td> | ||||||
|  |                                             <td> | ||||||
|  |                                                 <a :href="'./bills/show/' + entry.bill_id" :title="entry.bill_name" | ||||||
|  |                                                    x-text="entry.bill_name"></a></td> | ||||||
|  |                                         </tr> | ||||||
|  |                                     </template> | ||||||
|  |                                     <template x-for="date in dateFields"> | ||||||
|  |                                         <template x-if="null !== entry[date]"> | ||||||
|  |                                             <tr> | ||||||
|  |                                                 <th><span x-text="date"></span></th> | ||||||
|  |                                                 <td><span x-text="entry[date]"></span></td> | ||||||
|  |                                             </tr> | ||||||
|  |                                         </template> | ||||||
|  |                                     </template> | ||||||
|  |                                     <template x-for="meta in metaFields"> | ||||||
|  |                                         <template x-if="null !== entry[meta] and '' !== entry[meta]"> | ||||||
|  |                                             <tr> | ||||||
|  |                                                 <th><span x-text="meta"></span></th> | ||||||
|  |                                                 <td><span x-text="entry[meta]"></span></td> | ||||||
|  |                                             </tr> | ||||||
|  |                                         </template> | ||||||
|  |                                     </template> | ||||||
|  |                                     <tr> | ||||||
|  |                                         <th>recurring things</th> | ||||||
|  |                                         <td>meta</td> | ||||||
|  |                                     </tr> | ||||||
|  |                                     <template x-if="entry.tags.length > 0"> | ||||||
|  |                                         <tr> | ||||||
|  |                                             <th><em title="{{ __('firefly.tags') }}" class="fa-solid fa-tag"></em></th> | ||||||
|  |                                             <td> | ||||||
|  |                                                 <template x-for="tag in entry.tags"> | ||||||
|  |                                                     <a class="badge text-bg-info" :href="'./tags/show/' + tag" | ||||||
|  |                                                        :title="tag" x-text="tag"></a> | ||||||
|  |                                                 </template> | ||||||
|  |                                             </td> | ||||||
|  |                                         </tr> | ||||||
|  |                                     </template> | ||||||
|  |                                     <template x-if="'' !== entry.notes && null !== entry.notes"> | ||||||
|  |                                         <tr> | ||||||
|  |                                             <td colspan="2" x-text="entry.notes"></td> | ||||||
|  |                                         </tr> | ||||||
|  |                                     </template> | ||||||
|  |                                     </tbody> | ||||||
|  |                                 </table> | ||||||
|  |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                         <div class="card-body p-0"> |                         <div class="card mb-3"> | ||||||
|                             <table class="table table-x table-hover"> |                             <div class="card-header"> | ||||||
|                                 <tbody> |                                 <h3 class="card-title">Transaction links</h3> | ||||||
|                                 <tr> |                             </div> | ||||||
|                                     <td colspan="2"> |                             <div class="card-body p-0"> | ||||||
|                                         center |                             </div> | ||||||
|                                         From A to B (summary) |                         </div> | ||||||
|                                     </td> |                         <div class="card mb-3"> | ||||||
|                                 </tr> |                             <div class="card-header"> | ||||||
|                                 <tr> |                                 <h3 class="card-title">Piggy bank events.</h3> | ||||||
|                                     <th>category icon</th> |                             </div> | ||||||
|                                     <td>category</td> |                             <div class="card-body p-0"> | ||||||
|                                 </tr> |                             </div> | ||||||
|                                 <tr> |                         </div> | ||||||
|                                     <th>budget icon</th> |                         <div class="card mb-3"> | ||||||
|                                     <td>budget</td> |                             <div class="card-header"> | ||||||
|                                 </tr> |                                 <h3 class="card-title">Attachments</h3> | ||||||
|                                 <tr> |                             </div> | ||||||
|                                     <th>subscription icon</th> |                             <div class="card-body p-0"> | ||||||
|                                     <td>subscription</td> |                             </div> | ||||||
|                                 </tr> |                         </div> | ||||||
|                                 <tr> |                         <div class="card mb-3"> | ||||||
|                                     <th>dates (x6) icon</th> |                             <div class="card-header"> | ||||||
|                                     <td>subscription</td> |                                 <h3 class="card-title">Audit log entries</h3> | ||||||
|                                 </tr> |                             </div> | ||||||
|                                 <tr> |                             <div class="card-body p-0"> | ||||||
|                                     <th>meta fields</th> |                             </div> | ||||||
|                                     <td>meta</td> |  | ||||||
|                                 </tr> |  | ||||||
|                                 <tr> |  | ||||||
|                                     <th>recurring things</th> |  | ||||||
|                                     <td>meta</td> |  | ||||||
|                                 </tr> |  | ||||||
|                                 <tr> |  | ||||||
|                                     <th>tags</th> |  | ||||||
|                                     <td>meta</td> |  | ||||||
|                                 </tr> |  | ||||||
|                                 <tr> |  | ||||||
|                                     <td colspan="2">notes</td> |  | ||||||
|                                 </tr> |  | ||||||
|                                 </tbody> |  | ||||||
|                             </table> |  | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     </div> | ||||||
|                     <div class="card mb-3"> |                 </template> | ||||||
|                         <div class="card-header"> |  | ||||||
|                             <h3 class="card-title">Transaction links</h3> |  | ||||||
|                         </div> |  | ||||||
|                         <div class="card-body p-0"> |  | ||||||
|                         </div> |  | ||||||
|                     </div> |  | ||||||
|                     <div class="card mb-3"> |  | ||||||
|                         <div class="card-header"> |  | ||||||
|                             <h3 class="card-title">Piggy bank events.</h3> |  | ||||||
|                         </div> |  | ||||||
|                         <div class="card-body p-0"> |  | ||||||
|                         </div> |  | ||||||
|                     </div> |  | ||||||
|                     <div class="card mb-3"> |  | ||||||
|                         <div class="card-header"> |  | ||||||
|                             <h3 class="card-title">Attachments</h3> |  | ||||||
|                         </div> |  | ||||||
|                         <div class="card-body p-0"> |  | ||||||
|                         </div> |  | ||||||
|                     </div> |  | ||||||
|                     <div class="card mb-3"> |  | ||||||
|                         <div class="card-header"> |  | ||||||
|                             <h3 class="card-title">Audit log entries</h3> |  | ||||||
|                         </div> |  | ||||||
|                         <div class="card-body p-0"> |  | ||||||
|                         </div> |  | ||||||
|                     </div> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|             <div class="row mt-3"> |  | ||||||
|                 <div class="col"> |  | ||||||
|                     <h3>{{ __('firefly.audit_log_entries') }}</h3> |  | ||||||
|                 </div> |  | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user