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

working on calendar view #499

Closed
wants to merge 2 commits into from
Closed

working on calendar view #499

wants to merge 2 commits into from

Conversation

gabriel090
Copy link
Contributor

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide.
  • I checked for feature overlap with existing widgets.

Summary

Daily,weekly,and monthly Calendar view design
daily_13
monthly_13
weekly_13

Screenshots

None.

Related Issue

None.

Other

None.

Copy link
Member

@donaldkibet donaldkibet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the right track, some few suggestions

Comment on lines 15 to 16
// width: 100%;
// float: right;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this commented out code

}: {
type: CalendarType;
events: { appointmentDate: string; service: Array<any>; [key: string]: any }[];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be extracted to DailyCalendarViewProps to make it more readable, also avoid using Array<any> provide the correct type for it.

<div className={styles.container}>
<DailyHeader type={type} currentDate={currentDate} setCurrentDate={setCurrentDate} events={events} />
<div className={styles.wrapper}>
{type === 'daily' ? (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component is DailyCalendarView therefore no need to have this check here

<>
<div className={styles.cellComponent}>
<div className={styles[type === 'daily' ? 'daily-cell' : '']}>
{type === 'daily' ? <small>{dateTime.minute(0).format('h a')}</small> : null}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

min-height: 40px;
width: 100%;
&:nth-child(-n + 24) {
// border-top: 1px solid colors.$gray-20;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented code

Comment on lines 9 to 13
const Format = {
monthly: 'month',
weekly: 'week',
daily: 'day',
} as const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could use type here

@donaldkibet donaldkibet closed this Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants