- Fix spacing on so me alerts

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-01-17 00:19:51 -05:00
parent c2d6c980ed
commit 69791a3cdd
3 changed files with 49 additions and 42 deletions

View File

@@ -37,7 +37,6 @@ export function ScheduleCalendarHeaderComponent({
events, events,
...otherProps ...otherProps
}) { }) {
console.log(`ScheduleCalendarHeaderComponent: ${label} Calculating: ${calculating}`)
const ATSToday = useMemo(() => { const ATSToday = useMemo(() => {
if (!events) return []; if (!events) return [];
return _.groupBy( return _.groupBy(

View File

@@ -11,7 +11,7 @@ import HeaderComponent from "./schedule-calendar-header.component";
import "./schedule-calendar.styles.scss"; import "./schedule-calendar.styles.scss";
import JobDetailCards from "../job-detail-cards/job-detail-cards.component"; import JobDetailCards from "../job-detail-cards/job-detail-cards.component";
import { selectProblemJobs } from "../../redux/application/application.selectors"; import { selectProblemJobs } from "../../redux/application/application.selectors";
import { Alert, Collapse } from "antd"; import {Alert, Collapse, Space} from "antd";
import { useTranslation, Trans } from "react-i18next"; import { useTranslation, Trans } from "react-i18next";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
@@ -55,14 +55,16 @@ export function ScheduleCalendarWrapperComponent({
<> <>
<JobDetailCards /> <JobDetailCards />
{problemJobs && problemJobs.length > 2 ? ( {problemJobs && problemJobs.length > 2 ? (
<Collapse> <Collapse style={{marginBottom: '5px'}}>
<Collapse.Panel <Collapse.Panel
key="1"
header={ header={
<span style={{ color: "tomato" }}> <span style={{ color: "tomato" }}>
{t("appointments.labels.severalerrorsfound")} {t("appointments.labels.severalerrorsfound")}
</span> </span>
} }
> >
<Space direction="vertical" style={{ width: '100%' }}>
{problemJobs.map((problem) => ( {problemJobs.map((problem) => (
<Alert <Alert
key={problem.id} key={problem.id}
@@ -84,9 +86,13 @@ export function ScheduleCalendarWrapperComponent({
} }
/> />
))} ))}
</Space>
</Collapse.Panel> </Collapse.Panel>
</Collapse> </Collapse>
) : ( ) : (
<Space direction="vertical" style={{ width: '100%', marginBottom: '5px' }}>
{
problemJobs.map((problem) => ( problemJobs.map((problem) => (
<Alert <Alert
key={problem.id} key={problem.id}
@@ -105,6 +111,8 @@ export function ScheduleCalendarWrapperComponent({
} }
/> />
)) ))
}
</Space>
)} )}
<Calendar <Calendar