mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
v5.0.0 update
This commit is contained in:
420
config/abilities.php
Normal file
420
config/abilities.php
Normal file
@ -0,0 +1,420 @@
|
||||
<?php
|
||||
|
||||
use Crater\Models\Customer;
|
||||
use Crater\Models\CustomField;
|
||||
use Crater\Models\Estimate;
|
||||
use Crater\Models\ExchangeRateProvider;
|
||||
use Crater\Models\Expense;
|
||||
use Crater\Models\Invoice;
|
||||
use Crater\Models\Item;
|
||||
use Crater\Models\Note;
|
||||
use Crater\Models\Payment;
|
||||
use Crater\Models\RecurringInvoice;
|
||||
use Crater\Models\TaxType;
|
||||
|
||||
return [
|
||||
'abilities' => [
|
||||
|
||||
// Customer
|
||||
[
|
||||
"name" => "view customer",
|
||||
"ability" => "view-customer",
|
||||
"model" => Customer::class,
|
||||
],
|
||||
[
|
||||
"name" => "create customer",
|
||||
"ability" => "create-customer",
|
||||
"model" => Customer::class,
|
||||
"depends_on" => [
|
||||
'view-customer',
|
||||
'view-custom-field',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "edit customer",
|
||||
"ability" => "edit-customer",
|
||||
"model" => Customer::class,
|
||||
"depends_on" => [
|
||||
'view-customer',
|
||||
'view-custom-field',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "delete customer",
|
||||
"ability" => "delete-customer",
|
||||
"model" => Customer::class,
|
||||
"depends_on" => [
|
||||
'view-customer',
|
||||
]
|
||||
],
|
||||
|
||||
// Item
|
||||
[
|
||||
"name" => "view item",
|
||||
"ability" => "view-item",
|
||||
"model" => Item::class,
|
||||
],
|
||||
[
|
||||
"name" => "create item",
|
||||
"ability" => "create-item",
|
||||
"model" => Item::class,
|
||||
"depends_on" => [
|
||||
'view-item',
|
||||
'view-tax-type'
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "edit item",
|
||||
"ability" => "edit-item",
|
||||
"model" => Item::class,
|
||||
"depends_on" => [
|
||||
'view-item',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "delete item",
|
||||
"ability" => "delete-item",
|
||||
"model" => Item::class,
|
||||
"depends_on" => [
|
||||
'view-item',
|
||||
]
|
||||
],
|
||||
|
||||
// Tax Type
|
||||
[
|
||||
"name" => "view tax type",
|
||||
"ability" => "view-tax-type",
|
||||
"model" => TaxType::class,
|
||||
],
|
||||
[
|
||||
"name" => "create tax type",
|
||||
"ability" => "create-tax-type",
|
||||
"model" => TaxType::class,
|
||||
"depends_on" => [
|
||||
'view-tax-type',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "edit tax type",
|
||||
"ability" => "edit-tax-type",
|
||||
"model" => TaxType::class,
|
||||
"depends_on" => [
|
||||
'view-tax-type',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "delete tax type",
|
||||
"ability" => "delete-tax-type",
|
||||
"model" => TaxType::class,
|
||||
"depends_on" => [
|
||||
'view-tax-type',
|
||||
]
|
||||
],
|
||||
|
||||
// Estimate
|
||||
[
|
||||
"name" => "view estimate",
|
||||
"ability" => "view-estimate",
|
||||
"model" => Estimate::class,
|
||||
],
|
||||
[
|
||||
"name" => "create estimate",
|
||||
"ability" => "create-estimate",
|
||||
"model" => Estimate::class,
|
||||
"depends_on" => [
|
||||
'view-estimate',
|
||||
'view-item',
|
||||
'view-tax-type',
|
||||
'view-customer',
|
||||
'view-custom-field',
|
||||
'view-all-notes'
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "edit estimate",
|
||||
"ability" => "edit-estimate",
|
||||
"model" => Estimate::class,
|
||||
"depends_on" => [
|
||||
'view-item',
|
||||
'view-estimate',
|
||||
'view-tax-type',
|
||||
'view-customer',
|
||||
'view-custom-field',
|
||||
'view-all-notes'
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "delete estimate",
|
||||
"ability" => "delete-estimate",
|
||||
"model" => Estimate::class,
|
||||
"depends_on" => [
|
||||
'view-estimate',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "send estimate",
|
||||
"ability" => "send-estimate",
|
||||
"model" => Estimate::class,
|
||||
],
|
||||
|
||||
// Invoice
|
||||
[
|
||||
"name" => "view invoice",
|
||||
"ability" => "view-invoice",
|
||||
"model" => Invoice::class,
|
||||
],
|
||||
[
|
||||
"name" => "create invoice",
|
||||
"ability" => "create-invoice",
|
||||
"model" => Invoice::class,
|
||||
'owner_only' => false,
|
||||
"depends_on" => [
|
||||
'view-item',
|
||||
'view-invoice',
|
||||
'view-tax-type',
|
||||
'view-customer',
|
||||
'view-custom-field',
|
||||
'view-all-notes'
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "edit invoice",
|
||||
"ability" => "edit-invoice",
|
||||
"model" => Invoice::class,
|
||||
"depends_on" => [
|
||||
'view-item',
|
||||
'view-invoice',
|
||||
'view-tax-type',
|
||||
'view-customer',
|
||||
'view-custom-field',
|
||||
'view-all-notes'
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "delete invoice",
|
||||
"ability" => "delete-invoice",
|
||||
"model" => Invoice::class,
|
||||
"depends_on" => [
|
||||
'view-invoice'
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "send invoice",
|
||||
"ability" => "send-invoice",
|
||||
"model" => Invoice::class,
|
||||
],
|
||||
|
||||
// Recurring Invoice
|
||||
[
|
||||
"name" => "view recurring invoice",
|
||||
"ability" => "view-recurring-invoice",
|
||||
"model" => RecurringInvoice::class,
|
||||
],
|
||||
[
|
||||
"name" => "create recurring invoice",
|
||||
"ability" => "create-recurring-invoice",
|
||||
"model" => RecurringInvoice::class,
|
||||
"depends_on" => [
|
||||
'view-item',
|
||||
'view-recurring-invoice',
|
||||
'view-tax-type',
|
||||
'view-customer',
|
||||
'view-all-notes',
|
||||
'send-invoice'
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "edit recurring invoice",
|
||||
"ability" => "edit-recurring-invoice",
|
||||
"model" => RecurringInvoice::class,
|
||||
"depends_on" => [
|
||||
'view-item',
|
||||
'view-recurring-invoice',
|
||||
'view-tax-type',
|
||||
'view-customer',
|
||||
'view-all-notes',
|
||||
'send-invoice'
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "delete recurring invoice",
|
||||
"ability" => "delete-recurring-invoice",
|
||||
"model" => RecurringInvoice::class,
|
||||
"depends_on" => [
|
||||
'view-recurring-invoice',
|
||||
]
|
||||
],
|
||||
|
||||
// Payment
|
||||
[
|
||||
"name" => "view payment",
|
||||
"ability" => "view-payment",
|
||||
"model" => Payment::class,
|
||||
],
|
||||
[
|
||||
"name" => "create payment",
|
||||
"ability" => "create-payment",
|
||||
"model" => Payment::class,
|
||||
"depends_on" => [
|
||||
'view-customer',
|
||||
'view-payment',
|
||||
'view-invoice',
|
||||
'view-custom-field',
|
||||
'view-all-notes'
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "edit payment",
|
||||
"ability" => "edit-payment",
|
||||
"model" => Payment::class,
|
||||
"depends_on" => [
|
||||
'view-customer',
|
||||
'view-payment',
|
||||
'view-invoice',
|
||||
'view-custom-field',
|
||||
'view-all-notes'
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "delete payment",
|
||||
"ability" => "delete-payment",
|
||||
"model" => Payment::class,
|
||||
"depends_on" => [
|
||||
'view-payment',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "send payment",
|
||||
"ability" => "send-payment",
|
||||
"model" => Payment::class,
|
||||
],
|
||||
|
||||
// Expense
|
||||
[
|
||||
"name" => "view expense",
|
||||
"ability" => "view-expense",
|
||||
"model" => Expense::class,
|
||||
],
|
||||
[
|
||||
"name" => "create expense",
|
||||
"ability" => "create-expense",
|
||||
"model" => Expense::class,
|
||||
"depends_on" => [
|
||||
'view-customer',
|
||||
'view-expense',
|
||||
'view-custom-field',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "edit expense",
|
||||
"ability" => "edit-expense",
|
||||
"model" => Expense::class,
|
||||
"depends_on" => [
|
||||
'view-customer',
|
||||
'view-expense',
|
||||
'view-custom-field',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "delete expense",
|
||||
"ability" => "delete-expense",
|
||||
"model" => Expense::class,
|
||||
"depends_on" => [
|
||||
'view-expense',
|
||||
]
|
||||
],
|
||||
|
||||
// Custom Field
|
||||
[
|
||||
"name" => "view custom field",
|
||||
"ability" => "view-custom-field",
|
||||
"model" => CustomField::class,
|
||||
],
|
||||
[
|
||||
"name" => "create custom field",
|
||||
"ability" => "create-custom-field",
|
||||
"model" => CustomField::class,
|
||||
"depends_on" => [
|
||||
'view-custom-field',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "edit custom field",
|
||||
"ability" => "edit-custom-field",
|
||||
"model" => CustomField::class,
|
||||
"depends_on" => [
|
||||
'view-custom-field',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "delete custom field",
|
||||
"ability" => "delete-custom-field",
|
||||
"model" => CustomField::class,
|
||||
"depends_on" => [
|
||||
'view-custom-field',
|
||||
]
|
||||
],
|
||||
|
||||
// Financial Reports
|
||||
[
|
||||
"name" => "view financial reports",
|
||||
"ability" => "view-financial-reports",
|
||||
"model" => null,
|
||||
],
|
||||
|
||||
// Exchange Rate Provider
|
||||
[
|
||||
"name" => "view exchange rate provider",
|
||||
"ability" => "view-exchange-rate-provider",
|
||||
"model" => ExchangeRateProvider::class,
|
||||
'owner_only' => false,
|
||||
],
|
||||
[
|
||||
"name" => "create exchange rate provider",
|
||||
"ability" => "create-exchange-rate-provider",
|
||||
"model" => ExchangeRateProvider::class,
|
||||
'owner_only' => false,
|
||||
"depends_on" => [
|
||||
'view-exchange-rate-provider',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "edit exchange rate provider",
|
||||
"ability" => "edit-exchange-rate-provider",
|
||||
"model" => ExchangeRateProvider::class,
|
||||
'owner_only' => false,
|
||||
"depends_on" => [
|
||||
'view-exchange-rate-provider',
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "delete exchange rate provider",
|
||||
"ability" => "delete-exchange-rate-provider",
|
||||
"model" => ExchangeRateProvider::class,
|
||||
'owner_only' => false,
|
||||
"depends_on" => [
|
||||
'view-exchange-rate-provider',
|
||||
]
|
||||
],
|
||||
|
||||
// Settings
|
||||
[
|
||||
"name" => "view company dashboard",
|
||||
"ability" => "dashboard",
|
||||
"model" => null,
|
||||
],
|
||||
[
|
||||
"name" => "view all notes",
|
||||
"ability" => "view-all-notes",
|
||||
"model" => Note::class,
|
||||
],
|
||||
[
|
||||
"name" => "manage notes",
|
||||
"ability" => "manage-all-notes",
|
||||
"model" => Note::class,
|
||||
"depends_on" => [
|
||||
'view-all-notes'
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
@ -157,6 +157,7 @@ return [
|
||||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
Lavary\Menu\ServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
@ -219,5 +220,6 @@ return [
|
||||
'Flash' => Laracasts\Flash\Flash::class,
|
||||
// 'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
|
||||
'Pusher' => Pusher\Pusher::class,
|
||||
'Menu' => Lavary\Menu\Facade::class
|
||||
],
|
||||
];
|
||||
|
||||
@ -46,6 +46,12 @@ return [
|
||||
'provider' => 'users',
|
||||
'hash' => false,
|
||||
],
|
||||
|
||||
'customer' => [
|
||||
'driver' => 'sanctum',
|
||||
'provider' => 'customers',
|
||||
'hash' => false,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
@ -71,10 +77,10 @@ return [
|
||||
'model' => \Crater\Models\User::class,
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
// 'driver' => 'database',
|
||||
// 'table' => 'users',
|
||||
// ],
|
||||
'customers' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => \Crater\Models\Customer::class,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
@ -99,6 +105,13 @@ return [
|
||||
'expire' => 60,
|
||||
'throttle' => 60,
|
||||
],
|
||||
|
||||
'customers' => [
|
||||
'provider' => 'customers',
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
'throttle' => 60,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|
||||
@ -1,5 +1,17 @@
|
||||
<?php
|
||||
|
||||
use Crater\Models\Customer;
|
||||
use Crater\Models\CustomField;
|
||||
use Crater\Models\Estimate;
|
||||
use Crater\Models\ExchangeRateProvider;
|
||||
use Crater\Models\Expense;
|
||||
use Crater\Models\Invoice;
|
||||
use Crater\Models\Item;
|
||||
use Crater\Models\Note;
|
||||
use Crater\Models\Payment;
|
||||
use Crater\Models\RecurringInvoice;
|
||||
use Crater\Models\TaxType;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
@ -70,4 +82,350 @@ return [
|
||||
['key' => 'november-october' , 'value' => '11-10'],
|
||||
['key' => 'december-november', 'value' => '12-11'],
|
||||
],
|
||||
|
||||
/*
|
||||
* List of convert estimate options
|
||||
*/
|
||||
'convert_estimate_options' => [
|
||||
['key' => 'settings.preferences.no_action', 'value' => 'no_action'],
|
||||
['key' => 'settings.preferences.delete_estimate', 'value' => 'delete_estimate'],
|
||||
['key' => 'settings.preferences.mark_estimate_as_accepted', 'value' => 'mark_estimate_as_accepted'],
|
||||
],
|
||||
|
||||
/*
|
||||
* List of retrospective edits
|
||||
*/
|
||||
'retrospective_edits' => [
|
||||
['key' => 'settings.preferences.allow', 'value' => 'allow'],
|
||||
['key' => 'settings.preferences.disable_on_invoice_partial_paid', 'value' => 'disable_on_invoice_partial_paid'],
|
||||
['key' => 'settings.preferences.disable_on_invoice_paid', 'value' => 'disable_on_invoice_paid'],
|
||||
['key' => 'settings.preferences.disable_on_invoice_sent', 'value' => 'disable_on_invoice_sent'],
|
||||
],
|
||||
|
||||
/*
|
||||
* List of setting menu
|
||||
*/
|
||||
'setting_menu' => [
|
||||
[
|
||||
'title' => 'settings.menu_title.account_settings',
|
||||
'group' => '',
|
||||
'name' => 'Account Settings',
|
||||
'link' => '/admin/settings/account-settings',
|
||||
'icon' => 'UserIcon',
|
||||
'owner_only' => false,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.company_information',
|
||||
'group' => '',
|
||||
'name' => 'Company information',
|
||||
'link' => '/admin/settings/company-info',
|
||||
'icon' => 'OfficeBuildingIcon',
|
||||
'owner_only' => true,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.preferences',
|
||||
'group' => '',
|
||||
'name' => 'Preferences',
|
||||
'link' => '/admin/settings/preferences',
|
||||
'icon' => 'CogIcon',
|
||||
'owner_only' => true,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.customization',
|
||||
'group' => '',
|
||||
'name' => 'Customization',
|
||||
'link' => '/admin/settings/customization',
|
||||
'icon' => 'PencilAltIcon',
|
||||
'owner_only' => true,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'settings.roles.title',
|
||||
'group' => '',
|
||||
'name' => 'Roles',
|
||||
'link' => '/admin/settings/roles-settings',
|
||||
'icon' => 'UserGroupIcon',
|
||||
'owner_only' => true,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.exchange_rate',
|
||||
'group' => '',
|
||||
'name' => 'Exchange Rate Provider',
|
||||
'link' => '/admin/settings/exchange-rate-provider',
|
||||
'icon' => 'CashIcon',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-exchange-rate-provider',
|
||||
'model' => ExchangeRateProvider::class
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.notifications',
|
||||
'group' => '',
|
||||
'name' => 'Notifications',
|
||||
'link' => '/admin/settings/notifications',
|
||||
'icon' => 'BellIcon',
|
||||
'owner_only' => true,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.tax_types',
|
||||
'group' => '',
|
||||
'name' => 'Tax types',
|
||||
'link' => '/admin/settings/tax-types',
|
||||
'icon' => 'CheckCircleIcon',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-tax-type',
|
||||
'model' => TaxType::class
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.payment_modes',
|
||||
'group' => '',
|
||||
'name' => 'Payment modes',
|
||||
'link' => '/admin/settings/payment-mode',
|
||||
'icon' => 'CreditCardIcon',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-payment',
|
||||
'model' => Payment::class
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.custom_fields',
|
||||
'group' => '',
|
||||
'name' => 'Custom fields',
|
||||
'link' => '/admin/settings/custom-fields',
|
||||
'icon' => 'CubeIcon',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-custom-field',
|
||||
'model' => CustomField::class
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.notes',
|
||||
'group' => '',
|
||||
'name' => 'Notes',
|
||||
'link' => '/admin/settings/notes',
|
||||
'icon' => 'ClipboardCheckIcon',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-all-notes',
|
||||
'model' => Note::class
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.expense_category',
|
||||
'group' => '',
|
||||
'name' => 'Expense Category',
|
||||
'link' => '/admin/settings/expense-category',
|
||||
'icon' => 'ClipboardListIcon',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-expense',
|
||||
'model' => Expense::class
|
||||
],
|
||||
[
|
||||
'title' => 'settings.mail.mail_config',
|
||||
'group' => '',
|
||||
'name' => 'Mail Configuration',
|
||||
'link' => '/admin/settings/mail-configuration',
|
||||
'icon' => 'MailIcon',
|
||||
'owner_only' => true,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.file_disk',
|
||||
'group' => '',
|
||||
'name' => 'File Disk',
|
||||
'link' => '/admin/settings/file-disk',
|
||||
'icon' => 'FolderIcon',
|
||||
'owner_only' => true,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.backup',
|
||||
'group' => '',
|
||||
'name' => 'Backup',
|
||||
'link' => '/admin/settings/backup',
|
||||
'icon' => 'DatabaseIcon',
|
||||
'owner_only' => true,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'settings.menu_title.update_app',
|
||||
'group' => '',
|
||||
'name' => 'Update App',
|
||||
'link' => '/admin/settings/update-app',
|
||||
'icon' => 'RefreshIcon',
|
||||
'owner_only' => true,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* List of main menu
|
||||
*/
|
||||
'main_menu' => [
|
||||
[
|
||||
'title' => 'navigation.dashboard',
|
||||
'group' => 1,
|
||||
'link' => '/admin/dashboard',
|
||||
'icon' => 'HomeIcon',
|
||||
'name' => 'Dashboard',
|
||||
'owner_only' => false,
|
||||
'ability' => 'dashboard',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'navigation.customers',
|
||||
'group' => 1,
|
||||
'link' => '/admin/customers',
|
||||
'icon' => 'UserIcon',
|
||||
'name' => 'Customers',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-customer',
|
||||
'model' => Customer::class
|
||||
],
|
||||
[
|
||||
'title' => 'navigation.items',
|
||||
'group' => 1,
|
||||
'link' => '/admin/items',
|
||||
'icon' => 'StarIcon',
|
||||
'name' => 'Items',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-item',
|
||||
'model' => Item::class
|
||||
],
|
||||
[
|
||||
'title' => 'navigation.estimates',
|
||||
'group' => 2,
|
||||
'link' => '/admin/estimates',
|
||||
'icon' => 'DocumentIcon',
|
||||
'name' => 'Estimates',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-estimate',
|
||||
'model' => Estimate::class
|
||||
],
|
||||
[
|
||||
'title' => 'navigation.invoices',
|
||||
'group' => 2,
|
||||
'link' => '/admin/invoices',
|
||||
'icon' => 'DocumentTextIcon',
|
||||
'name' => 'Invoices',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-invoice',
|
||||
'model' => Invoice::class
|
||||
],
|
||||
[
|
||||
'title' => 'navigation.recurring-invoices',
|
||||
'group' => 2,
|
||||
'link' => '/admin/recurring-invoices',
|
||||
'icon' => 'DocumentTextIcon',
|
||||
'name' => 'Recurring Invoices',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-recurring-invoice',
|
||||
'model' => RecurringInvoice::class
|
||||
],
|
||||
[
|
||||
'title' => 'navigation.payments',
|
||||
'group' => 2,
|
||||
'link' => '/admin/payments',
|
||||
'icon' => 'CreditCardIcon',
|
||||
'name' => 'Payments',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-payment',
|
||||
'model' => Payment::class
|
||||
],
|
||||
[
|
||||
'title' => 'navigation.expenses',
|
||||
'group' => 2,
|
||||
'link' => '/admin/expenses',
|
||||
'icon' => 'CalculatorIcon',
|
||||
'name' => 'Expenses',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-expense',
|
||||
'model' => Expense::class
|
||||
],
|
||||
[
|
||||
'title' => 'navigation.users',
|
||||
'group' => 3,
|
||||
'link' => '/admin/users',
|
||||
'icon' => 'UsersIcon',
|
||||
'name' => 'Users',
|
||||
'owner_only' => true,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
[
|
||||
'title' => 'navigation.reports',
|
||||
'group' => 3,
|
||||
'link' => '/admin/reports',
|
||||
'icon' => 'ChartBarIcon',
|
||||
'name' => 'Reports',
|
||||
'owner_only' => false,
|
||||
'ability' => 'view-financial-reports',
|
||||
'model' => ''],
|
||||
[
|
||||
'title' => 'navigation.settings',
|
||||
'group' => 3,
|
||||
'link' => '/admin/settings',
|
||||
'icon' => 'CogIcon',
|
||||
'name' => 'Settings',
|
||||
'owner_only' => false,
|
||||
'ability' => '',
|
||||
'model' => ''
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* List of recurring invoice status
|
||||
*/
|
||||
'recurring_invoice_status' => [
|
||||
'create_status' => [
|
||||
['key' => 'settings.preferences.active', 'value' => 'ACTIVE'],
|
||||
['key' => 'settings.preferences.on_hold', 'value' => 'ON_HOLD']
|
||||
],
|
||||
'update_status' => [
|
||||
['key' => 'settings.preferences.active', 'value' => 'ACTIVE'],
|
||||
['key' => 'settings.preferences.on_hold', 'value' => 'ON_HOLD'],
|
||||
['key' => 'settings.preferences.completed', 'value' => 'COMPLETED'],
|
||||
]
|
||||
],
|
||||
|
||||
/*
|
||||
* List of exchange rate provider (currency converter server's)
|
||||
*/
|
||||
'currency_converter_servers' => [
|
||||
['key' => 'settings.preferences.premium', 'value' => 'PREMIUM'],
|
||||
['key' => 'settings.preferences.prepaid', 'value' => 'PREPAID'],
|
||||
['key' => 'settings.preferences.free', 'value' => 'FREE'],
|
||||
['key' => 'settings.preferences.dedicated', 'value' => 'DEDICATED'],
|
||||
],
|
||||
|
||||
/*
|
||||
* List of exchange rate drivers
|
||||
*/
|
||||
'exchange_rate_drivers' => [
|
||||
['key' => 'settings.exchange_rate.currency_converter', 'value' => 'currency_converter'],
|
||||
['key' => 'settings.exchange_rate.currency_freak', 'value' => 'currency_freak'],
|
||||
['key' => 'settings.exchange_rate.currency_layer', 'value' => 'currency_layer'],
|
||||
['key' => 'settings.exchange_rate.open_exchange_rate', 'value' => 'open_exchange_rate'],
|
||||
],
|
||||
|
||||
/*
|
||||
* List of Custom field supported models
|
||||
*/
|
||||
'custom_field_models' => [
|
||||
'Customer',
|
||||
'Estimate',
|
||||
'Invoice',
|
||||
'Payment',
|
||||
'Expense',
|
||||
]
|
||||
];
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
* @see https://github.com/vinkla/laravel-hashids
|
||||
*/
|
||||
|
||||
use Crater\Models\Company;
|
||||
use Crater\Models\Estimate;
|
||||
use Crater\Models\Invoice;
|
||||
use Crater\Models\Payment;
|
||||
@ -55,6 +56,11 @@ return [
|
||||
'length' => '20',
|
||||
'alphabet' => 'asqtW3eDRIxB65GYl7UVLS1dybn9XrKTZ4zO',
|
||||
],
|
||||
Company::class => [
|
||||
'salt' => Company::class.config('app.key'),
|
||||
'length' => '20',
|
||||
'alphabet' => 's0DxOFtEYEnuKPmP08Ch6A1iHlLmBTBVWms5',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
@ -1,88 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'models' => [
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* Eloquent model should be used to retrieve your permissions. Of course, it
|
||||
* is often just the "Permission" model but you may use whatever you like.
|
||||
*
|
||||
* The model you want to use as a Permission model needs to implement the
|
||||
* `Spatie\Permission\Contracts\Permission` contract.
|
||||
*/
|
||||
|
||||
'permission' => Spatie\Permission\Models\Permission::class,
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* Eloquent model should be used to retrieve your roles. Of course, it
|
||||
* is often just the "Role" model but you may use whatever you like.
|
||||
*
|
||||
* The model you want to use as a Role model needs to implement the
|
||||
* `Spatie\Permission\Contracts\Role` contract.
|
||||
*/
|
||||
|
||||
'role' => Spatie\Permission\Models\Role::class,
|
||||
|
||||
],
|
||||
|
||||
'table_names' => [
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your roles. We have chosen a basic
|
||||
* default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'roles' => 'roles',
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your permissions. We have chosen a basic
|
||||
* default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'permissions' => 'permissions',
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your models permissions. We have chosen a
|
||||
* basic default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'model_has_permissions' => 'model_has_permissions',
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your models roles. We have chosen a
|
||||
* basic default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'model_has_roles' => 'model_has_roles',
|
||||
|
||||
/*
|
||||
* When using the "HasRoles" trait from this package, we need to know which
|
||||
* table should be used to retrieve your roles permissions. We have chosen a
|
||||
* basic default value but you may easily change it to any table you like.
|
||||
*/
|
||||
|
||||
'role_has_permissions' => 'role_has_permissions',
|
||||
],
|
||||
|
||||
/*
|
||||
* By default all permissions will be cached for 24 hours unless a permission or
|
||||
* role is updated. Then the cache will be flushed immediately.
|
||||
*/
|
||||
|
||||
'cache_expiration_time' => 60 * 24,
|
||||
|
||||
/*
|
||||
* When set to true, the required permission/role names are added to the exception
|
||||
* message. This could be considered an information leak in some contexts, so
|
||||
* the default setting is false here for optimum safety.
|
||||
*/
|
||||
|
||||
'display_permission_in_exception' => false,
|
||||
];
|
||||
67
config/vite.php
Normal file
67
config/vite.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrypoints
|
||||
|--------------------------------------------------------------------------
|
||||
| The files in the configured directories will be considered
|
||||
| entry points and will not be required in the configuration file.
|
||||
| To disable the feature, set to false.
|
||||
*/
|
||||
'entrypoints' => [
|
||||
'resources/scripts/main.js',
|
||||
],
|
||||
'ignore_patterns' => ["/\.d\.ts$/"],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Aliases
|
||||
|--------------------------------------------------------------------------
|
||||
| These aliases will be added to the Vite configuration and used
|
||||
| to generate a proper tsconfig.json file.
|
||||
*/
|
||||
'aliases' => [
|
||||
'@' => 'resources',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Static assets path
|
||||
|--------------------------------------------------------------------------
|
||||
| This option defines the directory that Vite considers as the
|
||||
| public directory. Its content will be copied to the build directory
|
||||
| at build-time.
|
||||
| https://vitejs.dev/config/#publicdir
|
||||
*/
|
||||
'public_directory' => resource_path('static'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Ping timeout
|
||||
|--------------------------------------------------------------------------
|
||||
| The maximum duration, in seconds, that the ping to the development
|
||||
| server should take while trying to determine whether to use the
|
||||
| manifest or the server in a local environment.
|
||||
*/
|
||||
'ping_timeout' => .1,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Build path
|
||||
|--------------------------------------------------------------------------
|
||||
| The directory, relative to /public, in which Vite will build
|
||||
| the production files. This should match "build.outDir" in the Vite
|
||||
| configuration file.
|
||||
*/
|
||||
'build_path' => 'build',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Development URL
|
||||
|--------------------------------------------------------------------------
|
||||
| The URL at which the Vite development server runs.
|
||||
| This is used to generate the script tags when developing.
|
||||
*/
|
||||
'dev_url' => 'http://localhost:3000',
|
||||
];
|
||||
Reference in New Issue
Block a user