mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
fix: Update the relevant agent presence only (#5220)
This commit is contained in:
@@ -45,6 +45,16 @@ export const updatePresence = (state, data) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const updateSingleRecordPresence = (
|
||||
records,
|
||||
{ id, availabilityStatus }
|
||||
) => {
|
||||
const [selectedRecord] = records.filter(record => record.id === Number(id));
|
||||
if (selectedRecord) {
|
||||
Vue.set(selectedRecord, 'availability_status', availabilityStatus);
|
||||
}
|
||||
};
|
||||
|
||||
export const destroy = (state, id) => {
|
||||
state.records = state.records.filter(record => record.id !== id);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user