richie-education 3.3.2-dev10 → 3.3.2-dev11
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/js/pages/TeacherDashboardOrganizationQuotes/index.full-process.spec.tsx +2 -2
- package/js/pages/TeacherDashboardOrganizationQuotes/index.spec.tsx +1 -1
- package/js/pages/TeacherDashboardOrganizationQuotes/index.tsx +1 -1
- package/js/types/Joanie.ts +1 -1
- package/js/utils/test/factories/joanie.ts +1 -1
- package/package.json +1 -1
|
@@ -37,7 +37,7 @@ describe('full process for the organization quotes dashboard', () => {
|
|
|
37
37
|
|
|
38
38
|
const organization = OrganizationFactory({
|
|
39
39
|
abilities: {
|
|
40
|
-
|
|
40
|
+
can_manage_batch_order_agreement: true,
|
|
41
41
|
confirm_bank_transfer: true,
|
|
42
42
|
confirm_quote: true,
|
|
43
43
|
download_quote: true,
|
|
@@ -206,7 +206,7 @@ describe('full process for the organization quotes dashboard', () => {
|
|
|
206
206
|
fetchMock.get(`https://joanie.endpoint/api/v1.0/organizations/`, []);
|
|
207
207
|
const organization = OrganizationFactory({
|
|
208
208
|
abilities: {
|
|
209
|
-
|
|
209
|
+
can_manage_batch_order_agreement: true,
|
|
210
210
|
confirm_bank_transfer: true,
|
|
211
211
|
confirm_quote: true,
|
|
212
212
|
download_quote: true,
|
|
@@ -165,7 +165,7 @@ describe('pages/TeacherDashboardOrganizationQuotes', () => {
|
|
|
165
165
|
|
|
166
166
|
const organization = OrganizationFactory({
|
|
167
167
|
abilities: {
|
|
168
|
-
|
|
168
|
+
can_manage_batch_order_agreement: false,
|
|
169
169
|
confirm_bank_transfer: false,
|
|
170
170
|
confirm_quote: false,
|
|
171
171
|
download_quote: true,
|
|
@@ -415,7 +415,7 @@ const TeacherDashboardOrganizationQuotes = () => {
|
|
|
415
415
|
const submitForSignatureButton = (
|
|
416
416
|
<Button
|
|
417
417
|
size="small"
|
|
418
|
-
disabled={batchOrder.contract_submitted || !abilities?.
|
|
418
|
+
disabled={batchOrder.contract_submitted || !abilities?.can_manage_batch_order_agreement}
|
|
419
419
|
onClick={() =>
|
|
420
420
|
!batchOrder.contract_submitted && handleSubmitForSignature(quote.batch_order.id)
|
|
421
421
|
}
|
package/js/types/Joanie.ts
CHANGED
|
@@ -36,7 +36,7 @@ export interface Organization {
|
|
|
36
36
|
dpo_email: Nullable<string>;
|
|
37
37
|
address?: Address;
|
|
38
38
|
abilities: {
|
|
39
|
-
|
|
39
|
+
can_manage_batch_order_agreement: boolean;
|
|
40
40
|
confirm_bank_transfer: boolean;
|
|
41
41
|
confirm_quote: boolean;
|
|
42
42
|
delete: boolean;
|
|
@@ -176,7 +176,7 @@ export const OrganizationFactory = factory((): Organization => {
|
|
|
176
176
|
contact_phone: faker.phone.number(),
|
|
177
177
|
address: AddressFactory().one(),
|
|
178
178
|
abilities: {
|
|
179
|
-
|
|
179
|
+
can_manage_batch_order_agreement: faker.datatype.boolean(),
|
|
180
180
|
confirm_bank_transfer: faker.datatype.boolean(),
|
|
181
181
|
confirm_quote: faker.datatype.boolean(),
|
|
182
182
|
delete: faker.datatype.boolean(),
|