diff --git a/public/frontend/css/style.css b/public/frontend/css/style.css
index 75f4a6c..33b80c9 100644
--- a/public/frontend/css/style.css
+++ b/public/frontend/css/style.css
@@ -1649,6 +1649,30 @@ table.lightgrey-weekends tbody td:nth-child(n+6) {
.available-dates h5{
margin-bottom: 0;
}
+.zabuto-calendar.table>thead>tr>th,
+.zabuto-calendar.table>thead:first-child>tr:first-child>td {
+ color: #000000;
+}
+.zabuto-calendar.table>thead:first-child>tr:first-child>td{
+ pointer-events: all;
+}
+table.lightgrey-weekends tbody td:nth-child(n+6) {
+ background-color: #f3f3f3;
+ color: #d30000;
+ }
+.event-colourful {
+ color: #bdbdbd;
+ cursor: not-allowed;
+}
+.event-colourful .zabuto-calendar__day{
+ pointer-events: none;
+}
+.event-clickable{
+ pointer-events: all !important;
+ color: #000000;
+ cursor: pointer;
+ box-shadow: 0 1px 5px rgb(0 0 0 / 20%), 0 2px 2px rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 12%) !important;
+}
/* appointment page css ends */
/* Footer Css */
diff --git a/resources/views/appointment.blade.php b/resources/views/appointment.blade.php
index 1531711..aa07c9d 100644
--- a/resources/views/appointment.blade.php
+++ b/resources/views/appointment.blade.php
@@ -22,7 +22,7 @@
+ Migration | Visa Services
@@ -134,20 +134,39 @@
});
function displayCalendar($calender,id){
var id = id;
+ var now = new Date();
$calender.zabuto_calendar({
-
- classname: 'table clickable table-bordered lightgrey-weekends',
+ data: [
+ @foreach($educationAppointments as $appointment)
+ @php
+ $date = Carbon\Carbon::createFromFormat('Y-m-d', $appointment->date);
+ $start_time = Carbon\Carbon::createFromFormat('H:i A', $appointment->start_time);
+ $end_time = Carbon\Carbon::createFromFormat('H:i A', $appointment->end_time);
+ @endphp
+ {
+ date: "{{ $date->format('Y-m-d') }}",
+ content: "{{ $start_time->format('H:i') }} - {{ $end_time->format('H:i') }}"
+ },
+ @endforeach
+ ],
+ classname: 'table event-colourful table-bordered lightgrey-weekends',
week_starts: 'monday',
show_days: true,
cell_border: true,
- today: true,
show_days: true,
weekstartson: 0,
- today_markup: '[day]',
navigation_markup: {
prev: '',
next: ''
- }
+ },
+ events:[
+ @foreach($educationAppointments as $appointment)
+ {
+ date: "{{ $appointment->date }}",
+ "classname": "clickable event-clickable"
+ },
+ @endforeach
+ ]
});
@@ -174,9 +193,8 @@
}
});
-
if (e.today) {
- $(e.element).css('color', 'blue');
+ $(e.element).html(''+ e.date.getDate() +'');
} else if (e.date.getTime() < now.getTime()) {
$(e.element).html(''+ e.date.getDate() +'');
} else {