Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlpp committed Nov 19, 2024
1 parent bea6295 commit b0c14d1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/guide/building-entity-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebarDepth: 3
---

# Building an Entity List
# Create an Entity List

We need an Entity List to display the list of `instances` for an `entity`. This list can be paginated, searchable, filtered, ... as we'll see below.

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/building-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebarDepth: 3
---

# Building a Form
# Create a Form

Forms as used to create or update instances.

Expand Down
6 changes: 5 additions & 1 deletion docs/guide/building-menu.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Building the menu
# Create the main menu

The Sharp UI is organized with two menus: the main one is on a left sidebar, and the user menu is a dropdown located in the top right corner.

Expand Down Expand Up @@ -183,3 +183,7 @@ class MySharpMenu extends Code16\Sharp\Utils\Menu\SharpMenu
}
}
```

### Global menu Filters

If you want to display a filter on all pages, above the menu, useful to scope the entire data set (use cases: multi tenant app, customer selector...), you can define a global filter as described in the [Filters documentation](filters.md#global-menu-filters).
2 changes: 1 addition & 1 deletion docs/guide/building-show-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebarDepth: 3
---

# Building a Show Page
# Create a Show Page

Between an Entity List and a Form, you might want to add a Show page to display a whole instance, and allow the user to interact with it through Commands.

Expand Down
6 changes: 6 additions & 0 deletions docs/guide/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ class OrganizationGlobalFilter extends GlobalRequiredFilter
{
return Corporation::first()->id;
}

public function authorize(): bool
{
// Optional: you can define an authorization logic here
return true;
}
}
```

Expand Down

0 comments on commit b0c14d1

Please sign in to comment.