Commit Graph

16297 Commits

Author SHA1 Message Date
Jan Jakes
a052cdcceb Allow custom validation for all step types
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
9d8cb02006 Add valid step rule for custom step validation
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
14eb8db540 Propagate error details to REST API responses
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
6638707282 Add validation rule identifiers to exceptions and responses
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
9da204489d Collect step args validation errors
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
a41445cdaa Add tests for unknown step rule and step args rules
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
68c51c0f5c Convert WorkflowStepValidator to node-visitor-based rules
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
881dbfbe08 Fix root step args schema definition
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
19ce56fa5f Remove unused exceptions
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
5f5bbe15c8 Fix typos in error codes
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
9e86fa69b9 Add missing return typehint
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
7425c73d9e Add error messages to action validation, use step validation args
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
b6ba15c6c3 Introduce step validation args, similarly to step run args
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Jakes
a2948efc46 Rename namespace with defs for 3rd-party integrations to "Integration"
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
Jan Lysý
3773bc4985 Add link to subscriber doc
Because we want to avoid duplicities, we added a link to the method getting a subscriber.
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
66000fada4 Add test cases for MP API getSubscribers
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
ae0d60df3a Add getSubscribers documentation
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
083bad3051 Add subscriber tags to documentation
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
668aabb00d Add updatedAt to selection
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
2139b4d035 Fix typo in doc/Readme.md
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
296a47f8e7 Add new API method getSubscribers
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
f6928c982f Add filtering by updatedAt
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
879befcc76 Add setting updatedAt to Subscriber factory
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
d2247a1c76 Refactor parameter from int to entity
[MAILPOET-4372]
2022-10-12 11:44:37 +02:00
Jan Lysý
c93c42518a Add return value for backward compatibility in tests
[MAILPOET-4372]
2022-10-12 11:44:37 +02:00
Jan Lysý
09a54fdcd1 Fix dependencies in tests
[MAILPOET-4372]
2022-10-12 11:44:37 +02:00
Jan Lysý
a1e96c63a0 Remove old model usages from AutomaticEmailScheduler
[MAILPOET-4372]
2022-10-12 11:44:37 +02:00
Jan Lysý
745ff6af2a Remove SendingTask usages from AutomaticEmailTest
[MAILPOET-4372]
2022-10-12 11:44:37 +02:00
Jan Lysý
d141f23bb4 Remove old model from AutomaticEmailTest
[MAILPOET-4372]
2022-10-12 11:44:37 +02:00
David Remer
5600a2fef0 Load all statistics at once
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
d077370086 Perform only one SQL query for the statistics
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
211f6c3f1b Fix styling issues
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
193b9ae32d Index status column of workflow runs
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
18c4257f1f Drop hasValues method
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
368878c280 Simplify testItSeparatesWorkflowRunsCorrectly test
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
86c3d14af4 Fix typo
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
05a052ec08 Remove extra line break
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
ff9f5d304e Return statistics of Workflow
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
c73d242c5d Style statistics
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
4eb859154d Show statistics on listing page
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
3c2d8266e4 Add statistics to editor
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
c66c5d7bd0 Extend Workflow type definition
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
96ade7327e Provide statistics via endpoint and admin page
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
52dcba8493 Introduce WorkflowStatistics entity
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
Rodrigo Primo
f65d343950 Fix hasUnsavedChanges when user clicks "or Cancel" button
When the `or Cancel` button is clicked, the action `SET_SETTING` is not
triggered and thus `hasUnsavedChanges` was not updated resulting in
problems like the one described here:
https://github.com/mailpoet/mailpoet/pull/4315#issuecomment-1273013496.

This commit fixes this problem by updating `hasUnsavedChanges` also when
the action `SET_SETTINGS` (not the `s` at the end) is triggered.

[MAILPOET-4499]
2022-10-12 09:18:06 +02:00
Rodrigo Primo
dd51970a43 Simplify logic to decide if there were changes in settings page
[MAILPOET-4499]
2022-10-12 09:18:06 +02:00
Rodrigo Primo
1279eeb706 Don't show message if the value of the settings didn't change
This commit improves the code that decides whether or not to display a
confirmation message when the user tries to leave the settings pages
with unsaved changes. Before this commit, the confirmation message would
be displayed even if the user changed the settings a few times and then
back to the original value. Now, this won't happen anymore.

When the page is loaded, we save the original state of data in a
different property called `originalData` and use it to compare against
the current data when deciding whether or not the page has unsaved
changes.

I considered storing just a hash of the original data and using that for
the comparison, but I couldn't find an easy way to generate a hash of an
object in JS.

[MAILPOET-4499]
2022-10-12 09:18:06 +02:00
Rodrigo Primo
859251280e Update tests to account for modal displayed when saving settings
This commit updates a few acceptance tests to make sure they work with
the new modal that was added when the user tries to leave the settings
page before waiting for the save process to finish.

[MAILPOET-4499]
2022-10-12 09:18:06 +02:00
Rodrigo Primo
171c015afe Dispatch SAVE_DONE when users save a new sender address in modal
This is needed to make sure that hasUnsavedChanges is set back to false
after the modal sets it to true due to a call to SET_SETTING.

[MAILPOET-4499]
2022-10-12 09:18:06 +02:00
Rodrigo Primo
de0712d572 Yield SAVE_DONE when the user clicks on the Verify button
This is necessary to set state.save.hasUnsavedChanges to false when the
user clicks on the Verify button as this call triggers a call to
SET_SETTING that sets state.save.hasUnsavedChanges to true.

[MAILPOET-4499]
2022-10-12 09:18:06 +02:00