def competency(comp_id: int): work_id = request.args.get('work', 0, type=int) work = get_work_info(work_id, load_comps=False) if work_id else None return render_template("competency.html", user=get_current_user(), competency=get_competency(comp_id), work=work)
def get_prof_comps(): form = request.form area_id = form.get('area_id', 0, type=int) update_prof = form.get('update_prof', False, type=bool) user_comps = get_current_user()['competencies'] found_comp_table = render_table(get_found_comps(), user_comps) if update_prof: return jsonify(found_comp_table=found_comp_table, prof_select=render_template_string( _option_template, professions=get_area_profs(area_id), disabled=area_id == 0)) else: return jsonify(found_comp_table=found_comp_table)
def best_workers(work_id: int): return render_template("best_workers.html", user=get_current_user(), best_workers=get_best_workers(work_id), work_id=work_id)
def manage_competencies(work_id: int): return render_template("manage_competencies.html", user=get_current_user(), work=get_work_info(work_id), professions=get_professions(), areas=get_areas())
def best_works(): user = get_current_user() return render_template("best_works.html", user=user, best_works=get_best_works(user['id']))
def demanded_competencies(): return render_template("demanded_competencies.html", user=get_current_user(), demanded_competencies=get_demanded_comps())
def add_work(): form = AddWorkForm() if form.validate_on_submit(): work_id = add_work_(get_current_user_id(), form.description.data, form.salary.data) return redirect('/work/%d' % work_id) return render_template('add_work.html', user=get_current_user(), form=form)
def change_competency(**kwargs): change_competency_func() return jsonify( table=render_table(get_comps(**kwargs), get_current_user()['competencies']))
def change_competency(): change_competency_func() found_comps = get_found_comps() user_comps = get_current_user()['competencies'] return jsonify(found_comp_table=render_table(found_comps, user_comps), user_comp_table=render_table(user_comps, None))
def manage_competencies(): return render_template("manage_competencies.html", user=get_current_user(), professions=get_professions(), areas=get_areas())
def index(): return render_template("index.html", user=get_current_user(), works=get_employer_works(get_current_user_id()))
def competency(comp_id: int): return render_template("competency.html", user=get_current_user(), competency=get_competency(comp_id))
def work(work_id: int): return render_template("work.html", user=get_current_user(), work=get_work_info(work_id))
def employer(employer_id: int): return render_template("employer.html", user=get_current_user(), employer=get_employer_info(employer_id), works=get_employer_works(employer_id))