mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-11 01:19:31 +00:00
Add option to delete webhooks.
This commit is contained in:
@@ -40,6 +40,7 @@ use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionJournalLink;
|
||||
use FireflyIII\Models\Webhook;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
@@ -1244,6 +1245,30 @@ try {
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::for(
|
||||
'webhooks.show',
|
||||
static function (Generator $breadcrumbs, Webhook $webhook) {
|
||||
$breadcrumbs->parent('webhooks.index');
|
||||
$breadcrumbs->push(limitStringLength($webhook->title), route('webhooks.show', [$webhook->id]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::for(
|
||||
'webhooks.delete',
|
||||
static function (Generator $breadcrumbs, Webhook $webhook) {
|
||||
$breadcrumbs->parent('webhooks.show', $webhook);
|
||||
$breadcrumbs->push(trans('firefly.delete_webhook', ['title' => limitStringLength($webhook->title)]), route('webhooks.delete', [$webhook->id]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::for(
|
||||
'webhooks.edit',
|
||||
static function (Generator $breadcrumbs, Webhook $webhook) {
|
||||
$breadcrumbs->parent('webhooks.show', $webhook);
|
||||
$breadcrumbs->push(trans('firefly.edit_webhook', ['title' => limitStringLength($webhook->title)]), route('webhooks.edit', [$webhook->id]));
|
||||
}
|
||||
);
|
||||
|
||||
} catch (DuplicateBreadcrumbException $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user