feat: setup congrats page.

This commit is contained in:
Ahmed Bouhuolia
2020-10-14 17:49:27 +02:00
parent f9f517ae51
commit 5b9b5fc3a7
12 changed files with 267 additions and 12 deletions

View File

@@ -36,17 +36,29 @@ export const seedTenant = () => (dispatch, getState) => new Promise((resolve, re
const organizationId = getState().authentication.organizationId;
dispatch({
type: t.SET_ORGANIZATION_INITIALIZING,
type: t.SET_ORGANIZATION_SEEDING,
payload: { organizationId }
});
ApiService.post(`organization/seed/`).then((response) => {
resolve(response);
dispatch({
type: t.SET_ORGANIZATION_INITIALIZED,
type: t.SET_ORGANIZATION_SEEDED,
payload: { organizationId }
});
})
.catch((error) => {
reject(error.response.data.errors || []);
});
});
});
export const setOrganizationSetupCompleted = (congrats) => (dispatch, getState) => {
const organizationId = getState().authentication.organizationId;
dispatch({
type: t.SET_ORGANIZATION_CONGRATS,
payload: {
organizationId,
congrats
},
});
};