TP-21479|Kunal|Toast messages (#183)
This commit is contained in:
committed by
GitHub Enterprise
parent
fa87e04949
commit
6004c8e8f9
@@ -44,6 +44,7 @@ import { getNextJourneyActions, getNextWidget } from './services/forms.service';
|
||||
import { CaptureGeolocation } from './services/geoLocation.service';
|
||||
import Submit from './Submit';
|
||||
import { toast } from '../../../RN-UI-LIB/src/components/toast';
|
||||
import {ToastMessages} from "../../screens/allCases/constants";
|
||||
|
||||
interface IWidget {
|
||||
route: {
|
||||
@@ -241,7 +242,7 @@ const Widget: React.FC<IWidget> = props => {
|
||||
);
|
||||
toast({
|
||||
type: 'info',
|
||||
text1: "Feedback will be submitted automatically once you're back online",
|
||||
text1: ToastMessages.FEEDBACK_SUBMITTED_OFFLINE,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -14,6 +14,8 @@ import {setSelectedFilters, setSelectedFiltersVisitPlan,} from '../../../../redu
|
||||
import {FilterContainerProps, ISelectedFilterKey} from './Interface';
|
||||
import styles from './styles';
|
||||
import FilterOptions from './FilterOptions';
|
||||
import {toast} from "../../../../../RN-UI-LIB/src/components/toast";
|
||||
import {ToastMessages} from "../../../../screens/allCases/constants";
|
||||
|
||||
const FiltersContainer: React.FC<FilterContainerProps> = props => {
|
||||
const { closeFilterModal, isVisitPlan } = props;
|
||||
@@ -55,6 +57,11 @@ const FiltersContainer: React.FC<FilterContainerProps> = props => {
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.AV_FILTERS_APPLY_CLICKED, {
|
||||
selectedFilters: selectedFiltersMap,
|
||||
});
|
||||
toast({
|
||||
type: 'info',
|
||||
text1: ToastMessages.FILTERS_APPLIED_SUCCESSFULLY,
|
||||
visibilityTime: 1
|
||||
});
|
||||
closeFilterModal();
|
||||
};
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ import {
|
||||
} from '../../../../reducer/filtersSlice';
|
||||
import { SELECTION_TYPES } from '../../../../common/Constants';
|
||||
import PressableChip from '../../../../../RN-UI-LIB/src/components/PressableChip';
|
||||
import {toast} from "../../../../../RN-UI-LIB/src/components/toast";
|
||||
import {ToastMessages} from "../../../../screens/allCases/constants";
|
||||
|
||||
interface IQuickFilterProps {
|
||||
isVisitPlan?: boolean;
|
||||
@@ -49,6 +51,11 @@ const QuickFilters: React.FC<IQuickFilterProps> = ({ isVisitPlan }) => {
|
||||
: quickFilter.value,
|
||||
}),
|
||||
);
|
||||
toast({
|
||||
type: 'info',
|
||||
text1: ToastMessages.FILTERS_APPLIED_SUCCESSFULLY,
|
||||
visibilityTime: 1
|
||||
});
|
||||
break;
|
||||
case false:
|
||||
switch (quickFilter.selectionType) {
|
||||
|
||||
@@ -21,26 +21,31 @@ export const ListHeaderItems = {
|
||||
},
|
||||
ADD_VISIT_PLAN: {
|
||||
type: CaseTypes.ADD_VISIT_PLAN,
|
||||
caseReferenceId: '-4'
|
||||
}
|
||||
caseReferenceId: '-4',
|
||||
},
|
||||
};
|
||||
|
||||
export const LIST_HEADER_ITEMS = [
|
||||
CaseTypes.BANNER , CaseTypes.FILTER , CaseTypes.TODO_HEADER , CaseTypes.CASES_HEADER , CaseTypes.ADD_VISIT_PLAN
|
||||
CaseTypes.BANNER,
|
||||
CaseTypes.FILTER,
|
||||
CaseTypes.TODO_HEADER,
|
||||
CaseTypes.CASES_HEADER,
|
||||
CaseTypes.ADD_VISIT_PLAN,
|
||||
];
|
||||
|
||||
|
||||
|
||||
export const EmptyListMessages = {
|
||||
NO_COMPLETED_CASES: 'No case completed yet',
|
||||
NO_PENDING_CASES: 'Looks like you resolved all your cases for this allocation',
|
||||
NO_PENDING_CASES:
|
||||
'Looks like you resolved all your cases for this allocation',
|
||||
NO_VISIT_PLANS: 'Plan your day by creating a visit plan',
|
||||
NO_CASES_FOUND: 'No results found',
|
||||
NO_CASES_FOUND_SUB: 'Try removing or adding different filters, or search something else',
|
||||
NO_CASES_FOUND_SUB:
|
||||
'Try removing or adding different filters, or search something else',
|
||||
};
|
||||
|
||||
export const ToastMessages = {
|
||||
VISIT_PLAN_OFFLINE: 'Please connect to the internet to update the visit plan',
|
||||
VISIT_PLAN_OFFLINE:
|
||||
'Please connect to the internet to update the visit plan',
|
||||
ERROR_COPYING_LAN: 'Error copying LAN!!',
|
||||
SUCCESS_COPYING_LAN: 'LAN Copied Successfully!!',
|
||||
FEEDBACK_SUCCESSFUL: 'Feedback submitted successfully!',
|
||||
@@ -49,4 +54,8 @@ export const ToastMessages = {
|
||||
PAYMENT_LINK_ERROR: 'Payment link could not be shared',
|
||||
PAYMENT_LINK_SUCCESS: 'Link has been generated and shared with customer',
|
||||
SUCCESS_COPYING_PAYMENT_LINK: 'Link copied successfully',
|
||||
FILTERS_APPLIED_SUCCESSFULLY: 'Filters applied successfully',
|
||||
FEEDBACK_SUBMITTED_OFFLINE:
|
||||
"Feedback will be submitted automatically once you're back online",
|
||||
OFFLINE_MESSAGE: 'You seem to be offline'
|
||||
};
|
||||
|
||||
@@ -22,6 +22,8 @@ import {
|
||||
UnifiedCaseDetailsTypes,
|
||||
} from '../../action/caseApiActions';
|
||||
import RepaymentsTab from "./repayments/RepaymentsTab";
|
||||
import {toast} from "../../../RN-UI-LIB/src/components/toast";
|
||||
import {ToastMessages} from "../allCases/constants";
|
||||
|
||||
enum EmiTab {
|
||||
Schedule,
|
||||
@@ -46,19 +48,23 @@ const EmiSchedule: React.FC<IEmiSchedule> = props => {
|
||||
} = props;
|
||||
const [currentTab, setCurrentTab] = useState<EmiTab>(EmiTab.Schedule);
|
||||
const dispatch = useAppDispatch();
|
||||
const { refreshing, onRefresh } = useRefresh(() =>
|
||||
dispatch(
|
||||
getCaseUnifiedData(
|
||||
[loanAccountNumber],
|
||||
[UnifiedCaseDetailsTypes.EMI_SCHEDULE , UnifiedCaseDetailsTypes.REPAYMENTS],
|
||||
),
|
||||
),
|
||||
const isOnline = useIsOnline();
|
||||
const { refreshing, onRefresh } = useRefresh(() => {
|
||||
isOnline ? dispatch(
|
||||
getCaseUnifiedData(
|
||||
[loanAccountNumber],
|
||||
[UnifiedCaseDetailsTypes.EMI_SCHEDULE, UnifiedCaseDetailsTypes.REPAYMENTS],
|
||||
),
|
||||
) : toast({
|
||||
type: 'info',
|
||||
text1: ToastMessages.OFFLINE_MESSAGE,
|
||||
});
|
||||
}
|
||||
);
|
||||
const { pos, tenureMonths, disbursalDate } = useAppSelector(
|
||||
(state: RootState) =>
|
||||
state.allCases.caseDetails[caseId ?? customerReferenceId],
|
||||
);
|
||||
const isOnline = useIsOnline();
|
||||
const emiData = useAppSelector(
|
||||
state => state.emiSchedule?.[loanAccountNumber]?.data,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user