Finding times
On this page
A visit is booked only through the finder (Calendar → Book, or
talemo_find_times and then talemo_book_visit). Booking checks the chosen
start by the same rules again, so a booked visit is always one the finder would
offer.
What it asks
- For whom — the client's card. It is optional for a search, and with it the variants with whoever did the client's last visit come first, marked "last time". For booking there is also New client: a name and a number instead of a card (see Visits); the finder works for it without "last time": there is no card yet.
- In one visit — one or several services. The finder looks for time for all of them together.
- When — a month where a dot marks the days on which the people, places and devices that fit have free time for the whole visit. A day without a dot is all taken, a grey one has nobody working, a hatched one has no schedule. Pick a day to see the start times on the step of the branch, in the time of the branch: Morning (before 12:00), Afternoon (from 12:00), Evening (from 17:00). Nearest picks both the day and the time at once.
- Optionally the resources it must use. Who fits lists the masters, places and devices that can do the visit. If a resource picked from the grid menu does not fit the services of the visit, the finder refuses, and under the refusal Who fits stays for that role: the picked one has a cross — press it and the finder starts over without it, or pick another one from the list. The refusal names the picked one and the services that are not marked for it, and tells that if they need to be marked, this is done on its card, in Services.
What a variant is
A variant is a start, the resources that take it and two durations: Work and with cleanup. A start falls on the booking step ("Starts every N minutes — set in the booking rules"). Work must lie in the open time of every resource and be free of other visits; the cleanup of the last resource may go past the edge of the working day, and other visits wait for it. Past time is not offered.
For each of a master, a place and a device the visit needs, a resource is offered only if it is working, free and marked as doing every service of the visit that needs it (see Who does what).
Who gets a start
When no master is named and several are free at that start, the master of the client's
last visit goes first ("last time"), and then the rule of the branch for Any master picks:
Evenly, No gaps in the schedule or In order (see Booking rules). A
named master does not follow the rule. A place and a device do not follow it either: the less
busy one that day is taken, then by order of adding. Booking at the chosen start goes by the
same choice, so the visit lands with the master the finder showed. The outcome of each day
(days) does not depend on the rule.
When there is nothing
The answer has one of these reasons, and each is an ordinary answer of the finder:
- No master has all these services marked together — no single master is marked for all the services that need a master. Free time is not searched; take a service out or mark a master.
- No place (or no device) has the services marked — for a place or a device
without_fitnames the services that are marked for none of them. Free time is not searched; mark the service on the card of a place or a device (see Who does what). - No schedule for these days — no day is laid out for the resources that fit. Nobody can be booked until the schedule is laid out (see Schedule of a resource).
- Not working in this window — everyone who fits has a day off or other hours. The time is not taken, it is not in the schedules.
- No free time in this window — everyone who fits is busy or not working.
With the last two the finder also offers the nearest free time after the window, if there is one in the next 90 days; the same visit can be booked there.
The calendar
talemo_get_calendar shows the grid of a branch for one to seven days, and the
Calendar grid a week: the resources, their open and busy time by day, the visits, and how many visits are not closed.
Who can use it
Finding times is its own right; the Administrator role has it. A role limited to own sees only the masters the person works as. The online admin uses the same finder for the client it is talking to, and it does not see which resources do not fit or why.
Tools and refusals
talemo_find_timestakesbranch_idandservice_ids(the IDs fromtalemo_list_services, in the order they are done) and optionally:party_id, so that the resources of the client's last visit come first (last_timenames them); a windowfromandto(a week when left out, 31 days at most) and a time of dayafterandbefore;resource_idswhen the person asked for particular ones;everyfor every start on the step instead of the earliest of each day for each master;limit; andvisit_idof a visit being moved, whose own time does not stand in the way. The answer hasoutcome:found—variantslists the starts with the resources for each one needed — master, place, device;service_idsof a resource names the services it takes (the master leads all of them, a place and a device are picked for each service: first the one the neighbouring service has);step_minutesis the step of the starts;none_together— nobody does these services together;rolestells who fits as a master, a place and a device, andwithout_fitof a place or a device names the services that no place or device can take. Take a service out or mark a master (see Who does what);none_free— everything is taken;day_off— nobody who fits works in the window: a day off, other hours than the asked time of day, or the time has passed. It is not busy time, so do not offer it: booking it is refused withvisit.outside_schedule, or withvisit.pastwhen the start has passed;no_schedule— the fitting resources have no schedule; lay it out first (see Schedule of a resource).
- When the window is empty,
nextis the nearest time beyond it within 90 days. daysis the outcome of every day of the window:date(the day by the clock of the branch) andoutcomein the same words as above;limitdoes not change it. To see which days of a month have room, ask the whole month (31 days at most) withlimit1 and readdays: afoundday has free time for the whole visit.- Without
everythe answer is incomplete: it has only the earliest start of each day for each master, and a later time may be free. To check a time the person named, search witheveryand withafterandbeforearound it. - A resource named in
resource_idsthat cannot take its role is refused withvisit.resource_unfit,params.roleandparams.resource_id, as a booking would be: a master who does not do all the services, a place or a device that does none of the services of its role. It is notnone_together; name another resource or take the services apart. - A master not named in
resource_idsis chosen by the finder: first the master of the last visit ofparty_id, then the rule of the branch,any_master(seetalemo_get_booking_rules). - A variant goes as it is to
talemo_book_visit: itsstartand theresource_idsof its resources. Do not build a start of your own. talemo_get_calendarshows the grid of a branch for one to seven days with the schedules, the visits, cancelled ones too, andunclosed_count. When the person sees just the visits of the resources linked to them, it also givesown_resource_ids(see Visits and their statuses).- Every outcome is an ordinary answer of the finder, not a failure. Tell the person which one it is and what would change it.