Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature/out of office #311

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

Open
YairEn wants to merge 24 commits into PythonFreeCourse:develop
base: develop
Choose a base branch
Loading
from YairEn:feature/out-of-office

Conversation

Copy link
Contributor

@YairEn YairEn commented Feb 16, 2021

Hey,
This feature allow the users to set "Out of office"

  • Added new button at profile page to get an out of office modal
  • The out of office users will appear after create new events
  • If the user forgot to disable the out of office feature than it will off automatically if the date is pass

YairEn added 15 commits February 3, 2021 20:31
Add js file to handle the radio box
Add route to profile.py
Add modal to profile.html
Add run main for pycharm
and add out of office logic
add out of office to event.py
Copy link

codecov-io commented Feb 16, 2021
edited
Loading

Codecov Report

Merging #311 (3413899) into develop (cff596e) will decrease coverage by 4.44%.
The diff coverage is 84.46%.

Impacted file tree graph

@@ Coverage Diff @@
## develop #311 +/- ##
===========================================
- Coverage 98.77% 94.32% -4.45% 
===========================================
 Files 64 77 +13 
 Lines 2849 3417 +568 
===========================================
+ Hits 2814 3223 +409 
- Misses 35 194 +159 
Impacted Files Coverage Δ
app/database/alembic/env.py 0.00% <0.00%> (ø)
app/internal/celebrity.py 100.00% <ø> (ø)
app/internal/audio.py 28.94% <28.94%> (ø)
app/routers/audio.py 43.90% <43.90%> (ø)
app/internal/out_of_office.py 57.57% <57.57%> (ø)
app/routers/user.py 80.00% <57.89%> (-11.12%) ⬇️
app/routers/profile.py 85.15% <67.64%> (-7.58%) ⬇️
app/internal/event.py 89.65% <72.72%> (-10.35%) ⬇️
app/routers/weight.py 81.57% <81.57%> (ø)
app/internal/utils.py 96.55% <85.71%> (-3.45%) ⬇️
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cff596e...3413899. Read the comment docs.


def update_out_of_office(out_of_office_data_from_req,
out_of_office_data_from_db):
activate_out_of_office = '1'
Copy link
Contributor

Choose a reason for hiding this comment

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

please add TODO

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Explain, please :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe could you please explain this line? why you set always '1'?

Copy link
Contributor

Great job!

Copy link
Contributor

@PureDreamer PureDreamer left a comment

Choose a reason for hiding this comment

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

Very nice work overall

@@ -73,7 +73,8 @@ def find_pattern(session, event):

def get_messages(session: Session,
event: Event,
uninvited_contacts: Set[str]) -> List[str]:
uninvited_contacts: Set[str],
out_of_office_users: List[Tuple[str, str]]) -> List[str]:
Copy link
Contributor

@PureDreamer PureDreamer Feb 20, 2021

Choose a reason for hiding this comment

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

could it be none?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what did you mean?

activate_out_of_office = '1'
user = session.query(User).filter_by(id=1).first()

# TODO: Check if the user exist
Copy link
Contributor

@PureDreamer PureDreamer Feb 20, 2021

Choose a reason for hiding this comment

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

you could check it with an existing function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
2 more reviewers

@ivarshav ivarshav ivarshav left review comments

@PureDreamer PureDreamer PureDreamer left review comments

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /