Changeset 3030705
- Timestamp:
- 02/02/2024 06:22:22 PM (14 months ago)
- Location:
- wp-easy-crm
- Files:
-
- 37 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-easy-crm/trunk/easy-crm.php
r3027665 r3030705 4 4 * Plugin Name: Easy CRM 5 5 * Description: Collect new leads, manage clients, quotations, invoices, tasks and more for your entire team 6 * Version: 1.0.1 66 * Version: 1.0.17 7 7 * Author: IT-iCO SRL 8 8 * Author URI: https://it-ico.com … … 477 477 $myuserid = get_current_user_id(); 478 478 $taskTable = $wpdb->prefix . 'task'; 479 $clientTable = $wpdb->prefix . 'clients'; 479 480 $allmyopentasks = $wpdb->get_results( 480 481 $wpdb->prepare( … … 484 485 485 486 if(count($allmyopentasks) > 0){ 486 foreach($allmyopentasks as $singletask){ 487 // Reverse the order of tasks 488 $reversedTasks = array_reverse($allmyopentasks); 489 foreach($reversedTasks as $singletask){ 487 490 echo '<div style="display: flex;">'; 488 491 … … 499 502 if($clientid != 0) 500 503 { 501 echo '<a class="button button-secondary" href="admin.php?page=wp-easy-crm-perfil&id='.$clientid.'">'.__('Client Profile', 'wp-easy-crm').'</a><span> </span>'; 504 //get client name 505 $clientdetails = $wpdb->get_row($wpdb->prepare("SELECT * FROM $clientTable WHERE id = %d", $clientid)); 506 $clientname = $clientdetails->clientname; 507 508 echo '<a class="button button-secondary" href="admin.php?page=wp-easy-crm-perfil&id='.$clientid.'">'.$clientname.'</a><span> </span>'; 509 502 510 } 503 511 else … … 505 513 echo '<a class="button button-secondary" href="admin.php?page=wp-easy-crm-tasks">'.__('Tasks', 'wp-easy-crm').'</a><span> </span>'; 506 514 } 507 echo '</div>'; 515 echo '</div>'; 508 516 509 517 echo '</div>'; 510 518 echo '<hr/>'; 519 //get start and enddate of task 520 // Assuming $singletask['start_at'] is a string representing a date and time 521 $startDateTimeString = $singletask['start_at']; 522 $endDateTimeString = $singletask['end_at']; 523 $startDateTime = new DateTime($startDateTimeString); // Convert string to DateTime object 524 $endDateTime = new DateTime($endDateTimeString); // Convert string to DateTime object 525 $currentDateTime = new DateTime(); // Current date and time 526 527 // Now, you can safely compare the DateTime objects and format them 528 if ($startDateTime <= $currentDateTime) { 529 // Start date has passed or is today 530 echo '<span style="color: rgba(255, 0, 0, 0.5);font-weight: bold;">Start: ' . htmlspecialchars($startDateTime->format('Y-m-d')) . '</span>'; 531 } else { 532 // Start date is in the future 533 echo '<span style="color: black;">Start: ' . htmlspecialchars($startDateTime->format('Y-m-d')) . '</span>'; 534 } 535 536 // Additionally, checking the end date 537 if ($endDateTime <= $currentDateTime) { 538 // End date has passed 539 echo '<span style="color: rgba(255, 0, 0, 0.5);font-weight: bold;margin-left: 1em;">Due: ' . htmlspecialchars($endDateTime->format('Y-m-d')) . '</span>'; 540 } else { 541 // End date is in the future 542 echo '<span style="color: black;margin-left: 1em;">Due: ' . htmlspecialchars($endDateTime->format('Y-m-d')) . '</span>'; 543 } 544 545 echo '<hr/><hr/>'; 511 546 512 547 } -
wp-easy-crm/trunk/readme.txt
r3027665 r3030705 3 3 Donate link: https://www.paypal.com/donate/?hosted_button_id=73ZZVYDUTMHME 4 4 Requires at least: 5.9 5 Tested up to: 6.4. 26 Stable tag: 1.0.1 65 Tested up to: 6.4.3 6 Stable tag: 1.0.17 7 7 Contributors: sunnysonic 8 8 License: GPLv2 or later … … 61 61 == Changelog == 62 62 63 = 1.0.15 = 63 = 1.0.17 = 64 * tested wordpress 6.4.3 65 * show more buttons in client profile now wider and with animation to not miss it 66 * my open tasks widget on the dashboard now showing start/end date and client name on button 67 * open task widget now shows tasks from oldest to newest 68 69 = 1.0.16 = 64 70 * tested wordpress 6.4.2 65 71 * Buttons added to filter by accounting region / country on clientlist if several are present for the users with general access -
wp-easy-crm/trunk/views/clientProfile.php
r3027665 r3030705 139 139 padding-right: 5px !important; 140 140 } 141 } 141 142 } 143 144 /* Add this CSS for the wiggle animation */ 145 @keyframes wiggle { 146 0%, 100% { 147 transform: rotate(-5deg); /* Increase the rotation angle for a stronger effect */ 148 } 149 50% { 150 transform: rotate(5deg); /* Increase the rotation angle for a stronger effect */ 151 } 152 } 153 .wiggle { 154 animation: wiggle 0.3s ease-in-out 2; /* Increase the duration to 1.5 seconds */ 155 } 156 142 157 </style> 143 158 … … 197 212 }); 198 213 }); 214 215 199 216 }); 200 217 </script> … … 356 373 </div> 357 374 <script> 358 375 document.addEventListener('DOMContentLoaded', (event) => { 359 376 document.querySelectorAll('table').forEach(function(table) { 360 377 let rows = table.querySelectorAll('tr'); … … 383 400 showMoreBtn.style.marginLeft = 'auto'; // Align to center horizontally 384 401 showMoreBtn.style.marginRight = 'auto'; // Align to center horizontally 402 showMoreBtn.style.minWidth = '200px'; // Minimum width of 200px 403 //showMoreBtn.style.fontWeight = 'bold'; // Make font bold 404 385 405 386 406 // Append the button after the table … … 399 419 } 400 420 }); 421 422 // Function to add wiggle effect 423 function addWiggleEffect() { 424 document.querySelectorAll('.show-more-btn').forEach(function(showMoreBtn) { 425 var elementPosition = showMoreBtn.getBoundingClientRect().top; 426 var screenPosition = window.innerHeight; 427 if (elementPosition < screenPosition && elementPosition > 0) { 428 showMoreBtn.classList.add('wiggle'); 429 } else { 430 showMoreBtn.classList.remove('wiggle'); 431 } 432 }); 433 } 434 435 // Apply wiggle effect to elements in view on load 436 addWiggleEffect(); 437 438 // Apply wiggle effect to elements when scrolling 439 window.addEventListener('scroll', addWiggleEffect); 401 440 }); 402 403 441 </script> 442 404 443 <!-- Hook for Projects and other modules to be added --> 405 444 <?php
Note: See TracChangeset
for help on using the changeset viewer.