PluginProbe ʕ •ᴥ•ʔ
Appointment Booking Plugin – LatePoint | Calendar & Scheduling for WordPress / 5.6.8
Appointment Booking Plugin – LatePoint | Calendar & Scheduling for WordPress v5.6.8
5.6.8 5.6.7 5.6.6 5.6.5 5.6.4 5.6.3 5.6.2 5.6.1 5.6.0 5.5.2 5.5.1 5.5.0 5.4.2 trunk 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.1.91 5.1.92 5.1.93 5.1.94 5.2.0 5.2.1 5.2.10 5.2.11 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1
latepoint / lib / views / customer_cabinet / dashboard.php
latepoint / lib / views / customer_cabinet Last commit date
_booking_tile.php 1 week ago _bundle_tile.php 1 year ago _order_tile.php 2 months ago dashboard.php 2 months ago login.php 9 months ago password_reset_form.php 2 months ago request_password_reset_token.php 2 months ago scheduling_summary_for_bundle.php 1 year ago view_booking_summary_in_lightbox.php 1 year ago view_order_summary_in_lightbox.php 1 year ago
dashboard.php
160 lines
1 <?php
2 /** @var $customer OsCustomerModel */
3 /** @var $future_bookings OsBookingModel[] */
4 /** @var $past_bookings OsBookingModel[] */
5 /** @var $cancelled_bookings OsBookingModel[] */
6 /** @var $not_scheduled_bundles OsBundleModel[] */
7 /** @var $orders OsOrderModel[] */
8 /** @var $cart_not_empty bool */
9 /** @var $hide_new_appointment_ui bool */
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit; // Exit if accessed directly
13 }
14 ?>
15 <div class="latepoint-w">
16 <a href="<?php echo esc_url(OsRouterHelper::build_admin_post_link(['customer_cabinet', 'logout'] )); ?>"><?php esc_html_e('Logout', 'latepoint'); ?></a>
17 <h4><?php
18 // translators: %s is user first name
19 printf( esc_html__('Welcome %s', 'latepoint'), esc_html($customer->full_name)); ?></h4>
20 <div class="latepoint-tabs-w">
21 <div class="latepoint-tab-triggers customer-dashboard-tabs">
22 <a href="#" data-tab-target=".tab-content-customer-bookings" class="active latepoint-tab-trigger"><?php esc_html_e('Appointments', 'latepoint'); ?></a>
23 <a href="#" data-tab-target=".tab-content-customer-orders" class="latepoint-tab-trigger"><?php esc_html_e('Orders', 'latepoint'); ?></a>
24 <a href="#" data-tab-target=".tab-content-customer-info-form" class="latepoint-tab-trigger"><?php esc_html_e('Profile', 'latepoint'); ?></a>
25 <?php if (!$hide_new_appointment_ui) { ?>
26 <a href="#" data-tab-target=".tab-content-customer-new-appointment-form" class="latepoint-tab-trigger"><?php esc_html_e('New Appointment', 'latepoint'); ?></a>
27 <?php } ?>
28 <?php do_action('latepoint_customer_dashboard_after_tabs', $customer); ?>
29 </div>
30 <div class="latepoint-tab-content tab-content-customer-bookings active">
31 <?php do_action('latepoint_customer_dashboard_before_appointments', $customer); ?>
32 <?php if($future_bookings || $past_bookings || $cancelled_bookings || $not_scheduled_bundles){ ?>
33 <?php if($future_bookings){ ?>
34 <div class="latepoint-section-heading-w">
35 <h5 class="latepoint-section-heading"><?php esc_html_e('Upcoming', 'latepoint'); ?></h5>
36 <div class="heading-extra">
37 <?php
38 // translators: %d is number of appointments
39 echo sprintf( esc_html__('%d Appointments', 'latepoint'), count($future_bookings)); ?>
40 </div>
41 </div>
42 <div class="customer-bookings-tiles">
43 <?php
44 foreach($future_bookings as $booking){
45 $is_upcoming_booking = true;
46 include('_booking_tile.php');
47 } ?>
48 <?php if (!$hide_new_appointment_ui) { ?>
49 <a href="#" class="new-booking-tile os_trigger_booking" <?php echo OsSettingsHelper::get_settings_value('customer_dashboard_book_button_attributes', ''); ?>><i class="latepoint-icon latepoint-icon-plus"></i><span><?php esc_html_e('New Appointment', 'latepoint'); ?></span></a>
50 <?php } ?>
51 </div>
52 <?php } ?>
53 <?php
54 if($not_scheduled_bundles){ ?>
55 <div class="latepoint-section-heading-w">
56 <h5 class="latepoint-section-heading"><?php esc_html_e('Bundles', 'latepoint'); ?></h5>
57 <div class="heading-extra">
58 <?php
59 // translators: %d is number of bundles
60 echo sprintf( esc_html__('%d Bundles', 'latepoint'), count($not_scheduled_bundles)); ?>
61 </div>
62 </div>
63 <div class="customer-bookings-tiles">
64 <?php
65 foreach($not_scheduled_bundles as $order_item_id => $bundle){
66 $order_item = new OsOrderItemModel($order_item_id);
67 $order = new OsOrderModel($order_item->order_id);
68 $bundle_services_with_booked_count = OsOrdersHelper::bundle_services_and_booked_count_for_order_item_id($order_item_id);
69 include('_bundle_tile.php');
70 } ?>
71 </div>
72 <?php } ?>
73 <?php
74 if($past_bookings){ ?>
75 <div class="latepoint-section-heading-w">
76 <h5 class="latepoint-section-heading"><?php esc_html_e('Past', 'latepoint'); ?></h5>
77 <div class="heading-extra">
78 <?php
79 // translators: %d is number of appointments
80 echo sprintf( esc_html__('%d Appointments', 'latepoint'), count($past_bookings)); ?>
81 </div>
82 </div>
83 <div class="customer-bookings-tiles">
84 <?php
85 foreach($past_bookings as $booking){
86 $is_upcoming_booking = false;
87 include('_booking_tile.php');
88 } ?>
89 <?php if (!$hide_new_appointment_ui) { ?>
90 <a href="#" class="new-booking-tile os_trigger_booking"><i class="latepoint-icon latepoint-icon-plus"></i><span><?php esc_html_e('New Appointment', 'latepoint'); ?></span></a>
91 <?php } ?>
92 </div>
93 <?php } ?>
94 <?php
95 if($cancelled_bookings){ ?>
96 <div class="latepoint-section-heading-w">
97 <h5 class="latepoint-section-heading"><?php esc_html_e('Cancelled', 'latepoint'); ?></h5>
98 <div class="heading-extra">
99 <?php
100 // translators: %d is number of appointments
101 echo sprintf( esc_html__('%d Appointments', 'latepoint'), count($cancelled_bookings)); ?>
102 </div>
103 </div>
104 <div class="customer-bookings-tiles">
105 <?php
106 foreach($cancelled_bookings as $booking){
107 $is_upcoming_booking = false;
108 include('_booking_tile.php');
109 } ?>
110 <?php if (!$hide_new_appointment_ui) { ?>
111 <a href="#" class="new-booking-tile os_trigger_booking"><i class="latepoint-icon latepoint-icon-plus"></i><span><?php esc_html_e('New Appointment', 'latepoint'); ?></span></a>
112 <?php } ?>
113 </div>
114 <?php } ?>
115 <?php }else{
116 echo '<div class="latepoint-message-info latepoint-message">'.esc_html__('No appointments found', 'latepoint').'</div>';
117 }
118 ?>
119 </div>
120 <div class="latepoint-tab-content tab-content-customer-orders">
121 <?php
122 if($orders){
123 echo '<div class="customer-orders-tiles">';
124 foreach($orders as $order){
125 include('_order_tile.php');
126 }
127 echo '</div>';
128 }
129 ?>
130 </div>
131 <div class="latepoint-tab-content tab-content-customer-info-form">
132 <form action="" data-os-action="<?php echo esc_attr(OsRouterHelper::build_route_name('customer_cabinet', 'update')); ?>">
133 <div class="os-row">
134 <?php echo OsFormHelper::text_field('customer[first_name]', __('Your First Name', 'latepoint'), $customer->first_name, array('class' => 'required', 'autocomplete' => 'given-name'), array('class' => 'os-col-6')); ?>
135 <?php echo OsFormHelper::text_field('customer[last_name]', __('Your Last Name', 'latepoint'), $customer->last_name, array('class' => 'required', 'autocomplete' => 'family-name'), array('class' => 'os-col-6')); ?>
136 <?php echo OsFormHelper::phone_number_field('customer[phone]', __('Your Phone Number', 'latepoint'), $customer->phone, ['autocomplete' => 'tel'], array('class' => 'os-col-6')); ?>
137 <?php echo OsFormHelper::text_field('customer[email]', __('Your Email Address', 'latepoint'), $customer->email, array('class' => 'required', 'autocomplete' => 'email'), array('class' => 'os-col-6')); ?>
138 </div>
139 <?php do_action('latepoint_customer_dashboard_information_form_after', $customer); ?>
140 <?php wp_nonce_field('update_customer_'.$customer->get_uuid()); ?>
141 <?php echo OsFormHelper::button('submit', __('Save Changes', 'latepoint'), 'submit', ['class' => 'latepoint-btn']); ?>
142 </form>
143 <div class="customer-password-form-w">
144 <form action="" data-os-action="<?php echo esc_attr(OsRouterHelper::build_route_name('customer_cabinet', 'change_password')); ?>">
145 <h5><?php esc_html_e('Set New Password', 'latepoint'); ?></h5>
146 <div class="os-row">
147 <?php echo OsFormHelper::password_field('password', __('New Password', 'latepoint'), '', ['autocomplete' => 'new-password'], array('class' => 'os-col-6')); ?>
148 <?php echo OsFormHelper::password_field('password_confirmation', __('Confirm New Password', 'latepoint'), '', ['autocomplete' => 'new-password'], array('class' => 'os-col-6')); ?>
149 </div>
150 <?php wp_nonce_field('change_password_'.$customer->get_uuid(), 'change_password_nonce'); ?>
151 <?php echo OsFormHelper::button('submit', __('Set New Password', 'latepoint'), 'submit', ['class' => 'latepoint-btn']); ?>
152 </form>
153 </div>
154 </div>
155 <div class="latepoint-tab-content tab-content-customer-new-appointment-form">
156 <?php echo do_shortcode(OsSettingsHelper::get_settings_value('customer_dashboard_book_shortcode', '[latepoint_book_button]')); ?>
157 </div>
158 <?php do_action('latepoint_customer_dashboard_after_tab_contents', $customer); ?>
159 </div>
160 </div>