mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-30 00:50:50 +01:00
Calendar change
This commit is contained in:
parent
1d17067b02
commit
079a57c012
@ -1,15 +1,15 @@
|
||||
import { FC } from 'react';
|
||||
import { GetConfiguration, GetRoomEngine, GetSessionDataManager } from '../../api';
|
||||
import { Base, Column, Flex, LayoutImage } from '../../common';
|
||||
import { CalendarItem } from './common/CalendarItem';
|
||||
import { CalendarItemState } from './common/CalendarItemState';
|
||||
import { ICalendarItem } from './common/ICalendarItem';
|
||||
|
||||
interface CalendarItemViewProps
|
||||
{
|
||||
itemId: number;
|
||||
state: number;
|
||||
active?: boolean;
|
||||
product?: CalendarItem;
|
||||
product?: ICalendarItem;
|
||||
onClick: (itemId: number) => void;
|
||||
}
|
||||
|
||||
|
@ -2,14 +2,14 @@ import { FC, useState } from 'react';
|
||||
import { GetSessionDataManager, LocalizeText } from '../../api';
|
||||
import { Base, Button, Column, Flex, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../common';
|
||||
import { CalendarItemView } from './CalendarItemView';
|
||||
import { CalendarItem } from './common/CalendarItem';
|
||||
import { CalendarItemState } from './common/CalendarItemState';
|
||||
import { ICalendarItem } from './common/ICalendarItem';
|
||||
|
||||
interface CalendarViewProps
|
||||
{
|
||||
close(): void;
|
||||
openPackage(id: number, asStaff: boolean): void;
|
||||
receivedProducts: Map<number, CalendarItem>;
|
||||
receivedProducts: Map<number, ICalendarItem>;
|
||||
campaignName: string;
|
||||
currentDay: number;
|
||||
numDays: number;
|
||||
@ -139,28 +139,6 @@ export const CalendarView: FC<CalendarViewProps> = props =>
|
||||
<Base pointer className="campaign-spritesheet next" onClick={ onClickNext } />
|
||||
</Flex>
|
||||
</Flex>
|
||||
{/* <Grid fullHeight alignItems="center" gap={ 1 }>
|
||||
<Column fullHeight center size={ 1 }>
|
||||
<Base pointer className="campaign-spritesheet prev" onClick={ onClickPrev } />
|
||||
</Column>
|
||||
<Column fullHeight size={ 10 }>
|
||||
<Grid fullHeight columnCount={ TOTAL_SHOWN_ITEMS } gap={ 1 }>
|
||||
{ [...Array(TOTAL_SHOWN_ITEMS)].map((e, i) =>
|
||||
{
|
||||
const day = (index + i);
|
||||
|
||||
return (
|
||||
<Column key={ i } overflow="hidden">
|
||||
<CalendarItemView itemId={ day } state={ getDayState(day) } active={ (selectedDay === day) } productName={ receivedProducts.has(day) ? receivedProducts.get(day) : null } onClick={ onClickItem } />
|
||||
</Column>
|
||||
);
|
||||
}) }
|
||||
</Grid>
|
||||
</Column>
|
||||
<Column fullHeight center size={ 1 }>
|
||||
<Base pointer className="campaign-spritesheet next" onClick={ onClickNext } />
|
||||
</Column>
|
||||
</Grid> */}
|
||||
</NitroCardContentView>
|
||||
</NitroCardView>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user