Skip to content

Commit b10a80c

Browse files
Merge pull request #14 from jitendra-webkul/master
Updated plugin management
2 parents 4ab00d6 + 44911dd commit b10a80c

15 files changed

Lines changed: 249 additions & 314 deletions

File tree

.vitepress/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ export default defineConfig({
7272
},
7373
{ text: 'User Guide', link: 'https://docs.aureuserp.com/' },
7474
{ text: 'Contact Us', link: 'https://aureuserp.com/en/contacts/' },
75-
{ component: 'VersionSwitcher' }
7675
],
7776

7877
sidebar,

.vitepress/theme/components/VersionSwitcher.vue

Lines changed: 0 additions & 226 deletions
This file was deleted.

.vitepress/theme/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { h } from 'vue'
22
import type { Theme } from 'vitepress'
33
import DefaultTheme from 'vitepress/theme'
4-
import VersionSwitcher from '@theme/components/VersionSwitcher.vue'
54
import '@theme/styles/index.css'
65
import '@theme/styles/custom.css'
76

@@ -11,6 +10,5 @@ export default {
1110
return h(DefaultTheme.Layout, null, {})
1211
},
1312
enhanceApp({ app }) {
14-
app.component('VersionSwitcher', VersionSwitcher)
1513
}
1614
} satisfies Theme

src/master/architecture/panels.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,47 @@ The Admin [Panel](https://filamentphp.com/docs/3.x/panels/configuration) Provide
6262
- `sidebarCollapsibleOnDesktop()`: Makes the sidebar collapsible on desktop devices
6363
- `maxContentWidth()`: Sets content width to full screen
6464

65-
### Navigation Structure
65+
## How Menus Are Registered
66+
67+
Menus are registered through **Filament Resources, Pages, and Widgets** provided by each plugin.
68+
69+
When a plugin is loaded:
70+
71+
1. The **PluginManager** registers the plugin into the panel
72+
2. Filament automatically discovers:
73+
* Resources
74+
* Pages
75+
* Widgets
76+
3. Each of these defines its own navigation configuration
77+
78+
Example inside a Resource:
79+
80+
```php
81+
protected static ?string $navigationGroup = 'Sales';
82+
protected static ?string $navigationIcon = 'icon-orders';
83+
protected static ?int $navigationSort = 20;
84+
```
85+
86+
This ensures:
87+
88+
* The menu appears in the correct group
89+
* The icon is consistent
90+
* The menu order is predictable
91+
92+
## Navigation Groups (High-Level Menu Sections)
93+
94+
Navigation groups are **predefined at the panel level** in the `AdminPanelProvider`:
6695

6796
```php
6897
->navigationGroups([
69-
NavigationGroup::make()->label('Dashboard'),
70-
NavigationGroup::make()->label('Settings'),
98+
NavigationGroup::make()->label(__('admin.navigation.sale')),
99+
NavigationGroup::make()->label(__('admin.navigation.accounting')),
100+
NavigationGroup::make()->label(__('admin.navigation.inventory')),
71101
])
72102
```
73103

74-
- Creates two main navigation groups: Dashboard and Settings
75-
- Groups help organize navigation items into logical sections
104+
These groups act as **containers**.
105+
Plugins simply reference the group name when registering menus.
76106

77107
### Plugin Integration
78108

src/master/architecture/plugins.md

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ These plugin can be installed as needed to extend system functionality:
1919
| Module | Description |
2020
| ------------ | -------------------------------------------- |
2121
| Blogs | Manage blogs |
22-
| Accounts | Financial accounting and reporting |
22+
| Accounts | Core financial configuration module that defines chart of accounts, journals, ledgers, currencies, and fiscal structures used by other financial plugins |
23+
| Accounting | Main accounting operations module that handles journal entries, financial reports, period closing, and accounting workflows based on the Accounts setup |
2324
| Contacts | Contact management for customers and vendors |
2425
| Employees | Employees management |
2526
| Inventory | Inventory and warehouse management |
@@ -34,13 +35,38 @@ These plugin can be installed as needed to extend system functionality:
3435
| Timesheet | Employee work hour tracking |
3536
| Website | Website for customer |
3637

37-
## **Accounts**
38+
## Accounts vs Accounting
3839

39-
- **Purpose**: Manages financial accounts, including ledgers, journals, and chart of accounts.
40-
- **Key Features**:
41-
- Supports multi-currency transactions.
42-
- Integration with invoices and payments.
43-
- Comprehensive financial reporting and audit trails.
40+
In Aureus ERP, **Accounts** and **Accounting** are intentionally separated to provide a **flexible, scalable, and extensible financial system**.
41+
42+
### **Accounts (Base / Helper Plugin)**
43+
44+
* **Role**: Foundational financial layer
45+
* **Purpose**: Provides core accounting structures used by other financial modules
46+
47+
**Key Responsibilities:**
48+
49+
* Chart of Accounts (assets, liabilities, income, expenses)
50+
* Journals and ledger definitions
51+
* Currency and fiscal configurations
52+
* Common accounting utilities shared across modules
53+
54+
The **Accounts plugin does not handle business workflows directly**. Instead, it acts as a **shared financial backbone** that ensures consistency across all financial operations.
55+
56+
### **Accounting (Main Functional Plugin)**
57+
58+
* **Role**: Primary accounting engine
59+
* **Purpose**: Handles real-world accounting workflows and financial operations
60+
61+
**Key Responsibilities:**
62+
63+
* Journal entries and postings
64+
* Financial reports (Profit & Loss, Balance Sheet, Trial Balance)
65+
* Period closing and adjustments
66+
* Integration with invoices, payments, purchases, and sales
67+
* Audit trails and compliance-ready records
68+
69+
The **Accounting plugin depends on Accounts** to function correctly and uses its structures to execute business logic.
4470

4571
## **Analytics**
4672

src/master/getting-started/clusters.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,26 @@ To enable clusters in Aures ERP, configure the panel to discover cluster classes
1717
```php
1818
public function register(Panel $panel): void
1919
{
20-
if (! Package::isPluginInstalled($this->getId())) {
21-
return;
22-
}
23-
2420
$panel
2521
->when($panel->getId() == 'admin', function (Panel $panel) {
2622
$panel
27-
->discoverResources(in: $this->getPluginBasePath('/Filament/Resources'), for: 'Webkul\\Blog\\Filament\\Resources')
28-
->discoverPages(in: $this->getPluginBasePath('/Filament/Pages'), for: 'Webkul\\Blog\\Filament\\Pages')
23+
->discoverResources(
24+
in: __DIR__.'/Filament/Resources',
25+
for: 'Webkul\\Blog\\Filament\\Resources'
26+
)
27+
->discoverPages(
28+
in: __DIR__.'/Filament/Pages',
29+
for: 'Webkul\\Blog\\Filament\\Pages'
30+
)
2931
// below method is responsible to discover the clusters form blog plugin.
30-
->discoverClusters(in: $this->getPluginBasePath('/Filament/Clusters'), for: 'Webkul\\Blog\\Filament\\Clusters')
31-
->discoverWidgets(in: $this->getPluginBasePath('/Filament/Widgets'), for: 'Webkul\\Blog\\Filament\\Widgets');
32+
->discoverClusters(
33+
in: __DIR__.'/Filament/Clusters',
34+
for: 'Webkul\\Blog\\Filament\\Clusters'
35+
)
36+
->discoverWidgets(
37+
in: __DIR__.'/Filament/Widgets',
38+
for: 'Webkul\\Blog\\Filament\\Widgets'
39+
);
3240
});
3341
}
3442
```

0 commit comments

Comments
 (0)