Exemplo n.º 1
0
def list_of_vacancies() -> list:
    vacancies = []
    for vacancy in table.find():
        a = vacancy.setdefault('vacancy description', None)
        if a is not None:
            vacancies.append(a)
    return vacancies
Exemplo n.º 2
0
def opened_vacancies() -> list:
    return [
        a.get('opened_vacancies')
        for a in table.find({'_id': ObjectId("5e408dfe5cd5be458777b9a7")})
    ][0]
Exemplo n.º 3
0
def get_list_of_columns() -> list:
    return [
        a.get('list_of_columns') for a in table.find({})
        if a.get('list_of_columns') is not None
    ][0]
Exemplo n.º 4
0
def show_selected_by_id_cvs(cv_id: ObjectId) -> str:
    output = ''
    for applicant in table.find({'_id': {'$eq': cv_id}}):
        data = support_prev_by_id(applicant)
        output = f'{output}\n {data}'
    return output
Exemplo n.º 5
0
def show_columns_of_vacancy(vacancy: str) -> list:
    dict_obj = ([
        a.keys() for a in table.find({'vacancy description': vacancy})
    ])
    return [a for a in dict_obj[0] if a != '_id']
Exemplo n.º 6
0
def show_selected_cvs(vacancy: str) -> str:
    output = ''
    for applicant in table.find({'vacancy': vacancy}):
        output = f'{output}\n {support_prev(applicant)}'
    return output
Exemplo n.º 7
0
def show_selected_vacancies(vacancy: str) -> list:
    return [a for a in table.find({'vacancy description': vacancy})]