Pranav Nachanekar | afe52e8 | 2019-10-03 16:35:08 +0530 | [diff] [blame] | 1 | frappe.ready(async () => { |
Pranav Nachanekar | afe52e8 | 2019-10-03 16:35:08 +0530 | [diff] [blame] | 2 | initialise_select_date(); |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 3 | }) |
Pranav Nachanekar | afe52e8 | 2019-10-03 16:35:08 +0530 | [diff] [blame] | 4 | |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 5 | async function initialise_select_date() { |
Pranav Nachanekar | a2dbd39 | 2019-09-12 10:48:26 +0530 | [diff] [blame] | 6 | navigate_to_page(1); |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 7 | await get_global_variables(); |
| 8 | setup_date_picker(); |
| 9 | setup_timezone_selector(); |
| 10 | hide_next_button(); |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 11 | } |
| 12 | |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 13 | async function get_global_variables() { |
0Pranav | 793ba8f | 2019-11-14 11:25:49 +0530 | [diff] [blame] | 14 | // Using await through this file instead of then. |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 15 | window.appointment_settings = (await frappe.call({ |
Pranav Nachnekar | 6aa7632 | 2019-12-10 16:05:28 +0000 | [diff] [blame] | 16 | method: 'erpnext.www.book_appointment.index.get_appointment_settings' |
Pranav Nachanekar | afe52e8 | 2019-10-03 16:35:08 +0530 | [diff] [blame] | 17 | })).message; |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 18 | window.timezones = (await frappe.call({ |
Pranav Nachnekar | 6aa7632 | 2019-12-10 16:05:28 +0000 | [diff] [blame] | 19 | method:'erpnext.www.book_appointment.index.get_timezones' |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 20 | })).message; |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | function setup_timezone_selector() { |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 24 | let timezones_element = document.getElementById('appointment-timezone'); |
0Pranav | 84ae2cc | 2019-12-18 15:44:04 +0530 | [diff] [blame] | 25 | let local_timezone = moment.tz.guess() |
| 26 | window.timezones.forEach(timezone => { |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 27 | let opt = document.createElement('option'); |
Pranav Nachanekar | c6da5fb | 2019-10-03 11:56:23 +0530 | [diff] [blame] | 28 | opt.value = timezone; |
0Pranav | 84ae2cc | 2019-12-18 15:44:04 +0530 | [diff] [blame] | 29 | if (timezone == local_timezone) { |
Pranav Nachanekar | c6da5fb | 2019-10-03 11:56:23 +0530 | [diff] [blame] | 30 | opt.selected = true; |
| 31 | } |
0Pranav | 84ae2cc | 2019-12-18 15:44:04 +0530 | [diff] [blame] | 32 | opt.innerHTML = timezone; |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 33 | timezones_element.appendChild(opt) |
| 34 | }); |
| 35 | } |
| 36 | |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 37 | function setup_date_picker() { |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 38 | let date_picker = document.getElementById('appointment-date'); |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 39 | let today = new Date(); |
| 40 | date_picker.min = today.toISOString().substr(0, 10); |
Pranav Nachanekar | 469247b | 2019-09-12 11:15:42 +0530 | [diff] [blame] | 41 | today.setDate(today.getDate() + window.appointment_settings.advance_booking_days); |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 42 | date_picker.max = today.toISOString().substr(0, 10); |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 43 | } |
| 44 | |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 45 | function hide_next_button() { |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 46 | let next_button = document.getElementById('next-button'); |
| 47 | next_button.disabled = true; |
Ankush Menat | ff96bdf | 2021-05-25 19:54:40 +0530 | [diff] [blame] | 48 | next_button.onclick = () => frappe.msgprint(__("Please select a date and time")); |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 49 | } |
| 50 | |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 51 | function show_next_button() { |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 52 | let next_button = document.getElementById('next-button'); |
| 53 | next_button.disabled = false; |
| 54 | next_button.onclick = setup_details_page; |
| 55 | } |
| 56 | |
| 57 | function on_date_or_timezone_select() { |
| 58 | let date_picker = document.getElementById('appointment-date'); |
| 59 | let timezone = document.getElementById('appointment-timezone'); |
| 60 | if (date_picker.value === '') { |
| 61 | clear_time_slots(); |
| 62 | hide_next_button(); |
Ankush Menat | ff96bdf | 2021-05-25 19:54:40 +0530 | [diff] [blame] | 63 | frappe.throw(__('Please select a date')); |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 64 | } |
| 65 | window.selected_date = date_picker.value; |
| 66 | window.selected_timezone = timezone.value; |
| 67 | update_time_slots(date_picker.value, timezone.value); |
Pranav Nachanekar | a322b15 | 2019-09-11 14:25:26 +0530 | [diff] [blame] | 68 | let lead_text = document.getElementById('lead-text'); |
Ernesto Ruiz | 728ef46 | 2022-09-26 08:01:48 -0600 | [diff] [blame] | 69 | lead_text.innerHTML = __("Select Time") |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | async function get_time_slots(date, timezone) { |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 73 | let slots = (await frappe.call({ |
Pranav Nachnekar | 6aa7632 | 2019-12-10 16:05:28 +0000 | [diff] [blame] | 74 | method: 'erpnext.www.book_appointment.index.get_appointment_slots', |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 75 | args: { |
| 76 | date: date, |
| 77 | timezone: timezone |
| 78 | } |
| 79 | })).message; |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 80 | return slots; |
| 81 | } |
pranav nachnekar | c5b2a58 | 2019-09-03 14:16:47 +0530 | [diff] [blame] | 82 | |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 83 | async function update_time_slots(selected_date, selected_timezone) { |
| 84 | let timeslot_container = document.getElementById('timeslot-container'); |
| 85 | window.slots = await get_time_slots(selected_date, selected_timezone); |
| 86 | clear_time_slots(); |
| 87 | if (window.slots.length <= 0) { |
| 88 | let message_div = document.createElement('p'); |
Ernesto Ruiz | 728ef46 | 2022-09-26 08:01:48 -0600 | [diff] [blame] | 89 | message_div.innerHTML = __("There are no slots available on this date"); |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 90 | timeslot_container.appendChild(message_div); |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 91 | return |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 92 | } |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 93 | window.slots.forEach((slot, index) => { |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 94 | // Get and append timeslot div |
| 95 | let timeslot_div = get_timeslot_div_layout(slot) |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 96 | timeslot_container.appendChild(timeslot_div); |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 97 | }); |
| 98 | set_default_timeslot(); |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 99 | } |
| 100 | |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 101 | function get_timeslot_div_layout(timeslot) { |
| 102 | let start_time = new Date(timeslot.time) |
| 103 | let timeslot_div = document.createElement('div'); |
| 104 | timeslot_div.classList.add('time-slot'); |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 105 | if (!timeslot.availability) { |
| 106 | timeslot_div.classList.add('unavailable') |
| 107 | } |
| 108 | timeslot_div.innerHTML = get_slot_layout(start_time); |
0Pranav | d3605d2 | 2019-12-11 15:02:23 +0530 | [diff] [blame] | 109 | timeslot_div.id = timeslot.time.substring(11, 19); |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 110 | timeslot_div.addEventListener('click', select_time); |
| 111 | return timeslot_div |
| 112 | } |
| 113 | |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 114 | function clear_time_slots() { |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 115 | // Clear any existing divs in timeslot container |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 116 | let timeslot_container = document.getElementById('timeslot-container'); |
| 117 | while (timeslot_container.firstChild) { |
Pranav Nachanekar | 7323bfd | 2019-09-18 14:33:10 +0530 | [diff] [blame] | 118 | timeslot_container.removeChild(timeslot_container.firstChild); |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 119 | } |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 120 | } |
| 121 | |
| 122 | function get_slot_layout(time) { |
0Pranav | 6e6954c | 2019-11-13 16:00:59 +0530 | [diff] [blame] | 123 | let timezone = document.getElementById("appointment-timezone").value; |
Pranav Nachanekar | 7323bfd | 2019-09-18 14:33:10 +0530 | [diff] [blame] | 124 | time = new Date(time); |
0Pranav | 6e6954c | 2019-11-13 16:00:59 +0530 | [diff] [blame] | 125 | let start_time_string = moment(time).tz(timezone).format("LT"); |
| 126 | let end_time = moment(time).tz(timezone).add(window.appointment_settings.appointment_duration, 'minutes'); |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 127 | let end_time_string = end_time.format("LT"); |
Ernesto Ruiz | 728ef46 | 2022-09-26 08:01:48 -0600 | [diff] [blame] | 128 | return `<span style="font-size: 1.2em;">${start_time_string}</span><br><span class="text-muted small">${__("to") } ${end_time_string}</span>`; |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | function select_time() { |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 132 | if (this.classList.contains('unavailable')) { |
Pranav Nachanekar | 7323bfd | 2019-09-18 14:33:10 +0530 | [diff] [blame] | 133 | return; |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 134 | } |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 135 | let selected_element = document.getElementsByClassName('selected'); |
Pranav Nachanekar | 25148d0 | 2019-10-04 11:32:39 +0530 | [diff] [blame] | 136 | if (!(selected_element.length > 0)) { |
Pranav Nachanekar | 7323bfd | 2019-09-18 14:33:10 +0530 | [diff] [blame] | 137 | this.classList.add('selected'); |
| 138 | show_next_button(); |
| 139 | return; |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 140 | } |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 141 | selected_element = selected_element[0] |
Pranav Nachanekar | 7323bfd | 2019-09-18 14:33:10 +0530 | [diff] [blame] | 142 | window.selected_time = this.id; |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 143 | selected_element.classList.remove('selected'); |
| 144 | this.classList.add('selected'); |
Pranav Nachanekar | a2dbd39 | 2019-09-12 10:48:26 +0530 | [diff] [blame] | 145 | show_next_button(); |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | function set_default_timeslot() { |
| 149 | let timeslots = document.getElementsByClassName('time-slot') |
Pranav Nachanekar | 7323bfd | 2019-09-18 14:33:10 +0530 | [diff] [blame] | 150 | // Can't use a forEach here since, we need to break the loop after a timeslot is selected |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 151 | for (let i = 0; i < timeslots.length; i++) { |
| 152 | const timeslot = timeslots[i]; |
| 153 | if (!timeslot.classList.contains('unavailable')) { |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 154 | timeslot.classList.add('selected'); |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 155 | break; |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 160 | function navigate_to_page(page_number) { |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 161 | let page1 = document.getElementById('select-date-time'); |
| 162 | let page2 = document.getElementById('enter-details'); |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 163 | switch (page_number) { |
| 164 | case 1: |
Pranav Nachanekar | a2dbd39 | 2019-09-12 10:48:26 +0530 | [diff] [blame] | 165 | page1.style.display = 'block'; |
| 166 | page2.style.display = 'none'; |
| 167 | break; |
| 168 | case 2: |
| 169 | page1.style.display = 'none'; |
| 170 | page2.style.display = 'block'; |
| 171 | break; |
| 172 | default: |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 173 | break; |
Pranav Nachanekar | a2dbd39 | 2019-09-12 10:48:26 +0530 | [diff] [blame] | 174 | } |
| 175 | } |
| 176 | |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 177 | function setup_details_page() { |
Pranav Nachanekar | a2dbd39 | 2019-09-12 10:48:26 +0530 | [diff] [blame] | 178 | navigate_to_page(2) |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 179 | let date_container = document.getElementsByClassName('date-span')[0]; |
| 180 | let time_container = document.getElementsByClassName('time-span')[0]; |
Pranav Nachnekar | c131270 | 2020-01-28 12:20:47 +0000 | [diff] [blame] | 181 | setup_search_params(); |
Pranav Nachanekar | 5c008ef | 2019-09-10 13:12:07 +0530 | [diff] [blame] | 182 | date_container.innerHTML = moment(window.selected_date).format("MMM Do YYYY"); |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 183 | time_container.innerHTML = moment(window.selected_time, "HH:mm:ss").format("LT"); |
pranav nachnekar | 2791054 | 2019-09-03 12:04:52 +0530 | [diff] [blame] | 184 | } |
| 185 | |
Pranav Nachnekar | c131270 | 2020-01-28 12:20:47 +0000 | [diff] [blame] | 186 | function setup_search_params() { |
| 187 | let search_params = new URLSearchParams(window.location.search); |
| 188 | let customer_name = search_params.get("name") |
| 189 | let customer_email = search_params.get("email") |
| 190 | let detail = search_params.get("details") |
| 191 | if (customer_name) { |
| 192 | let name_input = document.getElementById("customer_name"); |
| 193 | name_input.value = customer_name; |
| 194 | name_input.disabled = true; |
| 195 | } |
| 196 | if(customer_email) { |
| 197 | let email_input = document.getElementById("customer_email"); |
| 198 | email_input.value = customer_email; |
| 199 | email_input.disabled = true; |
| 200 | } |
| 201 | if(detail) { |
| 202 | let detail_input = document.getElementById("customer_notes"); |
| 203 | detail_input.value = detail; |
| 204 | detail_input.disabled = true; |
| 205 | } |
| 206 | } |
pranav nachnekar | c5b2a58 | 2019-09-03 14:16:47 +0530 | [diff] [blame] | 207 | async function submit() { |
0Pranav | a92f060 | 2019-11-13 12:13:42 +0530 | [diff] [blame] | 208 | let button = document.getElementById('submit-button'); |
| 209 | button.disabled = true; |
Pranav Nachanekar | c9cf5ae | 2019-09-24 12:08:37 +0530 | [diff] [blame] | 210 | let form = document.querySelector('#customer-form'); |
Pranav Nachanekar | 25148d0 | 2019-10-04 11:32:39 +0530 | [diff] [blame] | 211 | if (!form.checkValidity()) { |
Pranav Nachanekar | c9cf5ae | 2019-09-24 12:08:37 +0530 | [diff] [blame] | 212 | form.reportValidity(); |
0Pranav | a92f060 | 2019-11-13 12:13:42 +0530 | [diff] [blame] | 213 | button.disabled = false; |
Pranav Nachanekar | c9cf5ae | 2019-09-24 12:08:37 +0530 | [diff] [blame] | 214 | return; |
| 215 | } |
0Pranav | a92f060 | 2019-11-13 12:13:42 +0530 | [diff] [blame] | 216 | let contact = get_form_data(); |
0Pranav | 511780a | 2019-11-14 12:47:08 +0530 | [diff] [blame] | 217 | let appointment = frappe.call({ |
Pranav Nachnekar | 6aa7632 | 2019-12-10 16:05:28 +0000 | [diff] [blame] | 218 | method: 'erpnext.www.book_appointment.index.create_appointment', |
pranav nachnekar | c5b2a58 | 2019-09-03 14:16:47 +0530 | [diff] [blame] | 219 | args: { |
Pranav Nachanekar | db21f86 | 2019-09-09 17:01:40 +0530 | [diff] [blame] | 220 | 'date': window.selected_date, |
| 221 | 'time': window.selected_time, |
0Pranav | a92f060 | 2019-11-13 12:13:42 +0530 | [diff] [blame] | 222 | 'contact': contact, |
0Pranav | d1c530c | 2019-10-31 15:36:33 +0530 | [diff] [blame] | 223 | 'tz':window.selected_timezone |
0Pranav | 511780a | 2019-11-14 12:47:08 +0530 | [diff] [blame] | 224 | }, |
| 225 | callback: (response)=>{ |
| 226 | if (response.message.status == "Unverified") { |
Ernesto Ruiz | 728ef46 | 2022-09-26 08:01:48 -0600 | [diff] [blame] | 227 | frappe.show_alert(__("Please check your email to confirm the appointment")) |
0Pranav | 511780a | 2019-11-14 12:47:08 +0530 | [diff] [blame] | 228 | } else { |
Ernesto Ruiz | 728ef46 | 2022-09-26 08:01:48 -0600 | [diff] [blame] | 229 | frappe.show_alert(__("Appointment Created Successfully")); |
0Pranav | 511780a | 2019-11-14 12:47:08 +0530 | [diff] [blame] | 230 | } |
| 231 | setTimeout(()=>{ |
| 232 | let redirect_url = "/"; |
| 233 | if (window.appointment_settings.success_redirect_url){ |
| 234 | redirect_url += window.appointment_settings.success_redirect_url; |
| 235 | } |
0Pranav | fb1e877 | 2019-11-26 12:14:41 +0530 | [diff] [blame] | 236 | window.location.href = redirect_url;},5000) |
0Pranav | 511780a | 2019-11-14 12:47:08 +0530 | [diff] [blame] | 237 | }, |
| 238 | error: (err)=>{ |
Ernesto Ruiz | 728ef46 | 2022-09-26 08:01:48 -0600 | [diff] [blame] | 239 | frappe.show_alert(__("Something went wrong please try again")); |
0Pranav | 511780a | 2019-11-14 12:47:08 +0530 | [diff] [blame] | 240 | button.disabled = false; |
pranav nachnekar | c5b2a58 | 2019-09-03 14:16:47 +0530 | [diff] [blame] | 241 | } |
0Pranav | 511780a | 2019-11-14 12:47:08 +0530 | [diff] [blame] | 242 | }); |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 243 | } |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 244 | |
Pranav Nachanekar | 91a5649 | 2019-09-17 16:58:41 +0530 | [diff] [blame] | 245 | function get_form_data() { |
Deepesh Garg | 0b1e78e | 2023-07-22 21:19:48 +0530 | [diff] [blame] | 246 | let contact = {}; |
0Pranav | 6de68c8 | 2019-11-01 09:51:32 +0530 | [diff] [blame] | 247 | let inputs = ['name', 'skype', 'number', 'notes', 'email']; |
| 248 | inputs.forEach((id) => contact[id] = document.getElementById(`customer_${id}`).value) |
0Pranav | a92f060 | 2019-11-13 12:13:42 +0530 | [diff] [blame] | 249 | return contact |
Pranav Nachanekar | 10711dd | 2019-09-09 15:41:20 +0530 | [diff] [blame] | 250 | } |