mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 11:56:29 +00:00
fix actions for calendar view
This commit is contained in:
parent
38e9b2c96c
commit
bfa998e478
@ -10,5 +10,6 @@
|
|||||||
.filter-action-button {
|
.filter-action-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 24px;
|
left: 24px;
|
||||||
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,6 +10,7 @@ import moment from 'moment';
|
|||||||
const localizer = momentLocalizer(moment) // or globalizeLocalizer
|
const localizer = momentLocalizer(moment) // or globalizeLocalizer
|
||||||
import Drawer from '@/components/pages/AdminLoader/Drawer';
|
import Drawer from '@/components/pages/AdminLoader/Drawer';
|
||||||
import { Details, DetailsPage } from '../Table';
|
import { Details, DetailsPage } from '../Table';
|
||||||
|
import { Actions } from '../../Actions';
|
||||||
|
|
||||||
export const icon = <LoadingOutlined style={{ fontSize: 36 }} spin />;
|
export const icon = <LoadingOutlined style={{ fontSize: 36 }} spin />;
|
||||||
|
|
||||||
@ -60,6 +61,7 @@ export function Calendar(props: CalendarProps) {
|
|||||||
endDateField,
|
endDateField,
|
||||||
detailsOpenMode,
|
detailsOpenMode,
|
||||||
details = [],
|
details = [],
|
||||||
|
actions = [],
|
||||||
} = schema;
|
} = schema;
|
||||||
|
|
||||||
console.log({schema})
|
console.log({schema})
|
||||||
@ -131,6 +133,22 @@ export function Calendar(props: CalendarProps) {
|
|||||||
console.log('events', data)
|
console.log('events', data)
|
||||||
return (
|
return (
|
||||||
<Card bordered={false}>
|
<Card bordered={false}>
|
||||||
|
<Actions associatedKey={associatedKey} onTrigger={{
|
||||||
|
async create(values) {
|
||||||
|
await refresh();
|
||||||
|
},
|
||||||
|
async filter(values) {
|
||||||
|
const items = values.filter.and || values.filter.or;
|
||||||
|
// @ts-ignore
|
||||||
|
run({...params[0], filter: values.filter});
|
||||||
|
// refresh();
|
||||||
|
},
|
||||||
|
}} actions={actions} style={{
|
||||||
|
position: 'absolute',
|
||||||
|
left: '157px',
|
||||||
|
right: '168px',
|
||||||
|
marginBottom: 14
|
||||||
|
}}/>
|
||||||
<BigCalendar
|
<BigCalendar
|
||||||
popup
|
popup
|
||||||
selectable
|
selectable
|
||||||
|
Loading…
Reference in New Issue
Block a user