appointment.js
1 year ago
attendee.js
1 year ago
auth.js
1 year ago
bookableType.js
3 years ago
booking.js
1 year ago
cabinet.js
1 year ago
cabinetFilters.js
1 year ago
coupon.js
2 years ago
customFields.js
2 years ago
customerInfo.js
1 year ago
employee.js
1 year ago
entities.js
1 year ago
event.js
1 year ago
eventBooking.js
3 years ago
eventEntities.js
1 year ago
eventWaitingListOptions.js
1 year ago
pagination.js
3 years ago
params.js
1 year ago
payment.js
2 years ago
persons.js
1 year ago
recurring.js
1 year ago
shortcodeParams.js
2 years ago
tickets.js
1 year ago
booking.js
684 lines
| 1 | import {settings} from "../../plugins/settings"; |
| 2 | |
| 3 | export default { |
| 4 | namespaced: true, |
| 5 | |
| 6 | state: () => ({ |
| 7 | appointment: { |
| 8 | bookingStartDate: '', |
| 9 | bookingStartTime: '', |
| 10 | bookings: [{ |
| 11 | customer: { |
| 12 | email: '', |
| 13 | externalId: null, |
| 14 | firstName: '', |
| 15 | id: null, |
| 16 | lastName: '', |
| 17 | phone: '', |
| 18 | countryPhoneIso : '', |
| 19 | translations: null, |
| 20 | }, |
| 21 | customFields: {}, |
| 22 | customerId: 0, |
| 23 | extras: [], |
| 24 | persons: 1, |
| 25 | haveMandatoryExtras: false, |
| 26 | minSelectedExtras: 0 |
| 27 | }], |
| 28 | duration: 0, |
| 29 | group: false, |
| 30 | notifyParticipants:'', |
| 31 | payment: { |
| 32 | amount: 0, |
| 33 | gateway: '', |
| 34 | deposit: false, |
| 35 | data: {} |
| 36 | }, |
| 37 | categoryId: null, |
| 38 | serviceId: null, |
| 39 | locationId: null, |
| 40 | providerId: null, |
| 41 | packageId: null, |
| 42 | }, |
| 43 | coupon: { |
| 44 | code: '', |
| 45 | discount: '', |
| 46 | deduction: '', |
| 47 | limit: '', |
| 48 | required: false, |
| 49 | bookingsCount: 0 |
| 50 | }, |
| 51 | payPalActions: null, |
| 52 | appointmentsIndex: 0, |
| 53 | currentCartItem: null, |
| 54 | appointments: [ |
| 55 | { |
| 56 | packageId: null, |
| 57 | serviceId: null, |
| 58 | index: 0, |
| 59 | services: {}, |
| 60 | } |
| 61 | ], |
| 62 | attachments: {}, |
| 63 | recurringRules: { |
| 64 | repeat: { |
| 65 | type: 'daily', |
| 66 | interval: 1, |
| 67 | }, |
| 68 | occurrence: { |
| 69 | type: 'After', |
| 70 | date: null, |
| 71 | count: 1, |
| 72 | }, |
| 73 | days: [ |
| 74 | {value: 'monday', selected: false}, |
| 75 | {value: 'tuesday', selected: false}, |
| 76 | {value: 'wednesday', selected: false}, |
| 77 | {value: 'thursday', selected: false}, |
| 78 | {value: 'friday', selected: false}, |
| 79 | {value: 'saturday', selected: false}, |
| 80 | {value: 'sunday', selected: false} |
| 81 | ], |
| 82 | monthly: 0 |
| 83 | }, |
| 84 | loading: false, |
| 85 | booked: null, |
| 86 | ready: false, |
| 87 | packageId: null, |
| 88 | error: '', |
| 89 | busyness: [], |
| 90 | lastBookedProviderId: null |
| 91 | }), |
| 92 | |
| 93 | getters: { |
| 94 | getSelection (state) { |
| 95 | return { |
| 96 | packageId: state.packageId, |
| 97 | categoryId: state.appointment.categoryId, |
| 98 | serviceId: state.appointment.serviceId, |
| 99 | providerId: state.appointment.providerId, |
| 100 | locationId: state.appointment.locationId, |
| 101 | type: state.appointment.type, |
| 102 | } |
| 103 | }, |
| 104 | |
| 105 | getServiceProviderSelection (state) { |
| 106 | return { |
| 107 | serviceId: state.appointment.serviceId, |
| 108 | providerId: state.appointment.providerId, |
| 109 | locationId: state.appointment.locationId, |
| 110 | } |
| 111 | }, |
| 112 | |
| 113 | getPackageId (state) { |
| 114 | return state.packageId |
| 115 | }, |
| 116 | |
| 117 | getCategoryId (state) { |
| 118 | return state.appointment.categoryId |
| 119 | }, |
| 120 | |
| 121 | getServiceId (state) { |
| 122 | return state.appointment.serviceId |
| 123 | }, |
| 124 | |
| 125 | getEmployeeId (state) { |
| 126 | return state.appointment.providerId |
| 127 | }, |
| 128 | |
| 129 | getLocationId (state) { |
| 130 | return state.appointment.locationId |
| 131 | }, |
| 132 | |
| 133 | getBooking (state) { |
| 134 | return state.appointment.bookings[0] |
| 135 | }, |
| 136 | |
| 137 | getBookingPersons (state) { |
| 138 | let i = state.appointmentsIndex |
| 139 | |
| 140 | return state.appointments[i] |
| 141 | .services[state.appointments[i].serviceId] |
| 142 | .list[state.appointments[i].index] |
| 143 | .persons |
| 144 | }, |
| 145 | |
| 146 | getBookingDuration (state) { |
| 147 | let i = state.appointmentsIndex |
| 148 | |
| 149 | return state.appointments[i] |
| 150 | .services[state.appointments[i].serviceId] |
| 151 | .list[state.appointments[i].index] |
| 152 | .duration |
| 153 | }, |
| 154 | |
| 155 | getBookableType (state) { |
| 156 | return state.appointment.type |
| 157 | }, |
| 158 | |
| 159 | getAllMultipleAppointments (state) { |
| 160 | return state.appointments |
| 161 | }, |
| 162 | |
| 163 | getMultipleAppointmentsServiceSlots (state) { |
| 164 | let selection = state.appointments[state.appointmentsIndex].services[state.appointments[state.appointmentsIndex].serviceId] |
| 165 | |
| 166 | if (selection.providerId || selection.locationId) { |
| 167 | let slots = {} |
| 168 | |
| 169 | for (let date in selection.slots) { |
| 170 | for (let time in selection.slots[date]) { |
| 171 | for (let i = 0; i < selection.slots[date][time].length; i++) { |
| 172 | if ((selection.providerId && selection.slots[date][time][i][0] === selection.providerId) || |
| 173 | (selection.locationId && selection.slots[date][time][i][1] === selection.locationId) |
| 174 | ) { |
| 175 | if (!(date in slots)) { |
| 176 | slots[date] = {} |
| 177 | } |
| 178 | |
| 179 | slots[date][time] = selection.slots[date][time] |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | return slots |
| 186 | } |
| 187 | |
| 188 | return state.appointments[state.appointmentsIndex].services[state.appointments[state.appointmentsIndex].serviceId].slots |
| 189 | }, |
| 190 | |
| 191 | getMultipleAppointmentsRange (state) { |
| 192 | let i = state.appointmentsIndex |
| 193 | |
| 194 | return state.appointments[i] |
| 195 | .services[state.appointments[i].serviceId] |
| 196 | .list[state.appointments[i].index] |
| 197 | .range |
| 198 | }, |
| 199 | |
| 200 | getMultipleAppointmentsAppCount: (state) => (serviceId) => { |
| 201 | let i = state.appointmentsIndex |
| 202 | |
| 203 | return state.appointments[i] |
| 204 | .services[serviceId] |
| 205 | .appCount |
| 206 | }, |
| 207 | |
| 208 | getMultipleAppointmentsDate (state) { |
| 209 | let i = state.appointmentsIndex |
| 210 | |
| 211 | return state.appointments[i] |
| 212 | .services[state.appointments[i].serviceId] |
| 213 | .list[state.appointments[i].index] |
| 214 | .date |
| 215 | }, |
| 216 | |
| 217 | getMultipleAppointmentsOccupied (state) { |
| 218 | return state.appointments[state.appointmentsIndex].services[state.appointments[state.appointmentsIndex].serviceId].occupied |
| 219 | }, |
| 220 | |
| 221 | getMultipleAppointmentsTime (state) { |
| 222 | let i = state.appointmentsIndex |
| 223 | |
| 224 | return state.appointments[i] |
| 225 | .services[state.appointments[i].serviceId] |
| 226 | .list[state.appointments[i].index] |
| 227 | .time |
| 228 | }, |
| 229 | |
| 230 | getMultipleAppointmentsSlots (state) { |
| 231 | let i = state.appointmentsIndex |
| 232 | |
| 233 | return state.appointments[i] |
| 234 | .services[state.appointments[i].serviceId] |
| 235 | .slots |
| 236 | }, |
| 237 | |
| 238 | getMultipleAppointmentsLastDate (state) { |
| 239 | let i = state.appointmentsIndex |
| 240 | |
| 241 | return state.appointments[i] |
| 242 | .services[state.appointments[i].serviceId] |
| 243 | .lastDate |
| 244 | }, |
| 245 | |
| 246 | getSelectedExtras (state) { |
| 247 | let i = state.appointmentsIndex |
| 248 | |
| 249 | return state.appointments[i] |
| 250 | .services[state.appointments[i].serviceId] |
| 251 | .list[state.appointments[i].index] |
| 252 | .extras |
| 253 | }, |
| 254 | |
| 255 | getCustomerId (state) { |
| 256 | return state.appointment.bookings[0].customer.id |
| 257 | }, |
| 258 | |
| 259 | getCustomerFirstName (state) { |
| 260 | return state.appointment.bookings[0].customer.firstName |
| 261 | }, |
| 262 | |
| 263 | getCustomerLastName (state) { |
| 264 | return state.appointment.bookings[0].customer.lastName |
| 265 | }, |
| 266 | |
| 267 | getCustomerEmail (state) { |
| 268 | return state.appointment.bookings[0].customer.email |
| 269 | }, |
| 270 | |
| 271 | getCustomerPhone (state) { |
| 272 | return state.appointment.bookings[0].customer.phone |
| 273 | }, |
| 274 | |
| 275 | getCustomerCountryPhoneIso (state) { |
| 276 | return state.appointment.bookings[0].customer.countryPhoneIso |
| 277 | }, |
| 278 | |
| 279 | getCustomerExternalId (state) { |
| 280 | return state.appointment.bookings[0].customer.externalId |
| 281 | }, |
| 282 | |
| 283 | getCustomerTranslations (state) { |
| 284 | return state.appointment.bookings[0].customer.translations |
| 285 | }, |
| 286 | |
| 287 | getAvailableCustomFields (state) { |
| 288 | return state.appointment.bookings[0].customFields |
| 289 | }, |
| 290 | |
| 291 | getRecurringRepeatType (state) { |
| 292 | return state.recurringRules.repeat.type |
| 293 | }, |
| 294 | |
| 295 | getRecurringRepeatInterval (state) { |
| 296 | return state.recurringRules.repeat.interval |
| 297 | }, |
| 298 | |
| 299 | getRecurringOccurrenceType (state) { |
| 300 | return state.recurringRules.occurrence.type |
| 301 | }, |
| 302 | |
| 303 | getRecurringOccurrenceDate (state) { |
| 304 | return state.recurringRules.occurrence.date |
| 305 | }, |
| 306 | |
| 307 | getRecurringOccurrenceCount (state) { |
| 308 | return state.recurringRules.occurrence.count |
| 309 | }, |
| 310 | |
| 311 | getRecurringDays (state) { |
| 312 | return state.recurringRules.days |
| 313 | }, |
| 314 | |
| 315 | getRecurringMonthly (state) { |
| 316 | return state.recurringRules.monthly |
| 317 | }, |
| 318 | |
| 319 | getAttachments (state) { |
| 320 | return state.attachments |
| 321 | }, |
| 322 | |
| 323 | getCoupon (state) { |
| 324 | return state.coupon |
| 325 | }, |
| 326 | |
| 327 | getCouponCode (state) { |
| 328 | return state.coupon.code |
| 329 | }, |
| 330 | |
| 331 | getCouponValidated (state) { |
| 332 | return !state.coupon.required || (state.coupon.code !== '') |
| 333 | }, |
| 334 | |
| 335 | getPayPalActions (state) { |
| 336 | return state.payPalActions |
| 337 | }, |
| 338 | |
| 339 | getPaymentGateway (state) { |
| 340 | return state.appointment.payment.gateway |
| 341 | }, |
| 342 | |
| 343 | getPaymentDeposit (state) { |
| 344 | return state.appointment.payment.deposit |
| 345 | }, |
| 346 | |
| 347 | getLoading (state) { |
| 348 | return state.loading |
| 349 | }, |
| 350 | |
| 351 | getBooked (state) { |
| 352 | return state.booked |
| 353 | }, |
| 354 | |
| 355 | getError (state) { |
| 356 | return state.error |
| 357 | }, |
| 358 | |
| 359 | getBusyness (state) { |
| 360 | return state.busyness |
| 361 | }, |
| 362 | |
| 363 | getLastBookedProviderId (state) { |
| 364 | return state.lastBookedProviderId |
| 365 | }, |
| 366 | |
| 367 | getCurrentCartItem (state) { |
| 368 | return state.currentCartItem |
| 369 | }, |
| 370 | |
| 371 | getCartItemIndex (state) { |
| 372 | return state.appointmentsIndex |
| 373 | }, |
| 374 | }, |
| 375 | |
| 376 | mutations: { |
| 377 | setPackageId (state, payload) { |
| 378 | state.packageId = payload |
| 379 | }, |
| 380 | |
| 381 | setCategoryId (state, payload) { |
| 382 | state.appointment.categoryId = payload |
| 383 | }, |
| 384 | |
| 385 | setServiceId (state, payload) { |
| 386 | state.appointment.serviceId = payload |
| 387 | }, |
| 388 | |
| 389 | setEmployeeId (state, payload) { |
| 390 | state.appointment.providerId = payload |
| 391 | }, |
| 392 | |
| 393 | setLocationId (state, payload) { |
| 394 | state.appointment.locationId = payload |
| 395 | }, |
| 396 | |
| 397 | setCartItem (state, payload) { |
| 398 | state.appointments[state.appointmentsIndex] = payload |
| 399 | }, |
| 400 | |
| 401 | setCurrentCartItem (state, payload) { |
| 402 | state.currentCartItem = payload |
| 403 | }, |
| 404 | |
| 405 | setCartItemIndex (state, payload) { |
| 406 | state.appointmentsIndex = payload |
| 407 | }, |
| 408 | |
| 409 | setMultipleAppointments (state, payload) { |
| 410 | state.appointments = payload |
| 411 | }, |
| 412 | |
| 413 | setMultipleAppointmentsServiceId (state, payload) { |
| 414 | state.appointments[state.appointmentsIndex].serviceId = payload |
| 415 | }, |
| 416 | |
| 417 | setMultipleAppointmentsIndex (state, payload) { |
| 418 | state.appointments[state.appointmentsIndex].index = payload |
| 419 | }, |
| 420 | |
| 421 | unsetMultipleAppointmentsData (state, payload) { |
| 422 | let i = state.appointmentsIndex |
| 423 | |
| 424 | if (payload !== '') { |
| 425 | state.appointments[i] |
| 426 | .services[state.appointments[i].serviceId] |
| 427 | .list[payload] = { |
| 428 | date: null, |
| 429 | time: null, |
| 430 | providerId: null, |
| 431 | locationId: null, |
| 432 | persons: state.appointments[i].services[state.appointments[i].serviceId].list[payload].persons, |
| 433 | extras: state.appointments[i].services[state.appointments[i].serviceId].list[payload].extras, |
| 434 | duration: null, |
| 435 | slots: [], |
| 436 | } |
| 437 | } |
| 438 | }, |
| 439 | |
| 440 | setMultipleAppointmentsRange (state, payload) { |
| 441 | let i = state.appointmentsIndex |
| 442 | |
| 443 | state.appointments[i] |
| 444 | .services[state.appointments[i].serviceId] |
| 445 | .list[state.appointments[i].index] |
| 446 | .range = payload |
| 447 | }, |
| 448 | |
| 449 | setMultipleAppointmentsExistingApp (state, payload) { |
| 450 | let i = state.appointmentsIndex |
| 451 | |
| 452 | state.appointments[i] |
| 453 | .services[state.appointments[i].serviceId] |
| 454 | .list[state.appointments[i].index] |
| 455 | .existingApp = payload |
| 456 | }, |
| 457 | |
| 458 | setMultipleAppointmentsAppCount (state, payload) { |
| 459 | let i = state.appointmentsIndex |
| 460 | |
| 461 | state.appointments[i] |
| 462 | .services[state.appointments[i].serviceId] |
| 463 | .appCount = payload |
| 464 | }, |
| 465 | |
| 466 | setMultipleAppointmentsDate (state, payload) { |
| 467 | let i = state.appointmentsIndex |
| 468 | |
| 469 | state.appointments[i] |
| 470 | .services[state.appointments[i].serviceId] |
| 471 | .list[state.appointments[i].index] |
| 472 | .date = payload |
| 473 | }, |
| 474 | |
| 475 | setMultipleAppointmentsTime (state, payload) { |
| 476 | let i = state.appointmentsIndex |
| 477 | |
| 478 | state.appointments[i] |
| 479 | .services[state.appointments[i].serviceId] |
| 480 | .list[state.appointments[i].index] |
| 481 | .time = payload |
| 482 | }, |
| 483 | |
| 484 | setMultipleAppointmentsSlots (state, payload) { |
| 485 | let i = state.appointmentsIndex |
| 486 | |
| 487 | state.appointments[i] |
| 488 | .services[state.appointments[i].serviceId] |
| 489 | .slots = payload |
| 490 | }, |
| 491 | |
| 492 | setMultipleAppointmentsOccupied (state, payload) { |
| 493 | let i = state.appointmentsIndex |
| 494 | |
| 495 | state.appointments[i] |
| 496 | .services[state.appointments[i].serviceId] |
| 497 | .occupied = payload |
| 498 | }, |
| 499 | |
| 500 | setMultipleAppointmentsLastDate (state, payload) { |
| 501 | let i = state.appointmentsIndex |
| 502 | |
| 503 | state.appointments[i] |
| 504 | .services[state.appointments[i].serviceId] |
| 505 | .lastDate = payload |
| 506 | }, |
| 507 | |
| 508 | setMultipleAppointmentsServiceProvider (state, payload) { |
| 509 | let i = state.appointmentsIndex |
| 510 | |
| 511 | state.appointments[i] |
| 512 | .services[state.appointments[i].serviceId] |
| 513 | .providerId = payload ? parseInt(payload) : null |
| 514 | }, |
| 515 | |
| 516 | setMultipleAppointmentsServiceLocation (state, payload) { |
| 517 | let i = state.appointmentsIndex |
| 518 | |
| 519 | state.appointments[i] |
| 520 | .services[state.appointments[i].serviceId] |
| 521 | .locationId = payload ? parseInt(payload) : null |
| 522 | }, |
| 523 | |
| 524 | setBookingPersons (state, payload) { |
| 525 | let i = state.appointmentsIndex |
| 526 | |
| 527 | state.appointments[i] |
| 528 | .services[state.appointments[i].serviceId] |
| 529 | .list[state.appointments[i].index] |
| 530 | .persons = payload + (settings.appointments.bringingAnyoneLogic === 'additional' ? 1 : 0) |
| 531 | }, |
| 532 | |
| 533 | setBookingDuration (state, payload) { |
| 534 | let i = state.appointmentsIndex |
| 535 | |
| 536 | state.appointments[i] |
| 537 | .services[state.appointments[i].serviceId] |
| 538 | .list[state.appointments[i].index] |
| 539 | .duration = payload |
| 540 | }, |
| 541 | |
| 542 | setAvailableCustomFields (state, payload) { |
| 543 | state.appointment.bookings[0].customFields = payload |
| 544 | }, |
| 545 | |
| 546 | setBookableType (state, payload) { |
| 547 | state.appointment.type = payload |
| 548 | }, |
| 549 | |
| 550 | setSelectedExtras (state, payload) { |
| 551 | let i = state.appointmentsIndex |
| 552 | |
| 553 | state.appointments[i] |
| 554 | .services[state.appointments[i].serviceId] |
| 555 | .list[state.appointments[i].index] |
| 556 | .extras = payload ? payload : [] |
| 557 | }, |
| 558 | |
| 559 | setCustomerId (state, payload) { |
| 560 | state.appointment.bookings[0].customer.id = payload |
| 561 | }, |
| 562 | |
| 563 | setCustomerFirstName (state, payload) { |
| 564 | state.appointment.bookings[0].customer.firstName = payload |
| 565 | }, |
| 566 | |
| 567 | setCustomerLastName (state, payload) { |
| 568 | state.appointment.bookings[0].customer.lastName = payload |
| 569 | }, |
| 570 | |
| 571 | setCustomerEmail (state, payload) { |
| 572 | state.appointment.bookings[0].customer.email = payload |
| 573 | }, |
| 574 | |
| 575 | setCustomerPhone (state, payload) { |
| 576 | state.appointment.bookings[0].customer.phone = payload |
| 577 | }, |
| 578 | |
| 579 | setCustomerCountryPhoneIso (state, payload) { |
| 580 | state.appointment.bookings[0].customer.countryPhoneIso = payload |
| 581 | }, |
| 582 | |
| 583 | setCustomerExternalId (state, payload) { |
| 584 | state.appointment.bookings[0].customer.externalId = payload |
| 585 | }, |
| 586 | |
| 587 | setRecurringRepeatType (state, payload) { |
| 588 | state.recurringRules.repeat.type = payload |
| 589 | }, |
| 590 | |
| 591 | setRecurringRepeatInterval (state, payload) { |
| 592 | state.recurringRules.repeat.interval = payload |
| 593 | }, |
| 594 | |
| 595 | setRecurringOccurrenceType (state, payload) { |
| 596 | state.recurringRules.occurrence.type = payload |
| 597 | }, |
| 598 | |
| 599 | setRecurringOccurrenceDate (state, payload) { |
| 600 | state.recurringRules.occurrence.date = payload |
| 601 | }, |
| 602 | |
| 603 | setRecurringOccurrenceCount (state, payload) { |
| 604 | state.recurringRules.occurrence.count = payload |
| 605 | }, |
| 606 | |
| 607 | setRecurringDays (state, payload) { |
| 608 | state.recurringRules.days.find(day => day.value === payload.value).selected = payload.selected |
| 609 | }, |
| 610 | |
| 611 | setRecurringMonthly (state, payload) { |
| 612 | state.recurringRules.monthly = payload |
| 613 | }, |
| 614 | |
| 615 | setCustomerTranslations (state, payload) { |
| 616 | state.appointment.bookings[0].customer.translations = payload |
| 617 | }, |
| 618 | |
| 619 | setAttachment (state, payload) { |
| 620 | state.attachments[payload.id] = payload.raw |
| 621 | }, |
| 622 | |
| 623 | setCoupon (state, payload) { |
| 624 | state.coupon = payload |
| 625 | }, |
| 626 | |
| 627 | setCouponCode (state, payload) { |
| 628 | state.coupon.code = payload |
| 629 | }, |
| 630 | |
| 631 | setCouponRequired (state, payload) { |
| 632 | state.coupon.required = payload |
| 633 | }, |
| 634 | |
| 635 | setBookingsCount (state, payload) { |
| 636 | state.coupon.bookingsCount = payload |
| 637 | }, |
| 638 | |
| 639 | setPayPalActions (state, payload) { |
| 640 | state.payPalActions = payload |
| 641 | }, |
| 642 | |
| 643 | enablePayPalActions (state) { |
| 644 | if (state.payPalActions) { |
| 645 | state.payPalActions.enable() |
| 646 | } |
| 647 | }, |
| 648 | |
| 649 | disablePayPalActions (state) { |
| 650 | if (state.payPalActions) { |
| 651 | state.payPalActions.disable() |
| 652 | } |
| 653 | }, |
| 654 | |
| 655 | setPaymentGateway (state, payload) { |
| 656 | state.appointment.payment.gateway = payload |
| 657 | }, |
| 658 | |
| 659 | setPaymentDeposit (state, payload) { |
| 660 | state.appointment.payment.deposit = payload |
| 661 | }, |
| 662 | |
| 663 | setLoading (state, payload) { |
| 664 | state.loading = payload |
| 665 | }, |
| 666 | |
| 667 | setBooked (state, payload) { |
| 668 | state.booked = payload |
| 669 | }, |
| 670 | |
| 671 | setError (state, payload) { |
| 672 | state.error = payload |
| 673 | }, |
| 674 | |
| 675 | setBusyness (state, payload) { |
| 676 | state.busyness = payload |
| 677 | }, |
| 678 | |
| 679 | setLastBookedProviderId (state, payload) { |
| 680 | state.lastBookedProviderId = !payload.fromBackend || (state.lastBookedProviderId === null && payload.providerId !==null) ? payload.providerId : state.lastBookedProviderId |
| 681 | }, |
| 682 | }, |
| 683 | } |
| 684 |