2024-09-28 13:34:50 -07:00
|
|
|
import { importEntities } from 'pl-fe/entity-store/actions';
|
|
|
|
import { Entities } from 'pl-fe/entity-store/entities';
|
|
|
|
|
2024-08-04 07:09:52 -07:00
|
|
|
import { getClient } from '../api';
|
2022-05-27 11:08:41 -07:00
|
|
|
|
2024-08-28 04:41:08 -07:00
|
|
|
import type { RootState } from 'pl-fe/store';
|
2024-08-28 05:48:35 -07:00
|
|
|
import type { AnyAction } from 'redux';
|
2022-05-27 11:08:41 -07:00
|
|
|
|
2024-08-11 01:48:58 -07:00
|
|
|
const submitAccountNote = (accountId: string, value: string) =>
|
2024-09-28 13:34:50 -07:00
|
|
|
(dispatch: React.Dispatch<AnyAction>, getState: () => RootState) =>
|
|
|
|
getClient(getState).accounts.updateAccountNote(accountId, value)
|
|
|
|
.then(response => dispatch(importEntities([response], Entities.RELATIONSHIPS)));
|
2022-05-27 11:08:41 -07:00
|
|
|
|
2024-09-28 13:34:50 -07:00
|
|
|
export { submitAccountNote };
|