_table_body.php
1 year ago
edit_form.php
1 year ago
index.php
1 year ago
inline_edit_form.php
1 year ago
mini_profile.php
1 year ago
new_form.php
1 year ago
query_for_booking_form.php
1 year ago
quick_edit.php
1 year ago
view_customer_log.php
1 year ago
_table_body.php
38 lines
| 1 | <?php |
| 2 | /** @var $customers OsCustomerModel[] */ |
| 3 | |
| 4 | if ( ! defined( 'ABSPATH' ) ) { |
| 5 | exit; // Exit if accessed directly |
| 6 | } |
| 7 | if($customers){ |
| 8 | foreach ($customers as $customer): |
| 9 | $next_booking = $customer->get_future_bookings(1, true); |
| 10 | ?> |
| 11 | <tr class="os-clickable-row" <?php echo OsCustomerHelper::quick_customer_btn_html($customer->id); ?>> |
| 12 | <td class="text-center os-column-faded text-right has-floating-button"> |
| 13 | <?php echo esc_html($customer->id); ?> |
| 14 | <div class="os-floating-button"><i class="latepoint-icon latepoint-icon-edit-3"></i></div> |
| 15 | </td> |
| 16 | <td> |
| 17 | <a class="os-with-avatar" href="#"> |
| 18 | <span class="os-avatar" style="background-image: url(<?php echo esc_url($customer->get_avatar_url()); ?>)"></span> |
| 19 | <span class="os-name"><?php echo esc_html($customer->full_name); ?></span> |
| 20 | </a> |
| 21 | </td> |
| 22 | <td><?php echo esc_html($customer->phone); ?></td> |
| 23 | <td style="max-width: 220px; overflow: scroll;"><?php echo esc_html($customer->email); ?></td> |
| 24 | <?php if(OsSettingsHelper::is_using_social_login()){ |
| 25 | $social_google = $customer->google_user_id ? '<i class="latepoint-customer-google latepoint-icon latepoint-icon-google"></i>' : ''; |
| 26 | $social_facebook = $customer->facebook_user_id ? '<i class="latepoint-customer-facebook latepoint-icon latepoint-icon-facebook"></i>' : ''; |
| 27 | echo '<td>'.$social_facebook.$social_google.'</td>'; |
| 28 | } |
| 29 | ?> |
| 30 | <td><?php echo esc_html($customer->get_total_bookings_count(true)); ?></td> |
| 31 | <td><?php echo ($next_booking) ? esc_html($next_booking->nice_start_datetime) : esc_html__('n/a', 'latepoint'); ?></td> |
| 32 | <td><?php echo ($next_booking) ? $next_booking->time_left : '<span class="time-left is-past">'.esc_html__('Past', 'latepoint').'</span>'; ?></td> |
| 33 | <?php if(OsAuthHelper::wp_users_as_customers()) echo ($customer->wordpress_user_id) ? '<td><a target="_blank" href="'.esc_url(get_edit_user_link($customer->wordpress_user_id)).'">'.esc_html($customer->wordpress_user_id).'</a></td>' : '<td><div class="not-connected-pill"></div></td>'; ?> |
| 34 | <td><?php echo esc_html($customer->formatted_created_date()); ?></td> |
| 35 | </tr> |
| 36 | <?php |
| 37 | endforeach; |
| 38 | }?> |