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
Here we can once more see how `_p()` helper localization function is used. The first argument is the file.key string, if we open newly created `resources/lang/en/pages.php` file it'll contain different translation strings:
124
+
Here we can once more see how `_p()` helper localization function is used. The first argument is the `file.key` string, if we open newly created `resources/lang/en/pages.php` file it'll contain different translation strings:
125
125
126
126
```php
127
127
<?php
@@ -136,27 +136,27 @@ return [
136
136
];
137
137
```
138
138
139
-
The second argument is a default value, which will be added to the localization file if key doesn't exist. Thus, by the time the interface build process is completed, you will have a complete base language file, ready for translation.
139
+
The second argument is a default value, which will be added to the localization file if key doesn't exist. Thus, by the time the interface build process is completed, you'll have full base language file, ready for translation.
140
140
141
-
Further in the template we can see `create_button` section, which determines how "floating" action button looks like:
141
+
Further, in the template, we can see `create_button` section, which determines how the "floating" action button looks and behaves like:
If we click on one of the filters, we'll see that it modifies `is_public` URL's parameter to respective value. Our component will track these changes and send server requests to get filtered data. We will return to this topic when we'll create additional filters ourselves.
157
+
If we click on one of the filters, we'll see that it modifies `is_public` URL's parameter to respective value. Our component tracks these changes and sends server requests to get filtered data. We return to this topic later when will be creating additional filters ourselves.
158
158
159
-
After filters, we can see one more very useful component - context menu, which in this case, controls ordering our leads by their names.
159
+
Moving on, we can see one more very useful component - `context menu`, which in this case, controls the ordering of our leads by their names.
160
160
161
161
```html
162
162
<context-menubutton-class="filter__slink"right>
@@ -168,7 +168,7 @@ After filters, we can see one more very useful component - context menu, which i
168
168
</context-menu>
169
169
```
170
170
171
-
Sorting is another topic we'll analyze in the future, when we'll build our custom filters based on repositories.
171
+
Sorting is another topic we'll analyze in the future when we build our custom filters based on repositories.
172
172
173
173
Next is the button to open main filters panel, for now, it only displays one parameter, but we'll add more, later:
174
174
@@ -190,9 +190,9 @@ Next is the button to open main filters panel, for now, it only displays one par
Next, we see the usage of one of our most powerful component - Table Builder, which powers `@table` blade component for easy interactive tables set up:
195
+
Further, we see the usage of one of our most powerful component - [Table Builder](https://github.com/awes-io/table-builder), which powers `@table` blade component for easy interactive tables set up:
196
196
197
197
```php
198
198
@table([
@@ -205,7 +205,7 @@ Next, we see the usage of one of our most powerful component - Table Builder, wh
205
205
...
206
206
```
207
207
208
-
And the last one is the modal window with leads creation form:
208
+
And the last one is the `modal window` with leads creation form:
@@ -215,17 +215,15 @@ And the last one is the modal window with leads creation form:
215
215
</modal-window>
216
216
```
217
217
218
-
We'll inspect Modal Window and Form Builder components in greater detail later when we'll update our current project.
218
+
We'll inspect `Modal Window` and [Form Builder](https://github.com/awes-io/form-builder) components later in greater detail when we update our current project.
219
219
220
220
# Let's build something new
221
221
222
222
We got a closer look at the general structure of a generated section. It's time to build something new and get into the platform's details.
223
223
224
224
## Improving existing filters
225
225
226
-
Let's go back to our group filter and update it to display leads with different statuses.
227
-
228
-
Firstly we need to create new migration and add the `status` column to our `leads` table:
226
+
Let's go back to our group filter and update it to display leads with different statuses. Firstly we need to create new migration and add the `status` column to our `leads` table:
Now if we refresh `/leads` page, we'll see that we need to add a new column to the table in order to see which status lead currently has:
240
+
Now if we refresh `/leads` page, we'll discover that we also need to add a new column to the UI table in order to see which status each record currently have:
As you can see, we added a new `tb-column` tag. `Name` parameter is a key in the data object, which is just our `status` column name. And we're passing new language string to a label property, as we discussed earlier.
254
-
255
-
Now if we refresh lead's page, we'll see their statuses:
251
+
As you can see, we added a new `tb-column` tag. `Name` parameter is a key in the data object, which is just our `status` field name. And we're also passing new language string to a `label` property, as we've discussed earlier. Now if we refresh lead's page, we'll see their statuses:
@@ -269,11 +265,13 @@ Normally we'd have to implement some filtering logic, but thanks to `awes-io/rep
269
265
protected $searchable = ['status'];
270
266
```
271
267
272
-
and add `status` to `@table`'s `scope_api_params` property (this will allow the component to track any changes in parameter value and handle them respectively):
268
+
and add `status` to `@table`'s `scope_api_params` property (this will allow the component to track any changes in the parameter's value and handle them respectively):
now if we click on filter option, request with `status` parameter will be sent to the server and `repository` package will filter data and return it for `table-builder` to render:
@@ -505,10 +503,10 @@ return [
505
503
506
504
That's all, now any validation errors will be displayed.
507
505
508
-
## Custom filters
506
+
<!--## Custom filters -->
509
507
510
508
<!-- Building custom scope for searching in several fields. -->
511
509
512
-
## Notifications
510
+
<!--## Notifications-->
513
511
514
512
<!-- success notification after new lead creation-->
0 commit comments