def index(page=1): search = SearchSessionService('business_category', request.args) search.save() form = BusinessCategorySearchForm(search.get_dict()) pagination = service.find(page, form.business_category_name.data) return render_template('master/business_category/index.html', pagination=pagination, form=form)
def index(page=1): search = SearchSessionService('user', request.args) search.save() form = UserSearchForm(search.get_dict()) pagination = service.find(page, form.user_name.data, form.shain_number.data) return render_template('master/user/index.html', pagination=pagination, form=form)
def index(page=1): search = SearchSessionService('department', request.args) search.save() form = DepartmentSearchForm(search.get_dict()) pagination = service.find(page, form.group_name.data, form.department_name.data) return render_template('master/department/index.html', pagination=pagination, form=form)
def index(page=1): search = SearchSessionService('bank', request.args) search.save() form = BankSearchForm(search.get_dict()) pagination = service.find(page, form.bank_name.data, form.text_for_document.data) return render_template('master/bank/index.html', pagination=pagination, form=form)
def index(page=1): search = SearchSessionService('company', request.args) search.save() form = CompanySearchForm(search.get_dict()) form.client_flag_id.choices = ClientFlag.get_flag_for_multi_select() form.bank_id.choices = bank_service.find_all_for_multi_select() pagination = service.find(page, form.company_name.data, form.client_flag_id.data, form.bank_id.data) return render_template('master/company/index.html', pagination=pagination, form=form)
def index(page=1): search = SearchSessionService('holiday', request.args) search.save() form = HolidaySearchForm(search.get_dict()) _save_holidays_when_no_data() pagination = service.find_by_year(form.year.data, page) return render_template('master/holiday/index.html', pagination=pagination, form=form)
def index(page=1): search = SearchSessionService('engineer', request.args) search.save() form = EngineerSearchForm(search.get_dict()) form.company_id.choices = company_service.find_for_select_with_subtext_by_client_flag_id( [ClientFlag.our_company.value, ClientFlag.bp.value]) form.skill_id.choices = skill_service.find_all_for_multi_select() form.business_category_id.choices = business_category_service.find_all_for_multi_select( ) pagination = service.find(page, form.engineer_name.data, form.company_id.data, form.contract_engineer_is_checked.data, form.skill_id.data, form.business_category_id.data) return render_template('master/engineer/index.html', pagination=pagination, form=form)
def index(page=1): search = SearchSessionService('search_payment', request.args) search.save() page_session_service = PageSessionService(bp.name + '.index') page_session_service.save() form = SearchPaymentForm(search.get_dict()) form.client_company_id.choices = company_service.find_for_multi_select_with_subtext_by_client_flag_id( [ClientFlag.client.value]) form.end_user_company_id.choices = company_service.find_for_multi_select_with_subtext_by_client_flag_id( [ClientFlag.end_user.value]) form.recorded_department_id.choices = department_service.find_all_for_multi_select( ) pagination = service.find_by_payment( page, form.project_name.data, form.estimation_no.data, form.input_flag.data, form.end_user_company_id.data, form.client_company_id.data, form.recorded_department_id.data, form.engineer_name.data, form.payment_expected_date_from.data, form.payment_expected_date_to.data) return render_template('search/payment.html', pagination=pagination, form=form)
def index(page=1): search = SearchSessionService('project', request.args) search.save() page_session_service = PageSessionService(bp.name + '.index') page_session_service.save() form = ProjectSearchForm(search.get_dict()) form.client_company_id.choices = company_service.find_for_multi_select_with_subtext_by_client_flag_id( [ClientFlag.client.value]) form.end_user_company_id.choices = company_service.find_for_multi_select_with_subtext_by_client_flag_id( [ClientFlag.end_user.value]) form.recorded_department_id.choices = department_service.find_all_for_multi_select( ) pagination = service.find(page, form.project_name.data, form.estimation_no.data, form.status.data, form.end_user_company_id.data, form.client_company_id.data, form.recorded_department_id.data, form.start_date.data, form.end_date.data) return render_template('project/index.html', pagination=pagination, form=form)
def test_get_dict(self): with app.test_request_context(): # testページで検索条件 excepted = ImmutableMultiDict({'test': 'test'}) search = SearchSessionService('test', excepted) # saveしていない場合は、get_dictでNoneが返却される self.assertIsNone(search.get_dict()) # saveすると、get_dictで保存した検索条件を取得できる。 search.save() self.assertEqual(search.get_dict(), excepted) # pageを変更すると、get_dictでNoneが返却される search = SearchSessionService('test2', excepted) search.save() self.assertEqual(search.get_dict(), excepted)
def index(page=1): search = SearchSessionService('skill', request.args) search.save() form = SkillSearchForm(search.get_dict()) pagination = service.find(page, form.skill_name.data) return render_template('master/skill/index.html', pagination=pagination, form=form)