make document notification agnostic #1991
This commit is contained in:
118
config/type.php
118
config/type.php
@ -6,119 +6,129 @@ return [
|
||||
|
||||
// Documents
|
||||
Document::INVOICE_TYPE => [
|
||||
'alias' => '', // core empty but module write own alias
|
||||
'group' => 'sales', // controller folder name for permission and route
|
||||
'alias' => '', // core empty but module write own alias
|
||||
'group' => 'sales', // controller folder name for permission and route
|
||||
'route' => [
|
||||
'prefix' => 'invoices', // core use with group + prefix, module ex. estimates
|
||||
'parameter' => 'invoice', // sales/invoices/{parameter}/edit
|
||||
//'create' => 'invoices.create', // if you change route, you can write full path
|
||||
'prefix' => 'invoices', // core use with group + prefix, module ex. estimates
|
||||
'parameter' => 'invoice', // sales/invoices/{parameter}/edit
|
||||
//'create' => 'invoices.create', // if you change route, you can write full path
|
||||
],
|
||||
'permission' => [
|
||||
'prefix' => 'invoices', // this controller file name.
|
||||
//'create' => 'create-sales-invoices', // if you change action permission key, you can write full permission
|
||||
'prefix' => 'invoices', // this controller file name.
|
||||
//'create' => 'create-sales-invoices', // if you change action permission key, you can write full permission
|
||||
],
|
||||
'translation' => [
|
||||
'prefix' => 'invoices', // this translation file name.
|
||||
'add_contact' => 'general.customers', //
|
||||
'issued_at' => 'invoices.invoice_date',
|
||||
'due_at' => 'invoices.due_date',
|
||||
'prefix' => 'invoices', // this translation file name.
|
||||
'add_contact' => 'general.customers', //
|
||||
'issued_at' => 'invoices.invoice_date',
|
||||
'due_at' => 'invoices.due_date',
|
||||
],
|
||||
'setting' => [
|
||||
'prefix' => 'invoice',
|
||||
'prefix' => 'invoice',
|
||||
],
|
||||
'category_type' => 'income',
|
||||
'transaction_type' => 'income',
|
||||
'contact_type' => 'customer', // use contact type
|
||||
'hide' => [], // for document items
|
||||
'class' => [],
|
||||
'notification' => [
|
||||
'class' => 'App\Notifications\Sale\Invoice',
|
||||
'notify_contact' => true,
|
||||
'notify_user' => true,
|
||||
],
|
||||
'category_type' => 'income',
|
||||
'transaction_type' => 'income',
|
||||
'contact_type' => 'customer', // use contact type
|
||||
'hide' => [], // for document items
|
||||
'class' => [],
|
||||
],
|
||||
|
||||
Document::BILL_TYPE => [
|
||||
'alias' => '',
|
||||
'group' => 'purchases',
|
||||
'alias' => '',
|
||||
'group' => 'purchases',
|
||||
'route' => [
|
||||
'prefix' => 'bills',
|
||||
'parameter' => 'bill',
|
||||
//'create' => 'bilss.create',
|
||||
'prefix' => 'bills',
|
||||
'parameter' => 'bill',
|
||||
//'create' => 'bilss.create',
|
||||
],
|
||||
'permission' => [
|
||||
'prefix' => 'bills',
|
||||
//'create' => 'create-purchases-bills',
|
||||
'prefix' => 'bills',
|
||||
//'create' => 'create-purchases-bills',
|
||||
],
|
||||
'translation' => [
|
||||
'prefix' => 'bills',
|
||||
'issued_at' => 'bills.bill_date',
|
||||
'due_at' => 'bills.due_date',
|
||||
'prefix' => 'bills',
|
||||
'issued_at' => 'bills.bill_date',
|
||||
'due_at' => 'bills.due_date',
|
||||
],
|
||||
'setting' => [
|
||||
'prefix' => 'bill',
|
||||
'prefix' => 'bill',
|
||||
],
|
||||
'category_type' => 'expense',
|
||||
'transaction_type' => 'expense',
|
||||
'contact_type' => 'vendor',
|
||||
'hide' => [],
|
||||
'notification' => [
|
||||
'class' => 'App\Notifications\Purchase\Bill',
|
||||
'notify_contact' => false,
|
||||
'notify_user' => true,
|
||||
],
|
||||
'category_type' => 'expense',
|
||||
'transaction_type' => 'expense',
|
||||
'contact_type' => 'vendor',
|
||||
'hide' => [],
|
||||
],
|
||||
|
||||
// Contacts
|
||||
'customer' => [
|
||||
'group' => 'sales',
|
||||
'group' => 'sales',
|
||||
'permission' => [
|
||||
'prefix' => 'customers',
|
||||
//'create' => 'create-sales-customers',
|
||||
'prefix' => 'customers',
|
||||
//'create' => 'create-sales-customers',
|
||||
],
|
||||
],
|
||||
|
||||
'vendor' => [
|
||||
'group' => 'purchases',
|
||||
'group' => 'purchases',
|
||||
'permission' => [
|
||||
'prefix' => 'vendors',
|
||||
//'create' => 'create-purchases-vendors',
|
||||
'prefix' => 'vendors',
|
||||
//'create' => 'create-purchases-vendors',
|
||||
],
|
||||
],
|
||||
|
||||
// Transactions
|
||||
'income' => [
|
||||
'group' => 'sales',
|
||||
'group' => 'sales',
|
||||
'permission' => [
|
||||
'prefix' => 'revenues',
|
||||
//'create' => 'create-sales-revenues',
|
||||
'prefix' => 'revenues',
|
||||
//'create' => 'create-sales-revenues',
|
||||
],
|
||||
'contact_type' => 'customer',
|
||||
'contact_type' => 'customer',
|
||||
],
|
||||
|
||||
'expense' => [
|
||||
'group' => 'purchases',
|
||||
'group' => 'purchases',
|
||||
'permission' => [
|
||||
'prefix' => 'payments',
|
||||
//'create' => 'create-purchases-payments',
|
||||
'prefix' => 'payments',
|
||||
//'create' => 'create-purchases-payments',
|
||||
],
|
||||
'contact_type' => 'vendor',
|
||||
'contact_type' => 'vendor',
|
||||
],
|
||||
|
||||
// Categories
|
||||
'category' => [
|
||||
'income' => [
|
||||
'alias' => '',
|
||||
'alias' => '',
|
||||
'translation' => [
|
||||
'prefix' => 'general',
|
||||
'prefix' => 'general',
|
||||
],
|
||||
],
|
||||
'expense' => [
|
||||
'alias' => '',
|
||||
'alias' => '',
|
||||
'translation' => [
|
||||
'prefix' => 'general',
|
||||
'prefix' => 'general',
|
||||
],
|
||||
],
|
||||
'item' => [
|
||||
'alias' => '',
|
||||
'alias' => '',
|
||||
'translation' => [
|
||||
'prefix' => 'general',
|
||||
'prefix' => 'general',
|
||||
],
|
||||
],
|
||||
'other' => [
|
||||
'alias' => '',
|
||||
'alias' => '',
|
||||
'translation' => [
|
||||
'prefix' => 'general',
|
||||
'prefix' => 'general',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
Reference in New Issue
Block a user