You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, useBAINotification tracks the state of backgroundTask.promise to update the notification’s status. However, in cases where the notification’s status needs to be updated after the promise is resolved, it cannot be updated directly through the promise. Therefore, I plan to pass the value to be updated through the resolve or reject of the promise to update the notification’s status.
Plans
In resolve() or reject(), when passing a value of type Partial<Omit<NotificationState, 'created'>>, it performs a deep merge using lodash.merge. Then, using the updated value, the upsertNotification function is executed.
(Previously, no value was passed in resolve() or reject(), so it was expected that no side effects would occur.)
If this is applied, we can handle promise more cool
resolves#3060, [(FR-352)](https://lablup.atlassian.net/browse/FR-352)
I added functionality to handle `task's status` based on the notification in `useNotification`. Since the existing approach was not changed, no additional modifications are needed.
**changes**
* update `useBAINotification` to handle task's status
* refactor `MaintenanceSetttingList` component (I have confirmed that it is working properly.)
**Checklist:** (if applicable)
- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after
Description
Currently,
useBAINotification
tracks the state ofbackgroundTask.promise
to update thenotification
’s status. However, in cases where thenotification
’s status needs to be updated after the promise is resolved, it cannot be updated directly through the promise. Therefore, I plan to pass the value to be updated through theresolve
orreject
of the promise to update thenotification
’s status.Plans
In
resolve()
orreject()
, when passing avalue
of typePartial<Omit<NotificationState, 'created'>>
, it performs a deep merge usinglodash.merge
. Then, using the updated value, theupsertNotification
function is executed.(Previously, no value was passed in resolve() or reject(), so it was expected that no side effects would occur.)
The text was updated successfully, but these errors were encountered: