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

Add hidden booking types #103

Merged
merged 19 commits into from
Oct 13, 2023
Merged

Add hidden booking types #103

merged 19 commits into from
Oct 13, 2023

Conversation

folix-01
Copy link
Member

@folix-01 folix-01 commented Oct 11, 2023

Here we are going to have a possibility to use the hidden booking types which can be used only by the operator side

Copy link
Contributor

@mamico mamico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manca ancora changelog e due righe di spiegazione della funzionalità nella pull request

@folix-01 folix-01 requested a review from mamico October 11, 2023 07:57
@folix-01
Copy link
Member Author

Manca ancora changelog e due righe di spiegazione della funzionalità nella pull request

Solved, thanks

Comment on lines 19 to 21
for index, type in enumerate(deepcopy(res.get("booking_types", {}))):
if type.get("hidden"):
del res["booking_types"][index]
Copy link
Contributor

@mamico mamico Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for index, type in enumerate(deepcopy(res.get("booking_types", {}))):
if type.get("hidden"):
del res["booking_types"][index]
if res.get("booking_types"):
res["booking_types"] = [
t for t in res["booking_types"] if not t.get("hidden")
]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved, thanks for suggestions

Copy link
Member Author

@folix-01 folix-01 Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, I could even commit the suggestion directly :D

@cekk
Copy link
Member

cekk commented Oct 12, 2023

@folix-01 fix tests please

@mamico mamico self-requested a review October 12, 2023 08:34
@folix-01
Copy link
Member Author

@folix-01 fix tests please

It seems to be the coverage run problems, re-runned all test jobs

@folix-01 folix-01 force-pushed the hidden_booking_types branch from 92ac6d5 to a6fd1b0 Compare October 12, 2023 13:04
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6496999025

  • 15 of 15 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 72.973%

Totals Coverage Status
Change from base Build 6482919104: 0.1%
Covered Lines: 2862
Relevant Lines: 3922

💛 - Coveralls

Copy link
Member

@cekk cekk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manca ancora la descrizione sul README

data["morning_end"] = "1000"
self.folder_prenotazioni.week_table = week_table

def test_hidden_type_is_not_shown(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qui farei due test a seconda del permesso che ha l'utente

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved

@folix-01 folix-01 changed the base branch from master to develop October 13, 2023 08:32
@folix-01 folix-01 requested a review from cekk October 13, 2023 08:32
@folix-01 folix-01 merged commit 6bb8b9a into develop Oct 13, 2023
9 of 10 checks passed
@folix-01 folix-01 deleted the hidden_booking_types branch October 17, 2023 09:20
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