Skip to content

Commit

Permalink
WIP: Adicionar novo componente da descrição do evento
Browse files Browse the repository at this point in the history
  • Loading branch information
Anemaygi committed Nov 6, 2024
1 parent 5277dac commit 4309f4a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const Evento = ({ item }) => {
<Container className={'evento'}>
<h3>{item.title}</h3>
<When start={item.start} end={item.end} />
{/* TODO ADICIONAR DESCRIÇÃO OPCIONAL */}
</Container>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const messages = defineMessages({
id: 'Query',
defaultMessage: 'Query',
},
hasdescription: {
id: 'Descrição',
defaultMessage: 'Adicionar descrição dos eventos?',
},
});

// Consulta padrão dos eventos
Expand All @@ -35,7 +39,7 @@ export const calendarioSchema = (props) => {
{
id: 'default',
title: 'Default',
fields: ['heading', 'querystring'],
fields: ['heading', 'querystring', 'hasdescription'],
},
],
properties: {
Expand All @@ -48,6 +52,10 @@ export const calendarioSchema = (props) => {
widget: 'querystring',
default: defaultQueryString,
},
hasdescription: {
title: props.intl.formatMessage(messages.hasdescription),
default: 'Adicionar descrição?',
},
},
required: ['heading', 'querystring'],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ const CalendarioEventos = (props) => {
const hasEvents = Object.keys(items);
return (
<I18nProvider locale="pt-br">
<div className={'calendarioEventos'}>
<RACCalendar {...props}>
<header>
<Heading />
</header>
<CalendarGrid>
{(date) => {
const className =
hasEvents.indexOf(date.toString()) > -1 ? 'hasEvents' : '';
return (
<CalendarCell
date={date}
className={`${className} react-aria-CalendarCell`}
/>
);
}}
</CalendarGrid>
</RACCalendar>
</div>
<div className={'calendarioEventos'}>
<RACCalendar {...props}>
<header>
<Heading />
</header>
<CalendarGrid>
{(date) => {
const className =
hasEvents.indexOf(date.toString()) > -1 ? 'hasEvents' : '';
return (
<CalendarCell
date={date}
className={`${className} react-aria-CalendarCell`}
/>
);
}}
</CalendarGrid>
</RACCalendar>
</div>
</I18nProvider>
);
};
Expand Down

0 comments on commit 4309f4a

Please sign in to comment.