|
|
@@ -43,12 +43,36 @@ export default new Vuex.Store({
|
|
|
.then(res => {
|
|
|
if (res) {
|
|
|
context.commit('updateOrganization', res.data);
|
|
|
+ } else {
|
|
|
+ context.commit('updateOrganization', null);
|
|
|
}
|
|
|
return Promise.resolve();
|
|
|
})
|
|
|
.catch(() => {
|
|
|
return Promise.reject();
|
|
|
});
|
|
|
+ },
|
|
|
+ checkOrganization(context) {
|
|
|
+ console.log(context.state.organization);
|
|
|
+ if (context.state.organization) {
|
|
|
+ if (
|
|
|
+ context.state.organization.owner &&
|
|
|
+ context.state.organization.ownerEmail &&
|
|
|
+ context.state.organization.ownerPhone &&
|
|
|
+ context.state.organization.privacyPolicy &&
|
|
|
+ context.state.organization.IDNo &&
|
|
|
+ context.state.organization.uscc &&
|
|
|
+ context.state.organization.district &&
|
|
|
+ context.state.organization.address &&
|
|
|
+ context.state.organization.businessLicense
|
|
|
+ ) {
|
|
|
+ return Promise.resolve();
|
|
|
+ } else {
|
|
|
+ return Promise.reject();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return Promise.resolve();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
});
|