Ejemplo n.º 1
0
def amount_of_planned_days(request):
    context_extras = {}
    if request.user.id:
        context_extras["AMOUNT_OF_PLANNED_DAYS"] = PersonalDayWorkPlan.get_amount_of_unceasingly_planned_days(
            request.user, datetime.today().date()
        )
        context_extras["PLAN_IS_FULFILLED"] = context_extras["AMOUNT_OF_PLANNED_DAYS"] >= 3
    return context_extras
Ejemplo n.º 2
0
def developer_work_time_evaluation(context, project, user, date):
    result = ''
    work_plan = PersonalDayWorkPlan.get_work_plan(user, date, date)
    if len(work_plan) > 0:
        result = '/' + str(work_plan[0].work_hours) + '/' + str(context['projects_per_user_amount'][user])
    return result