You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -225,6 +225,50 @@ The generated vue files are placed under the Pages/Books folder in the js folder
225
225
Then the menu for payments must have `payments` as the json key.
226
226
- For parent menus and any other menus which may not match any module, you have to create a permission with the key name to control its access. For example, if you have a parent menu called `master-data` you have to generate a permission with the same name.
227
227
228
+
## Components Documentation
229
+
### Datatables
230
+
JIG is built on top of datatables.net and is fully server-side rendered using [Yajra Datatables](https://yajrabox.com/docs/laravel-datatables/master/introduction). Most of the logic resides inside `App\Repositories` and in the respective Repository file, there is a method called `dtColumns` which is used to fully control the columns shown in the Index page.
231
+
232
+
For example, in order to control the columns shown for the Users Datatable, the following is the `dtColumns` method under `App\Repositories\Users.php`:
**NOTE: In order to omit the `email_verified_at` class from my Index columns all I had to do is comment it out (or better yet, just remove it from the list of columns!)**
255
+
256
+
The datatables are also responsive by default (Checkout https://datatables.net/extensions/responsive/ for more details). For this purpose, you can use one of the following jig-provided responsive breakpoints to automatically collapse the column below a given screen size. For info on how to use the class logic, checkout the [Class Logic Documentation](https://datatables.net/extensions/responsive/classes). Most of the time I only use `min-`, e.g `min-desktop-l`
257
+
```ts
258
+
breakpoints: [
259
+
{ name: "tv", width: Infinity },
260
+
{ name: "desktop-l", width: 1536 },
261
+
{ name: "desktop", width: 1280 },
262
+
{ name: "tablet-l", width: 1024 },
263
+
{ name: "tablet-p", width: 768 },
264
+
{ name: "mobile-l", width: 480 },
265
+
{ name: "mobile-p", width: 320 },
266
+
],
267
+
}
268
+
```
269
+
Checkout the first snippet on how I have used the responsive classes!
0 commit comments