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

[NEW] Announcement component #114

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

samad-yar-khan
Copy link
Contributor

Issues

Mentioned in the issue #113

Proposed changes (including videos or screenshots)

  • Add New Announcement Component which can display relevant announcement on any page using a helper function - getAnnouncementData('announcement_code').
  • The component has been added to the layout and is only displayed when a relevant/published announcement is fetched using getAnnouncementData('announcement_code') code function and passed in the page props.
  • Added announcement collection type / schema to store announcements in the database.
  • Announcements have a publish_date and unpublish_date
    • Announcements are only displayed after the publish_date and before the unpublish_date
  • Added a deleteOldAnnouncemts() helper function as a cron job which will run once a day and will delete any announcements which are supposed to be unpublished depending on the date. This will ensure that unwanted announcements do not clutter the database.
  • At the time of data-initialization , the announcements in cms/config/initialData/announcemnets.json will populate the data base.
2022-03-30.22-24-46.mp4

@samad-yar-khan samad-yar-khan force-pushed the AnnouncementComponent branch 2 times, most recently from 3ebadf8 to 869f6c8 Compare April 2, 2022 05:14
@debdutdeb debdutdeb closed this Apr 2, 2022
@debdutdeb debdutdeb reopened this Apr 2, 2022
Copy link
Member

@debdutdeb debdutdeb left a comment

Choose a reason for hiding this comment

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

Please check why the build is failing.

@samad-yar-khan
Copy link
Contributor Author

@debdutdeb I have rebased the branch with the master branch and there are no more build errors. Build is not failing anymore 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants