Merge branch 'develop' into feat/app-store-reviews
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import * as MutationHelpers from 'shared/helpers/vuex/mutationHelpers';
|
||||
import * as types from '../mutation-types';
|
||||
import AccountAPI from '../../api/account';
|
||||
import OnboardingAPI from '../../api/onboarding';
|
||||
import { differenceInDays } from 'date-fns';
|
||||
import EnterpriseAccountAPI from '../../api/enterprise/account';
|
||||
import { throwErrorMessage } from '../utils/api';
|
||||
@@ -83,6 +84,15 @@ export const actions = {
|
||||
throw new Error(error);
|
||||
}
|
||||
},
|
||||
finishOnboarding: async ({ commit }, payload) => {
|
||||
commit(types.default.SET_ACCOUNT_UI_FLAG, { isUpdating: true });
|
||||
try {
|
||||
const response = await OnboardingAPI.update(payload);
|
||||
commit(types.default.EDIT_ACCOUNT, response.data);
|
||||
} finally {
|
||||
commit(types.default.SET_ACCOUNT_UI_FLAG, { isUpdating: false });
|
||||
}
|
||||
},
|
||||
delete: async ({ commit }, { id }) => {
|
||||
commit(types.default.SET_ACCOUNT_UI_FLAG, { isUpdating: true });
|
||||
try {
|
||||
|
||||
@@ -7,7 +7,7 @@ const state = {
|
||||
records: [],
|
||||
meta: {
|
||||
currentPage: 1,
|
||||
perPage: 15,
|
||||
perPage: 25,
|
||||
totalEntries: 0,
|
||||
},
|
||||
uiFlags: {
|
||||
|
||||
@@ -312,10 +312,14 @@ export const actions = {
|
||||
commit(types.CLEAR_CONTACT_FILTERS);
|
||||
},
|
||||
|
||||
initiateCall: async ({ commit }, { contactId, inboxId }) => {
|
||||
initiateCall: async ({ commit }, { contactId, inboxId, conversationId }) => {
|
||||
commit(types.SET_CONTACT_UI_FLAG, { isInitiatingCall: true });
|
||||
try {
|
||||
const response = await ContactAPI.initiateCall(contactId, inboxId);
|
||||
const response = await ContactAPI.initiateCall(
|
||||
contactId,
|
||||
inboxId,
|
||||
conversationId
|
||||
);
|
||||
commit(types.SET_CONTACT_UI_FLAG, { isInitiatingCall: false });
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
|
||||
@@ -25,7 +25,7 @@ const fetchMetaData = async (commit, params) => {
|
||||
}
|
||||
};
|
||||
|
||||
const debouncedFetchMetaData = debounce(fetchMetaData, 500, false, 1500);
|
||||
const debouncedFetchMetaData = debounce(fetchMetaData, 500, false, 2000);
|
||||
const longDebouncedFetchMetaData = debounce(fetchMetaData, 5000, false, 10000);
|
||||
const superLongDebouncedFetchMetaData = debounce(
|
||||
fetchMetaData,
|
||||
@@ -36,7 +36,7 @@ const superLongDebouncedFetchMetaData = debounce(
|
||||
|
||||
export const actions = {
|
||||
get: async ({ commit, state: $state }, params) => {
|
||||
if ($state.allCount > 5000) {
|
||||
if ($state.allCount > 2000) {
|
||||
superLongDebouncedFetchMetaData(commit, params);
|
||||
} else if ($state.allCount > 100) {
|
||||
longDebouncedFetchMetaData(commit, params);
|
||||
|
||||
@@ -329,12 +329,21 @@ const actions = {
|
||||
});
|
||||
commit(types.ADD_CONVERSATION_ATTACHMENTS, message);
|
||||
}
|
||||
handleVoiceCallCreated(message, rootGetters?.getCurrentUserID);
|
||||
handleVoiceCallCreated(
|
||||
message,
|
||||
rootGetters?.getCurrentUserID,
|
||||
rootGetters?.getCurrentUserAvailability
|
||||
);
|
||||
},
|
||||
|
||||
updateMessage({ commit, rootGetters }, message) {
|
||||
commit(types.ADD_MESSAGE, message);
|
||||
handleVoiceCallUpdated(commit, message, rootGetters?.getCurrentUserID);
|
||||
handleVoiceCallUpdated(
|
||||
commit,
|
||||
message,
|
||||
rootGetters?.getCurrentUserID,
|
||||
rootGetters?.getCurrentUserAvailability
|
||||
);
|
||||
},
|
||||
|
||||
deleteMessage: async function deleteLabels(
|
||||
|
||||
Reference in New Issue
Block a user