Skip to content

Commit fa25d11

Browse files
committed
feat: update documentation for Table Views and Progress Stepper; remove obsolete customer panel documentation
1 parent 849b465 commit fa25d11

File tree

10 files changed

+421
-275
lines changed

10 files changed

+421
-275
lines changed

.vitepress/routes/master.ts

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,14 @@ const routes = [
3131
{
3232
text: 'Modular Design',
3333
link: '/master/architecture/modular-design'
34-
}
34+
},
35+
{ text: 'Panels', link: '/master/architecture/panels' }
3536
]
3637
},
3738
{
3839
text: 'Getting Started',
3940
collapsed: false,
4041
items: [
41-
{
42-
text: 'Panels',
43-
collapsed: true,
44-
items: [
45-
{
46-
text: 'Admin',
47-
link: '/master/getting-started/panels/admin'
48-
},
49-
{
50-
text: 'Customer',
51-
link: '/master/getting-started/panels/customer'
52-
}
53-
]
54-
},
5542
{
5643
text: 'Migrations',
5744
collapsed: false,
@@ -112,10 +99,6 @@ const routes = [
11299
text: 'Pages',
113100
collapsed: false,
114101
link: '/master/getting-started/pages'
115-
},
116-
{
117-
text: 'Custom Fields',
118-
link: '/master/getting-started/custom-fields'
119102
}
120103
]
121104
},
@@ -137,17 +120,11 @@ const routes = [
137120
},
138121
{
139122
text: 'Progress Stepper',
140-
collapsed: true,
141-
items: [
142-
{
143-
text: 'Implementation',
144-
link: '/master/advanced/progress-stepper/implementation'
145-
},
146-
{
147-
text: 'Customization',
148-
link: '/master/advanced/progress-stepper/customization'
149-
}
150-
]
123+
link: '/master/advanced/progress-stepper'
124+
},
125+
{
126+
text: 'Custom Fields',
127+
link: '/master/getting-started/custom-fields'
151128
},
152129
{
153130
text: 'Chatter',
File renamed without changes.

src/master/advanced/progress-stepper/images/progress-stepper.png renamed to src/master/advanced/images/progress-stepper.png

File renamed without changes.

src/master/advanced/progress-stepper/implementation.md renamed to src/master/advanced/progress-stepper.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,74 @@ protected static function getStateOptions($record): array
5858
}
5959
```
6060

61+
## **Changing Button Colors**
62+
63+
To modify the colors of different states, use the `colors()` method:
64+
65+
```php
66+
ProgressStepper::make('state')
67+
->options([
68+
'draft' => 'Draft',
69+
'processing' => 'Processing',
70+
'completed' => 'Completed'
71+
])
72+
->colors([
73+
'draft' => 'gray',
74+
'processing' => 'info',
75+
'completed' => 'success',
76+
]);
77+
```
78+
79+
## **Adding Icons**
80+
81+
To display icons alongside state labels, use the `icons()` method:
82+
83+
```php
84+
ProgressStepper::make('state')
85+
->options([
86+
'draft' => 'Draft',
87+
'processing' => 'Processing',
88+
'completed' => 'Completed'
89+
])
90+
->icons([
91+
'draft' => 'heroicon-o-pencil',
92+
'processing' => 'heroicon-o-clock',
93+
'completed' => 'heroicon-o-check-circle',
94+
]);
95+
```
96+
97+
## **Using Enums for State Management**
98+
99+
Instead of defining options manually, you can use an Enum:
100+
101+
```php
102+
use App\Enums\OrderState;
103+
104+
ProgressStepper::make('state')
105+
->options(OrderState::options())
106+
->colors(OrderState::colors())
107+
->icons(OrderState::icons());
108+
```
109+
110+
This keeps the state definitions centralized in an `OrderState` enum.
111+
112+
## **Handling Conditional States**
113+
114+
To prevent certain states from being displayed (e.g., hiding "Canceled" if the order is active):
115+
116+
```php
117+
ProgressStepper::make('state')
118+
->options(function ($record) {
119+
$options = OrderState::options();
120+
121+
if ($record && $record->state != OrderState::CANCEL->value) {
122+
unset($options[OrderState::CANCEL->value]);
123+
}
124+
125+
return $options;
126+
});
127+
```
128+
61129
## **Example Output**
62130

63131
![Progress Stepper](./images/progress-stepper.png)

src/master/advanced/progress-stepper/customization.md

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

src/master/advanced/table-views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Overview
22

3-
Table Views is a powerful feature in Aureus ERP that enhances data filtering and organization capabilities. It provides advanced customization options for table filters throughout the application, allowing users to create, save, and manage personalized views of tabular data.
3+
The **Table Views** is a powerful feature in Aureus ERP that enhances data filtering and organization capabilities. It provides advanced customization options for table filters throughout the application, allowing users to create, save, and manage personalized views of tabular data.
44

55
## Core Components
66

0 commit comments

Comments
 (0)