Example #1
0
 def _clean(cls, user):
     DialogSearchManager(user_id=user.id).clean()
     SearchManager(user_id=user.id).clean()
     JobManager(user_id=user.id).clean()
     DialogJobManager(user_id=user.id).clean()
     DialogResumeManager(user_id=user.id).clean()
     ResumeManager(user_id=user.id).clean()
Example #2
0
    def send_categories(self, user, text):
        if user.profile == 1:
            JobManager(user_id=user.id).clean()
            dialog = DialogJobManager(user_id=user.id)
            dialog.clean()
            dialog.create()
        elif user.profile == 2:
            ResumeManager(user_id=user.id).clean()
            dialog = DialogResumeManager(user_id=user.id)
            dialog.clean()
            dialog.create()
        else:
            print(__name__, 'send cat')

        text = self.text.send_categories()

        if self.check_search_city(user=user):
            reply_markup = self.markup.send_categories(search=True)
        else:
            reply_markup = self.markup.send_categories()

        try:
            self.edit_message_text(text=text, reply_markup=reply_markup)
        except ApiException:
            self.send_message(text=text, reply_markup=reply_markup)
Example #3
0
    def work_moderation(self, text, user):
        ResumeManager(user_id=user.id).update_description(description=text)
        DialogResumeManager(user_id=user.id).clean()
        text = self.text.work_moderation()
        self.send_message(text=text)

        if hasattr(user, 'username') and user.username:
            name = user.username
        else:
            name = user.id

        return self.send_message(user_id=652287516,
                                 text=f'Появилося нове резюме\n{name}')
Example #4
0
    def send_sub_category(self, category, user):
        if user.profile == 1:
            JobManager(user_id=user.id).create(category=category)
            DialogJobManager(user_id=user.id).update_category()
        elif user.profile == 2:
            ResumeManager(user_id=user.id).create(category=category)
            DialogResumeManager(user_id=user.id).update_category()
        else:
            print(__name__, 'send sub cat')

        text = self.text.send_sub_category()

        if self.check_search_category(user=user):
            reply_markup = self.markup.send_sub_category(category, search=True)
        else:
            reply_markup = self.markup.send_sub_category(category)

        return self.edit_message_text(text=text, reply_markup=reply_markup)
Example #5
0
 def education(self, text, user):
     ResumeManager(user_id=user.id).update_experience(experience=text)
     DialogResumeManager(user_id=user.id).education()
     text = self.text.education()
     return self.send_message(text=text)
Example #6
0
 def lang(self, text, user):
     ResumeManager(user_id=user.id).update_city(city=text)
     DialogResumeManager(user_id=user.id).lang()
     text = self.text.lang()
     return self.send_message(text=text)
Example #7
0
 def age(self, text, user):
     ResumeManager(user_id=user.id).update_name(name=text)
     DialogResumeManager(user_id=user.id).age()
     text = self.text.age()
     return self.send_message(text=text)
Example #8
0
 def name(self, position, user):
     ResumeManager(user_id=user.id).update_position(position=position)
     DialogResumeManager(user_id=user.id).name()
     text = self.text.name()
     return self.send_message(text=text)
Example #9
0
 def check_work_experience(self, user):
     return DialogResumeManager(user_id=user.id).check_experience()
Example #10
0
 def check_lang(self, user):
     return DialogResumeManager(user_id=user.id).check_lang()
Example #11
0
 def work_experience(self, text, user):
     ResumeManager(user_id=user.id).update_lang(lang=text)
     DialogResumeManager(user_id=user.id).experience()
     text = self.text.work_experience()
     markup = self.markup.experience()
     return self.send_message(text=text, reply_markup=markup)
Example #12
0
 def check_education(self, user):
     return DialogResumeManager(user_id=user.id).check_education()
Example #13
0
 def work_description(self, text, user):
     ResumeManager(user_id=user.id).update_education(education=text)
     DialogResumeManager(user_id=user.id).description()
     text = self.text.work_description()
     return self.send_message(text=text)
Example #14
0
 def check_work_description(self, user):
     return DialogResumeManager(user_id=user.id).check_description()
Example #15
0
 def check_work_city(self, user):
     return DialogResumeManager(user_id=user.id).check_city()
Example #16
0
 def work_city(self, text, user):
     ResumeManager(user_id=user.id).update_age(age=text)
     DialogResumeManager(user_id=user.id).city()
     text = self.text.work_city()
     markup = self.markup.city()
     return self.send_message(text=text, reply_markup=markup)