NTP-14132| custom toast

This commit is contained in:
aishwarya.srivastava
2024-11-29 16:07:38 +05:30
parent 4ebfcf3bdb
commit b4c66efff8
4 changed files with 19 additions and 11 deletions

View File

@@ -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 });
}
};

View File

@@ -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;
};

View 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;
};

View File

@@ -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 {