Skip to content

Dt Import CSV #2694

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

Merged
merged 50 commits into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
83ae95e
Implement a CSV import directly in the theme
corsacca Jun 4, 2025
4da2257
Rename import classes to avoid conflicts with existing import plugin
corsacca Jun 4, 2025
9bb60b0
Complete renaming of all import classes to avoid conflicts
corsacca Jun 4, 2025
a02e4c4
Enhance connection field processing: support record creation and prev…
corsacca Jun 4, 2025
e9cc051
Add frontend support for connection field warnings in import preview
corsacca Jun 4, 2025
9c6bdfb
Add warning translations for connection field record creation
corsacca Jun 4, 2025
eced48e
Implement connection field logic
corsacca Jun 4, 2025
3f21f66
Enable location geocoding
corsacca Jun 4, 2025
1f31e1f
Implement duplicate checking feature in CSV import process
corsacca Jun 5, 2025
9665cb4
Default assigned to and source. Add csv examples
corsacca Jun 5, 2025
0e15b91
fix creating new fields
corsacca Jun 5, 2025
4fc7c23
add documentation
corsacca Jun 5, 2025
9c89382
add user documentation
corsacca Jun 5, 2025
a4c507b
Ability to create field options. Ability to skip a multi select option
corsacca Jun 6, 2025
b4d9884
Implement value formatting for preview display and update import opti…
corsacca Jun 6, 2025
c1cd607
move the tab to the utilities page.
corsacca Jun 6, 2025
6ac659b
Enhance location import documentation and processing to support multi…
corsacca Jun 6, 2025
43eef57
FIx preview for many records
corsacca Jun 6, 2025
a30d788
Contact contact: when geocoding, remove contact_address if gecoding s…
corsacca Jun 6, 2025
1630b31
FIx location import and geocoding
corsacca Jun 6, 2025
765847a
cleanup
corsacca Jun 6, 2025
e5878d4
cleanup
corsacca Jun 6, 2025
6404f66
Refactor field options filtering to remove hidden field check for val…
corsacca Jun 6, 2025
c751939
Add error handling to import preview display
corsacca Jun 6, 2025
d9d5bd2
Enhance import processing to support sampling for large datasets
corsacca Jun 6, 2025
91ef07a
better field mapping
corsacca Jun 6, 2025
47c1705
Remove basic validation for email and phone channels in import proces…
corsacca Jun 6, 2025
cb73149
Enhance CSV import documentation and connection field handling
corsacca Jun 6, 2025
14be00e
Fix state being broken upon navigation.
corsacca Jun 6, 2025
4d65b94
wording
corsacca Jun 9, 2025
5594bb1
Enhance CSS for import steps and mobile responsiveness
corsacca Jun 9, 2025
08b6390
Refactor CSS for import step headings to ensure consistent styling
corsacca Jun 9, 2025
43eedcf
Use a toast for the success message.
corsacca Jun 9, 2025
174041e
Move location of import button
corsacca Jun 9, 2025
1fdaf10
Better handle large files
corsacca Jun 10, 2025
4483fe7
Spinner on importing notification
corsacca Jun 10, 2025
e15a108
Fix handling large files.
corsacca Jun 10, 2025
1aeca93
Location field types should only accept grid ids
corsacca Jun 10, 2025
1a39687
Add file path validation and security checks in CSV import utilities
corsacca Jun 10, 2025
2e5deba
lower sampling threshold
corsacca Jun 10, 2025
b4e2dbf
Implement transient lock for cleanup process to prevent concurrent ex…
corsacca Jun 10, 2025
3505560
Enhance cleanup_old_files method with transient lock to prevent concu…
corsacca Jun 10, 2025
88d6750
Enhance location value processing to support latitude/longitude and D…
corsacca Jun 10, 2025
be391f0
Update documentation for location fields.
corsacca Jun 10, 2025
f917621
remove unused function
corsacca Jun 10, 2025
0c34999
Restrict user search to single result when matching by display name i…
corsacca Jun 10, 2025
739847c
Name field is required. Don't use uploads folder for storing CSVs
corsacca Jun 11, 2025
748f13d
Remove import button from navigation after successful import completion
corsacca Jun 11, 2025
b6d984a
Escape dynamic content in dt-import-modals.js and dt-import.js to pre…
corsacca Jun 11, 2025
037d4c2
cleanup
corsacca Jun 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
],
"globals": {
"jQuery": false,
"Toastify": false,
},
"rules": {
"no-console": "off",
Expand Down
10 changes: 5 additions & 5 deletions dt-core/admin/admin-settings-endpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -945,9 +945,9 @@ public static function new_field_option( WP_REST_Request $request ) {
$field_key = $post_submission['field_key'];
$post_type = $post_submission['post_type'];
$new_field_option_name = $post_submission['field_option_name'];
$new_field_option_key = dt_create_field_key( $new_field_option_name );
$new_field_option_description = $post_submission['field_option_description'];
$field_option_icon = $post_submission['field_option_icon'];
$new_field_option_key = $post_submission['field_option_key'] ?? dt_create_field_key( $new_field_option_name );
$new_field_option_description = $post_submission['field_option_description'] ?? '';
$field_option_icon = $post_submission['field_option_icon'] ?? '';

$custom_field_options = dt_get_option( 'dt_field_customizations' );
$custom_field_options[$post_type][$field_key]['default'][$new_field_option_key] = [
Expand Down Expand Up @@ -980,8 +980,8 @@ public static function edit_field_option( WP_REST_Request $request ) {
$post_type = $post_submission['post_type'];
$field_option_key = $post_submission['field_option_key'];
$new_field_option_label = $post_submission['new_field_option_label'];
$new_field_option_description = $post_submission['new_field_option_description'];
$field_option_icon = $post_submission['field_option_icon'];
$new_field_option_description = $post_submission['new_field_option_description'] ?? '';
$field_option_icon = $post_submission['field_option_icon'] ?? '';

$fields = DT_Posts::get_post_field_settings( $post_type, false, true );
$field_options = $fields[$field_key]['default'] ?? [];
Expand Down
6 changes: 3 additions & 3 deletions dt-core/admin/menu/tabs/tab-exports.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public function __construct(){
} // End __construct()

public function add_submenu(){
add_submenu_page( 'edit.php?post_type=exports', __( 'Exports', 'disciple_tools' ), __( 'Exports', 'disciple_tools' ), 'manage_dt', 'dt_utilities&tab=exports', [
add_submenu_page( 'edit.php?post_type=exports', __( 'Settings Exports', 'disciple_tools' ), __( 'Settings Exports', 'disciple_tools' ), 'manage_dt', 'dt_utilities&tab=exports', [
'Disciple_Tools_Settings_Menu',
'content'
] );
add_submenu_page( 'dt_utilities', __( 'Exports', 'disciple_tools' ), __( 'Exports', 'disciple_tools' ), 'manage_dt', 'dt_utilities&tab=exports', [
add_submenu_page( 'dt_utilities', __( 'Settings Exports', 'disciple_tools' ), __( 'Settings Exports', 'disciple_tools' ), 'manage_dt', 'dt_utilities&tab=exports', [
'Disciple_Tools_Settings_Menu',
'content'
] );
Expand All @@ -71,7 +71,7 @@ public function add_tab( $tab ){
if ( $tab == 'exports' ){
echo 'nav-tab-active';
}
echo '">' . esc_attr__( 'Exports' ) . '</a>';
echo '">' . esc_attr__( 'Settings Exports' ) . '</a>';
}

public function content( $tab ){
Expand Down
6 changes: 3 additions & 3 deletions dt-core/admin/menu/tabs/tab-imports.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public function import_new_post_types( $post_types, $imported_config ) {
}

public function add_submenu(){
add_submenu_page( 'edit.php?post_type=imports', __( 'Imports', 'disciple_tools' ), __( 'Imports', 'disciple_tools' ), 'manage_dt', 'dt_utilities&tab=imports', [
add_submenu_page( 'edit.php?post_type=imports', __( 'Settings Imports', 'disciple_tools' ), __( 'Settings Imports', 'disciple_tools' ), 'manage_dt', 'dt_utilities&tab=imports', [
'Disciple_Tools_Settings_Menu',
'content'
] );
add_submenu_page( 'dt_utilities', __( 'Imports', 'disciple_tools' ), __( 'Imports', 'disciple_tools' ), 'manage_dt', 'dt_utilities&tab=imports', [
add_submenu_page( 'dt_utilities', __( 'Settings Imports', 'disciple_tools' ), __( 'Settings Imports', 'disciple_tools' ), 'manage_dt', 'dt_utilities&tab=imports', [
'Disciple_Tools_Settings_Menu',
'content'
] );
Expand All @@ -71,7 +71,7 @@ public function add_tab( $tab ){
if ( $tab == 'imports' ){
echo 'nav-tab-active';
}
echo '">' . esc_attr__( 'Imports' ) . '</a>';
echo '">' . esc_attr__( 'Settings Imports' ) . '</a>';
}

public function content( $tab ){
Expand Down
Loading