-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature2/integrate actions #741
Conversation
…eature/integrate-actions
…eature/integrate-actions
# Conflicts: # src/App.php
Codecov Report
@@ Coverage Diff @@
## develop2 #741 +/- ##
==============================================
- Coverage 68.6% 67.48% -1.13%
- Complexity 2058 2092 +34
==============================================
Files 106 109 +3
Lines 4839 4921 +82
==============================================
+ Hits 3320 3321 +1
- Misses 1519 1600 +81
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## develop2 #741 +/- ##
==============================================
- Coverage 68.6% 67.48% -1.13%
- Complexity 2058 2092 +34
==============================================
Files 106 109 +3
Lines 4839 4921 +82
==============================================
+ Hits 3320 3321 +1
- Misses 1519 1600 +81
Continue to review full report at Codecov.
|
REMERGE of #701
Implements support for ATK Data Actions in ATK UI through Generic UI:
Implicit use in CRUD
Explicit executor use
TODO
Explanation
Various UI elements will become aware of Model actions and will provide UI to invoke a corresponding PHP method. The "UserAction" class will provide meta-information on how the method should be called.
Use Cases
I'm collecting some of the potential use-cases here which can be solved by this PR:
Emailing Invoice
User has a CRUD of Invoices. He can click "Email Invoice" button on any client. Modal window will appear showing a Preview of a specific invoice. Two buttons below "Confirm" and "Cancel". Preview is generated by non-ui $action->preview callback. Actual emailing happens by invoking nun-ui $action->callback. Arguments for both are identical and in this case - empty.
Executor = Preview\HTML
Generate VAT report
User have to supply START and END date as arguments to a non-ui callback "generateVATReport". Arguments must be supplied by a user. No preview. When submitted, callback return model "VatReport" that was just generated.
We can use Hook of the executor, to properly redirect the user:
Executor = ArgumentForm
Big Red Button
This is a executor which displays a message along with a big red button. Will use name and description of the action. If button is clicked, action is executed.
Executor = Confirmation