diff --git a/src/components/form/index.tsx b/src/components/form/index.tsx index ab3ec772..7d895bd3 100644 --- a/src/components/form/index.tsx +++ b/src/components/form/index.tsx @@ -294,6 +294,7 @@ const Widget: React.FC = (props) => { text1: ToastMessages.POST_OPERATIVE_HOURS_ACTIVITY, }); if (!addingNewFeedbackDisabled) setIsSubmitButtonDiabled(true); + navigateToScreen(CaseDetailStackEnum.COLLECTION_CASE_DETAIL, { caseId }); } }; diff --git a/src/screens/addressGeolocation/utils/operativeHourUtils.ts b/src/screens/addressGeolocation/utils/operativeHourUtils.ts deleted file mode 100644 index 3dc7fb70..00000000 --- a/src/screens/addressGeolocation/utils/operativeHourUtils.ts +++ /dev/null @@ -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; -}; diff --git a/src/screens/addressGeolocation/utils/operativeHourUtils.tsx b/src/screens/addressGeolocation/utils/operativeHourUtils.tsx new file mode 100644 index 00000000..20cdf712 --- /dev/null +++ b/src/screens/addressGeolocation/utils/operativeHourUtils.tsx @@ -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: + }, + }); + return; +}; diff --git a/src/screens/allCases/constants.ts b/src/screens/allCases/constants.ts index 6cf970cd..ea6ec968 100644 --- a/src/screens/allCases/constants.ts +++ b/src/screens/allCases/constants.ts @@ -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 {