Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: une nouvelle action créée depuis le CR aura comme data la date de démarrage du CR #1846

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { useLocalStorage } from '../../../services/useLocalStorage';
import { useRecoilValue } from 'recoil';
import { userState } from '../../../recoil/auth';

export const ActionsOrConsultations = ({ actions, consultations }) => {
export const ActionsOrConsultationsReport = ({ actions, consultations, period }) => {
const [activeTab, setActiveTab] = useLocalStorage('reports-actions-consultation-toggle', 'Actions');
const [fullScreen, setFullScreen] = useState(false);
const [filterStatus, setFilterStatus] = useState([]);
Expand Down Expand Up @@ -48,6 +48,7 @@ export const ActionsOrConsultations = ({ actions, consultations }) => {
onClick={() => {
const searchParams = new URLSearchParams(history.location.search);
searchParams.set(activeTab.includes('Actions') ? 'newAction' : 'newConsultation', true);
searchParams.set('dueAt', period.startDate);
history.push(`?${searchParams.toString()}`);
}}>
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/scenes/report/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { passagesState } from '../../recoil/passages';
import useTitle from '../../services/useTitle';
import SelectTeamMultiple from '../../components/SelectTeamMultiple';
import { arrayOfitemsGroupedByPersonSelector, onlyFilledObservationsTerritories } from '../../recoil/selectors';
import { ActionsOrConsultations } from './components/ActionsReport';
import { ActionsOrConsultationsReport } from './components/ActionsOrConsultationsReport';
import ServicesReport from './components/ServicesReport';
import DateRangePickerWithPresets, { reportsPresets } from '../../components/DateRangePickerWithPresets';
import { CommentsSocialAndMedical } from './components/CommentsReport';
Expand Down Expand Up @@ -346,7 +346,7 @@ const View = () => {
].join(' ')}>
<div className="tw-mb-12 tw-min-h-1/2 tw-basis-6/12 tw-overflow-auto">
<div className="tw-mb-4 tw-h-[60vh] tw-overflow-hidden tw-rounded-lg tw-border tw-border-zinc-200 tw-shadow">
<ActionsOrConsultations actions={actions} consultations={consultations} />
<ActionsOrConsultationsReport actions={actions} consultations={consultations} period={period} />
</div>
{canSeeComments && (
<div className="tw-h-[60vh] tw-overflow-hidden tw-rounded-lg tw-border tw-border-zinc-200 tw-shadow">
Expand Down
Loading