feat: Show alerts when the limit is reached in accounts (#7323)

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
Pranav Raj S
2023-06-15 20:47:11 -07:00
committed by GitHub
parent e8a27bea4b
commit 86b2896333
8 changed files with 202 additions and 2 deletions

View File

@@ -97,6 +97,15 @@ export const actions = {
commit(types.default.SET_ACCOUNT_UI_FLAG, { isCheckoutInProcess: false });
}
},
limits: async ({ commit }) => {
try {
const response = await EnterpriseAccountAPI.getLimits();
commit(types.default.SET_ACCOUNT_LIMITS, response.data);
} catch (error) {
// silent error
}
},
};
export const mutations = {
@@ -108,6 +117,7 @@ export const mutations = {
},
[types.default.ADD_ACCOUNT]: MutationHelpers.setSingleRecord,
[types.default.EDIT_ACCOUNT]: MutationHelpers.update,
[types.default.SET_ACCOUNT_LIMITS]: MutationHelpers.updateAttributes,
};
export default {