richie-education 2.25.0-b2.dev24 → 2.25.0-b2.dev26
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.
|
@@ -94,11 +94,11 @@ describe('OrganizationContractFrame', () => {
|
|
|
94
94
|
user: true,
|
|
95
95
|
queriesCallback: (queries) => {
|
|
96
96
|
// Push contract and orders queries
|
|
97
|
-
queries.push(QueryStateFactory(['user', '
|
|
97
|
+
queries.push(QueryStateFactory(['user', 'organization_contracts'], { data: [] }));
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
-
let contractsQueryState = client.getQueryState(['user', '
|
|
101
|
+
let contractsQueryState = client.getQueryState(['user', 'organization_contracts']);
|
|
102
102
|
expect(contractsQueryState?.isInvalidated).toBe(false);
|
|
103
103
|
|
|
104
104
|
await act(async () => {
|
|
@@ -126,7 +126,7 @@ describe('OrganizationContractFrame', () => {
|
|
|
126
126
|
|
|
127
127
|
// onDone should be tweaked to invalidate the user orders and contracts queries
|
|
128
128
|
// and passed down to AbstractContractFrame
|
|
129
|
-
contractsQueryState = client.getQueryState(['user', '
|
|
129
|
+
contractsQueryState = client.getQueryState(['user', 'organization_contracts']);
|
|
130
130
|
expect(contractsQueryState?.isInvalidated).toBe(true);
|
|
131
131
|
expect(handleDone).toHaveBeenCalledTimes(1);
|
|
132
132
|
|
|
@@ -158,11 +158,11 @@ describe('OrganizationContractFrame', () => {
|
|
|
158
158
|
user: true,
|
|
159
159
|
queriesCallback: (queries) => {
|
|
160
160
|
// Push contract and orders queries
|
|
161
|
-
queries.push(QueryStateFactory(['user', '
|
|
161
|
+
queries.push(QueryStateFactory(['user', 'organization_contracts'], { data: [] }));
|
|
162
162
|
},
|
|
163
163
|
});
|
|
164
164
|
|
|
165
|
-
let contractsQueryState = client.getQueryState(['user', '
|
|
165
|
+
let contractsQueryState = client.getQueryState(['user', 'organization_contracts']);
|
|
166
166
|
expect(contractsQueryState?.isInvalidated).toBe(false);
|
|
167
167
|
|
|
168
168
|
await act(async () => {
|
|
@@ -191,7 +191,7 @@ describe('OrganizationContractFrame', () => {
|
|
|
191
191
|
|
|
192
192
|
// onDone should be tweaked to invalidate the user orders and contracts queries
|
|
193
193
|
// and passed down to AbstractContractFrame
|
|
194
|
-
contractsQueryState = client.getQueryState(['user', '
|
|
194
|
+
contractsQueryState = client.getQueryState(['user', 'organization_contracts']);
|
|
195
195
|
expect(contractsQueryState?.isInvalidated).toBe(true);
|
|
196
196
|
expect(handleDone).toHaveBeenCalledTimes(1);
|
|
197
197
|
|
|
@@ -45,7 +45,7 @@ const OrganizationContractFrame = ({ organizationId, contractIds, onDone, ...pro
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
const onDoneWithInvalidation = () => {
|
|
48
|
-
queryClient.invalidateQueries({ queryKey: ['user', '
|
|
48
|
+
queryClient.invalidateQueries({ queryKey: ['user', 'organization_contracts'] });
|
|
49
49
|
onDone?.();
|
|
50
50
|
};
|
|
51
51
|
|
package/js/settings.dev.dist.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
CURRENT_JOANIE_DEV_DEMO_USER: 'admin',
|
|
14
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Available users:
|
|
3
|
+
* * admin
|
|
4
|
+
* * user0
|
|
5
|
+
* * user1
|
|
6
|
+
* * user2
|
|
7
|
+
* * user3
|
|
8
|
+
* * user4
|
|
9
|
+
* * organization_owner
|
|
10
|
+
* * student_user
|
|
11
|
+
*/
|
|
12
|
+
export const CURRENT_JOANIE_DEV_DEMO_USER = 'admin';
|
package/js/settings.ts
CHANGED