1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

Fixes for api docs + hyperlinks to document downloads in emails

This commit is contained in:
David Bomba 2024-08-03 09:36:46 +10:00
parent 83fe0521ca
commit da9e587f67
4 changed files with 6940 additions and 6885 deletions

View File

@ -65,7 +65,7 @@ class TemplateEmail extends Mailable
} }
$link_string = '<ul>'; $link_string = '<ul>';
$link_string .= "<li>{ctrans('texts.download_files')}</li>";
foreach ($this->build_email->getAttachmentLinks() as $link) { foreach ($this->build_email->getAttachmentLinks() as $link) {
$link_string .= "<li>{$link}</li>"; $link_string .= "<li>{$link}</li>";
} }

File diff suppressed because it is too large Load Diff

View File

@ -998,7 +998,7 @@ paths:
post: post:
tags: tags:
- bank_transactions - bank_transactions
summary: "Performs bulk actions on an array of bank_transations" summary: "Bulk actions"
description: "" description: ""
operationId: bulkBankTransactions operationId: bulkBankTransactions
parameters: parameters:
@ -1042,8 +1042,30 @@ paths:
post: post:
tags: tags:
- bank_transactions - bank_transactions
summary: "Performs match actions on an array of bank_transactions" summary: "Match transactions"
description: "" description: |
Matching invoices or a payment to a bank transactions.
The API expects the id of the transaction along with either a comma separated list of invoice ids OR the payment id to associate the transaction to.
Example for matching a transaction to two invoices:
{"transactions":[{"id":"olejRl5ejN","invoice_ids":"JxboYBLegw,JxboYBLeXX"}]}
Example for matching a transaction and a paymente:
{"transactions":[{"id":"olejRl5ejN","payment_id":"JxboYBLeXf"}]}
Matching expenses.
You can match an existing expense within Invoice Ninja - or - create a new expense using the following:
{"transactions":[{"id":"open5pld7A","vendor_id":"gl9avJnaG1","ninja_category_id":""}]}
To match to an existing expense:
{"transactions":[{"id":"Jxbo2qKagw","expense_id":"7N1aMM1aWm"}]}
operationId: matchBankTransactions operationId: matchBankTransactions
parameters: parameters:
- $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-API-TOKEN"

View File

@ -22,6 +22,7 @@
color-scheme: light dark; color-scheme: light dark;
supported-color-schemes: light dark; supported-color-schemes: light dark;
} }
@if(isset($settings) && $settings->email_style === 'dark') @if(isset($settings) && $settings->email_style === 'dark')
body { body {
background-color: #1a1a1a !important; background-color: #1a1a1a !important;
@ -48,6 +49,13 @@
hr { hr {
border-color: #474849 !important; border-color: #474849 !important;
} }
.file_icon {
filter: invert(1);
}
@else
.file_icon {
filter: invert(1);
}
@endif @endif
/** Content-specific styles. **/ /** Content-specific styles. **/
#content .button { #content .button {
@ -171,9 +179,12 @@
@isset($links) @isset($links)
<div> <div>
<ul style="list-style-type: none;"> <ul style="list-style-type: none;">
@if(count($links) > 0)
<li>{{ ctrans('texts.download_files')}}</li>
@endif
@foreach($links as $link) @foreach($links as $link)
<li>{!! $link ?? '' !!} <img height="15px" src="{{ asset('images/svg/dark/file.svg') }}"></li> <li>{!! $link ?? '' !!} <img height="15px" src="{{ asset('images/svg/dark/file.svg') }}" class="file_icon"></li>
@endforeach @endforeach
</ul> </ul>
</div> </div>