fix: Исправлены ошибки в формах и запросах данных

This commit is contained in:
Андрей Дувакин 2025-07-04 09:28:46 +05:00
parent ac70c09509
commit 90f3ab8ab1
4 changed files with 7 additions and 7 deletions

View File

@ -228,10 +228,9 @@ const AppointmentFormModal = () => {
]);
const ConfirmStep = useMemo(() => {
const values = appointmentFormModalUI.form.getFieldsValue();
const formValues = appointmentFormModalUI.formValues;
const patient = appointmentFormModalData.patients.find((p) => p.id === values.patient_id);
const appointmentType = appointmentFormModalData.appointmentTypes.find((t) => t.id === values.type_id);
const patient = appointmentFormModalData.patients.find((p) => p.id === formValues.patient_id);
const appointmentType = appointmentFormModalData.appointmentTypes.find((t) => t.id === formValues.type_id);
return (
<div style={appointmentFormModalUI.blockStepStyle}>
@ -244,10 +243,10 @@ const AppointmentFormModal = () => {
</p>
<p>
<b>Время приема:</b>{" "}
{values.appointment_datetime ? dayjs(values.appointment_datetime).format("DD.MM.YYYY HH:mm") : "Не указано"}
{formValues.appointment_datetime ? dayjs(formValues.appointment_datetime).format("DD.MM.YYYY HH:mm") : "Не указано"}
</p>
<p>
<b>Дней до следующего приема:</b> {values.days_until_the_next_appointment || "Не указано"}
<b>Дней до следующего приема:</b> {formValues.days_until_the_next_appointment || "Не указано"}
</p>
<p>
<b>Результаты приема:</b>

View File

@ -274,7 +274,7 @@ const useAppointmentFormModalUI = (createAppointment, patients, cancelAppointmen
} else if (currentStep === 1) {
try {
const values = await form.validateFields();
setFormValues(values);
setFormValues({...values, patient_id: selectedPatient.id});
setCurrentStep(2);
} catch (error) {
notification.error({

View File

@ -70,6 +70,7 @@ const MailingPage = () => {
value={searchQuery}
onChange={handleSearchChange}
style={{ marginBottom: 16, width: isMobile ? "100%" : 300 }}
allowClear
/>
<Table
rowSelection={{

View File

@ -29,7 +29,7 @@ const useProfilePage = () => {
error: sessionsError,
} = useGetSessionsQuery(undefined, {
skip: !user,
pollingInterval: 20000,
pollingInterval: 5000,
});
const [logoutSession, {isLoading: isLoggingOutSession}] = useLogoutSessionMutation();