Skip to content

Commit

Permalink
Merge branch 'fix-build-lib' of https://github.com/react-scheduler/re…
Browse files Browse the repository at this point in the history
…act-big-schedule into fix-build-lib
  • Loading branch information
Ansul Agrawal committed Nov 19, 2024
2 parents 34693c1 + 0895bcc commit 71e38e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/examples/pages/Add-More/functional-based.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ function AddMore() {
if (item.id >= newFreshId) newFreshId = item.id + 1;
});

let newEvent = {
const newEvent = {
id: newFreshId,
title: 'New event you just created',
start: start,
end: end,
start,
end,
resourceId: slotId,
bgColor: 'purple',
};
Expand Down
12 changes: 5 additions & 7 deletions src/examples/pages/Drag-And-Drop/functional-based.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ function DragAndDrop() {
let newEvent = {
id: newFreshId,
title: 'New event you just created',
start: start,
end: end,
start,
end,
resourceId: slotId,
bgColor: 'purple',
};
Expand Down Expand Up @@ -154,9 +154,7 @@ function DragAndDrop() {
console.log('moving event', schedulerData, slotId, slotName, newStart, newEnd, action, type, item);
};

const subtitleGetter = (schedulerData, event) => {
return schedulerData.isEventPerspective ? schedulerData.getResourceById(event.resourceId).name : event.groupName;
};
const subtitleGetter = (schedulerData, event) => (schedulerData.isEventPerspective ? schedulerData.getResourceById(event.resourceId).name : event.groupName);

const toggleExpandFunc = (schedulerData, slotId) => {
schedulerData.toggleExpandStatus(slotId);
Expand All @@ -169,8 +167,8 @@ function DragAndDrop() {
<>
<Row align="middle" justify="center">
<Typography.Title level={4}>
{state.showScheduler &&
(state.viewModel?.isEventPerspective ? 'Drag a resource from outside and drop to the resource view.' : 'Drag a task from outside and drop to the resource view')}
{state.showScheduler
&& (state.viewModel?.isEventPerspective ? 'Drag a resource from outside and drop to the resource view.' : 'Drag a task from outside and drop to the resource view')}
</Typography.Title>
</Row>
<Row>
Expand Down

0 comments on commit 71e38e2

Please sign in to comment.