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

Feature/out of office #311

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from

Conversation

YairEn
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

@codecov-io
Copy link

codecov-io commented Feb 16, 2021

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'?

@ivarshav
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

app/internal/event.py Show resolved Hide resolved
app/internal/out_of_office.py Outdated Show resolved Hide resolved
@@ -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

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?

app/internal/out_of_office.py Outdated Show resolved Hide resolved
app/internal/out_of_office.py Outdated Show resolved Hide resolved
app/internal/out_of_office.py Show resolved Hide resolved
app/routers/profile.py Outdated Show resolved Hide resolved
activate_out_of_office = '1'
user = session.query(User).filter_by(id=1).first()

# TODO: Check if the user exist
Copy link
Contributor

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.

app/routers/profile.py Outdated Show resolved Hide resolved
app/routers/profile.py Outdated Show resolved Hide resolved
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