@geexcode/geex-angular 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -1
- package/dist/index.mjs +13 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -126,7 +126,18 @@ var GQL_ORGS_CACHE = import_graphql_tag.default`query orgsCache { orgs(take: 999
|
|
|
126
126
|
var GQL_INIT_SETTINGS = import_graphql_tag.default`query initSettings { initSettings { id name value } }`;
|
|
127
127
|
function createTenantModule(injector) {
|
|
128
128
|
const current = (0, import_core.signal)(null);
|
|
129
|
-
|
|
129
|
+
const module2 = {
|
|
130
|
+
init: async () => {
|
|
131
|
+
try {
|
|
132
|
+
const tenantCode = injector.get(import_util.CookieService).get("__tenant");
|
|
133
|
+
if (tenantCode) {
|
|
134
|
+
const tenantData = await module2.loadTenantData(tenantCode);
|
|
135
|
+
current.set(tenantData ?? null);
|
|
136
|
+
}
|
|
137
|
+
} catch (err) {
|
|
138
|
+
console.error(err);
|
|
139
|
+
}
|
|
140
|
+
},
|
|
130
141
|
current,
|
|
131
142
|
async loadTenantData(code) {
|
|
132
143
|
const res = await (0, import_rxjs.firstValueFrom)(
|
|
@@ -148,6 +159,7 @@ function createTenantModule(injector) {
|
|
|
148
159
|
});
|
|
149
160
|
}
|
|
150
161
|
};
|
|
162
|
+
return module2;
|
|
151
163
|
}
|
|
152
164
|
function createAuthModule(injector) {
|
|
153
165
|
const user = (0, import_core.signal)(null);
|
package/dist/index.mjs
CHANGED
|
@@ -81,7 +81,18 @@ var GQL_ORGS_CACHE = gql`query orgsCache { orgs(take: 999) { items { id orgType
|
|
|
81
81
|
var GQL_INIT_SETTINGS = gql`query initSettings { initSettings { id name value } }`;
|
|
82
82
|
function createTenantModule(injector) {
|
|
83
83
|
const current = signal(null);
|
|
84
|
-
|
|
84
|
+
const module = {
|
|
85
|
+
init: async () => {
|
|
86
|
+
try {
|
|
87
|
+
const tenantCode = injector.get(CookieService).get("__tenant");
|
|
88
|
+
if (tenantCode) {
|
|
89
|
+
const tenantData = await module.loadTenantData(tenantCode);
|
|
90
|
+
current.set(tenantData ?? null);
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
console.error(err);
|
|
94
|
+
}
|
|
95
|
+
},
|
|
85
96
|
current,
|
|
86
97
|
async loadTenantData(code) {
|
|
87
98
|
const res = await firstValueFrom(
|
|
@@ -103,6 +114,7 @@ function createTenantModule(injector) {
|
|
|
103
114
|
});
|
|
104
115
|
}
|
|
105
116
|
};
|
|
117
|
+
return module;
|
|
106
118
|
}
|
|
107
119
|
function createAuthModule(injector) {
|
|
108
120
|
const user = signal(null);
|