2023-08-14 09:23:39 +00:00
|
|
|
<?php
|
|
|
|
|
|
2023-08-14 17:48:26 +00:00
|
|
|
use App\Enums\Invoices\InvoiceStatusEnum;
|
2023-08-14 09:23:39 +00:00
|
|
|
use App\Models\Brand;
|
|
|
|
|
use App\Models\Company;
|
|
|
|
|
use App\Models\Information;
|
|
|
|
|
use App\Models\Invoice;
|
|
|
|
|
use App\Models\Label;
|
|
|
|
|
use App\Models\Package;
|
|
|
|
|
use App\Models\Site;
|
|
|
|
|
use App\Models\Ticket\TicketType;
|
|
|
|
|
use App\Models\User;
|
|
|
|
|
use Diglactic\Breadcrumbs\Breadcrumbs;
|
|
|
|
|
use Diglactic\Breadcrumbs\Generator;
|
|
|
|
|
|
|
|
|
|
// * PACKAGES
|
|
|
|
|
Breadcrumbs::for('bo.packages.index', function (Generator $trail) {
|
|
|
|
|
$trail->push(__('models.classes.packages'), route('bo.packages.index'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.packages.create', function (Generator $trail) {
|
|
|
|
|
$trail->parent('bo.packages.index');
|
|
|
|
|
$trail->push(__('crud.actions.create'), route('bo.packages.create'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.packages.edit', function (Generator $trail, Package $package) {
|
|
|
|
|
$trail->parent('bo.packages.index');
|
|
|
|
|
$trail->push(__('crud.actions.edit'), route('bo.packages.edit', $package->id));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// * INFORMATIONS
|
|
|
|
|
Breadcrumbs::for('bo.informations.index', function (Generator $trail) {
|
|
|
|
|
$trail->push(__('models.classes.informations'), route('bo.informations.index'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.informations.create', function (Generator $trail) {
|
|
|
|
|
$trail->parent('bo.informations.index');
|
|
|
|
|
$trail->push(__('crud.actions.create'), route('bo.informations.create'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.informations.edit', function (Generator $trail, Information $information) {
|
|
|
|
|
$trail->parent('bo.informations.index');
|
|
|
|
|
$trail->push(__('crud.actions.edit'), route('bo.informations.edit', $information->id));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// * USERS
|
|
|
|
|
Breadcrumbs::for('bo.users.index', function (Generator $trail) {
|
|
|
|
|
$trail->push(__('models.classes.users'), route('bo.users.index'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.users.create', function (Generator $trail) {
|
|
|
|
|
$trail->parent('bo.users.index');
|
|
|
|
|
$trail->push(__('crud.actions.create'), route('bo.users.create'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.users.edit', function (Generator $trail, User $user) {
|
|
|
|
|
$trail->parent('bo.users.index');
|
|
|
|
|
$trail->push(__('crud.actions.edit'), route('bo.users.edit', $user->id));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// * TICKET_TYPES
|
|
|
|
|
Breadcrumbs::for('bo.ticket_types.index', function (Generator $trail) {
|
|
|
|
|
$trail->push(trans_choice('models.classes.ticket_types', 2), route('bo.ticket_types.index'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.ticket_types.create', function (Generator $trail) {
|
|
|
|
|
$trail->parent('bo.ticket_types.index');
|
|
|
|
|
$trail->push(__('crud.actions.create'), route('bo.ticket_types.create'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.ticket_types.edit', function (Generator $trail, TicketType $ticket_type) {
|
|
|
|
|
$trail->parent('bo.ticket_types.index');
|
|
|
|
|
$trail->push(__('crud.actions.edit'), route('bo.ticket_types.edit', $ticket_type->id));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// * COMPANIES
|
|
|
|
|
Breadcrumbs::for('bo.companies.index', function (Generator $trail) {
|
|
|
|
|
$trail->push(__('models.classes.companies'), route('bo.companies.index'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.companies.create', function (Generator $trail) {
|
|
|
|
|
$trail->parent('bo.companies.index');
|
|
|
|
|
$trail->push(__('crud.actions.create'), route('bo.companies.create'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.companies.edit', function (Generator $trail, Company $company) {
|
|
|
|
|
$trail->parent('bo.companies.index');
|
|
|
|
|
$trail->push(__('crud.actions.edit'), route('bo.companies.edit', $company->id));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// * INVOICES
|
|
|
|
|
Breadcrumbs::for('bo.invoices.index', function (Generator $trail) {
|
2023-08-14 17:48:26 +00:00
|
|
|
$trail->push(__('models.classes.invoices'), route('bo.invoices.index', ['status' => InvoiceStatusEnum::opened]));
|
2023-08-14 09:23:39 +00:00
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.invoices.create', function (Generator $trail) {
|
|
|
|
|
$trail->parent('bo.invoices.index');
|
|
|
|
|
$trail->push(__('crud.actions.create'), route('bo.invoices.create'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.invoices.edit', function (Generator $trail, Invoice $invoice) {
|
|
|
|
|
$trail->parent('bo.invoices.index');
|
|
|
|
|
$trail->push(__('crud.actions.edit'), route('bo.invoices.edit', $invoice->id));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.invoices.show', function (Generator $trail, Invoice $invoice) {
|
|
|
|
|
$trail->parent('bo.invoices.index');
|
|
|
|
|
$trail->push(__('crud.actions.show'), route('bo.invoices.show', $invoice->id));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// * SITES
|
|
|
|
|
Breadcrumbs::for('bo.sites.index', function (Generator $trail) {
|
|
|
|
|
$trail->push(__('models.classes.sites'), route('bo.sites.index'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.sites.create', function (Generator $trail) {
|
|
|
|
|
$trail->parent('bo.sites.index');
|
|
|
|
|
$trail->push(__('crud.actions.create'), route('bo.sites.create'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.sites.edit', function (Generator $trail, Site $site) {
|
|
|
|
|
$trail->parent('bo.sites.index');
|
|
|
|
|
$trail->push(__('crud.actions.edit'), route('bo.sites.edit', $site->id));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.sites.show', function (Generator $trail, Site $site) {
|
|
|
|
|
$trail->parent('bo.sites.index');
|
|
|
|
|
$trail->push(__('crud.actions.show'), route('bo.sites.show', $site->id));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// * BRANDS
|
|
|
|
|
Breadcrumbs::for('bo.brands.index', function (Generator $trail) {
|
|
|
|
|
$trail->push(__('models.classes.brands'), route('bo.brands.index'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.brands.create', function (Generator $trail) {
|
|
|
|
|
$trail->parent('bo.brands.index');
|
|
|
|
|
$trail->push(__('crud.actions.create'), route('bo.brands.create'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.brands.edit', function (Generator $trail, Brand $brand) {
|
|
|
|
|
$trail->parent('bo.brands.index');
|
|
|
|
|
$trail->push(__('crud.actions.edit'), route('bo.brands.edit', $brand->id));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.brands.show', function (Generator $trail, Brand $brand) {
|
|
|
|
|
$trail->parent('bo.brands.index');
|
|
|
|
|
$trail->push(__('crud.actions.show'), route('bo.brands.show', $brand->id));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// * ACCOUNTS
|
|
|
|
|
Breadcrumbs::for('bo.credit_accounts.index', function (Generator $trail) {
|
|
|
|
|
$trail->push(__('models.classes.accounts'), route('bo.credit_accounts.index'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.credit_accounts.credit_logs.index', function (Generator $trail) {
|
|
|
|
|
$trail->parent('bo.credit_accounts.index');
|
|
|
|
|
$trail->push(__('crud.actions.historic'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Breadcrumbs::for('bo.brands.credit_accounts.index', function (Generator $trail, Brand $brand) {
|
|
|
|
|
$trail->parent('bo.brands.index');
|
|
|
|
|
$trail->push(__('models.classes.accounts'), route('bo.brands.credit_accounts.index', $brand));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.brands.credit_accounts.create', function (Generator $trail, Brand $brand) {
|
|
|
|
|
$trail->parent('bo.brands.credit_accounts.index', $brand);
|
|
|
|
|
$trail->push(__('crud.actions.create'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.brands.credit_accounts.credit_logs.index', function (Generator $trail, Brand $brand) {
|
|
|
|
|
$trail->parent('bo.brands.credit_accounts.index', $brand);
|
|
|
|
|
$trail->push(__('crud.actions.historic'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.brands.credit_accounts.credit_logs.create', function (Generator $trail, Brand $brand) {
|
|
|
|
|
$trail->parent('bo.brands.credit_accounts.index', $brand);
|
|
|
|
|
$trail->push(__('crud.actions.credit'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// * LABELS
|
|
|
|
|
Breadcrumbs::for('bo.labels.index', function (Generator $trail) {
|
|
|
|
|
$trail->push(__('models.classes.labels'), route('bo.labels.index'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.labels.create', function (Generator $trail) {
|
|
|
|
|
$trail->parent('bo.labels.index');
|
|
|
|
|
$trail->push(trans('crud.actions.create'), route('bo.labels.create'));
|
|
|
|
|
});
|
|
|
|
|
Breadcrumbs::for('bo.labels.edit', function (Generator $trail, Label $label) {
|
|
|
|
|
$trail->parent('bo.labels.index');
|
|
|
|
|
$trail->push(trans('crud.actions.edit'), route('bo.labels.edit', $label->id));
|
|
|
|
|
});
|