Metadata-Version: 2.1
Name: design.plone.ioprenoto
Version: 1.1.6
Summary: An add-on for Plone
Home-page: https://github.com/RedTurtle/design.plone.ioprenoto
Author: RedTurtle
Author-email: info@redturtle.it
License: GPL version 2
Project-URL: PyPI, https://pypi.org/project/design.plone.ioprenoto/
Project-URL: Source, https://github.com/RedTurtle/design.plone.ioprenoto
Project-URL: Tracker, https://github.com/RedTurtle/design.plone.ioprenoto/issues
Keywords: Python Plone CMS
Classifier: Environment :: Web Environment
Classifier: Framework :: Plone
Classifier: Framework :: Plone :: Addon
Classifier: Framework :: Plone :: 6.0
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: >=3.7
License-File: LICENSE.GPL
License-File: LICENSE.rst
Requires-Dist: setuptools
Requires-Dist: z3c.jbot
Requires-Dist: plone.api >=1.8.4
Requires-Dist: plone.app.dexterity
Requires-Dist: redturtle.prenotazioni >=2.0.0.rc2
Requires-Dist: design.plone.policy
Provides-Extra: test
Requires-Dist: plone.app.testing ; extra == 'test'
Requires-Dist: plone.testing >=5.0.0 ; extra == 'test'
Requires-Dist: plone.app.contenttypes ; extra == 'test'
Requires-Dist: plone.app.robotframework[debug] ; extra == 'test'
Requires-Dist: collective.MockMailHost ; extra == 'test'
Requires-Dist: redturtle.prenotazioni[test] ; extra == 'test'
Requires-Dist: design.plone.policy[test] ; extra == 'test'


.. image:: https://img.shields.io/pypi/v/design.plone.ioprenoto.svg
    :target: https://pypi.org/project/design.plone.ioprenoto/
    :alt: Latest Version

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

.. image:: https://img.shields.io/pypi/dm/design.plone.ioprenoto.svg
    :target: https://pypi.org/project/design.plone.ioprenoto/
    :alt: Number of PyPI downloads

.. image:: https://img.shields.io/pypi/l/design.plone.ioprenoto.svg
    :target: https://pypi.org/project/design.plone.ioprenoto/
    :alt: License

.. image:: https://github.com/RedTurtle/design.plone.ioprenoto/actions/workflows/tests.yml/badge.svg
    :target: https://github.com/RedTurtle/design.plone.ioprenoto/actions
    :alt: Tests

.. image:: https://coveralls.io/repos/github/RedTurtle/design.plone.ioprenoto/badge.svg?branch=master
    :target: https://coveralls.io/github/RedTurtle/design.plone.ioprenoto?branch=master
    :alt: Coverage

=======================
Design Plone Io-Prenoto
=======================

This product is designed to integrate `redturtle.prenotazioni` package with `design.plone.contenttypes`

PrenotazioniFolder additional fields
====================================

There is a behavior that adds some additional fields:

- Uffici correlati
- Orario di apertura

Rest API
========

Servizio serializer
-------------------

There is a customization of Servizio serializer that adds an additional field:

- `referenced_by_prenotazioni_folder` which idicates if it has backreferences to PrenotazioniFolder 
  (design.plone.ioprenoto) throught correlated UO (with "Uffici correlati" field)

PrenotazioniFolder serializer
-----------------------------

There is a customization of PrenotazioniFolder serializer that redirects to '/prenotazione-appuntamenti-uffici'
if the user has not `design.plone.ioprenoto.ManagePrenotazioni`.

@bookable-uo-list
-----------------

Endpoint that returns a list of *UnitaOrganizzativa* contents that have at least one PrenotazioniFolder that 
relates to it (with "Uffici correlati" field).

Parameters:

- **uid**: The uid of a Servizio.

The endpoint can be called with a GET request::

   curl -i http://localhost:8080/Plone/@bookable-uo-list -H 'Accept: application/json'

Response::

    {
        "@id": "http://localhost:8080/Plone/@bookable-uo-list",
        "items": [
          {
            "@id": "...",
            "title": "...",
            "id": "...",
            "prenotazioni_folder": [
              {
                "@id": "http://localhost:8080/Plone/prenotazioni-folder",
                "address": {
                  "@id": "http://localhost:8080/Plone/a-venue",
                  "@type": "Venue",
                  "city": "Ferrara",
                  "geolocation": {
                    "latitude": 1111,
                    "longitude": 2222,
                  },
                  ...
                }
              }
            ],
          }
        ]
    }

If uid parameter is passed, only UnitaOrganizzative related to that Servizio (with *canale_fisico* relation field) will be returned.

@bookable-list
--------------

Endpoint that returns a list of *Bookable*.

The endpoint can be called with a GET request::

   curl -i http://localhost:8080/Plone/@bookable-list -H 'Accept: application/json'

Response::

    {
        "@id": "http://localhost:8080/Plone/@bookable-list",
        "items": [
          {
            "@id": "...",
            "title": "...",
            "url": "...",
            "booking_types": [],
          }
        ]
    }


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

Install design.plone.ioprenoto by adding it to your buildout::

    [buildout]

    ...

    eggs =
        design.plone.ioprenoto


and then running `bin/buildout`

Contribute
==========

- Issue Tracker: https://github.com/RedTurtle/design.plone.ioprenoto/issues
- Source Code: https://github.com/RedTurtle/design.plone.ioprenoto


Notes
=====

**design.plone.ioprenoto** has been tested with Plone 6 and works with Python 3.

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
============

- RedTurtle, info@redturtle.it


Changelog
=========

1.1.6 (2023-09-22)
------------------

- Fix @bookings overrides
  [mamico]

1.1.5 (2023-09-05)
------------------

- Move redirect for anonymous in the frontend
  [mamico]


1.1.4 (2023-08-31)
------------------

- Fixed the manager message stringinterp adapter.
  [folix-01]


1.1.3 (2023-08-11)
------------------

- Fix bad stringinterp adapter definition.
  [folix-01]
- Remove "description" field to customizable PrenotazioniFolder fields.
  [cekk]
- Customize @booking-schema endpoint to set *description* as always required.
  [cekk]
- Url operator
  [mamico]

1.1.2 (2023-07-25)
------------------

- Fix redireect url for anonymous
  [mamico]

- Changed label 'uffici correalti'
  [mamico]

1.1.1 (2023-07-07)
------------------

- fix booking_url in @bookings
  [mamico]

1.1.0 (2023-06-30)
------------------

- Move message to contentrule in iocittadino
  [mamico]

- Handle custom frontend_domain in notification urls (to fix the /admin problem).
  [cekk]

- Fix permission management in PrenotazioniFolder serializer.
  [cekk]

1.0.10 (2023-06-20)
-------------------

- Fix the prentazione created message.
  [folix-01]


1.0.9 (2023-06-19)
------------------

- Fix the prentazione link in the message.
  [folix-01]


1.0.8 (2023-06-19)
------------------

- Edit prenotazione creation message.
  [folix-01]


1.0.7 (2023-06-16)
------------------

- Add title to message created on prenotazione creation(#42314).
  [folix-01]

1.0.6 (2023-06-16)
------------------

- On message creation use `sent` state.
  [folix-01]


1.0.5 (2023-06-16)
------------------

- Add message on Prenotazione creation (#42314).
  [folix-01]


1.0.4 (2023-06-14)
------------------

- Overrides @bookings for booking urls
  [mamico]


1.0.3 (2023-06-13)
------------------

- typo "corellati" vs. "correlati" (+ i18n)
  [mamico]


1.0.2 (2023-06-12)
------------------

- Fix uo-bookable-list esporta solo le stanze pubbliche
  [mamico]

- Customize some stringinterp adapters to use io-comune frontend view.
  [cekk]

1.0.1 (2023-04-06)
------------------

- Fix CI struments configs.
  [foxtrot-dfm1]


1.0.0 (2023-04-06)
------------------

- Initial release.
  [RedTurtle]
