NTP-14132| custom toast
This commit is contained in:
@@ -294,6 +294,7 @@ const Widget: React.FC<IWidget> = (props) => {
|
||||
text1: ToastMessages.POST_OPERATIVE_HOURS_ACTIVITY,
|
||||
});
|
||||
if (!addingNewFeedbackDisabled) setIsSubmitButtonDiabled(true);
|
||||
navigateToScreen(CaseDetailStackEnum.COLLECTION_CASE_DETAIL, { caseId });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import { toast } from "@rn-ui-lib/components/toast";
|
||||
|
||||
export const handleClickPostOperativeHours = () => {
|
||||
|
||||
toast({
|
||||
type: 'accessDenied',
|
||||
text1: 'You will be able to add feedback only during work hours (8 AM to 7 PM).',
|
||||
});
|
||||
return;
|
||||
};
|
||||
16
src/screens/addressGeolocation/utils/operativeHourUtils.tsx
Normal file
16
src/screens/addressGeolocation/utils/operativeHourUtils.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { COLORS } from '@rn-ui-lib/colors';
|
||||
import { toast } from '@rn-ui-lib/components/toast';
|
||||
import InfoIcon from '@rn-ui-lib/icons/InfoIcon';
|
||||
import { ToastMessages } from '@screens/allCases/constants';
|
||||
|
||||
export const handleClickPostOperativeHours = () => {
|
||||
toast({
|
||||
type: 'custom',
|
||||
text1: ToastMessages.DISABLE_ADD_FEEDBACK_AFTER_POST_OPERATIVE_HOURS,
|
||||
props: {
|
||||
customBackgroundColor: COLORS.BACKGROUND.ORANGE_LIGHT,
|
||||
customIcon: <InfoIcon color={COLORS.TEXT.ORANGE_DARK}/>
|
||||
},
|
||||
});
|
||||
return;
|
||||
};
|
||||
@@ -95,7 +95,8 @@ export const ToastMessages = {
|
||||
WHATSAPP_SHARE_SUCCESS: 'Document shared successfully via WhatsApp',
|
||||
WHATSAPP_SHARE_FAILURE: 'Document sharing failed via WhatsApp',
|
||||
ERROR_FETCHING_MULTILINGUAL_DOC : 'Error fetching multilingual document',
|
||||
POST_OPERATIVE_HOURS_ACTIVITY: 'You can contact customer only during work hours (8 AM to 7 PM)'
|
||||
POST_OPERATIVE_HOURS_ACTIVITY: 'Submission failed! You can add feedback only during work hours (8 AM to 7 PM)',
|
||||
DISABLE_ADD_FEEDBACK_AFTER_POST_OPERATIVE_HOURS: 'You will be able to add feedback only during work hours (8 AM to 7 PM)'
|
||||
};
|
||||
|
||||
export enum BOTTOM_TAB_ROUTES {
|
||||
|
||||
Reference in New Issue
Block a user