Add option to delete webhooks.

This commit is contained in:
James Cole
2022-09-18 05:49:56 +02:00
parent 625ad14d7d
commit d9245f06f7
58 changed files with 768 additions and 43 deletions

View File

@@ -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
}