Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const ALLOCATE_LEARNING_BUDGETS_TARGETS = {
INVITE_MEMBERS_BUDGET_BUTTON: 'invite-members-button',
TRACK_BUDGET_ACTIVITY: 'track-budget-activity',
BUDGET_TABLE: 'budget-table',
ZERO_STATE_ASSIGN_CARD: 'zero-state-assign-card',
BUDGET_SPENT_TABLE: 'spent-budget-table',
BUDGET_CATALOG_TAB: 'budget-catalog-tab',
BUDGET_MEMBERS_TAB: 'budget-members-tab',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ const AdminOnboardingTour = (
const administerSubscriptionsFlow = AdministerSubscriptionsFlow({
currentStep, enterpriseSlug, handleEndTour, handleBackTour, setCurrentStep, targetSelector,
});
const analyticsFlow = AnalyticsFlow({ handleAdvanceTour, handleBackTour, handleEndTour });
const analyticsFlow = AnalyticsFlow({
handleAdvanceTour, handleBackTour, handleEndTour,
});
const customizeReportsFlow = CustomizeReportsFlow({ handleEndTour });
const learnerProgressFlow = LearnerProgressFlow({
handleAdvanceTour, handleBackTour, handleEndTour,
Expand All @@ -95,7 +97,6 @@ const AdminOnboardingTour = (
setCurrentStep,
targetSelector,
});

const setUpPreferencesFlow = SetUpPreferencesFlow({ handleEndTour });

// Map target selectors to their respective flows
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useIntl } from '@edx/frontend-platform/i18n';
import { sendEnterpriseTrackEvent } from '@edx/frontend-enterprise-utils';
import { useParams } from 'react-router';

import { ALLOCATE_LEARNING_BUDGETS_TARGETS, ADMIN_TOUR_EVENT_NAMES } from '../constants';
import messages from '../messages';
import { TourStep } from '../../types';
Expand Down Expand Up @@ -67,8 +68,8 @@ const AllocateLearningBudgetsFlow = ({

if (isOnBudgetPage) {
if (policyType === 'Assignment') {
// Assignment budget with spend or assignment activity
if (isOnBudgetPage && (hasSpentTransactions || hasContentAssignments)) {
// Assignment budget with spend and assignment activity
if (hasSpentTransactions && hasContentAssignments) {
return [
{
target: `#${ALLOCATE_LEARNING_BUDGETS_TARGETS.BUDGET_DETAIL_CARD}`,
Expand Down Expand Up @@ -113,6 +114,51 @@ const AllocateLearningBudgetsFlow = ({
onEnd: onAllocateEnd,
},
];
} if (hasSpentTransactions && !hasContentAssignments) {
return [
{
target: `#${ALLOCATE_LEARNING_BUDGETS_TARGETS.BUDGET_DETAIL_CARD}`,
placement: 'top',
body: intl.formatMessage(messages.allocateLearningBudgetStepThreeAssignment),
onAdvance: onAllocateAdvance,
}, {
target: `#${ALLOCATE_LEARNING_BUDGETS_TARGETS.NEW_ASSIGNMENT_BUDGET_BUTTON}`,
placement: 'bottom',
body: intl.formatMessage(messages.allocateLearningBudgetStepFourAssignment),
onAdvance: onAllocateAdvance,
onBack: onAllocateBack,
}, {
target: `#${ALLOCATE_LEARNING_BUDGETS_TARGETS.TRACK_BUDGET_ACTIVITY}`,
placement: 'top',
body: intl.formatMessage(messages.allocateLearningBudgetStepFiveAssignment),
onAdvance: onAllocateAdvance,
onBack: onAllocateBack,
}, {
target: `#${ALLOCATE_LEARNING_BUDGETS_TARGETS.ZERO_STATE_ASSIGN_CARD}`,
placement: 'top',
body: intl.formatMessage(messages.allocateLearningBudgetStepSixSpendNoAssignment),
onAdvance: onAllocateAdvance,
onBack: onAllocateBack,
}, {
target: `#${ALLOCATE_LEARNING_BUDGETS_TARGETS.BUDGET_SPENT_TABLE}`,
placement: 'top',
body: intl.formatMessage(messages.allocateLearningBudgetStepSevenAssignment),
onAdvance: onAllocateAdvance,
onBack: onAllocateBack,
}, {
target: `#${ALLOCATE_LEARNING_BUDGETS_TARGETS.BUDGET_CATALOG_TAB}`,
placement: 'top',
body: intl.formatMessage(messages.allocateLearningBudgetStepEightAssignment),
onAdvance: onAllocateAdvance,
onBack: onAllocateBack,
}, {
target: `#${ALLOCATE_LEARNING_BUDGETS_TARGETS.LEARNER_CREDIT_MANAGEMENT_BREADCRUMBS}`,
placement: 'top',
body: intl.formatMessage(messages.allocateLearningBudgetStepNine),
onBack: onAllocateBack,
onEnd: onAllocateEnd,
},
];
// Zero state assignment budget
} if (!hasSpentTransactions && !hasContentAssignments) {
return [
Expand All @@ -131,8 +177,7 @@ const AllocateLearningBudgetsFlow = ({
placement: 'top',
body: intl.formatMessage(messages.allocateLearningBudgetStepFiveAssignmentZeroState),
onAdvance: onAllocateAdvance,
},
{
}, {
target: `#${ALLOCATE_LEARNING_BUDGETS_TARGETS.BUDGET_CATALOG_TAB}`,
placement: 'top',
body: intl.formatMessage(messages.allocateLearningBudgetStepSixAssignmentZeroState),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ const LearnerProgressFlow = ({
body: intl.formatMessage(messages.trackLearnerProgressStepFourBody),
onAdvance: onLearnerAdvance,
onBack: onLearnerBack,
}, {
target: `#${TRACK_LEARNER_PROGRESS_TARGETS.MODULE_ACTIVITY}`,
placement: 'top',
body: intl.formatMessage(messages.trackLearnerProgressStepFiveBody),
onBack: onLearnerBack,
onAdvance: onLearnerAdvance,
}, {
target: `#${TRACK_LEARNER_PROGRESS_TARGETS.FILTER}`,
placement: 'top',
Expand Down
9 changes: 7 additions & 2 deletions src/components/ProductTours/AdminOnboardingTours/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,14 @@ const messages = defineMessages({
description: 'Description for the allocate learning budgets invite only Browse and Enroll flow step six',
},
allocateLearningBudgetStepSixAssignment: {
id: 'adminPortal.productTours.adminOnboarding.allocateLearningBudget.body.7.assignment',
id: 'adminPortal.productTours.adminOnboarding.allocateLearningBudget.body.6.assignment',
defaultMessage: 'The Assigned table helps you monitor learner assignments, send reminders, or cancel as needed.',
description: 'Description for the allocate learning budgets flow step seven',
description: 'Description for the allocate learning budgets flow step six',
},
allocateLearningBudgetStepSixSpendNoAssignment: {
id: 'adminPortal.productTours.adminOnboarding.allocateLearningBudget.body.6.spendNoAssignment',
defaultMessage: 'Once you assign courses, you can monitor learner assignments, send reminders, or cancel as needed.',
description: 'Description for the allocate learning budgets flow step six for customers that have spend but no assignments.',
},
allocateLearningBudgetStepSevenAssignment: {
id: 'adminPortal.productTours.adminOnboarding.allocateLearningBudget.body.8.assignment',
Expand Down
Loading
Loading