|
@@ -24,6 +24,7 @@ interface OrganizationStoreDefinition extends CommonStoreDefinition<State> {
|
|
onUpdate(org: Organization, options?: {replace: true}): void;
|
|
onUpdate(org: Organization, options?: {replace: true}): void;
|
|
onUpdate(org: Partial<Organization>, options?: {replace?: false}): void;
|
|
onUpdate(org: Partial<Organization>, options?: {replace?: false}): void;
|
|
reset(): void;
|
|
reset(): void;
|
|
|
|
+ setNoOrganization(): void;
|
|
}
|
|
}
|
|
|
|
|
|
const storeConfig: OrganizationStoreDefinition = {
|
|
const storeConfig: OrganizationStoreDefinition = {
|
|
@@ -78,6 +79,14 @@ const storeConfig: OrganizationStoreDefinition = {
|
|
this.trigger(this.get());
|
|
this.trigger(this.get());
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ setNoOrganization() {
|
|
|
|
+ this.organization = null;
|
|
|
|
+ this.errorType = ORGANIZATION_FETCH_ERROR_TYPES.NO_ORGS;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ this.dirty = false;
|
|
|
|
+ this.trigger(this.get());
|
|
|
|
+ },
|
|
|
|
+
|
|
get() {
|
|
get() {
|
|
return {
|
|
return {
|
|
organization: this.organization,
|
|
organization: this.organization,
|