Reworked form, deleted "full_name_kafedra"
This commit is contained in:
parent
66eae00518
commit
7575047b52
11
main.py
11
main.py
|
@ -218,14 +218,6 @@ async def process_org_job(message: types.Message, state: FSMContext):
|
||||||
async with state.proxy() as data:
|
async with state.proxy() as data:
|
||||||
data['org_job'] = message.text.capitalize()
|
data['org_job'] = message.text.capitalize()
|
||||||
|
|
||||||
await DocFormStates.full_name_kafedra.set()
|
|
||||||
await message.answer("Введите ФИО руководителя практики от кафедры, например: <b>Иванов Иван Иванович</b>", parse_mode='HTML')
|
|
||||||
|
|
||||||
@dp.message_handler(state=DocFormStates.full_name_kafedra)
|
|
||||||
async def process_full_name_kafedra(message: types.Message, state: FSMContext):
|
|
||||||
async with state.proxy() as data:
|
|
||||||
data['full_name_kafedra'] = message.text
|
|
||||||
|
|
||||||
|
|
||||||
await fill_document(
|
await fill_document(
|
||||||
template_path='templates/Заявление_на_практику.docx',
|
template_path='templates/Заявление_на_практику.docx',
|
||||||
|
@ -239,7 +231,6 @@ async def process_full_name_kafedra(message: types.Message, state: FSMContext):
|
||||||
org_phone=data['org_phone'],
|
org_phone=data['org_phone'],
|
||||||
full_name_org=data['full_name_org'],
|
full_name_org=data['full_name_org'],
|
||||||
org_job=data['org_job'].capitalize(),
|
org_job=data['org_job'].capitalize(),
|
||||||
full_name_kafedra=data['full_name_kafedra'],
|
|
||||||
f_initial=format_fio(data['full_name']),
|
f_initial=format_fio(data['full_name']),
|
||||||
message=message
|
message=message
|
||||||
)
|
)
|
||||||
|
@ -464,7 +455,6 @@ async def fill_document(
|
||||||
org_phone,
|
org_phone,
|
||||||
full_name_org,
|
full_name_org,
|
||||||
org_job,
|
org_job,
|
||||||
full_name_kafedra,
|
|
||||||
f_initial,
|
f_initial,
|
||||||
message
|
message
|
||||||
):
|
):
|
||||||
|
@ -485,7 +475,6 @@ async def fill_document(
|
||||||
replace_text(doc, "{{ORG_PHONE}}", org_phone)
|
replace_text(doc, "{{ORG_PHONE}}", org_phone)
|
||||||
replace_text(doc, "{{FULL_NAME_ORG}}", full_name_org, underline=True)
|
replace_text(doc, "{{FULL_NAME_ORG}}", full_name_org, underline=True)
|
||||||
replace_text(doc, "{{ORG_JOB}}", org_job, underline=True)
|
replace_text(doc, "{{ORG_JOB}}", org_job, underline=True)
|
||||||
replace_text(doc, "{{FULL_NAME_KAFEDRA}}", full_name_kafedra, underline=True)
|
|
||||||
replace_text(doc, "{{TODAY_DATE}}", datetime.now().strftime('«%d» %m %Y'), space=False)
|
replace_text(doc, "{{TODAY_DATE}}", datetime.now().strftime('«%d» %m %Y'), space=False)
|
||||||
replace_text(doc, "{{INITIALS_STUD}}", f_initial, space=False)
|
replace_text(doc, "{{INITIALS_STUD}}", f_initial, space=False)
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue