Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dismiss alert modal and cancelled assignments #900

Closed
wants to merge 9 commits into from
Closed
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@
</CourseEnrollmentsAlert>
);
}

Check failure on line 112 in src/components/dashboard/main-content/course-enrollments/CourseEnrollments.jsx

View workflow job for this annotation

GitHub Actions / tests

Expected indentation of 2 spaces but found 3

Check failure on line 112 in src/components/dashboard/main-content/course-enrollments/CourseEnrollments.jsx

View workflow job for this annotation

GitHub Actions / tests

'handleOnClose' is assigned a value but never used
const handleOnClose = () => {
// 1) setShowCancelledAssignmentsAlert(false);
katrinan029 marked this conversation as resolved.
Show resolved Hide resolved
// 2) patchLearnerContentAssignment
katrinan029 marked this conversation as resolved.
Show resolved Hide resolved
katrinan029 marked this conversation as resolved.
Show resolved Hide resolved
// 3) refetch fetchRedeemableLearnerCreditPolicies to update list

Check failure on line 116 in src/components/dashboard/main-content/course-enrollments/CourseEnrollments.jsx

View workflow job for this annotation

GitHub Actions / tests

Missing semicolon
katrinan029 marked this conversation as resolved.
Show resolved Hide resolved
}

Check failure on line 118 in src/components/dashboard/main-content/course-enrollments/CourseEnrollments.jsx

View workflow job for this annotation

GitHub Actions / tests

More than 1 blank line not allowed

const hasCourseEnrollments = Object.values(courseEnrollmentsByStatus).flat().length > 0;
return (
<>
Expand Down
16 changes: 16 additions & 0 deletions src/components/enterprise-user-subsidy/data/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,19 @@
const url = `${config.LICENSE_MANAGER_URL}/api/v1/customer-agreement/${customerAgreementId}/auto-apply/`;
return getAuthenticatedHttpClient().post(url);
}


Check failure on line 54 in src/components/enterprise-user-subsidy/data/service.js

View workflow job for this annotation

GitHub Actions / tests

More than 1 blank line not allowed
function patchLearnerContentAssignment(assignmentConfigurationUUID, userID, params) {

Check failure on line 55 in src/components/enterprise-user-subsidy/data/service.js

View workflow job for this annotation

GitHub Actions / tests

Expected indentation of 0 spaces but found 1

Check failure on line 55 in src/components/enterprise-user-subsidy/data/service.js

View workflow job for this annotation

GitHub Actions / tests

'patchLearnerContentAssignment' is defined but never used

Check failure on line 55 in src/components/enterprise-user-subsidy/data/service.js

View workflow job for this annotation

GitHub Actions / tests

'assignmentConfigurationUUID' is defined but never used

Check failure on line 55 in src/components/enterprise-user-subsidy/data/service.js

View workflow job for this annotation

GitHub Actions / tests

'userID' is defined but never used

Check failure on line 55 in src/components/enterprise-user-subsidy/data/service.js

View workflow job for this annotation

GitHub Actions / tests

'params' is defined but never used
// const url = `${config.ENTERPRISE_ACCESS_BASE_URL}/v1/assignment-configurations/{assignmentConfigurationUUID}/assignments/{userID}/`;
// const { data } = await getAuthenticatedHttpClient()
// .patch(url, params, {
// headers: {
// 'Content-Type': 'application/json',
// },
// })
// .catch((error) => {
// throw error;
// });
// return data;
}