fix: Исправлены ошибки в формах и запросах данных
This commit is contained in:
parent
ac70c09509
commit
90f3ab8ab1
@ -228,10 +228,9 @@ const AppointmentFormModal = () => {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const ConfirmStep = useMemo(() => {
|
const ConfirmStep = useMemo(() => {
|
||||||
const values = appointmentFormModalUI.form.getFieldsValue();
|
|
||||||
const formValues = appointmentFormModalUI.formValues;
|
const formValues = appointmentFormModalUI.formValues;
|
||||||
const patient = appointmentFormModalData.patients.find((p) => p.id === values.patient_id);
|
const patient = appointmentFormModalData.patients.find((p) => p.id === formValues.patient_id);
|
||||||
const appointmentType = appointmentFormModalData.appointmentTypes.find((t) => t.id === values.type_id);
|
const appointmentType = appointmentFormModalData.appointmentTypes.find((t) => t.id === formValues.type_id);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={appointmentFormModalUI.blockStepStyle}>
|
<div style={appointmentFormModalUI.blockStepStyle}>
|
||||||
@ -244,10 +243,10 @@ const AppointmentFormModal = () => {
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>Время приема:</b>{" "}
|
<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>
|
||||||
<p>
|
<p>
|
||||||
<b>Дней до следующего приема:</b> {values.days_until_the_next_appointment || "Не указано"}
|
<b>Дней до следующего приема:</b> {formValues.days_until_the_next_appointment || "Не указано"}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>Результаты приема:</b>
|
<b>Результаты приема:</b>
|
||||||
|
|||||||
@ -274,7 +274,7 @@ const useAppointmentFormModalUI = (createAppointment, patients, cancelAppointmen
|
|||||||
} else if (currentStep === 1) {
|
} else if (currentStep === 1) {
|
||||||
try {
|
try {
|
||||||
const values = await form.validateFields();
|
const values = await form.validateFields();
|
||||||
setFormValues(values);
|
setFormValues({...values, patient_id: selectedPatient.id});
|
||||||
setCurrentStep(2);
|
setCurrentStep(2);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notification.error({
|
notification.error({
|
||||||
|
|||||||
@ -70,6 +70,7 @@ const MailingPage = () => {
|
|||||||
value={searchQuery}
|
value={searchQuery}
|
||||||
onChange={handleSearchChange}
|
onChange={handleSearchChange}
|
||||||
style={{ marginBottom: 16, width: isMobile ? "100%" : 300 }}
|
style={{ marginBottom: 16, width: isMobile ? "100%" : 300 }}
|
||||||
|
allowClear
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
rowSelection={{
|
rowSelection={{
|
||||||
|
|||||||
@ -29,7 +29,7 @@ const useProfilePage = () => {
|
|||||||
error: sessionsError,
|
error: sessionsError,
|
||||||
} = useGetSessionsQuery(undefined, {
|
} = useGetSessionsQuery(undefined, {
|
||||||
skip: !user,
|
skip: !user,
|
||||||
pollingInterval: 20000,
|
pollingInterval: 5000,
|
||||||
});
|
});
|
||||||
|
|
||||||
const [logoutSession, {isLoading: isLoggingOutSession}] = useLogoutSessionMutation();
|
const [logoutSession, {isLoading: isLoggingOutSession}] = useLogoutSessionMutation();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user