redturtle.prenotazioni


Nameredturtle.prenotazioni JSON
Version 2.6.5 PyPI version JSON
download
home_pagehttps://github.com/redturtle/redturtle.prenotazioni
SummaryAn add-on for Plone
upload_time2024-04-24 08:56:52
maintainerNone
docs_urlNone
authorRedTurtle Technology
requires_python>=3.8
licenseGPL version 2
keywords python plone
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            .. image:: https://img.shields.io/pypi/v/redturtle.prenotazioni.svg
    :target: https://pypi.org/project/redturtle.prenotazioni/
    :alt: Latest Version

.. image:: https://img.shields.io/pypi/pyversions/redturtle.prenotazioni.svg?style=plastic
    :target: https://pypi.org/project/redturtle.prenotazioni/
    :alt: Supported - Python Versions

.. image:: https://img.shields.io/pypi/dm/redturtle.prenotazioni.svg
    :target: https://pypi.org/project/redturtle.prenotazioni/
    :alt: Number of PyPI downloads

.. image:: https://img.shields.io/pypi/l/redturtle.prenotazioni.svg
    :target: https://pypi.org/project/redturtle.prenotazioni/
    :alt: License

.. image:: https://github.com/RedTurtle/redturtle.prenotazioni/actions/workflows/tests.yml/badge.svg
    :target: https://github.com/RedTurtle/redturtle.prenotazioni/actions
    :alt: Tests

.. image:: https://coveralls.io/repos/github/RedTurtle/redturtle.prenotazioni/badge.svg?branch=master
    :target: https://coveralls.io/github/RedTurtle/redturtle.prenotazioni?branch=master
    :alt: Coverage

======================
redturtle.prenotazioni
======================

A **booking product for Plone** which allows to reserve time slots throughout the week.

.. contents::

Installation
============

Add **redturtle.prenotazioni** to the egg section of your instance:

::

  [instance]
  eggs=
        ...
        redturtle.prenotazioni

To avoid spam, there is a background validation with `collective.honeypot`_ .

.. _collective.honeypot: https://pypi.org/project/collective.honeypot


With a version of `plone.app.dexterity` lower than 3.* (ie Plone 5.2) you need to add
`collective.dexteritytextindexer`_ as requirement.

::

    [instance]
    eggs=
        ...
        redturtle.prenotazioni
        collective.dexteritytextindexer

.. _collective.dexteritytextindexer: https://pypi.org/project/collective.dexteritytextindexer

Introduction
============

This product introduces two new `content types`_ to your Plone site:

.. _content types: http://developer.plone.org/content/types.html

- `Booking`
- `Booking Folder`

Booking content
---------------

**Booking** is a `content type` used to store information about reservation.

The product interface provides a way to add new booking elements, by clicking on one of the plus signs available in the slots calendar.

Each booking element once created is storerd into its own **Booking Folder**.


Booking Folder content
----------------------

**Booking Folder** is a folderish content type which store your **Booking** objects.


Using redturtle.prenotazioni
============================

Creating a new Booking Folder
-----------------------------

If the product is correctly installed the **Booking Folder** entry is available on the `add new` action menu.

You can configure:
- hidden booking types for the internal usage
- more then one gate
- booking vacations
- custom duration for booking types
- week schedule for morning and afternoon time tables

Creating the hidden booking types
---------------------------------

You can hide your booking types from simple and anonymous users by using the 'Hidden Booking' flag
in your booking types definition. This way, it will only be available to users with the 'Bookings Manager'
permission. This feature may be useful if you want to restrict booking types for internal corporate use.

Creating a new booking content
------------------------------

Anonymous and authenticated users are allowed to add new booking content
by clicking on the plus signs on the default booking folder view.

After its creation the slot will be displayed as "busy" for anonymous user
and the slot won't be available anymore.

Back-end users can see and manage the reservation according to the assigned Plone roles.


Workflow
--------

The product comes with its own workflow "prenotazioni_workflow".

Here below a list of all the states available:

**Private**: booking object initial state:

* `submit` (Automatic transition to pending)

**Pending**

Transaction available:

* `publish` (to published)
* `refuse` (to refused)

**Published**

Transaction available:

* `refuse` (to refused)

**Refused**

Transaction available:

* `restore` (to pending)

Managers can confirm a Booking using workflow transitions.
The workflow transition triggers an email to be sent to the booker (see below).


Booking Notifications
---------------------

There are automated notifications implementend by the following behaviors:

* `redturtle.prenotazioni.behavior.notification_appio` (Notify via AppIO gateway)
* `redturtle.prenotazioni.behavior.notification_email` (Notify via Email gateway)
* `redturtle.prenotazioni.behavior.notification_sms` (Notify via SMS gateway)

Each behavior is implementing the following notification types:
* `booking-accepted` (An notification if the booking had been accepted)
* `booking-moved` (An notification if the booking had been moved)
* `booking-created` (An notification if the booking had been created)
* `booking-refuse` (An notification if the booking had been refused)
* `booking-reminder` (An notification reminder)

Notifications are **NOT automatically** enabled in every Booking Folder.
If you want to send some notification, you only need to enable them by assigning the behavior to PrenotazioniFolder c.t.

You can create your own notification templates for the booking events(confirm, refuse, create, delete, reminder).
The temlates are being saved in the PrenotazioniFolder object.

The template variables list:

* ``${title}`` - Booking title.
* ``${booking_gate}`` - Booking gate.
* ``${booking_human_readable_start}`` - Booking human readable start datetime.
* ``${booking_date}`` - Booking date.
* ``${booking_end_date}`` - Booking end date.
* ``${booking_time}`` - Booking time.
* ``${booking_time_end}`` - Booking time end.
* ``${booking_code}`` - Booking code.
* ``${booking_type}`` - Booking type.
* ``${booking_print_url}`` - Booking summary url.
* ``${booking_url_with_delete_token}`` - Booking url to delete page.
* ``${booking_user_phone}`` - Booking user phone.
* ``${booking_user_email}`` - Booking user email.
* ``${booking_user_details}`` - Booking user details.
* ``${booking_office_contact_phone}`` - Booking office contact phone.
* ``${booking_office_contact_pec}`` - Booking office contact pec.
* ``${booking_office_contact_fax}`` - Booking office contact fax.
* ``${booking_how_to_get_to_office}`` - Booking how to get to office.
* ``${booking_office_complete_address}`` - Booking office complete address.
* ``${booking_user_details}`` - Booking details inserted by user.
* ``${booking_requirements}`` - Booking requeirements.
* ``${prenotazioni_folder_title}`` - Booking folder title.
* ``${booking_requirements}`` - Related PrenotazioneType.booking_requirements field

Note that the sms can be used only if you implement an own sender adapter
Example:

You just need to register a new adapter::

    <adapter
      factory = ".my_adapter.CustomSMSSenderAdapter"
      name="booking_transition_sms_sender"
    />

And here the `send` method must be implementend::

    from zope.component import adapter
    from zope.interface import implementer

    from redturtle.prenotazioni.content.prenotazione import IPrenotazione
    from redturtle.prenotazioni.interfaces import IBookingNotificationSender
    from redturtle.prenotazioni.interfaces import IBookingSMSMessage
    from redturtle.prenotazioni.behaviors.booking_folder.sms.adapters import BookingNotificationSender


    @implementer(IBookingNotificationSender)
    @adapter(IBookingSMSMessage5, IPrenotazione, YourAddonLayerInterface)
    class CustomSMSSenderAdapter(BookingNotificationSender):

        def send(self):
            if self.is_notification_allowed():
                # the message is automatically generated basing on the event type
                message = self.message_adapter.message
                phone = self.booking.phone

                # Your custom send logics integration below
                custom_send_function(message, phone)


Vacations
---------

You can specify days when the Booking Folder will not accept
bookings.
Those days are called "Vacation days".

Vacation days can be specified compiling the "Vacation days"
field in the Booking Folder edit form.
Values are allowed in the format DD/MM/YYYY.
Instead of the year you can put an asterisk, in this case every here
the day DD of month MM will be considered a vacation day.

It is also possible to specify a vacation period
for a single gate using the vacation booking form with a link that you can see in the toolbar.


Searching
---------

Using the prenotazioni_search view it is possible to search
bookings within a given time interval.
You can also filter the results specifying a searchable text,
a gate or a review state.

Booking code generation
-----------------------

Every booking has an unique code generated on creation.

By default this code is based on its UID.
If you need to change this logic, you can do it registering a more specific adapter::

    <adapter factory=".my_new_code.MyNewBookingCodeGenerator" />


And the adapter should be something like this::

    from redturtle.prenotazioni.adapters.booking_code import BookingCodeGenerator
    from redturtle.prenotazioni.adapters.booking_code import IBookingCodeGenerator
    from redturtle.prenotazioni.content.prenotazione import IPrenotazione
    from my.package.interfaces import IMyPackageLayer
    from zope.component import adapter
    from zope.interface import implementer


    @implementer(IBookingCodeGenerator)
    @adapter(IPrenotazione, IMyPackageLayer)
    class MyNewBookingCodeGenerator(BookingCodeGenerator):
        def __call__(self, *args, **kwargs):
            return "XXXXX"


Rest API
========

There are some endpoints useful to use this tool also with external frontends (like Volto).

@booking
--------

GET
~~~

This endpoint allows to retrieve a booking by its UID.

Example::

    curl http://localhost:8080/Plone/++api++/@booking/<booking UID> -H 'Accept: application/json'

Response::

    {
        "booking_code": "17E3E6",
        "booking_date": "2023-05-22T09:09:00",
        "booking_expiration_date": "2023-05-22T09:10:00",
        "booking_type": "SPID: SOLO riconoscimento \"de visu\" (no registrazione)",
        "company": null,
        "cosa_serve": null,
        "description": "",
        "email": "mario.rossi@example",
        "fiscalcode": "",
        "gate": "postazione2",
        "id": "mario-rossi",
        "phone": "",
        "staff_notes": null,
        "title": "Mario Rossi"
    }

POST
~~~~

This endpoint allows to create a new booking.

Example::

    curl http://localhost:8080/Plone/++api++/<booking_folder_path>/@booking \
        -X POST \
        -H 'Accept: application/json' \
        -H 'Content-Type: application/json' \
        -d '{
            "booking_date": "2023-05-23T09:00:00+02:00",
            "booking_type": "SPID: SOLO riconoscimento \"de visu\" (no registrazione)",
            "fields": [
                {"name": "fullname", "value": "Mario Rossi"},
                {"name": "email", "value": "mario.rossi@example"}
            ],
        }'

Response::

    {
        "booking_code": "17E3E6",
        "booking_date": "2023-05-22T09:09:00",
        "booking_expiration_date": "2023-05-22T09:10:00",
        "booking_type": "SPID: SOLO riconoscimento \"de visu\" (no registrazione)",
        "company": null,
        "cosa_serve": null,
        "description": "",
        "email": "mario.rossi@example",
        "fiscalcode": "",
        "gate": "postazione1",
        "id": "mario-rossi-1",
        "phone": "",
        "staff_notes": null,
        "title": "Mario Rossi"
    }

DELETE
~~~~~~

This endpoint allows to delete a booking by its UID.

Example::

    curl -X DELETE http://localhost:8080/Plone/++api++/@booking/<booking UID> -H 'Accept: application/json'

A booking can be deleted only if on of the following rules are satisfied:

- Anonymous user and booking has been created by an anonymous user
- Booking created by current logged-in user
- Current logged-in user has `redturtle.prenotazioni.ManagePrenotazioni` permission
- Booking has a date > today


MOVE
~~~~

This endpoint allows to move a booking by its UID to a different date/time slot.

Example::

    curl http://localhost:8080/Plone/++api++/<booking_folder_path>/@booking-move \
        -X POST \
        -H 'Accept: application/json' \
        -H 'Content-Type: application/json' \
        -d '{
            "booking_date": "2023-05-23T09:00:00+02:00",
            "booking_id": "<booking UID>",
        }'


@prenotazione
-------------

Leave for compatibility reasons (identical to `@booking`'s GET). Could be removed in future.

Example::

   curl http://localhost:8080/Plone/@prenotazione?uid=<booking UID> -H 'Accept: application/json'

Response, see: @booking

@vacation
---------

POST
~~~~

This endpoint allows to create a new vacation.

Example::

    curl http://localhost:8080/Plone/++api++/<booking_folder_path>/@vacation \
        -X POST \
        -H 'Accept: application/json' \
        -H 'Content-Type: application/json' \
        -d '{
            "start": "2023-05-23T09:00:00+02:00",
            "end": "2023-05-23T10:00:00+02:00",
            "gate": "gate A",
            "title": "vacation"
        }'


@available-slots
----------------

Endpoint that need to be called on a PrenotazioniFolder.
It returns the list of all available slots based on some parameters.

An available slot is the first free time on each hour slot (each day is split in 1h slots).

By default (without parameters) the endpoint returns available slots for the current month, starting from today.

Parameters:

- **start** a start date. If not given, the start will be today.
- **end** an end date. If not given, the end will be the last day of current month.
- **first_available** a boolean flag, if valiorized, the first available slot returned without the current month search limit but the one year.

Example::

   curl -i http://localhost:8080/Plone/folder/@available-slots -H 'Accept: application/json'

Response::

    {
        "@id": "http://localhost:8080/Plone/folder/@available-slots",
        "items": [
            '2023-04-10T07:30:00',
            '2023-04-10T08:00:00',
            '2023-04-10T09:00:00',
            '2023-04-17T07:00:00',
            '2023-04-17T08:00:00',
            '2023-04-17T09:00:00',
            '2023-04-24T07:00:00',
            '2023-04-24T08:00:00',
            '2023-04-24T09:00:00'
        ]
    }


Example::

   curl -i http://localhost:8080/Plone/folder/@available-slots?start=2023-04-12 -H 'Accept: application/json'

Response::

    {
        "@id": "http://localhost:8080/Plone/folder/@available-slots",
        "items": [
            '2023-04-17T07:00:00',
            '2023-04-17T08:00:00',
            '2023-04-17T09:00:00',
            '2023-04-24T07:00:00',
            '2023-04-24T08:00:00',
            '2023-04-24T09:00:00'
        ]
    }

@booking-schema
---------------

Endpoint that need to be called on a PrenotazioniFolder.
It returns the list of all fields to fill in for the booking.

The booking date is passed via querystring (e.g ?booking_date=2023-04-13+10%3A00')

Example::

   curl -i -X GET 'http://localhost:8080/Plone/prenotazioni/@prenotazione-schema?booking_date=2023-05-15T13:00:00' -H 'Accept: application/json'

Response::

    {
        "booking_types": {
            "bookable": [],
            "unbookable": [
                {
                "duration": "60",
                "name": "Rilascio CIE"
              }
            ]
        },
        "fields": [
          {
            "desc": "Inserisci l'email",
            "label": "Email",
            "name": "email",
            "readonly": false,
            "required": false,
            "type": "text",
            "value": ""
          },
          {
            "desc": "Inserisci il numero di telefono",
            "label": "Numero di telefono",
            "name": "phone",
            "readonly": false,
            "required": false,
            "type": "text",
            "value": ""
          },
          {
            "desc": "Inserisci ulteriori informazioni",
            "label": "Note",
            "name": "description",
            "readonly": false,
            "required": false,
            "type": "textarea",
            "value": ""
          },
          {
            "desc": "Inserisci il codice fiscale",
            "label": "Codice Fiscale",
            "name": "fiscalcode",
            "readonly": false,
            "required": true,
            "type": "text",
            "value": ""
          },
          {
            "desc": "Inserire il nome completo",
            "label": "Nome completo",
            "name": "Nome",
            "readonly": false,
            "required": true,
            "type": "text",
            "value": ""
          }
        ]
    }

@bookings
---------

Endpoint that returns a list of own *Prenotazione* content by parameters

Parameters:

- **SearchableText**: The SearchableText of content;
- **from**: The start date of research (with YYYY-MM-DD format);
- **to**: The end date of research (with YYYY-MM-DD format);
- **modified_after**: To filter bookings modified only after given date (needed also a timezone: YYYY-MM-DDThh:mm:ss+02:00);
- **gate**: The booking gate;
- **userid**: The userid(basically it is the fiscalcode). Allowed to be used by users having the 'redturtle.prenotazioni: search prenotazioni' permission;
- **booking_type**: The booking_type, available values are stored in 'redturtle.prenotazioni.booking_types' vocabulary;
- **review_state**: The booking status, one of: 'confirmed', 'refused', 'private', 'pending';
- **sort_on**: The index by which to order (default 'Date' aka the booking datetime);
- **sort_order**: The order in which to sort, possible values: 'ascending', 'descending' (default 'descending');
- **fullobjects**: If `fullobjects=1` is passed, the endpoint will return the full objects instead of a list of brains (actually the only information added is the `requirements` field. (aka `cosa_serve`).

Example::

   curl -i http://localhost:8080/Plone/@bookings?from=2023-10-22&to=2023-10-22&gate=Gate1&userid=user1&booking_type=type1&SearchableText=text1 \
     -H 'Accept: application/json'

Response::

    {
        "@id": "http://localhost:8080/Plone/folder/@bookings",
        "items": [
             {
                "title": "Booking Title",
                "booking_id": "abcdefgh1234567890",
                "booking_url": "https://url.ioprenoto.it/prenotazione/abcd",
                "booking_date": "2018-04-25T10:00:00",
                "booking_expiration_date": "2018-04-30T10:00:00",
                "booking_type": "Servizio di prova",
                "booking_room": "stanza-1",
                "booking_gate": "sportello-urp-polifunzionale",
                "booking_status": "confirmed",
                "booking_status_label": "Confermata",
                "booking_status_date": "2018-04-25T10:00:00",
                "booking_status_notes": "Prenotazione confermata",
                "userid": "FISCALCODE",
            },
            ...
            ],
          }
    }


@booking-notify
---------------

Endpoint that fires the confirm email to user


Example::

   curl -i http://localhost:8080/Plone/booking_folder/@booking-notify/<booking UID> \
     -H 'Accept: application/json'


If the user is not logged in, the endpoint will return a 401 error.

Response::
    HTTP 200 OK


@day-busy-slots
---------------

Endpoint that returns a list of busy slots and pauses based on the passed date

Parameters:

- **date**: Date

Example::

    curl -i  "http://localhost:8080/Plone/prenotazioni_folder/@day-busy-slots?date=2023/05/22"\
        -H 'Accept: application/json'\

Response::

    {
        "@id": "http://localhost:8080/Plone/prenotazioni_folder/@day-busy-slots",
        "bookings": {
            "gate1":
                [
                    {
                        "booking_code": "17E3E6",
                        "booking_date": "2023-05-22T09:09:00",
                        "booking_expiration_date": "2023-05-22T09:10:00",
                        "booking_type": "SPID: SOLO riconoscimento \"de visu\" (no registrazione)",
                        "company": null,
                        "cosa_serve": null,
                        "description": "",
                        "email": "mario.rossi@example",
                        "fiscalcode": "",
                        "gate": "postazione1",
                        "id": "mario-rossi-1",
                        "phone": "",
                        "staff_notes": null,
                        "title": "Mario Rossi"
                    },
                    ...
                ],
            "gate2":
                [
                    {
                        "booking_code": "17E3E6",
                        "booking_date": "2023-05-22T09:09:00",
                        "booking_expiration_date": "2023-05-22T09:10:00",
                        "booking_type": "SPID: SOLO riconoscimento \"de visu\" (no registrazione)",
                        "company": null,
                        "cosa_serve": null,
                        "description": "",
                        "email": "mario.rossi@example",
                        "fiscalcode": "",
                        "gate": "postazione2",
                        "id": "mario-rossi",
                        "phone": "",
                        "staff_notes": null,
                        "title": "Mario Rossi"
                    },
                    ...
                ]
        },
        "pauses": [
            {
                "start": "2023-05-22T07:15:00+00:00",
                "stop": "2023-05-22T08:30:00+00:00"
            },
            ...
        ]
    }

Special Views
==============

@@download/bookings.xlsx
------------------------

This view allows to download the bookings filtered by passed parameters

- **text**: The SearchableText of content.
- **from**: The start date of research.
- **to**: The end date of research.
- **gate**: The booking gate.
- **userid**: The userid(basically it is the fiscalcode). Allowed to be used by users having the 'redturtle.prenotazioni: search prenotazioni' permission.
- **booking_type**: The booking_type, available values are stored in 'redturtle.prenotazioni.booking_types' vocabulary.
- **review_state**: The booking status, one of: 'confirmed', 'refused', 'private', 'pending'


Example::
    curl -i http://localhost:8080/Plone/folder/@@download/bookings.xlsx?text=Text&review_state=confirmed&gate=Gate1&start=2010-10-10&end=2025-10-10&booking_type=Type1

Response::
    Binary file

@@send-booking-reminders
------------------------

This view sends a booking reminder email to all the bookings inside PrenotazioniFolders that
have the Reminder Notification Gap field populated. If you intend to set up a cronjob to call this view, you might use a special script call.
The script is located at src/redturtle/prenotazioni/scripts/notify_upcoming_bookings.py.



Scripts
=======

notify_upcoming_bookings
------------------------

The script is supposed to be used to call the **@@send-booking-reminders** view.
It is supposed to be ran once a day otherwise, duplicate emails will be sent.

Usage::

    bin/instance1 -OPlone run bin/notify_upcoming_bookings

Buildout config example::

    [buildout]
    # You can change it in according to your policy
    cron_instance = instance1
    parts +=
        notify-upcoming-bookings

    [notify-upcoming-bookings]
    recipe = z3c.recipe.usercrontab
    times = 0 3 * * *
    command = flock -n ${buildout:directory}/var/notify_upcoming_bookings.lock ${buildout:directory}/bin/${buildout:cron_instance} -OPlone run bin/notify_upcoming_bookings >> ${buildout:directory}/var/log/notify_upcoming_bookings.log 2>&1



Behaviors
=========

redturtle.prenotazioni.behavior.notification_appio
--------------------------------------------------

If you mind to use this behavior note that first of all you also need to assign
this **redturtle.prenotazioni.behavior.notification_appio_booking_type** to PrenotazioneType c.t.

To send the messages via AppIO gateway the **service_code** field defined by **redturtle.prenotazioni.behavior.notification_appio_booking_type**
must be compiled in the PrenotazioniType object. All the possible values of this field are being
taken from an **yaml** file with the following format.

appio_config_keys.yaml::

    - name: Service1
      key: ABC123

    - name: Service2
      key: ABC231

    - name: Service3
      key: ABC312

The file path is being taken from the **APPIO_CONFIG_FILE** env var.
This variable can be configured automatically in the buildout using the following config.

buildout.cfg::

    [instance]
    environment-vars =
        APPIO_CONFIG_FILE ${buildout:directory}/appio_config_keys.yaml


Content-transfer-encoding
=========================

It is possible to set the content-transfer-encoding for the email body, settings the environment
variable `MAIL_CONTENT_TRANSFER_ENCODING`::

    [instance]
    environment-vars =
        MAIL_CONTENT_TRANSFER_ENCODING base64

This is useful for some SMTP servers that have problems with `quoted-printable` encoding.

By default the content-transfer-encoding is `quoted-printable` as overrided in
https://github.com/zopefoundation/Products.MailHost/blob/master/src/Products/MailHost/MailHost.py#L65


How to develop
==============

Frontend
--------

There is a custom widget made in React and registered as bundle.
To develop it, you should do following steps:

First of all, enable nvm::

    > nvm use

Install dependencies::

    > yarn

Run webpack::

    > yarn start

This will start webpack with autoreload.
To see changes on your site, you need to enable development mode in Resources Registry in your Plone site, and enable CSS and js development of "week-table-overrides-widget-bundle" bundle.


When changes are ok, you need to make a production build::

    > yarn build

Contribute
==========

- Issue Tracker: https://github.com/RedTurtle/redturtle.prenotazioni/issues
- Source Code: https://github.com/RedTurtle/redturtle.prenotazioni


Notes
=====

**redturtle.prenotazioni** has been tested with Plone 5.2 and works with Python 3.

This is a merge from other two booking products:

- `rg.prenotazioni`__.
- `pd.prenotazioni`__.

__ https://github.com/PloneGov-IT/rg.prenotazioni/
__ https://github.com/PloneGov-IT/pd.prenotazioni/


Credits
=======

Developed with the support of:

* `Unione Reno Galliera`__

  .. image:: http://blog.redturtle.it/pypi-images/redturtle.prenotazioni/logo-urg.jpg/image_mini
     :alt: Logo Unione Reno Galliera

* `S. Anna Hospital, Ferrara`__

  .. image:: http://www.ospfe.it/ospfe-logo.jpg
     :alt: S. Anna Hospital - logo

* `Comune di Padova`__;

  .. image:: https://raw.githubusercontent.com/PloneGov-IT/pd.prenotazioni/master/docs/logo-comune-pd-150x200.jpg
     :alt: Comune di Padova's logo

All of them supports the `PloneGov initiative`__.

__ http://www.renogalliera.it/
__ http://www.ospfe.it/
__ http://www.padovanet.it/
__ http://www.plonegov.it/

Authors
=======

This product was developed by **RedTurtle Technology** team.

.. image:: https://avatars1.githubusercontent.com/u/1087171?s=100&v=4
   :alt: RedTurtle Technology Site
   :target: http://www.redturtle.it/


Contributors
============

`List of contributors`_ .

.. _List of contributors: https://github.com/RedTurtle/redturtle.prenotazioni/graphs/contributors


Changelog
=========


2.6.5 (2024-04-24)
------------------

- Package chore.
  [folix-01]


2.6.4 (2024-04-24)
------------------

- Fix reminder send view.
  [folix-01]


2.6.3 (2024-04-15)
------------------

- avoid gate collision
  [mamico]


2.6.2 (2024-04-12)
------------------

- Bypass notBeforeDays when using the @available-slots to find the first bookable slot(used by BookingManager).
  [folix-01]

- Fix day endpoint to show the available scheduling for the same day as start date.
  [folix-01]

- Manage the user's phone attribute in booking-schema
  [mamico]


2.6.1 (2024-04-02)
------------------

- PrenotazioniFolder.max_bookings_allowed constraint (if compiled, the fiscalcode must be required).
  [folix-01]


2.6.0 (2024-04-02)
------------------

- Return empty data from the @day endpoint if requested date is out of PrenotazioniFolder range
  [folix-01]

- Fix double gate bug.
  [folix-01]

- first_available flag for the @available-slots endpoint.
  [folix-01]

- Fix double gate when it is repeated in more than one week table overrides.
  [folix-01]


2.5.3 (2024-03-19)
------------------

- Fix SMS links. Removed the dot immediately after the url
  [folix-01]


2.5.2 (2024-03-08)
------------------

- Fix rolemap
  [lucabel]

- Add manager notification on booking canceled
  [folix-01]

2.5.1 (2024-03-06)
------------------

- Add the years range configuration to week table overrides.
  [folix-01]

- Bypass the today delete limit for the 'out-of-office' types
  [folix-01]

- Change the booking notification flag label.
  [folix-01]


2.5.0 (2024-02-29)
------------------

- `canceled` state for booking. if an user cancel a booking, the booking is not deleted but is set to cancel state
  [mamico]

2.4.9 (2024-02-22)
------------------

- Disabled "user has exceeded the limit" validation when the fiscal code is missing.
  [daniele]


2.4.8 (2024-02-16)
------------------

- No cache per restapi available_slots, available_slots changes frequently and anonymous users
  need to see the updated data.
  [mamico]

- Remove acquisition when getting version_id in **on_modify** event handler.
  [cekk]


2.4.7 (2024-02-12)
------------------

- permission for move bookings for booking managers
  [mamico]


2.4.6 (2024-02-12)
------------------

- permission for move bookings for booking managers
  [mamico]

- Use the yaml file to configure the AppIO keys
  [folix-01]

2.4.5 (2024-02-01)
------------------

- sort_on/sort_order in restapi bookings and xlsx
  [mamico]


2.4.4 (2024-01-25)
------------------

- Fix the sms nofications behavior's field label.
  [folix-01]


2.4.3 (2024-01-24)
------------------

- Remove the notification gateways allowing cross logics
  [folix-01]

- Add @id in booking serializer
  [mamico]

- Handle `modified_after` parameter in @bookings endpoint.
  [cekk]

- Add booking_code as catalog metadata.
  [cekk]

- [BREAKING] Move code generation and managers email notification from event handlers into booker.
  [cekk]


2.4.2 (2024-01-15)
------------------

- Revert last changes to avoid incompatibility.
  [cekk]


2.4.1 (2024-01-15)
------------------

- Register event handler for IObjectAddedEvent instead IObjectCreatedEvent for code generator.
  [cekk]


2.4.0 (2024-01-15)
------------------

- Performance improvements: changed functions: `hm2DT`, `value_hr`, `get_values_hr_every`
  [mamico]

- Perfomance refactoring for @available-slots view
  [folix-01]

- Split booking notification gateways to 'App IO', 'Email' and 'SMS'
  [folix-01]

- remove unused contentrules
  [mamico]

- Add booking reminder emails.
  [folix-01]

- Move code generation to adapter, to be more customizable.
  [cekk]

- Add customizable email from in PrenotazioniFolder contents.
  [cekk]

2.3.2 (2024-01-03)
------------------

- Add creation and modification dates to serialized booking
  [folix-01]

- Add fullobjects in @bookings
  [mamico]
- Use the <PrenotazioniFolder>.holidays constraint.
  [folix-01]


2.3.1 (2023-12-21)
------------------

- add content-transfer-encoding customization
  [mamico]


2.3.0 (2023-12-19)
------------------

- Add booking_type vocabularies for portal_root
  [mamico]

- Improve manager mail notification subject to include also name and date.
  [cekk]

- Update the min booking type length value to 5min.
  [folix-01]

- Fix: hidden attribute in tipologia
  [mamico]

- Fix upgrade step error #139
  [mamico]

- Add flag `auto_confirm_manager` that allows to automatically confirm bookings created by Booking Managers.
  [cekk]

- Booking Managers bypass futureDays checks when create new bookings.
  [cekk]

- Remove duplicated method in booker: create. Now there is only `book`.
  [cekk]

- Hide PrenotazioniYear in add menu for restapi.
  [cekk]

2.2.5 (2023-12-04)
------------------

- Contributors can add PrenotazioniFolder.
  [cekk]

- On PrenotazioniFolder upgrade-step (2000->2001) migrate also requirements field.
  [cekk]

- Fix gate chooser algorithm to avoid overlaps. Now we randomly choose it without getting the less used one.
  [cekk]


2.2.4 (2023-11-30)
------------------

- Do not raise Unauthorized when translate title ical adapter.
  [cekk]


2.2.3 (2023-11-29)
------------------

- Fix message composition in manager notification.
  [cekk]


2.2.2 (2023-11-28)
------------------

- Set PrenotazioniFolder and PrenotazioneType as not searchable (types_not_searched).
  [cekk]

- Send ical also for manager notifications.
  [cekk]


2.2.1 (2023-11-22)
------------------

- Do not send the booking created email if auto_confirm is true and notify on confirm is true.
  [folix-01, cekk]


2.2.0 (2023-11-20)
------------------

- Fix sub BaseSlots whene some slots overlap
  [mamico]

- Compatibility with old code that use booking_types field in PrenotazioniFolder
  [mamico]

- Extend the booking duration limit to 180 min.
  [folix-01]

- Allow Bookings Manager to create, move the bookings and create the vacations.
  [folix-01]

- [BREAKING CHANGE] Convert booking types to c.t.
  [folix-01]

- Change bookings default limit to 0.
  [folix-01]

- Fix Bookings Manager permission in according to expected behavior
  [folix-01]

- Add booking_refuse_message to Prenotazione stringinterp variables.
  [folix-01]

- Extended PrenotaizoniFolder email templates var list.
  [folix-01]

- Better handle overrides between years.
  [cekk]

- Handle possibility to create more overrides with different gates schedule.
  [cekk]

2.1.5 (2023-11-10)
------------------

- Fix release (2.1.4 was already made).
  [cekk]


2.1.4 (2023-11-10)
------------------

- Fix week overrides when booking next year.
  [cekk]

- Bypass limit for out-of-office bookings.
  [cekk]


2.1.3 (2023-10-13)
------------------

- Resect hidden booking types from @booking-schema.
  [folix-01]


2.1.2 (2023-10-13)
------------------

- Add hidden booking types for operator use.
  [folix-01]


2.1.1 (2023-10-11)
------------------

- Sort gate slots in get_free_slots method to better handle also pauses.
  [cekk]


2.1.0 (2023-10-11)
------------------

- Add booking details to the export file.
  [folix-01]

- Change PrenotazioniFolder.cosa_serve field type to RichText.
  [folix-01]

- Utilizzare defaultFactory se il default รจ una funzione, altrimenti non viene
  eseguita nel momento corretto.
  [mamico]

- Rimosso searchabletext di prenotazioni doppio.
  [mamico]

- Aggiunto indexer per fiscalcode uppercase per
  fare ricerche case insensitive.
  [mamico]

- Remove Contributor from the package permissions map.
  [folix-01]

- Add configurable simultaneous bookings limit for the same user.
  [folix-01]

- Remove "immediate=True" from mailhost send in send_email_to_managers because can cause multiple sends when there are conflicts.
  [cekk]

- Better handle edge-case when a booking is created inside a pause (booking created before pause set in folder config).
  [cekk]

2.0.0 (2023-09-12)
------------------

- workaround per download prenotazioni, parametri in base64 sul path
  per gestire bug Volto
  [mamico]

- add xlsx tests
  [mamico]

- add booking description in @bookings
  [mamico]

- add booking_code field to IPrenotazione schema
  update locales
  [lucabel]

- Call booking url adapter on plone.stringinterp.adapters.ContextWrapper
  [foxli-01]

- Traduzioni
  [mamico]

- Restapi @booking-notify.
  [foxli-01]

2.0.0rc5 (2023-09-05)
---------------------

- Update locales.
  [foxli-01]


2.0.0rc4 (2023-09-05)
---------------------

- Add a dedicated role to manage the bookings.
  [folix-01]


2.0.0.rc2 (2023-08-31)
----------------------

- Show default gates as unavailable in get_gates method, if they are overrided.
  [cekk]
- Skip required field validation when add out of office bookings in @booking endpoint.
  [cekk]
- Only users with permission can add out of office bookings in @booking endpoint.
  [cekk]
- Fix slots overlap valiation on booking move
  [folix-01]

2.0.0.rc1 (2023-08-25)
----------------------

- Remove complexity in `same_day_booking_disallowed`` field: now you can set only *yes* or *no*.
  [cekk]

- duration in minutes instead of days
  [mamico]

- allow to add out-of-office in api (aka blocco prenotazione)
  [mamico]

2.0.0.dev5 (2023-08-21)
-----------------------

- Add logic to override pauses and gates.
  [daniele]

- Permit to force gate / duration to operator (restapi add booking)
  [mamico]

- Changes required to migrate the old bookings.
  [folix-01]


- Allow to override also gates and pauses.
  [cekk]

- Remove unused unavailable_gates field.
  [cekk]

2.0.0.dev4 (2023-08-11)
-----------------------

- Moved contacts fields to a dedicated behavior.
  [daniele]

- Tabs/fields reordering for the booking folder.
  [daniele]

- fix date in @@download
  [mamico]

- fix tz in pause
  [mamico]

- skip email to manager on block/vacation creation
  [mamico]

- Manage timezone in booking dates. (upgrade step)
  [cekk]

- Fix: only valid interval in the subtraction slots operation.
  [mamico]

- Fix boking code uniqueness
  [folix-01]

- Fix default start/end time for search @bookings
  [mamico]

- Add @vacation rest api
  [mamico]

- Customized status message in prenotazione_print.pt based on review_state.
  [cekk]

- Add @booking-move restapi
  [mamico]

- Extend @@bookings search view parameters list.
  [folix-01]

- Added event handler on booking creation to send email to managers.
  [daniele]

- Rename routes:
  months-slots => available-slots
  prenotazione-schema => booking-schema
  @@download_reservation => @@download/bookings.xlsx
  [cekk] [mamico]


2.0.0.dev3 (2023-07-20)
-----------------------

- Handle contentrules by the plone events and do not use contentrules anymore.
  [folix-01]

- Change "day" type in week_table (TODO: need an upgrade step?).
  [mamico]

2.0.0.dev2 (2023-06-30)
-----------------------

- reorganize backend form
  [mamico]

- booking_type filter in @months-slots
  [mamico]

- Register adapters for IMailFromFieldAction for both Site root and dx containers.
  [cekk]

2.0.0.dev1 (2023-06-12)
-----------------------

- Add Booking restapi
  [mamico]

- Fix Plone6 compatibility.
  [cekk]

- Removed unused type PrenotazioniFolderContainer.
  [cekk]

- Added endpoint to get booking schema.
  [daniele]

- Avoid change gate, booking date, booking end from /edit;
  this would allow you to skip the checks;
  Fix profile registration name;
  [lucabel]

- Add @bookings endpoint to get booking items for a user
  [foxtrot-dfm1]

- Add a new endpoint to get booking details. (#40442).
  [daniele]

- Add autoconfirm content rule to profile.
  [foxtrot-dfm1]

- Added field "cosa_serve" (#40445).
  [daniele]

- Refactor booking delete machinery and remove unused token.
  [cekk]

- Add DELETE endpoint for booking.
  [cekk]

- Add new field that allows to override week schedule for a certain date range.
  [cekk]

- Send iCal attachment on approved or moved booking.
  [cekk]

1.7.1 (2023-03-28)
------------------

- Add plone5 profile to setup.
  [foxtrot-dfm1]


1.7.0 (2023-03-24)
------------------

- Remove sort order on week-legend table (#33584).
  [foxtrot-dfm1]
- RestAPI endpoint to have available week slots.
  [foxtrot-dfm1]

- Plone 6 support
  [mamico]


1.6.5 (2023-02-06)
------------------

- Fix the upgrade step of release 1.6.4
  [foxtrot-dfm1]

1.6.4 (2023-02-06)
------------------

- Fix the upgrade step of release 1.6.1
  [foxtrot-dfm1]


1.6.3 (2023-02-01)
------------------

- Fix cookies encoding
  [foxtrot-dfm1]


1.6.2 (2023-01-30)
------------------

- Handle prenotation type passed by url.
  [foxtrot-dfm1]


1.6.1 (2023-01-11)
------------------

- Handle confirmed state instead of published.
  [cekk]


1.6.0 (2023-01-10)
------------------

- The workflow state 'public' of prenotazioni_workflow was renamed to 'confirmed'
  [foxtrot-dfm1]
- Show review state column of prenotations (#37119)
  [foxtrot-dfm1]

1.5.7 (2022-12-29)
------------------

- updated mail sent to the final user to show report with delete option for accepted booking.
  [daniele]

1.5.6 (2022-12-06)
------------------

- fix: now handle differente dst in prenotazione_add booking_date.
  [cekk]


1.5.5 (2022-12-06)
------------------

fix: booking hour.
  [cekk]

1.5.4 (2022-12-06)
------------------

- fix: show actual booking hour un prenotazione_add view.
  [cekk]


1.5.3 (2022-12-06)
------------------

- chore: updated time label of booking add view
  [sara]


1.5.2 (2022-11-30)
------------------

- fix: export all visible fields in the ods report.
  [cekk]


1.5.1 (2022-11-16)
------------------

- fix: fixed booking labels [sara]


1.5.0 (2022-11-14)
------------------

- [BREAKING CHANGE] Remove recaptcha dependency and use collective.honeypot. UNINSTALL plone.formwidget.recaptcha before upgrading to this version.
  [cekk]


1.4.4 (2022-09-30)
------------------

- Fix upgrade-step.
  [cekk]


1.4.3 (2022-08-01)
------------------

- Add caching profile and enable it on install.
  [cekk]


1.4.2 (2022-05-22)
------------------

- Disable check_valid_fiscalcode constraint.
  [cekk]


1.4.1 (2022-05-04)
------------------

- Standardize fields between schema and creation form.
  [cekk]
- Improve extensibility of add form and required fields.
  [cekk]
- Handle (do not broke) non existent fiscalcode member field.
  [cekk]

1.4.0 (2022-01-13)
------------------

- Better manage fiscalcode.
  [cekk]
- Add github actions for code quality and fix black/zpretty/flake8 linting.
  [cekk]

1.3.5 (2021-10-15)
------------------

- [new] Added field "Note prenotante" e "Note del personale" inside the
  exported .ods file.
  [arsenico13]


1.3.4 (2021-09-08)
------------------

- [chg] only editor/manager can view booking data
  [mamico]
- [fix] fix check title on vacation booking
  [eikichi18]


1.3.3 (2021-08-09)
------------------

- [chg] autofill data from user context
  [mamico]


1.3.2 (2021-06-17)
------------------

- Prevented booking without gate
  [eikichi18]


1.3.1 (2021-06-14)
------------------

- Booking tipology as required
  [eikichi18]


1.3.0 (2021-06-07)
------------------

- [fix] translations
  [nzambello]
- [chg] prenotazioni slot as required
  [nzambello]
- [fix] slot prenotazione search button
  [nzambello]


1.2.0 (2021-05-31)
------------------

- [fix] handle reservation move without any gate set
  [cekk]
- [new] dependency with collective.z3cform.datagridfield>=2.0
  [cekk]

1.1.8 (2021-05-27)
------------------

- [fix] project urls in setup.py


1.1.7 (2021-05-27)
------------------

- [fix] changelog syntax
- [chg] project urls in setup.py


1.1.6 (2021-04-26)
------------------

- [fix] fix reservation download. ods writer can't cast none to empty string


1.1.5 (2021-04-26)
------------------

- [fix] force gate on authenticated reservation
- [fix] fix slot dimension in case of confirmed reservation
- [fix] Reindex subject on move
- [fix] download reservation after search give error calculating review_state


1.1.4 (2021-03-10)
------------------

- [fix] fix translations
- [chg] change prenotazioni search adding phone number and removing state
- [fix] fix problem with sending mail if mail not compiled
- [fix] allow to not use not required fields
  [lucabel]

1.1.3 (2021-02-22)
------------------

- [fix] fix search reservation accessing by gate icon


1.1.2 (2021-02-22)
------------------

- [chg] change 'sportello' label with 'postazione'
- [fix] now we can handle more gates and layout is safe
- [fix] fix insufficient permission deleting reservation
- [fix] pauses are spread over more gate if more gate are available
- [fix] hide "download" link in search reservation print


1.1.1 (2021-02-19)
------------------

- [chg] tuning permission to allow reader to see everything
- [chg] tuning css for mobile
- [new] add pause to prenotazioni folder
- [chg] add some accessibility to prenotazioni folder
- [new] add logic to delete reservation using a link sendable by mail

1.1.0 (2020-12-15)
------------------

- feat: tooltip on add button
  [nzambello]


1.0.3 (2020-12-10)
------------------

- Fix return url when click Cancel button.
  [cekk]


1.0.2 (2020-12-09)
------------------

- Changed fields order for prenotazione ct.
  [daniele]

1.0.1 (2020-12-09)
------------------

- Added logic to generate booking code on the fly.
  This code is calculated on the basis of the booking date and time.
  [daniele]
- Add new stringinterp for prenotazione print url and update contentrules.
  [cekk]
- Added fiscal code field to required fields. Added widget for visible fields.
  Updated views and templates.
  [daniele]

1.0.0 (2020-11-23)
------------------

- Initial release.
  [cekk]
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/redturtle/redturtle.prenotazioni",
    "name": "redturtle.prenotazioni",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Python Plone",
    "author": "RedTurtle Technology",
    "author_email": "sviluppoplone@redturtle.it",
    "download_url": "https://files.pythonhosted.org/packages/d8/c8/9e76947c1f03e34e923a09f9c7fe81de06a4c126c76a0ff25212ec24ed7d/redturtle.prenotazioni-2.6.5.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/redturtle.prenotazioni.svg\n    :target: https://pypi.org/project/redturtle.prenotazioni/\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/pyversions/redturtle.prenotazioni.svg?style=plastic\n    :target: https://pypi.org/project/redturtle.prenotazioni/\n    :alt: Supported - Python Versions\n\n.. image:: https://img.shields.io/pypi/dm/redturtle.prenotazioni.svg\n    :target: https://pypi.org/project/redturtle.prenotazioni/\n    :alt: Number of PyPI downloads\n\n.. image:: https://img.shields.io/pypi/l/redturtle.prenotazioni.svg\n    :target: https://pypi.org/project/redturtle.prenotazioni/\n    :alt: License\n\n.. image:: https://github.com/RedTurtle/redturtle.prenotazioni/actions/workflows/tests.yml/badge.svg\n    :target: https://github.com/RedTurtle/redturtle.prenotazioni/actions\n    :alt: Tests\n\n.. image:: https://coveralls.io/repos/github/RedTurtle/redturtle.prenotazioni/badge.svg?branch=master\n    :target: https://coveralls.io/github/RedTurtle/redturtle.prenotazioni?branch=master\n    :alt: Coverage\n\n======================\nredturtle.prenotazioni\n======================\n\nA **booking product for Plone** which allows to reserve time slots throughout the week.\n\n.. contents::\n\nInstallation\n============\n\nAdd **redturtle.prenotazioni** to the egg section of your instance:\n\n::\n\n  [instance]\n  eggs=\n        ...\n        redturtle.prenotazioni\n\nTo avoid spam, there is a background validation with `collective.honeypot`_ .\n\n.. _collective.honeypot: https://pypi.org/project/collective.honeypot\n\n\nWith a version of `plone.app.dexterity` lower than 3.* (ie Plone 5.2) you need to add\n`collective.dexteritytextindexer`_ as requirement.\n\n::\n\n    [instance]\n    eggs=\n        ...\n        redturtle.prenotazioni\n        collective.dexteritytextindexer\n\n.. _collective.dexteritytextindexer: https://pypi.org/project/collective.dexteritytextindexer\n\nIntroduction\n============\n\nThis product introduces two new `content types`_ to your Plone site:\n\n.. _content types: http://developer.plone.org/content/types.html\n\n- `Booking`\n- `Booking Folder`\n\nBooking content\n---------------\n\n**Booking** is a `content type` used to store information about reservation.\n\nThe product interface provides a way to add new booking elements, by clicking on one of the plus signs available in the slots calendar.\n\nEach booking element once created is storerd into its own **Booking Folder**.\n\n\nBooking Folder content\n----------------------\n\n**Booking Folder** is a folderish content type which store your **Booking** objects.\n\n\nUsing redturtle.prenotazioni\n============================\n\nCreating a new Booking Folder\n-----------------------------\n\nIf the product is correctly installed the **Booking Folder** entry is available on the `add new` action menu.\n\nYou can configure:\n- hidden booking types for the internal usage\n- more then one gate\n- booking vacations\n- custom duration for booking types\n- week schedule for morning and afternoon time tables\n\nCreating the hidden booking types\n---------------------------------\n\nYou can hide your booking types from simple and anonymous users by using the 'Hidden Booking' flag\nin your booking types definition. This way, it will only be available to users with the 'Bookings Manager'\npermission. This feature may be useful if you want to restrict booking types for internal corporate use.\n\nCreating a new booking content\n------------------------------\n\nAnonymous and authenticated users are allowed to add new booking content\nby clicking on the plus signs on the default booking folder view.\n\nAfter its creation the slot will be displayed as \"busy\" for anonymous user\nand the slot won't be available anymore.\n\nBack-end users can see and manage the reservation according to the assigned Plone roles.\n\n\nWorkflow\n--------\n\nThe product comes with its own workflow \"prenotazioni_workflow\".\n\nHere below a list of all the states available:\n\n**Private**: booking object initial state:\n\n* `submit` (Automatic transition to pending)\n\n**Pending**\n\nTransaction available:\n\n* `publish` (to published)\n* `refuse` (to refused)\n\n**Published**\n\nTransaction available:\n\n* `refuse` (to refused)\n\n**Refused**\n\nTransaction available:\n\n* `restore` (to pending)\n\nManagers can confirm a Booking using workflow transitions.\nThe workflow transition triggers an email to be sent to the booker (see below).\n\n\nBooking Notifications\n---------------------\n\nThere are automated notifications implementend by the following behaviors:\n\n* `redturtle.prenotazioni.behavior.notification_appio` (Notify via AppIO gateway)\n* `redturtle.prenotazioni.behavior.notification_email` (Notify via Email gateway)\n* `redturtle.prenotazioni.behavior.notification_sms` (Notify via SMS gateway)\n\nEach behavior is implementing the following notification types:\n* `booking-accepted` (An notification if the booking had been accepted)\n* `booking-moved` (An notification if the booking had been moved)\n* `booking-created` (An notification if the booking had been created)\n* `booking-refuse` (An notification if the booking had been refused)\n* `booking-reminder` (An notification reminder)\n\nNotifications are **NOT automatically** enabled in every Booking Folder.\nIf you want to send some notification, you only need to enable them by assigning the behavior to PrenotazioniFolder c.t.\n\nYou can create your own notification templates for the booking events(confirm, refuse, create, delete, reminder).\nThe temlates are being saved in the PrenotazioniFolder object.\n\nThe template variables list:\n\n* ``${title}`` - Booking title.\n* ``${booking_gate}`` - Booking gate.\n* ``${booking_human_readable_start}`` - Booking human readable start datetime.\n* ``${booking_date}`` - Booking date.\n* ``${booking_end_date}`` - Booking end date.\n* ``${booking_time}`` - Booking time.\n* ``${booking_time_end}`` - Booking time end.\n* ``${booking_code}`` - Booking code.\n* ``${booking_type}`` - Booking type.\n* ``${booking_print_url}`` - Booking summary url.\n* ``${booking_url_with_delete_token}`` - Booking url to delete page.\n* ``${booking_user_phone}`` - Booking user phone.\n* ``${booking_user_email}`` - Booking user email.\n* ``${booking_user_details}`` - Booking user details.\n* ``${booking_office_contact_phone}`` - Booking office contact phone.\n* ``${booking_office_contact_pec}`` - Booking office contact pec.\n* ``${booking_office_contact_fax}`` - Booking office contact fax.\n* ``${booking_how_to_get_to_office}`` - Booking how to get to office.\n* ``${booking_office_complete_address}`` - Booking office complete address.\n* ``${booking_user_details}`` - Booking details inserted by user.\n* ``${booking_requirements}`` - Booking requeirements.\n* ``${prenotazioni_folder_title}`` - Booking folder title.\n* ``${booking_requirements}`` - Related PrenotazioneType.booking_requirements field\n\nNote that the sms can be used only if you implement an own sender adapter\nExample:\n\nYou just need to register a new adapter::\n\n    <adapter\n      factory = \".my_adapter.CustomSMSSenderAdapter\"\n      name=\"booking_transition_sms_sender\"\n    />\n\nAnd here the `send` method must be implementend::\n\n    from zope.component import adapter\n    from zope.interface import implementer\n\n    from redturtle.prenotazioni.content.prenotazione import IPrenotazione\n    from redturtle.prenotazioni.interfaces import IBookingNotificationSender\n    from redturtle.prenotazioni.interfaces import IBookingSMSMessage\n    from redturtle.prenotazioni.behaviors.booking_folder.sms.adapters import BookingNotificationSender\n\n\n    @implementer(IBookingNotificationSender)\n    @adapter(IBookingSMSMessage5, IPrenotazione, YourAddonLayerInterface)\n    class CustomSMSSenderAdapter(BookingNotificationSender):\n\n        def send(self):\n            if self.is_notification_allowed():\n                # the message is automatically generated basing on the event type\n                message = self.message_adapter.message\n                phone = self.booking.phone\n\n                # Your custom send logics integration below\n                custom_send_function(message, phone)\n\n\nVacations\n---------\n\nYou can specify days when the Booking Folder will not accept\nbookings.\nThose days are called \"Vacation days\".\n\nVacation days can be specified compiling the \"Vacation days\"\nfield in the Booking Folder edit form.\nValues are allowed in the format DD/MM/YYYY.\nInstead of the year you can put an asterisk, in this case every here\nthe day DD of month MM will be considered a vacation day.\n\nIt is also possible to specify a vacation period\nfor a single gate using the vacation booking form with a link that you can see in the toolbar.\n\n\nSearching\n---------\n\nUsing the prenotazioni_search view it is possible to search\nbookings within a given time interval.\nYou can also filter the results specifying a searchable text,\na gate or a review state.\n\nBooking code generation\n-----------------------\n\nEvery booking has an unique code generated on creation.\n\nBy default this code is based on its UID.\nIf you need to change this logic, you can do it registering a more specific adapter::\n\n    <adapter factory=\".my_new_code.MyNewBookingCodeGenerator\" />\n\n\nAnd the adapter should be something like this::\n\n    from redturtle.prenotazioni.adapters.booking_code import BookingCodeGenerator\n    from redturtle.prenotazioni.adapters.booking_code import IBookingCodeGenerator\n    from redturtle.prenotazioni.content.prenotazione import IPrenotazione\n    from my.package.interfaces import IMyPackageLayer\n    from zope.component import adapter\n    from zope.interface import implementer\n\n\n    @implementer(IBookingCodeGenerator)\n    @adapter(IPrenotazione, IMyPackageLayer)\n    class MyNewBookingCodeGenerator(BookingCodeGenerator):\n        def __call__(self, *args, **kwargs):\n            return \"XXXXX\"\n\n\nRest API\n========\n\nThere are some endpoints useful to use this tool also with external frontends (like Volto).\n\n@booking\n--------\n\nGET\n~~~\n\nThis endpoint allows to retrieve a booking by its UID.\n\nExample::\n\n    curl http://localhost:8080/Plone/++api++/@booking/<booking UID> -H 'Accept: application/json'\n\nResponse::\n\n    {\n        \"booking_code\": \"17E3E6\",\n        \"booking_date\": \"2023-05-22T09:09:00\",\n        \"booking_expiration_date\": \"2023-05-22T09:10:00\",\n        \"booking_type\": \"SPID: SOLO riconoscimento \\\"de visu\\\" (no registrazione)\",\n        \"company\": null,\n        \"cosa_serve\": null,\n        \"description\": \"\",\n        \"email\": \"mario.rossi@example\",\n        \"fiscalcode\": \"\",\n        \"gate\": \"postazione2\",\n        \"id\": \"mario-rossi\",\n        \"phone\": \"\",\n        \"staff_notes\": null,\n        \"title\": \"Mario Rossi\"\n    }\n\nPOST\n~~~~\n\nThis endpoint allows to create a new booking.\n\nExample::\n\n    curl http://localhost:8080/Plone/++api++/<booking_folder_path>/@booking \\\n        -X POST \\\n        -H 'Accept: application/json' \\\n        -H 'Content-Type: application/json' \\\n        -d '{\n            \"booking_date\": \"2023-05-23T09:00:00+02:00\",\n            \"booking_type\": \"SPID: SOLO riconoscimento \\\"de visu\\\" (no registrazione)\",\n            \"fields\": [\n                {\"name\": \"fullname\", \"value\": \"Mario Rossi\"},\n                {\"name\": \"email\", \"value\": \"mario.rossi@example\"}\n            ],\n        }'\n\nResponse::\n\n    {\n        \"booking_code\": \"17E3E6\",\n        \"booking_date\": \"2023-05-22T09:09:00\",\n        \"booking_expiration_date\": \"2023-05-22T09:10:00\",\n        \"booking_type\": \"SPID: SOLO riconoscimento \\\"de visu\\\" (no registrazione)\",\n        \"company\": null,\n        \"cosa_serve\": null,\n        \"description\": \"\",\n        \"email\": \"mario.rossi@example\",\n        \"fiscalcode\": \"\",\n        \"gate\": \"postazione1\",\n        \"id\": \"mario-rossi-1\",\n        \"phone\": \"\",\n        \"staff_notes\": null,\n        \"title\": \"Mario Rossi\"\n    }\n\nDELETE\n~~~~~~\n\nThis endpoint allows to delete a booking by its UID.\n\nExample::\n\n    curl -X DELETE http://localhost:8080/Plone/++api++/@booking/<booking UID> -H 'Accept: application/json'\n\nA booking can be deleted only if on of the following rules are satisfied:\n\n- Anonymous user and booking has been created by an anonymous user\n- Booking created by current logged-in user\n- Current logged-in user has `redturtle.prenotazioni.ManagePrenotazioni` permission\n- Booking has a date > today\n\n\nMOVE\n~~~~\n\nThis endpoint allows to move a booking by its UID to a different date/time slot.\n\nExample::\n\n    curl http://localhost:8080/Plone/++api++/<booking_folder_path>/@booking-move \\\n        -X POST \\\n        -H 'Accept: application/json' \\\n        -H 'Content-Type: application/json' \\\n        -d '{\n            \"booking_date\": \"2023-05-23T09:00:00+02:00\",\n            \"booking_id\": \"<booking UID>\",\n        }'\n\n\n@prenotazione\n-------------\n\nLeave for compatibility reasons (identical to `@booking`'s GET). Could be removed in future.\n\nExample::\n\n   curl http://localhost:8080/Plone/@prenotazione?uid=<booking UID> -H 'Accept: application/json'\n\nResponse, see: @booking\n\n@vacation\n---------\n\nPOST\n~~~~\n\nThis endpoint allows to create a new vacation.\n\nExample::\n\n    curl http://localhost:8080/Plone/++api++/<booking_folder_path>/@vacation \\\n        -X POST \\\n        -H 'Accept: application/json' \\\n        -H 'Content-Type: application/json' \\\n        -d '{\n            \"start\": \"2023-05-23T09:00:00+02:00\",\n            \"end\": \"2023-05-23T10:00:00+02:00\",\n            \"gate\": \"gate A\",\n            \"title\": \"vacation\"\n        }'\n\n\n@available-slots\n----------------\n\nEndpoint that need to be called on a PrenotazioniFolder.\nIt returns the list of all available slots based on some parameters.\n\nAn available slot is the first free time on each hour slot (each day is split in 1h slots).\n\nBy default (without parameters) the endpoint returns available slots for the current month, starting from today.\n\nParameters:\n\n- **start** a start date. If not given, the start will be today.\n- **end** an end date. If not given, the end will be the last day of current month.\n- **first_available** a boolean flag, if valiorized, the first available slot returned without the current month search limit but the one year.\n\nExample::\n\n   curl -i http://localhost:8080/Plone/folder/@available-slots -H 'Accept: application/json'\n\nResponse::\n\n    {\n        \"@id\": \"http://localhost:8080/Plone/folder/@available-slots\",\n        \"items\": [\n            '2023-04-10T07:30:00',\n            '2023-04-10T08:00:00',\n            '2023-04-10T09:00:00',\n            '2023-04-17T07:00:00',\n            '2023-04-17T08:00:00',\n            '2023-04-17T09:00:00',\n            '2023-04-24T07:00:00',\n            '2023-04-24T08:00:00',\n            '2023-04-24T09:00:00'\n        ]\n    }\n\n\nExample::\n\n   curl -i http://localhost:8080/Plone/folder/@available-slots?start=2023-04-12 -H 'Accept: application/json'\n\nResponse::\n\n    {\n        \"@id\": \"http://localhost:8080/Plone/folder/@available-slots\",\n        \"items\": [\n            '2023-04-17T07:00:00',\n            '2023-04-17T08:00:00',\n            '2023-04-17T09:00:00',\n            '2023-04-24T07:00:00',\n            '2023-04-24T08:00:00',\n            '2023-04-24T09:00:00'\n        ]\n    }\n\n@booking-schema\n---------------\n\nEndpoint that need to be called on a PrenotazioniFolder.\nIt returns the list of all fields to fill in for the booking.\n\nThe booking date is passed via querystring (e.g ?booking_date=2023-04-13+10%3A00')\n\nExample::\n\n   curl -i -X GET 'http://localhost:8080/Plone/prenotazioni/@prenotazione-schema?booking_date=2023-05-15T13:00:00' -H 'Accept: application/json'\n\nResponse::\n\n    {\n        \"booking_types\": {\n            \"bookable\": [],\n            \"unbookable\": [\n                {\n                \"duration\": \"60\",\n                \"name\": \"Rilascio CIE\"\n              }\n            ]\n        },\n        \"fields\": [\n          {\n            \"desc\": \"Inserisci l'email\",\n            \"label\": \"Email\",\n            \"name\": \"email\",\n            \"readonly\": false,\n            \"required\": false,\n            \"type\": \"text\",\n            \"value\": \"\"\n          },\n          {\n            \"desc\": \"Inserisci il numero di telefono\",\n            \"label\": \"Numero di telefono\",\n            \"name\": \"phone\",\n            \"readonly\": false,\n            \"required\": false,\n            \"type\": \"text\",\n            \"value\": \"\"\n          },\n          {\n            \"desc\": \"Inserisci ulteriori informazioni\",\n            \"label\": \"Note\",\n            \"name\": \"description\",\n            \"readonly\": false,\n            \"required\": false,\n            \"type\": \"textarea\",\n            \"value\": \"\"\n          },\n          {\n            \"desc\": \"Inserisci il codice fiscale\",\n            \"label\": \"Codice Fiscale\",\n            \"name\": \"fiscalcode\",\n            \"readonly\": false,\n            \"required\": true,\n            \"type\": \"text\",\n            \"value\": \"\"\n          },\n          {\n            \"desc\": \"Inserire il nome completo\",\n            \"label\": \"Nome completo\",\n            \"name\": \"Nome\",\n            \"readonly\": false,\n            \"required\": true,\n            \"type\": \"text\",\n            \"value\": \"\"\n          }\n        ]\n    }\n\n@bookings\n---------\n\nEndpoint that returns a list of own *Prenotazione* content by parameters\n\nParameters:\n\n- **SearchableText**: The SearchableText of content;\n- **from**: The start date of research (with YYYY-MM-DD format);\n- **to**: The end date of research (with YYYY-MM-DD format);\n- **modified_after**: To filter bookings modified only after given date (needed also a timezone: YYYY-MM-DDThh:mm:ss+02:00);\n- **gate**: The booking gate;\n- **userid**: The userid(basically it is the fiscalcode). Allowed to be used by users having the 'redturtle.prenotazioni: search prenotazioni' permission;\n- **booking_type**: The booking_type, available values are stored in 'redturtle.prenotazioni.booking_types' vocabulary;\n- **review_state**: The booking status, one of: 'confirmed', 'refused', 'private', 'pending';\n- **sort_on**: The index by which to order (default 'Date' aka the booking datetime);\n- **sort_order**: The order in which to sort, possible values: 'ascending', 'descending' (default 'descending');\n- **fullobjects**: If `fullobjects=1` is passed, the endpoint will return the full objects instead of a list of brains (actually the only information added is the `requirements` field. (aka `cosa_serve`).\n\nExample::\n\n   curl -i http://localhost:8080/Plone/@bookings?from=2023-10-22&to=2023-10-22&gate=Gate1&userid=user1&booking_type=type1&SearchableText=text1 \\\n     -H 'Accept: application/json'\n\nResponse::\n\n    {\n        \"@id\": \"http://localhost:8080/Plone/folder/@bookings\",\n        \"items\": [\n             {\n                \"title\": \"Booking Title\",\n                \"booking_id\": \"abcdefgh1234567890\",\n                \"booking_url\": \"https://url.ioprenoto.it/prenotazione/abcd\",\n                \"booking_date\": \"2018-04-25T10:00:00\",\n                \"booking_expiration_date\": \"2018-04-30T10:00:00\",\n                \"booking_type\": \"Servizio di prova\",\n                \"booking_room\": \"stanza-1\",\n                \"booking_gate\": \"sportello-urp-polifunzionale\",\n                \"booking_status\": \"confirmed\",\n                \"booking_status_label\": \"Confermata\",\n                \"booking_status_date\": \"2018-04-25T10:00:00\",\n                \"booking_status_notes\": \"Prenotazione confermata\",\n                \"userid\": \"FISCALCODE\",\n            },\n            ...\n            ],\n          }\n    }\n\n\n@booking-notify\n---------------\n\nEndpoint that fires the confirm email to user\n\n\nExample::\n\n   curl -i http://localhost:8080/Plone/booking_folder/@booking-notify/<booking UID> \\\n     -H 'Accept: application/json'\n\n\nIf the user is not logged in, the endpoint will return a 401 error.\n\nResponse::\n    HTTP 200 OK\n\n\n@day-busy-slots\n---------------\n\nEndpoint that returns a list of busy slots and pauses based on the passed date\n\nParameters:\n\n- **date**: Date\n\nExample::\n\n    curl -i  \"http://localhost:8080/Plone/prenotazioni_folder/@day-busy-slots?date=2023/05/22\"\\\n        -H 'Accept: application/json'\\\n\nResponse::\n\n    {\n        \"@id\": \"http://localhost:8080/Plone/prenotazioni_folder/@day-busy-slots\",\n        \"bookings\": {\n            \"gate1\":\n                [\n                    {\n                        \"booking_code\": \"17E3E6\",\n                        \"booking_date\": \"2023-05-22T09:09:00\",\n                        \"booking_expiration_date\": \"2023-05-22T09:10:00\",\n                        \"booking_type\": \"SPID: SOLO riconoscimento \\\"de visu\\\" (no registrazione)\",\n                        \"company\": null,\n                        \"cosa_serve\": null,\n                        \"description\": \"\",\n                        \"email\": \"mario.rossi@example\",\n                        \"fiscalcode\": \"\",\n                        \"gate\": \"postazione1\",\n                        \"id\": \"mario-rossi-1\",\n                        \"phone\": \"\",\n                        \"staff_notes\": null,\n                        \"title\": \"Mario Rossi\"\n                    },\n                    ...\n                ],\n            \"gate2\":\n                [\n                    {\n                        \"booking_code\": \"17E3E6\",\n                        \"booking_date\": \"2023-05-22T09:09:00\",\n                        \"booking_expiration_date\": \"2023-05-22T09:10:00\",\n                        \"booking_type\": \"SPID: SOLO riconoscimento \\\"de visu\\\" (no registrazione)\",\n                        \"company\": null,\n                        \"cosa_serve\": null,\n                        \"description\": \"\",\n                        \"email\": \"mario.rossi@example\",\n                        \"fiscalcode\": \"\",\n                        \"gate\": \"postazione2\",\n                        \"id\": \"mario-rossi\",\n                        \"phone\": \"\",\n                        \"staff_notes\": null,\n                        \"title\": \"Mario Rossi\"\n                    },\n                    ...\n                ]\n        },\n        \"pauses\": [\n            {\n                \"start\": \"2023-05-22T07:15:00+00:00\",\n                \"stop\": \"2023-05-22T08:30:00+00:00\"\n            },\n            ...\n        ]\n    }\n\nSpecial Views\n==============\n\n@@download/bookings.xlsx\n------------------------\n\nThis view allows to download the bookings filtered by passed parameters\n\n- **text**: The SearchableText of content.\n- **from**: The start date of research.\n- **to**: The end date of research.\n- **gate**: The booking gate.\n- **userid**: The userid(basically it is the fiscalcode). Allowed to be used by users having the 'redturtle.prenotazioni: search prenotazioni' permission.\n- **booking_type**: The booking_type, available values are stored in 'redturtle.prenotazioni.booking_types' vocabulary.\n- **review_state**: The booking status, one of: 'confirmed', 'refused', 'private', 'pending'\n\n\nExample::\n    curl -i http://localhost:8080/Plone/folder/@@download/bookings.xlsx?text=Text&review_state=confirmed&gate=Gate1&start=2010-10-10&end=2025-10-10&booking_type=Type1\n\nResponse::\n    Binary file\n\n@@send-booking-reminders\n------------------------\n\nThis view sends a booking reminder email to all the bookings inside PrenotazioniFolders that\nhave the Reminder Notification Gap field populated. If you intend to set up a cronjob to call this view, you might use a special script call.\nThe script is located at src/redturtle/prenotazioni/scripts/notify_upcoming_bookings.py.\n\n\n\nScripts\n=======\n\nnotify_upcoming_bookings\n------------------------\n\nThe script is supposed to be used to call the **@@send-booking-reminders** view.\nIt is supposed to be ran once a day otherwise, duplicate emails will be sent.\n\nUsage::\n\n    bin/instance1 -OPlone run bin/notify_upcoming_bookings\n\nBuildout config example::\n\n    [buildout]\n    # You can change it in according to your policy\n    cron_instance = instance1\n    parts +=\n        notify-upcoming-bookings\n\n    [notify-upcoming-bookings]\n    recipe = z3c.recipe.usercrontab\n    times = 0 3 * * *\n    command = flock -n ${buildout:directory}/var/notify_upcoming_bookings.lock ${buildout:directory}/bin/${buildout:cron_instance} -OPlone run bin/notify_upcoming_bookings >> ${buildout:directory}/var/log/notify_upcoming_bookings.log 2>&1\n\n\n\nBehaviors\n=========\n\nredturtle.prenotazioni.behavior.notification_appio\n--------------------------------------------------\n\nIf you mind to use this behavior note that first of all you also need to assign\nthis **redturtle.prenotazioni.behavior.notification_appio_booking_type** to PrenotazioneType c.t.\n\nTo send the messages via AppIO gateway the **service_code** field defined by **redturtle.prenotazioni.behavior.notification_appio_booking_type**\nmust be compiled in the PrenotazioniType object. All the possible values of this field are being\ntaken from an **yaml** file with the following format.\n\nappio_config_keys.yaml::\n\n    - name: Service1\n      key: ABC123\n\n    - name: Service2\n      key: ABC231\n\n    - name: Service3\n      key: ABC312\n\nThe file path is being taken from the **APPIO_CONFIG_FILE** env var.\nThis variable can be configured automatically in the buildout using the following config.\n\nbuildout.cfg::\n\n    [instance]\n    environment-vars =\n        APPIO_CONFIG_FILE ${buildout:directory}/appio_config_keys.yaml\n\n\nContent-transfer-encoding\n=========================\n\nIt is possible to set the content-transfer-encoding for the email body, settings the environment\nvariable `MAIL_CONTENT_TRANSFER_ENCODING`::\n\n    [instance]\n    environment-vars =\n        MAIL_CONTENT_TRANSFER_ENCODING base64\n\nThis is useful for some SMTP servers that have problems with `quoted-printable` encoding.\n\nBy default the content-transfer-encoding is `quoted-printable` as overrided in\nhttps://github.com/zopefoundation/Products.MailHost/blob/master/src/Products/MailHost/MailHost.py#L65\n\n\nHow to develop\n==============\n\nFrontend\n--------\n\nThere is a custom widget made in React and registered as bundle.\nTo develop it, you should do following steps:\n\nFirst of all, enable nvm::\n\n    > nvm use\n\nInstall dependencies::\n\n    > yarn\n\nRun webpack::\n\n    > yarn start\n\nThis will start webpack with autoreload.\nTo see changes on your site, you need to enable development mode in Resources Registry in your Plone site, and enable CSS and js development of \"week-table-overrides-widget-bundle\" bundle.\n\n\nWhen changes are ok, you need to make a production build::\n\n    > yarn build\n\nContribute\n==========\n\n- Issue Tracker: https://github.com/RedTurtle/redturtle.prenotazioni/issues\n- Source Code: https://github.com/RedTurtle/redturtle.prenotazioni\n\n\nNotes\n=====\n\n**redturtle.prenotazioni** has been tested with Plone 5.2 and works with Python 3.\n\nThis is a merge from other two booking products:\n\n- `rg.prenotazioni`__.\n- `pd.prenotazioni`__.\n\n__ https://github.com/PloneGov-IT/rg.prenotazioni/\n__ https://github.com/PloneGov-IT/pd.prenotazioni/\n\n\nCredits\n=======\n\nDeveloped with the support of:\n\n* `Unione Reno Galliera`__\n\n  .. image:: http://blog.redturtle.it/pypi-images/redturtle.prenotazioni/logo-urg.jpg/image_mini\n     :alt: Logo Unione Reno Galliera\n\n* `S. Anna Hospital, Ferrara`__\n\n  .. image:: http://www.ospfe.it/ospfe-logo.jpg\n     :alt: S. Anna Hospital - logo\n\n* `Comune di Padova`__;\n\n  .. image:: https://raw.githubusercontent.com/PloneGov-IT/pd.prenotazioni/master/docs/logo-comune-pd-150x200.jpg\n     :alt: Comune di Padova's logo\n\nAll of them supports the `PloneGov initiative`__.\n\n__ http://www.renogalliera.it/\n__ http://www.ospfe.it/\n__ http://www.padovanet.it/\n__ http://www.plonegov.it/\n\nAuthors\n=======\n\nThis product was developed by **RedTurtle Technology** team.\n\n.. image:: https://avatars1.githubusercontent.com/u/1087171?s=100&v=4\n   :alt: RedTurtle Technology Site\n   :target: http://www.redturtle.it/\n\n\nContributors\n============\n\n`List of contributors`_ .\n\n.. _List of contributors: https://github.com/RedTurtle/redturtle.prenotazioni/graphs/contributors\n\n\nChangelog\n=========\n\n\n2.6.5 (2024-04-24)\n------------------\n\n- Package chore.\n  [folix-01]\n\n\n2.6.4 (2024-04-24)\n------------------\n\n- Fix reminder send view.\n  [folix-01]\n\n\n2.6.3 (2024-04-15)\n------------------\n\n- avoid gate collision\n  [mamico]\n\n\n2.6.2 (2024-04-12)\n------------------\n\n- Bypass notBeforeDays when using the @available-slots to find the first bookable slot(used by BookingManager).\n  [folix-01]\n\n- Fix day endpoint to show the available scheduling for the same day as start date.\n  [folix-01]\n\n- Manage the user's phone attribute in booking-schema\n  [mamico]\n\n\n2.6.1 (2024-04-02)\n------------------\n\n- PrenotazioniFolder.max_bookings_allowed constraint (if compiled, the fiscalcode must be required).\n  [folix-01]\n\n\n2.6.0 (2024-04-02)\n------------------\n\n- Return empty data from the @day endpoint if requested date is out of PrenotazioniFolder range\n  [folix-01]\n\n- Fix double gate bug.\n  [folix-01]\n\n- first_available flag for the @available-slots endpoint.\n  [folix-01]\n\n- Fix double gate when it is repeated in more than one week table overrides.\n  [folix-01]\n\n\n2.5.3 (2024-03-19)\n------------------\n\n- Fix SMS links. Removed the dot immediately after the url\n  [folix-01]\n\n\n2.5.2 (2024-03-08)\n------------------\n\n- Fix rolemap\n  [lucabel]\n\n- Add manager notification on booking canceled\n  [folix-01]\n\n2.5.1 (2024-03-06)\n------------------\n\n- Add the years range configuration to week table overrides.\n  [folix-01]\n\n- Bypass the today delete limit for the 'out-of-office' types\n  [folix-01]\n\n- Change the booking notification flag label.\n  [folix-01]\n\n\n2.5.0 (2024-02-29)\n------------------\n\n- `canceled` state for booking. if an user cancel a booking, the booking is not deleted but is set to cancel state\n  [mamico]\n\n2.4.9 (2024-02-22)\n------------------\n\n- Disabled \"user has exceeded the limit\" validation when the fiscal code is missing.\n  [daniele]\n\n\n2.4.8 (2024-02-16)\n------------------\n\n- No cache per restapi available_slots, available_slots changes frequently and anonymous users\n  need to see the updated data.\n  [mamico]\n\n- Remove acquisition when getting version_id in **on_modify** event handler.\n  [cekk]\n\n\n2.4.7 (2024-02-12)\n------------------\n\n- permission for move bookings for booking managers\n  [mamico]\n\n\n2.4.6 (2024-02-12)\n------------------\n\n- permission for move bookings for booking managers\n  [mamico]\n\n- Use the yaml file to configure the AppIO keys\n  [folix-01]\n\n2.4.5 (2024-02-01)\n------------------\n\n- sort_on/sort_order in restapi bookings and xlsx\n  [mamico]\n\n\n2.4.4 (2024-01-25)\n------------------\n\n- Fix the sms nofications behavior's field label.\n  [folix-01]\n\n\n2.4.3 (2024-01-24)\n------------------\n\n- Remove the notification gateways allowing cross logics\n  [folix-01]\n\n- Add @id in booking serializer\n  [mamico]\n\n- Handle `modified_after` parameter in @bookings endpoint.\n  [cekk]\n\n- Add booking_code as catalog metadata.\n  [cekk]\n\n- [BREAKING] Move code generation and managers email notification from event handlers into booker.\n  [cekk]\n\n\n2.4.2 (2024-01-15)\n------------------\n\n- Revert last changes to avoid incompatibility.\n  [cekk]\n\n\n2.4.1 (2024-01-15)\n------------------\n\n- Register event handler for IObjectAddedEvent instead IObjectCreatedEvent for code generator.\n  [cekk]\n\n\n2.4.0 (2024-01-15)\n------------------\n\n- Performance improvements: changed functions: `hm2DT`, `value_hr`, `get_values_hr_every`\n  [mamico]\n\n- Perfomance refactoring for @available-slots view\n  [folix-01]\n\n- Split booking notification gateways to 'App IO', 'Email' and 'SMS'\n  [folix-01]\n\n- remove unused contentrules\n  [mamico]\n\n- Add booking reminder emails.\n  [folix-01]\n\n- Move code generation to adapter, to be more customizable.\n  [cekk]\n\n- Add customizable email from in PrenotazioniFolder contents.\n  [cekk]\n\n2.3.2 (2024-01-03)\n------------------\n\n- Add creation and modification dates to serialized booking\n  [folix-01]\n\n- Add fullobjects in @bookings\n  [mamico]\n- Use the <PrenotazioniFolder>.holidays constraint.\n  [folix-01]\n\n\n2.3.1 (2023-12-21)\n------------------\n\n- add content-transfer-encoding customization\n  [mamico]\n\n\n2.3.0 (2023-12-19)\n------------------\n\n- Add booking_type vocabularies for portal_root\n  [mamico]\n\n- Improve manager mail notification subject to include also name and date.\n  [cekk]\n\n- Update the min booking type length value to 5min.\n  [folix-01]\n\n- Fix: hidden attribute in tipologia\n  [mamico]\n\n- Fix upgrade step error #139\n  [mamico]\n\n- Add flag `auto_confirm_manager` that allows to automatically confirm bookings created by Booking Managers.\n  [cekk]\n\n- Booking Managers bypass futureDays checks when create new bookings.\n  [cekk]\n\n- Remove duplicated method in booker: create. Now there is only `book`.\n  [cekk]\n\n- Hide PrenotazioniYear in add menu for restapi.\n  [cekk]\n\n2.2.5 (2023-12-04)\n------------------\n\n- Contributors can add PrenotazioniFolder.\n  [cekk]\n\n- On PrenotazioniFolder upgrade-step (2000->2001) migrate also requirements field.\n  [cekk]\n\n- Fix gate chooser algorithm to avoid overlaps. Now we randomly choose it without getting the less used one.\n  [cekk]\n\n\n2.2.4 (2023-11-30)\n------------------\n\n- Do not raise Unauthorized when translate title ical adapter.\n  [cekk]\n\n\n2.2.3 (2023-11-29)\n------------------\n\n- Fix message composition in manager notification.\n  [cekk]\n\n\n2.2.2 (2023-11-28)\n------------------\n\n- Set PrenotazioniFolder and PrenotazioneType as not searchable (types_not_searched).\n  [cekk]\n\n- Send ical also for manager notifications.\n  [cekk]\n\n\n2.2.1 (2023-11-22)\n------------------\n\n- Do not send the booking created email if auto_confirm is true and notify on confirm is true.\n  [folix-01, cekk]\n\n\n2.2.0 (2023-11-20)\n------------------\n\n- Fix sub BaseSlots whene some slots overlap\n  [mamico]\n\n- Compatibility with old code that use booking_types field in PrenotazioniFolder\n  [mamico]\n\n- Extend the booking duration limit to 180 min.\n  [folix-01]\n\n- Allow Bookings Manager to create, move the bookings and create the vacations.\n  [folix-01]\n\n- [BREAKING CHANGE] Convert booking types to c.t.\n  [folix-01]\n\n- Change bookings default limit to 0.\n  [folix-01]\n\n- Fix Bookings Manager permission in according to expected behavior\n  [folix-01]\n\n- Add booking_refuse_message to Prenotazione stringinterp variables.\n  [folix-01]\n\n- Extended PrenotaizoniFolder email templates var list.\n  [folix-01]\n\n- Better handle overrides between years.\n  [cekk]\n\n- Handle possibility to create more overrides with different gates schedule.\n  [cekk]\n\n2.1.5 (2023-11-10)\n------------------\n\n- Fix release (2.1.4 was already made).\n  [cekk]\n\n\n2.1.4 (2023-11-10)\n------------------\n\n- Fix week overrides when booking next year.\n  [cekk]\n\n- Bypass limit for out-of-office bookings.\n  [cekk]\n\n\n2.1.3 (2023-10-13)\n------------------\n\n- Resect hidden booking types from @booking-schema.\n  [folix-01]\n\n\n2.1.2 (2023-10-13)\n------------------\n\n- Add hidden booking types for operator use.\n  [folix-01]\n\n\n2.1.1 (2023-10-11)\n------------------\n\n- Sort gate slots in get_free_slots method to better handle also pauses.\n  [cekk]\n\n\n2.1.0 (2023-10-11)\n------------------\n\n- Add booking details to the export file.\n  [folix-01]\n\n- Change PrenotazioniFolder.cosa_serve field type to RichText.\n  [folix-01]\n\n- Utilizzare defaultFactory se il default \u00e8 una funzione, altrimenti non viene\n  eseguita nel momento corretto.\n  [mamico]\n\n- Rimosso searchabletext di prenotazioni doppio.\n  [mamico]\n\n- Aggiunto indexer per fiscalcode uppercase per\n  fare ricerche case insensitive.\n  [mamico]\n\n- Remove Contributor from the package permissions map.\n  [folix-01]\n\n- Add configurable simultaneous bookings limit for the same user.\n  [folix-01]\n\n- Remove \"immediate=True\" from mailhost send in send_email_to_managers because can cause multiple sends when there are conflicts.\n  [cekk]\n\n- Better handle edge-case when a booking is created inside a pause (booking created before pause set in folder config).\n  [cekk]\n\n2.0.0 (2023-09-12)\n------------------\n\n- workaround per download prenotazioni, parametri in base64 sul path\n  per gestire bug Volto\n  [mamico]\n\n- add xlsx tests\n  [mamico]\n\n- add booking description in @bookings\n  [mamico]\n\n- add booking_code field to IPrenotazione schema\n  update locales\n  [lucabel]\n\n- Call booking url adapter on plone.stringinterp.adapters.ContextWrapper\n  [foxli-01]\n\n- Traduzioni\n  [mamico]\n\n- Restapi @booking-notify.\n  [foxli-01]\n\n2.0.0rc5 (2023-09-05)\n---------------------\n\n- Update locales.\n  [foxli-01]\n\n\n2.0.0rc4 (2023-09-05)\n---------------------\n\n- Add a dedicated role to manage the bookings.\n  [folix-01]\n\n\n2.0.0.rc2 (2023-08-31)\n----------------------\n\n- Show default gates as unavailable in get_gates method, if they are overrided.\n  [cekk]\n- Skip required field validation when add out of office bookings in @booking endpoint.\n  [cekk]\n- Only users with permission can add out of office bookings in @booking endpoint.\n  [cekk]\n- Fix slots overlap valiation on booking move\n  [folix-01]\n\n2.0.0.rc1 (2023-08-25)\n----------------------\n\n- Remove complexity in `same_day_booking_disallowed`` field: now you can set only *yes* or *no*.\n  [cekk]\n\n- duration in minutes instead of days\n  [mamico]\n\n- allow to add out-of-office in api (aka blocco prenotazione)\n  [mamico]\n\n2.0.0.dev5 (2023-08-21)\n-----------------------\n\n- Add logic to override pauses and gates.\n  [daniele]\n\n- Permit to force gate / duration to operator (restapi add booking)\n  [mamico]\n\n- Changes required to migrate the old bookings.\n  [folix-01]\n\n\n- Allow to override also gates and pauses.\n  [cekk]\n\n- Remove unused unavailable_gates field.\n  [cekk]\n\n2.0.0.dev4 (2023-08-11)\n-----------------------\n\n- Moved contacts fields to a dedicated behavior.\n  [daniele]\n\n- Tabs/fields reordering for the booking folder.\n  [daniele]\n\n- fix date in @@download\n  [mamico]\n\n- fix tz in pause\n  [mamico]\n\n- skip email to manager on block/vacation creation\n  [mamico]\n\n- Manage timezone in booking dates. (upgrade step)\n  [cekk]\n\n- Fix: only valid interval in the subtraction slots operation.\n  [mamico]\n\n- Fix boking code uniqueness\n  [folix-01]\n\n- Fix default start/end time for search @bookings\n  [mamico]\n\n- Add @vacation rest api\n  [mamico]\n\n- Customized status message in prenotazione_print.pt based on review_state.\n  [cekk]\n\n- Add @booking-move restapi\n  [mamico]\n\n- Extend @@bookings search view parameters list.\n  [folix-01]\n\n- Added event handler on booking creation to send email to managers.\n  [daniele]\n\n- Rename routes:\n  months-slots => available-slots\n  prenotazione-schema => booking-schema\n  @@download_reservation => @@download/bookings.xlsx\n  [cekk] [mamico]\n\n\n2.0.0.dev3 (2023-07-20)\n-----------------------\n\n- Handle contentrules by the plone events and do not use contentrules anymore.\n  [folix-01]\n\n- Change \"day\" type in week_table (TODO: need an upgrade step?).\n  [mamico]\n\n2.0.0.dev2 (2023-06-30)\n-----------------------\n\n- reorganize backend form\n  [mamico]\n\n- booking_type filter in @months-slots\n  [mamico]\n\n- Register adapters for IMailFromFieldAction for both Site root and dx containers.\n  [cekk]\n\n2.0.0.dev1 (2023-06-12)\n-----------------------\n\n- Add Booking restapi\n  [mamico]\n\n- Fix Plone6 compatibility.\n  [cekk]\n\n- Removed unused type PrenotazioniFolderContainer.\n  [cekk]\n\n- Added endpoint to get booking schema.\n  [daniele]\n\n- Avoid change gate, booking date, booking end from /edit;\n  this would allow you to skip the checks;\n  Fix profile registration name;\n  [lucabel]\n\n- Add @bookings endpoint to get booking items for a user\n  [foxtrot-dfm1]\n\n- Add a new endpoint to get booking details. (#40442).\n  [daniele]\n\n- Add autoconfirm content rule to profile.\n  [foxtrot-dfm1]\n\n- Added field \"cosa_serve\" (#40445).\n  [daniele]\n\n- Refactor booking delete machinery and remove unused token.\n  [cekk]\n\n- Add DELETE endpoint for booking.\n  [cekk]\n\n- Add new field that allows to override week schedule for a certain date range.\n  [cekk]\n\n- Send iCal attachment on approved or moved booking.\n  [cekk]\n\n1.7.1 (2023-03-28)\n------------------\n\n- Add plone5 profile to setup.\n  [foxtrot-dfm1]\n\n\n1.7.0 (2023-03-24)\n------------------\n\n- Remove sort order on week-legend table (#33584).\n  [foxtrot-dfm1]\n- RestAPI endpoint to have available week slots.\n  [foxtrot-dfm1]\n\n- Plone 6 support\n  [mamico]\n\n\n1.6.5 (2023-02-06)\n------------------\n\n- Fix the upgrade step of release 1.6.4\n  [foxtrot-dfm1]\n\n1.6.4 (2023-02-06)\n------------------\n\n- Fix the upgrade step of release 1.6.1\n  [foxtrot-dfm1]\n\n\n1.6.3 (2023-02-01)\n------------------\n\n- Fix cookies encoding\n  [foxtrot-dfm1]\n\n\n1.6.2 (2023-01-30)\n------------------\n\n- Handle prenotation type passed by url.\n  [foxtrot-dfm1]\n\n\n1.6.1 (2023-01-11)\n------------------\n\n- Handle confirmed state instead of published.\n  [cekk]\n\n\n1.6.0 (2023-01-10)\n------------------\n\n- The workflow state 'public' of prenotazioni_workflow was renamed to 'confirmed'\n  [foxtrot-dfm1]\n- Show review state column of prenotations (#37119)\n  [foxtrot-dfm1]\n\n1.5.7 (2022-12-29)\n------------------\n\n- updated mail sent to the final user to show report with delete option for accepted booking.\n  [daniele]\n\n1.5.6 (2022-12-06)\n------------------\n\n- fix: now handle differente dst in prenotazione_add booking_date.\n  [cekk]\n\n\n1.5.5 (2022-12-06)\n------------------\n\nfix: booking hour.\n  [cekk]\n\n1.5.4 (2022-12-06)\n------------------\n\n- fix: show actual booking hour un prenotazione_add view.\n  [cekk]\n\n\n1.5.3 (2022-12-06)\n------------------\n\n- chore: updated time label of booking add view\n  [sara]\n\n\n1.5.2 (2022-11-30)\n------------------\n\n- fix: export all visible fields in the ods report.\n  [cekk]\n\n\n1.5.1 (2022-11-16)\n------------------\n\n- fix: fixed booking labels [sara]\n\n\n1.5.0 (2022-11-14)\n------------------\n\n- [BREAKING CHANGE] Remove recaptcha dependency and use collective.honeypot. UNINSTALL plone.formwidget.recaptcha before upgrading to this version.\n  [cekk]\n\n\n1.4.4 (2022-09-30)\n------------------\n\n- Fix upgrade-step.\n  [cekk]\n\n\n1.4.3 (2022-08-01)\n------------------\n\n- Add caching profile and enable it on install.\n  [cekk]\n\n\n1.4.2 (2022-05-22)\n------------------\n\n- Disable check_valid_fiscalcode constraint.\n  [cekk]\n\n\n1.4.1 (2022-05-04)\n------------------\n\n- Standardize fields between schema and creation form.\n  [cekk]\n- Improve extensibility of add form and required fields.\n  [cekk]\n- Handle (do not broke) non existent fiscalcode member field.\n  [cekk]\n\n1.4.0 (2022-01-13)\n------------------\n\n- Better manage fiscalcode.\n  [cekk]\n- Add github actions for code quality and fix black/zpretty/flake8 linting.\n  [cekk]\n\n1.3.5 (2021-10-15)\n------------------\n\n- [new] Added field \"Note prenotante\" e \"Note del personale\" inside the\n  exported .ods file.\n  [arsenico13]\n\n\n1.3.4 (2021-09-08)\n------------------\n\n- [chg] only editor/manager can view booking data\n  [mamico]\n- [fix] fix check title on vacation booking\n  [eikichi18]\n\n\n1.3.3 (2021-08-09)\n------------------\n\n- [chg] autofill data from user context\n  [mamico]\n\n\n1.3.2 (2021-06-17)\n------------------\n\n- Prevented booking without gate\n  [eikichi18]\n\n\n1.3.1 (2021-06-14)\n------------------\n\n- Booking tipology as required\n  [eikichi18]\n\n\n1.3.0 (2021-06-07)\n------------------\n\n- [fix] translations\n  [nzambello]\n- [chg] prenotazioni slot as required\n  [nzambello]\n- [fix] slot prenotazione search button\n  [nzambello]\n\n\n1.2.0 (2021-05-31)\n------------------\n\n- [fix] handle reservation move without any gate set\n  [cekk]\n- [new] dependency with collective.z3cform.datagridfield>=2.0\n  [cekk]\n\n1.1.8 (2021-05-27)\n------------------\n\n- [fix] project urls in setup.py\n\n\n1.1.7 (2021-05-27)\n------------------\n\n- [fix] changelog syntax\n- [chg] project urls in setup.py\n\n\n1.1.6 (2021-04-26)\n------------------\n\n- [fix] fix reservation download. ods writer can't cast none to empty string\n\n\n1.1.5 (2021-04-26)\n------------------\n\n- [fix] force gate on authenticated reservation\n- [fix] fix slot dimension in case of confirmed reservation\n- [fix] Reindex subject on move\n- [fix] download reservation after search give error calculating review_state\n\n\n1.1.4 (2021-03-10)\n------------------\n\n- [fix] fix translations\n- [chg] change prenotazioni search adding phone number and removing state\n- [fix] fix problem with sending mail if mail not compiled\n- [fix] allow to not use not required fields\n  [lucabel]\n\n1.1.3 (2021-02-22)\n------------------\n\n- [fix] fix search reservation accessing by gate icon\n\n\n1.1.2 (2021-02-22)\n------------------\n\n- [chg] change 'sportello' label with 'postazione'\n- [fix] now we can handle more gates and layout is safe\n- [fix] fix insufficient permission deleting reservation\n- [fix] pauses are spread over more gate if more gate are available\n- [fix] hide \"download\" link in search reservation print\n\n\n1.1.1 (2021-02-19)\n------------------\n\n- [chg] tuning permission to allow reader to see everything\n- [chg] tuning css for mobile\n- [new] add pause to prenotazioni folder\n- [chg] add some accessibility to prenotazioni folder\n- [new] add logic to delete reservation using a link sendable by mail\n\n1.1.0 (2020-12-15)\n------------------\n\n- feat: tooltip on add button\n  [nzambello]\n\n\n1.0.3 (2020-12-10)\n------------------\n\n- Fix return url when click Cancel button.\n  [cekk]\n\n\n1.0.2 (2020-12-09)\n------------------\n\n- Changed fields order for prenotazione ct.\n  [daniele]\n\n1.0.1 (2020-12-09)\n------------------\n\n- Added logic to generate booking code on the fly.\n  This code is calculated on the basis of the booking date and time.\n  [daniele]\n- Add new stringinterp for prenotazione print url and update contentrules.\n  [cekk]\n- Added fiscal code field to required fields. Added widget for visible fields.\n  Updated views and templates.\n  [daniele]\n\n1.0.0 (2020-11-23)\n------------------\n\n- Initial release.\n  [cekk]",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "An add-on for Plone",
    "version": "2.6.5",
    "project_urls": {
        "Homepage": "https://github.com/redturtle/redturtle.prenotazioni",
        "PyPI": "https://pypi.org/project/redturtle.prenotazioni",
        "Source": "https://github.com/redturtle/redturtle.prenotazioni",
        "Tracker": "https://github.com/redturtle/redturtle.prenotazioni/issues"
    },
    "split_keywords": [
        "python",
        "plone"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d8c89e76947c1f03e34e923a09f9c7fe81de06a4c126c76a0ff25212ec24ed7d",
                "md5": "794b351cada60bd4ecd04129794c1c30",
                "sha256": "990763f93c529f8ccb19cbf19434a03bb90e8a03fa0f125ad5f2b783e704c759"
            },
            "downloads": -1,
            "filename": "redturtle.prenotazioni-2.6.5.tar.gz",
            "has_sig": false,
            "md5_digest": "794b351cada60bd4ecd04129794c1c30",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 352474,
            "upload_time": "2024-04-24T08:56:52",
            "upload_time_iso_8601": "2024-04-24T08:56:52.870171Z",
            "url": "https://files.pythonhosted.org/packages/d8/c8/9e76947c1f03e34e923a09f9c7fe81de06a4c126c76a0ff25212ec24ed7d/redturtle.prenotazioni-2.6.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-24 08:56:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "redturtle",
    "github_project": "redturtle.prenotazioni",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "redturtle.prenotazioni"
}
        
Elapsed time: 0.23765s