Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Booking additional fields #216

Merged
merged 30 commits into from
Oct 9, 2024
Merged

Booking additional fields #216

merged 30 commits into from
Oct 9, 2024

Conversation

folix-01
Copy link
Member

@folix-01 folix-01 commented Aug 22, 2024

You can also create the addtional fields for your booking, you just need to compile
them in your PrenotazioneType.
And they will appear in the ["booking_types"]["booking_additional_fields_schema"]
in your booking schema so u can compile them for your booking in this way:

@folix-01 folix-01 requested a review from cekk August 22, 2024 14:42
@folix-01 folix-01 marked this pull request as draft August 22, 2024 14:46
@folix-01 folix-01 marked this pull request as ready for review August 22, 2024 14:49
@folix-01 folix-01 requested a review from mamico August 22, 2024 14:52
@coveralls
Copy link

coveralls commented Aug 22, 2024

Pull Request Test Coverage Report for Build 11069580854

Details

  • 93 of 95 (97.89%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 75.711%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/redturtle/prenotazioni/restapi/services/booking/update.py 37 39 94.87%
Totals Coverage Status
Change from base Build 10851958267: 0.5%
Covered Lines: 4102
Relevant Lines: 5418

💛 - Coveralls

@mamico
Copy link
Contributor

mamico commented Aug 22, 2024

README

You can also create the addtional fields for your booking, you just need to compile 
them in your PrenotazioneType.
And they will appear in the ["booking_types"]["booking_additional_fields_schema"] 
in your booking schema so u can compile them for your booking in this way:

@mamico
Copy link
Contributor

mamico commented Aug 22, 2024

How does the frontend know about the additional fields? By reading the typology object?

Alternatively, if you put the additional fields in the schema https://github.com/RedTurtle/redturtle.prenotazioni/blob/main/src/redturtle/prenotazioni/restapi/services/booking_schema/get.py the only change on the frontend would be to call the schema api with the chosen typology.

At that point even the writing API would have no changes on the frontend and it would be the backend that would save the additional fields to the correct field.

\cc @folix-01 @giuliaghisini

@folix-01 folix-01 self-assigned this Aug 26, 2024
@mamico
Copy link
Contributor

mamico commented Aug 26, 2024

@folix-01 added a test for patch method that fail with additional_fields 416f9b7

@folix-01
Copy link
Member Author

@folix-01 added a test for patch method that fail with additional_fields 416f9b7

Do we use the edit on ioprenoto?

@mamico
Copy link
Contributor

mamico commented Aug 26, 2024

@folix-01 added a test for patch method that fail with additional_fields 416f9b7

Do we use the edit on ioprenoto?

yep

cekk
cekk previously requested changes Aug 29, 2024
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
src/redturtle/prenotazioni/content/prenotazione.py Outdated Show resolved Hide resolved
@folix-01 folix-01 requested a review from cekk August 29, 2024 13:56
@folix-01 folix-01 dismissed cekk’s stale review August 30, 2024 09:07

all the problems had ben solved

@folix-01 folix-01 force-pushed the booking_additional_fields branch from 1b43690 to a89faa0 Compare September 27, 2024 11:12
@folix-01 folix-01 merged commit a89b95c into main Oct 9, 2024
18 checks passed
@folix-01 folix-01 deleted the booking_additional_fields branch October 9, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants