Skip to content

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 samad-yar-khan force-pushed the AnnouncementComponent branch from f90f003 to ad09104 Compare April 3, 2022 10:20
@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 😅

@samad-yar-khan samad-yar-khan force-pushed the AnnouncementComponent branch from ad09104 to ac4cfaa Compare April 9, 2022 11:41
@samad-yar-khan samad-yar-khan force-pushed the AnnouncementComponent branch from ac4cfaa to 1435a0f Compare April 11, 2022 17:54
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