Skip to content

feat(mobile): remind me#1664

Open
pranavmene2000 wants to merge 8 commits intodevelopfrom
mobile-remind-me
Open

feat(mobile): remind me#1664
pranavmene2000 wants to merge 8 commits intodevelopfrom
mobile-remind-me

Conversation

@pranavmene2000
Copy link
Copy Markdown
Contributor

Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2025-05-04.at.13.11.18.mp4

toast.success('Reminder updated successfully')
router.back()
mutate("in_progress_reminders")
mutate("completed_reminders")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I dont think need to mutate completed_reminders on update as well as on create

}

const handleDelete = () => {
Promise.all(data.message.map((reminder: Reminder) => deleteDoc('Raven Reminder', reminder.name)))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use bulk delete API (POST Call) frappe.desk.reportview.delete_items

.then(() => {
toast.success('Reminder marked as complete')
mutate("in_progress_reminders")
mutate('reminders_count')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

completed data mutate required,
Better Solution - Instead of calling each in_progress_reminder or reminder_count or completed_reminders every time, just publish the events from backend when reminders get updated (for user)

Comment thread raven/api/reminder.py


@frappe.whitelist(methods=["POST"])
def create_reminder(remind_at: str, message_id: str | None = None, description: str | None = None):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use Create Doc instead of API and for toggle_like you can call in after_insert of Raven Reminder

Comment thread raven/api/reminder.py


@frappe.whitelist(methods=["POST"])
def update_reminder(reminder_id: str, remind_at: str, description: str | None = None):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use useFrappeUpdateDoc instead of API

Comment thread raven/api/reminder.py


def send_reminders():
reminders = frappe.get_all(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use get_count

Comment thread raven/api/reminder.py
if len(reminders) == 0:
return

frappe.publish_realtime("due_reminders", {"message": reminders}, room="all", after_commit=True)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

add user in publish_realtime

@ankush
Copy link
Copy Markdown
Contributor

ankush commented Aug 12, 2025

Some shortcuts will help. (In 10 minutes, in 1hr, evening, tomorrow morning etc)

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.

4 participants