-
Notifications
You must be signed in to change notification settings - Fork 62
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
#1660 - Revert Record Back In Time Shape #1776
#1660 - Revert Record Back In Time Shape #1776
Conversation
471e7bf
to
14ef2b3
Compare
1d70edc
to
02bcedd
Compare
02bcedd
to
7684c5c
Compare
# Conflicts: # dt-assets/build/css/style.min.css # dt-contacts/base-setup.php # dt-people-groups/people-groups-base.php # dt-posts/dt-posts.php # single-template.php
@@ -348,6 +348,24 @@ function dt_site_scripts() { | |||
'template_dir_uri' => esc_html( get_template_directory_uri() ), | |||
'fetch_more_text' => __( 'Load More', 'disciple_tools' ) // Support translations | |||
) ); | |||
|
|||
wp_register_script( 'litepicker', 'https://cdn.jsdelivr.net/npm/litepicker/dist/litepicker.js', false ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kodinkat lets us the existing date range picker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See metrics, and tasks
dt-assets/js/record-history.js
Outdated
field_label = 'contact_other'; | ||
|
||
} else { | ||
field_label = 'communication_channel'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section can modularized.
dt-posts/dt-posts.php
Outdated
$field_key = 'contact_twitter'; | ||
|
||
} elseif ( substr( $field_key, 0, strlen( 'contact_other_' ) ) == 'contact_other_' ) { | ||
$field_key = 'contact_other'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section can be modularized to accommodate for custom channels.
…g + Dynamic location_meta keep lookups + Support number min/max bounds
…h select widget + Additional permissions + Formatted links + Revert to specific activity record + Resolved groups connection field revert issue
…ols-theme into 1660-revert-record-back-in-time
…ols-theme into 1660-revert-record-back-in-time
…ols-theme into 1660-revert-record-back-in-time
…ols-theme into 1660-revert-record-back-in-time
</tr> | ||
<tr style="border: none;"> | ||
<td style="vertical-align: top;"> | ||
<span><?php echo esc_html( _x( 'Show All', 'Show All', 'disciple_tools' ) ) ?></span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to add context if the string is the same as the context.
Adding the context can result in an extra string to translate
dt-contacts/base-setup.php
Outdated
@@ -386,7 +386,7 @@ public function dt_custom_fields_settings_after_combine( $fields, $post_type ){ | |||
public static function dt_record_admin_actions( $post_type, $post_id ){ | |||
if ( $post_type === 'contacts' ){ | |||
$post = DT_Posts::get_post( $post_type, $post_id ); | |||
if ( empty( $post['archive'] ) && isset( $post['type'] ) && ( $post['type']['key'] === 'personal' || $post['type']['key'] === 'placeholder' ) ) :?> | |||
if ( empty( $post['archive'] ) && isset( $post['type'] ) && isset( $post['type'] ) && ( $post['type']['key'] === 'personal' || $post['type']['key'] === 'placeholder' ) ) :?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kodinkat this is duplicate?
dt-posts/dt-posts-endpoints.php
Outdated
register_rest_route( | ||
$this->namespace, '/(?P<post_type>\w+)/(?P<id>\d+)/revert_activity_history', [ | ||
[ | ||
'methods' => 'GET', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be a post request more naturally
Typically, this filters from most recent date to selected filtered date. So, you should be able to scroll down in time to selected date? |
Suitable user capabilities added and the following
Let me know if you are still encountering any troublesome fields/values? |
@kodinkat Let's filter this to just show the day selected. There might be 100s of activity between today and the date selected. |
Number not changing is prob related to: #1969 |
…ols-theme into 1660-revert-record-back-in-time
AND `action` IN ( $supported_actions_sql ) | ||
AND `field_type` IN ( $supported_field_types_sql ) | ||
AND `hist_time` BETWEEN %d AND %d | ||
ORDER BY hist_time $result_order", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kodinkat $result_order is NOT escaped
…activity listing endpoints
@kodinkat !!!!! |
fixes #1660