@abihealth/goapp-react-native 1.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +157 -0
- package/README.md +3 -0
- package/dist/common/animations/Animation.d.ts +10 -0
- package/dist/common/animations/Animation.js +38 -0
- package/dist/common/animations/FindingAnimation/index.d.ts +2 -0
- package/dist/common/animations/FindingAnimation/index.js +20 -0
- package/dist/common/animations/FindingAnimation/xml.d.ts +2 -0
- package/dist/common/animations/FindingAnimation/xml.js +7 -0
- package/dist/common/animations/HorizontalLoadingAnimation/index.d.ts +5 -0
- package/dist/common/animations/HorizontalLoadingAnimation/index.js +14 -0
- package/dist/common/animations/HorizontalLoadingAnimation/xml.d.ts +1 -0
- package/dist/common/animations/HorizontalLoadingAnimation/xml.js +5 -0
- package/dist/common/animations/LoadingCircleAnimation/index.d.ts +2 -0
- package/dist/common/animations/LoadingCircleAnimation/index.js +24 -0
- package/dist/common/animations/LoadingCircleAnimation/xml.d.ts +2 -0
- package/dist/common/animations/LoadingCircleAnimation/xml.js +5 -0
- package/dist/common/animations/LoadingDotsAnimation/index.d.ts +6 -0
- package/dist/common/animations/LoadingDotsAnimation/index.js +17 -0
- package/dist/common/animations/LoadingDotsAnimation/xml.d.ts +1 -0
- package/dist/common/animations/LoadingDotsAnimation/xml.js +5 -0
- package/dist/common/animations/LoadingHeart.d.ts +2 -0
- package/dist/common/animations/LoadingHeart.js +92 -0
- package/dist/common/api/auth.d.ts +2 -0
- package/dist/common/api/auth.js +18 -0
- package/dist/common/api/config.d.ts +7 -0
- package/dist/common/api/config.js +15 -0
- package/dist/common/api/consultation.d.ts +6 -0
- package/dist/common/api/consultation.js +80 -0
- package/dist/common/api/models/auth.d.ts +8 -0
- package/dist/common/api/models/auth.js +2 -0
- package/dist/common/api/models/consultation.d.ts +70 -0
- package/dist/common/api/models/consultation.js +23 -0
- package/dist/common/api/models/region.d.ts +1 -0
- package/dist/common/api/models/region.js +2 -0
- package/dist/common/api/models/user.d.ts +5 -0
- package/dist/common/api/models/user.js +2 -0
- package/dist/common/api/models/websocket.d.ts +6 -0
- package/dist/common/api/models/websocket.js +2 -0
- package/dist/common/api/user.d.ts +2 -0
- package/dist/common/api/user.js +10 -0
- package/dist/common/api/websocket.d.ts +6 -0
- package/dist/common/api/websocket.js +66 -0
- package/dist/common/assets/background-pattern.png +0 -0
- package/dist/common/components/ActionSheet.d.ts +6 -0
- package/dist/common/components/ActionSheet.js +43 -0
- package/dist/common/components/AnswerScreen/Card.d.ts +8 -0
- package/dist/common/components/AnswerScreen/Card.js +76 -0
- package/dist/common/components/AnswerScreen/CloseConsultationActionSheet.d.ts +2 -0
- package/dist/common/components/AnswerScreen/CloseConsultationActionSheet.js +109 -0
- package/dist/common/components/AnswerScreen/DeliveryAddressCard.d.ts +5 -0
- package/dist/common/components/AnswerScreen/DeliveryAddressCard.js +39 -0
- package/dist/common/components/AnswerScreen/PrescriptionCard/PrescriptionCardHeader.d.ts +5 -0
- package/dist/common/components/AnswerScreen/PrescriptionCard/PrescriptionCardHeader.js +79 -0
- package/dist/common/components/AnswerScreen/PrescriptionCard/index.d.ts +5 -0
- package/dist/common/components/AnswerScreen/PrescriptionCard/index.js +46 -0
- package/dist/common/components/AnswerScreen/Summary.d.ts +5 -0
- package/dist/common/components/AnswerScreen/Summary.js +49 -0
- package/dist/common/components/BackgroundPattern.d.ts +2 -0
- package/dist/common/components/BackgroundPattern.js +19 -0
- package/dist/common/components/Button.d.ts +14 -0
- package/dist/common/components/Button.js +124 -0
- package/dist/common/components/CancelConsultationButton.d.ts +2 -0
- package/dist/common/components/CancelConsultationButton.js +107 -0
- package/dist/common/components/Card.d.ts +2 -0
- package/dist/common/components/Card.js +13 -0
- package/dist/common/components/Checkbox.d.ts +7 -0
- package/dist/common/components/Checkbox.js +75 -0
- package/dist/common/components/DateInput.d.ts +8 -0
- package/dist/common/components/DateInput.js +76 -0
- package/dist/common/components/DoctorProfileCard.d.ts +8 -0
- package/dist/common/components/DoctorProfileCard.js +128 -0
- package/dist/common/components/FadeIn.d.ts +8 -0
- package/dist/common/components/FadeIn.js +66 -0
- package/dist/common/components/FormControl.d.ts +8 -0
- package/dist/common/components/FormControl.js +40 -0
- package/dist/common/components/FormWrapper.d.ts +11 -0
- package/dist/common/components/FormWrapper.js +46 -0
- package/dist/common/components/Header.d.ts +10 -0
- package/dist/common/components/Header.js +109 -0
- package/dist/common/components/Input.d.ts +8 -0
- package/dist/common/components/Input.js +74 -0
- package/dist/common/components/Modal/AttachmentPreviewModal.d.ts +9 -0
- package/dist/common/components/Modal/AttachmentPreviewModal.js +68 -0
- package/dist/common/components/Modal/CancelModal.d.ts +9 -0
- package/dist/common/components/Modal/CancelModal.js +16 -0
- package/dist/common/components/Modal/CloseConsultationModal.d.ts +9 -0
- package/dist/common/components/Modal/CloseConsultationModal.js +16 -0
- package/dist/common/components/Modal/DoctorProfileModal.d.ts +8 -0
- package/dist/common/components/Modal/DoctorProfileModal.js +47 -0
- package/dist/common/components/Modal/ModalHeader.d.ts +7 -0
- package/dist/common/components/Modal/ModalHeader.js +40 -0
- package/dist/common/components/Modal/TwoOptionsModal.d.ts +14 -0
- package/dist/common/components/Modal/TwoOptionsModal.js +58 -0
- package/dist/common/components/Modal/index.d.ts +7 -0
- package/dist/common/components/Modal/index.js +57 -0
- package/dist/common/components/PhoneInput.d.ts +11 -0
- package/dist/common/components/PhoneInput.js +81 -0
- package/dist/common/components/Reminder.d.ts +7 -0
- package/dist/common/components/Reminder.js +214 -0
- package/dist/common/components/ScreenWrapper.d.ts +12 -0
- package/dist/common/components/ScreenWrapper.js +46 -0
- package/dist/common/components/Select.d.ts +17 -0
- package/dist/common/components/Select.js +132 -0
- package/dist/common/components/Slide.d.ts +13 -0
- package/dist/common/components/Slide.js +83 -0
- package/dist/common/components/SlideUp.d.ts +8 -0
- package/dist/common/components/SlideUp.js +69 -0
- package/dist/common/components/Text.d.ts +22 -0
- package/dist/common/components/Text.js +130 -0
- package/dist/common/contexts/ConsultationContext.d.ts +22 -0
- package/dist/common/contexts/ConsultationContext.js +215 -0
- package/dist/common/contexts/FormContext.d.ts +25 -0
- package/dist/common/contexts/FormContext.js +55 -0
- package/dist/common/contexts/ThemeContext.d.ts +13 -0
- package/dist/common/contexts/ThemeContext.js +18 -0
- package/dist/common/hooks/useConsultation.d.ts +13 -0
- package/dist/common/hooks/useConsultation.js +166 -0
- package/dist/common/hooks/useForm.d.ts +10 -0
- package/dist/common/hooks/useForm.js +107 -0
- package/dist/common/hooks/useHeader.d.ts +4 -0
- package/dist/common/hooks/useHeader.js +10 -0
- package/dist/common/hooks/useTheme.d.ts +2 -0
- package/dist/common/hooks/useTheme.js +26 -0
- package/dist/common/hooks/useUser.d.ts +4 -0
- package/dist/common/hooks/useUser.js +10 -0
- package/dist/common/icons/AbiLogoIcon.d.ts +2 -0
- package/dist/common/icons/AbiLogoIcon.js +53 -0
- package/dist/common/icons/BackArrowIcon.d.ts +2 -0
- package/dist/common/icons/BackArrowIcon.js +49 -0
- package/dist/common/icons/CalendarIcon.d.ts +3 -0
- package/dist/common/icons/CalendarIcon.js +43 -0
- package/dist/common/icons/CheckSuccessIcon.d.ts +3 -0
- package/dist/common/icons/CheckSuccessIcon.js +47 -0
- package/dist/common/icons/CloseIcon.d.ts +5 -0
- package/dist/common/icons/CloseIcon.js +51 -0
- package/dist/common/icons/DoctorIcon.d.ts +3 -0
- package/dist/common/icons/DoctorIcon.js +48 -0
- package/dist/common/icons/DoctorImagePlaceholderIcon.d.ts +5 -0
- package/dist/common/icons/DoctorImagePlaceholderIcon.js +64 -0
- package/dist/common/icons/DropdownIcon.d.ts +3 -0
- package/dist/common/icons/DropdownIcon.js +41 -0
- package/dist/common/icons/ExitIcon.d.ts +2 -0
- package/dist/common/icons/ExitIcon.js +58 -0
- package/dist/common/icons/InfoIcon.d.ts +2 -0
- package/dist/common/icons/InfoIcon.js +49 -0
- package/dist/common/icons/KoCircleIcon.d.ts +3 -0
- package/dist/common/icons/KoCircleIcon.js +42 -0
- package/dist/common/icons/MotorbikeIcon.d.ts +2 -0
- package/dist/common/icons/MotorbikeIcon.js +65 -0
- package/dist/common/icons/NoCaseFoundIcon.d.ts +3 -0
- package/dist/common/icons/NoCaseFoundIcon.js +55 -0
- package/dist/common/icons/PdfDownloadIcon.d.ts +2 -0
- package/dist/common/icons/PdfDownloadIcon.js +58 -0
- package/dist/common/icons/PdfIcon.d.ts +2 -0
- package/dist/common/icons/PdfIcon.js +50 -0
- package/dist/common/icons/PersonIcon.d.ts +3 -0
- package/dist/common/icons/PersonIcon.js +45 -0
- package/dist/common/icons/PillsIcon.d.ts +2 -0
- package/dist/common/icons/PillsIcon.js +52 -0
- package/dist/common/icons/PlaneIcon.d.ts +5 -0
- package/dist/common/icons/PlaneIcon.js +48 -0
- package/dist/common/icons/RatingIcon.d.ts +2 -0
- package/dist/common/icons/RatingIcon.js +53 -0
- package/dist/common/icons/StarIcon.d.ts +4 -0
- package/dist/common/icons/StarIcon.js +57 -0
- package/dist/common/icons/TextConsultationIcon.d.ts +4 -0
- package/dist/common/icons/TextConsultationIcon.js +53 -0
- package/dist/common/icons/TrashIcon.d.ts +2 -0
- package/dist/common/icons/TrashIcon.js +49 -0
- package/dist/common/icons/VideoConsultationIcon.d.ts +4 -0
- package/dist/common/icons/VideoConsultationIcon.js +50 -0
- package/dist/common/index.d.ts +57 -0
- package/dist/common/index.js +114 -0
- package/dist/common/locale/i18n.d.ts +5 -0
- package/dist/common/locale/i18n.js +79 -0
- package/dist/common/locale/translations/ar-AE.base.json +604 -0
- package/dist/common/locale/translations/ar-LB.base.json +604 -0
- package/dist/common/locale/translations/bg.base.json +488 -0
- package/dist/common/locale/translations/cs.base.json +499 -0
- package/dist/common/locale/translations/en.base.json +923 -0
- package/dist/common/locale/translations/es-MX.base.json +827 -0
- package/dist/common/locale/translations/es.base.json +827 -0
- package/dist/common/locale/translations/fr.base.json +605 -0
- package/dist/common/locale/translations/hu.base.json +488 -0
- package/dist/common/locale/translations/pl.base.json +487 -0
- package/dist/common/locale/translations/ro.base.json +501 -0
- package/dist/common/locale/translations/ru.base.json +603 -0
- package/dist/common/locale/translations/sk.base.json +535 -0
- package/dist/common/locale/translations/zh-HK.base.json +349 -0
- package/dist/common/locale/translations/zh-SG.base.json +603 -0
- package/dist/common/locale/translations/zh-TW.base.json +873 -0
- package/dist/common/screens/AnswerScreen.d.ts +11 -0
- package/dist/common/screens/AnswerScreen.js +101 -0
- package/dist/common/screens/MatchScreen.d.ts +5 -0
- package/dist/common/screens/MatchScreen.js +36 -0
- package/dist/common/screens/MatchingScreen.d.ts +2 -0
- package/dist/common/screens/MatchingScreen.js +41 -0
- package/dist/common/screens/NoConsultationFoundScreen.d.ts +2 -0
- package/dist/common/screens/NoConsultationFoundScreen.js +34 -0
- package/dist/common/screens/PreparingSummaryScreen.d.ts +5 -0
- package/dist/common/screens/PreparingSummaryScreen.js +35 -0
- package/dist/common/screens/RatingScreen.d.ts +2 -0
- package/dist/common/screens/RatingScreen.js +198 -0
- package/dist/common/screens/index.d.ts +3 -0
- package/dist/common/screens/index.js +29 -0
- package/dist/common/types/consultation.d.ts +93 -0
- package/dist/common/types/consultation.js +41 -0
- package/dist/common/types/deliveryAddress.d.ts +18 -0
- package/dist/common/types/deliveryAddress.js +11 -0
- package/dist/common/types/events.d.ts +13 -0
- package/dist/common/types/events.js +15 -0
- package/dist/common/types/prescription.d.ts +52 -0
- package/dist/common/types/prescription.js +31 -0
- package/dist/common/types/professional.d.ts +14 -0
- package/dist/common/types/professional.js +2 -0
- package/dist/common/types/theme.d.ts +82 -0
- package/dist/common/types/theme.js +58 -0
- package/dist/common/types/user.d.ts +10 -0
- package/dist/common/types/user.js +2 -0
- package/dist/common/utils/platform.d.ts +3 -0
- package/dist/common/utils/platform.js +7 -0
- package/dist/common/utils/professional.d.ts +2 -0
- package/dist/common/utils/professional.js +12 -0
- package/dist/common/utils/zod.d.ts +5 -0
- package/dist/common/utils/zod.js +19 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +133 -0
- package/dist/video-consultations/animations/CallingAnimation/index.d.ts +2 -0
- package/dist/video-consultations/animations/CallingAnimation/index.js +17 -0
- package/dist/video-consultations/animations/CallingAnimation/xml.d.ts +2 -0
- package/dist/video-consultations/animations/CallingAnimation/xml.js +5 -0
- package/dist/video-consultations/api/models/video.d.ts +10 -0
- package/dist/video-consultations/api/models/video.js +2 -0
- package/dist/video-consultations/api/video.d.ts +3 -0
- package/dist/video-consultations/api/video.js +12 -0
- package/dist/video-consultations/components/AgoraWrapper/components/BaseRenderUsers.d.ts +12 -0
- package/dist/video-consultations/components/AgoraWrapper/components/BaseRenderUsers.js +174 -0
- package/dist/video-consultations/components/AgoraWrapper/components/BtnControls.d.ts +14 -0
- package/dist/video-consultations/components/AgoraWrapper/components/BtnControls.js +55 -0
- package/dist/video-consultations/components/AgoraWrapper/components/ui/index.d.ts +14 -0
- package/dist/video-consultations/components/AgoraWrapper/components/ui/index.js +100 -0
- package/dist/video-consultations/components/AgoraWrapper/index.d.ts +8 -0
- package/dist/video-consultations/components/AgoraWrapper/index.js +173 -0
- package/dist/video-consultations/components/Modal/EndVideoCallModal.d.ts +8 -0
- package/dist/video-consultations/components/Modal/EndVideoCallModal.js +15 -0
- package/dist/video-consultations/components/VideoConsultation.d.ts +7 -0
- package/dist/video-consultations/components/VideoConsultation.js +42 -0
- package/dist/video-consultations/helpers/eventHandler.d.ts +14 -0
- package/dist/video-consultations/helpers/eventHandler.js +61 -0
- package/dist/video-consultations/hooks/useInitRtcEngine.d.ts +15 -0
- package/dist/video-consultations/hooks/useInitRtcEngine.js +194 -0
- package/dist/video-consultations/icons/EndVideoCallIcon.d.ts +2 -0
- package/dist/video-consultations/icons/EndVideoCallIcon.js +51 -0
- package/dist/video-consultations/icons/HangUpIcon.d.ts +3 -0
- package/dist/video-consultations/icons/HangUpIcon.js +41 -0
- package/dist/video-consultations/icons/MicroOffIcon.d.ts +7 -0
- package/dist/video-consultations/icons/MicroOffIcon.js +47 -0
- package/dist/video-consultations/icons/MicroOnIcon.d.ts +3 -0
- package/dist/video-consultations/icons/MicroOnIcon.js +42 -0
- package/dist/video-consultations/icons/PersonIcon.d.ts +3 -0
- package/dist/video-consultations/icons/PersonIcon.js +45 -0
- package/dist/video-consultations/icons/SwitchCameraIcon.d.ts +3 -0
- package/dist/video-consultations/icons/SwitchCameraIcon.js +41 -0
- package/dist/video-consultations/icons/VideoOffIcon.d.ts +5 -0
- package/dist/video-consultations/icons/VideoOffIcon.js +44 -0
- package/dist/video-consultations/icons/VideoOnIcon.d.ts +3 -0
- package/dist/video-consultations/icons/VideoOnIcon.js +41 -0
- package/dist/video-consultations/index.d.ts +10 -0
- package/dist/video-consultations/index.js +24 -0
- package/dist/video-consultations/screens/DeliveryAddressScreen.d.ts +2 -0
- package/dist/video-consultations/screens/DeliveryAddressScreen.js +84 -0
- package/dist/video-consultations/screens/EndingVideoScreen.d.ts +5 -0
- package/dist/video-consultations/screens/EndingVideoScreen.js +27 -0
- package/dist/video-consultations/screens/JoinVideoCallScreen.d.ts +5 -0
- package/dist/video-consultations/screens/JoinVideoCallScreen.js +108 -0
- package/dist/video-consultations/screens/ProcessingPrescriptionScreen.d.ts +2 -0
- package/dist/video-consultations/screens/ProcessingPrescriptionScreen.js +32 -0
- package/dist/video-consultations/screens/VideoCallScreen.d.ts +3 -0
- package/dist/video-consultations/screens/VideoCallScreen.js +77 -0
- package/dist/video-consultations/utils/permission.d.ts +14 -0
- package/dist/video-consultations/utils/permission.js +97 -0
- package/package.json +58 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Question } from '../types/consultation';
|
|
3
|
+
import { Prescription } from '../types/prescription';
|
|
4
|
+
import { Professional } from '../types/professional';
|
|
5
|
+
interface AnswerScreenProps {
|
|
6
|
+
questions: Question[];
|
|
7
|
+
professional: Professional;
|
|
8
|
+
prescription?: Prescription;
|
|
9
|
+
}
|
|
10
|
+
export declare const AnswerScreen: ({ questions, professional, prescription }: AnswerScreenProps) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.AnswerScreen = void 0;
|
|
37
|
+
var react_1 = __importStar(require("react"));
|
|
38
|
+
var react_i18next_1 = require("react-i18next");
|
|
39
|
+
var react_native_1 = require("react-native");
|
|
40
|
+
var Card_1 = require("../components/AnswerScreen/Card");
|
|
41
|
+
var CloseConsultationActionSheet_1 = require("../components/AnswerScreen/CloseConsultationActionSheet");
|
|
42
|
+
var PrescriptionCard_1 = require("../components/AnswerScreen/PrescriptionCard");
|
|
43
|
+
var PrescriptionCardHeader_1 = require("../components/AnswerScreen/PrescriptionCard/PrescriptionCardHeader");
|
|
44
|
+
var Summary_1 = require("../components/AnswerScreen/Summary");
|
|
45
|
+
var Header_1 = require("../components/Header");
|
|
46
|
+
var ScreenWrapper_1 = require("../components/ScreenWrapper");
|
|
47
|
+
var Text_1 = require("../components/Text");
|
|
48
|
+
var useConsultation_1 = require("../hooks/useConsultation");
|
|
49
|
+
var useTheme_1 = require("../hooks/useTheme");
|
|
50
|
+
var VideoConsultationIcon_1 = require("../icons/VideoConsultationIcon");
|
|
51
|
+
var SHOW_CLOSE_DELAY = 3000;
|
|
52
|
+
var AnswerScreen = function (_a) {
|
|
53
|
+
var _b;
|
|
54
|
+
var questions = _a.questions, professional = _a.professional, prescription = _a.prescription;
|
|
55
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
56
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
57
|
+
var styles = getStyles(theme);
|
|
58
|
+
var scrollRef = (0, react_1.useRef)(null);
|
|
59
|
+
var consultation = (0, useConsultation_1.useConsultation)().consultation;
|
|
60
|
+
var _c = (0, react_1.useState)(false), showCloseConsultation = _c[0], setShowCloseConsultation = _c[1];
|
|
61
|
+
var scrollEnd = function () { var _a; return (_a = scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollToEnd({ animated: true }); };
|
|
62
|
+
(0, react_1.useEffect)(function () { return scrollEnd(); }, [showCloseConsultation]);
|
|
63
|
+
(0, react_1.useEffect)(function () {
|
|
64
|
+
var timeout = setTimeout(function () { return setShowCloseConsultation(true); }, SHOW_CLOSE_DELAY);
|
|
65
|
+
return function () { return clearTimeout(timeout); };
|
|
66
|
+
}, []);
|
|
67
|
+
return (<>
|
|
68
|
+
<ScreenWrapper_1.ScreenWrapper scrollRef={scrollRef} header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />}/>} containerStyle={styles.container} onContentSizeChange={scrollEnd}>
|
|
69
|
+
{questions.map(function (_a, index) {
|
|
70
|
+
var question = _a.question, answer = _a.answer;
|
|
71
|
+
return (<react_1.Fragment key={index}>
|
|
72
|
+
<Card_1.Card type="question">
|
|
73
|
+
<Text_1.Text>{question}</Text_1.Text>
|
|
74
|
+
</Card_1.Card>
|
|
75
|
+
|
|
76
|
+
{answer && (<Card_1.Card type="answer" style={styles.answerCard}>
|
|
77
|
+
<PrescriptionCardHeader_1.ProfessionalCardHeader professional={professional}/>
|
|
78
|
+
<Text_1.Text>{answer}</Text_1.Text>
|
|
79
|
+
</Card_1.Card>)}
|
|
80
|
+
</react_1.Fragment>);
|
|
81
|
+
})}
|
|
82
|
+
|
|
83
|
+
{prescription && <PrescriptionCard_1.PrescriptionCard prescription={prescription}/>}
|
|
84
|
+
|
|
85
|
+
<Summary_1.Summary url={(_b = consultation === null || consultation === void 0 ? void 0 : consultation.pdf) === null || _b === void 0 ? void 0 : _b.fileName}/>
|
|
86
|
+
</ScreenWrapper_1.ScreenWrapper>
|
|
87
|
+
|
|
88
|
+
{showCloseConsultation && <CloseConsultationActionSheet_1.CloseConsultationActionSheet />}
|
|
89
|
+
</>);
|
|
90
|
+
};
|
|
91
|
+
exports.AnswerScreen = AnswerScreen;
|
|
92
|
+
var getStyles = function (_a) {
|
|
93
|
+
var spacing = _a.spacing;
|
|
94
|
+
return react_native_1.StyleSheet.create({
|
|
95
|
+
container: {
|
|
96
|
+
rowGap: spacing.xs,
|
|
97
|
+
padding: spacing.sm
|
|
98
|
+
},
|
|
99
|
+
answerCard: { rowGap: spacing.sm }
|
|
100
|
+
});
|
|
101
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MatchScreen = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_i18next_1 = require("react-i18next");
|
|
9
|
+
var react_native_1 = require("react-native");
|
|
10
|
+
var CancelConsultationButton_1 = require("../components/CancelConsultationButton");
|
|
11
|
+
var DoctorProfileCard_1 = require("../components/DoctorProfileCard");
|
|
12
|
+
var Header_1 = require("../components/Header");
|
|
13
|
+
var ScreenWrapper_1 = require("../components/ScreenWrapper");
|
|
14
|
+
var Text_1 = require("../components/Text");
|
|
15
|
+
var useTheme_1 = require("../hooks/useTheme");
|
|
16
|
+
var VideoConsultationIcon_1 = require("../icons/VideoConsultationIcon");
|
|
17
|
+
var MatchScreen = function (_a) {
|
|
18
|
+
var professional = _a.professional;
|
|
19
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
20
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
21
|
+
var styles = getStyles(theme);
|
|
22
|
+
return (<ScreenWrapper_1.ScreenWrapper header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />} rightIcon={<CancelConsultationButton_1.CancelConsultationButton />}/>} containerStyle={styles.container} reminder={false}>
|
|
23
|
+
<DoctorProfileCard_1.DoctorProfileCard professional={professional} description={t('reviewing.video')}/>
|
|
24
|
+
|
|
25
|
+
<Text_1.Text center>{t('matching.video.text_message')}</Text_1.Text>
|
|
26
|
+
</ScreenWrapper_1.ScreenWrapper>);
|
|
27
|
+
};
|
|
28
|
+
exports.MatchScreen = MatchScreen;
|
|
29
|
+
var getStyles = function (_a) {
|
|
30
|
+
var spacing = _a.spacing;
|
|
31
|
+
return react_native_1.StyleSheet.create({
|
|
32
|
+
container: {
|
|
33
|
+
rowGap: spacing.sm
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MatchingScreen = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_i18next_1 = require("react-i18next");
|
|
9
|
+
var react_native_1 = require("react-native");
|
|
10
|
+
var FindingAnimation_1 = require("../animations/FindingAnimation");
|
|
11
|
+
var CancelConsultationButton_1 = require("../components/CancelConsultationButton");
|
|
12
|
+
var Header_1 = require("../components/Header");
|
|
13
|
+
var ScreenWrapper_1 = require("../components/ScreenWrapper");
|
|
14
|
+
var Text_1 = require("../components/Text");
|
|
15
|
+
var useTheme_1 = require("../hooks/useTheme");
|
|
16
|
+
var VideoConsultationIcon_1 = require("../icons/VideoConsultationIcon");
|
|
17
|
+
var MatchingScreen = function () {
|
|
18
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
19
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
20
|
+
var styles = getStyles(theme);
|
|
21
|
+
return (<ScreenWrapper_1.ScreenWrapper header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />} rightIcon={<CancelConsultationButton_1.CancelConsultationButton />}/>} containerStyle={styles.container} reminder>
|
|
22
|
+
<Text_1.Text variant="h2" color={theme.colors.primary} center>
|
|
23
|
+
{t('matching')}
|
|
24
|
+
</Text_1.Text>
|
|
25
|
+
|
|
26
|
+
<FindingAnimation_1.FindingAnimation />
|
|
27
|
+
|
|
28
|
+
<Text_1.Text center>{t('matching.video.text_message')}</Text_1.Text>
|
|
29
|
+
<Text_1.Text center>{t('match.one_minute')}</Text_1.Text>
|
|
30
|
+
</ScreenWrapper_1.ScreenWrapper>);
|
|
31
|
+
};
|
|
32
|
+
exports.MatchingScreen = MatchingScreen;
|
|
33
|
+
var getStyles = function (_a) {
|
|
34
|
+
var spacing = _a.spacing;
|
|
35
|
+
return react_native_1.StyleSheet.create({
|
|
36
|
+
container: {
|
|
37
|
+
paddingTop: spacing.xl,
|
|
38
|
+
rowGap: spacing.xl
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NoConsultationFoundScreen = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_i18next_1 = require("react-i18next");
|
|
9
|
+
var react_native_1 = require("react-native");
|
|
10
|
+
var Header_1 = require("../components/Header");
|
|
11
|
+
var ScreenWrapper_1 = require("../components/ScreenWrapper");
|
|
12
|
+
var Text_1 = require("../components/Text");
|
|
13
|
+
var useTheme_1 = require("../hooks/useTheme");
|
|
14
|
+
var AbiLogoIcon_1 = require("../icons/AbiLogoIcon");
|
|
15
|
+
var NoCaseFoundIcon_1 = __importDefault(require("../icons/NoCaseFoundIcon"));
|
|
16
|
+
var NoConsultationFoundScreen = function () {
|
|
17
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
18
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
19
|
+
var styles = getStyles(theme);
|
|
20
|
+
return (<ScreenWrapper_1.ScreenWrapper header={<Header_1.Header centerIcon={<AbiLogoIcon_1.AbiLogoIcon />}/>} containerStyle={styles.container}>
|
|
21
|
+
<NoCaseFoundIcon_1.default />
|
|
22
|
+
<Text_1.Text>{t('no_active_cases.title')}</Text_1.Text>
|
|
23
|
+
</ScreenWrapper_1.ScreenWrapper>);
|
|
24
|
+
};
|
|
25
|
+
exports.NoConsultationFoundScreen = NoConsultationFoundScreen;
|
|
26
|
+
var getStyles = function (_a) {
|
|
27
|
+
var spacing = _a.spacing;
|
|
28
|
+
return react_native_1.StyleSheet.create({
|
|
29
|
+
container: {
|
|
30
|
+
rowGap: spacing.xl,
|
|
31
|
+
justifyContent: 'center'
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PreparingSummaryScreen = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_i18next_1 = require("react-i18next");
|
|
9
|
+
var react_native_1 = require("react-native");
|
|
10
|
+
var DoctorProfileCard_1 = require("../components/DoctorProfileCard");
|
|
11
|
+
var Header_1 = require("../components/Header");
|
|
12
|
+
var ScreenWrapper_1 = require("../components/ScreenWrapper");
|
|
13
|
+
var Text_1 = require("../components/Text");
|
|
14
|
+
var useTheme_1 = require("../hooks/useTheme");
|
|
15
|
+
var VideoConsultationIcon_1 = require("../icons/VideoConsultationIcon");
|
|
16
|
+
var PreparingSummaryScreen = function (_a) {
|
|
17
|
+
var professional = _a.professional;
|
|
18
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
19
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
20
|
+
var styles = getStyles(theme);
|
|
21
|
+
return (<ScreenWrapper_1.ScreenWrapper header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />}/>} containerStyle={styles.container} reminder>
|
|
22
|
+
<DoctorProfileCard_1.DoctorProfileCard professional={professional} description={t('consultation.summary_being_prepared')}/>
|
|
23
|
+
|
|
24
|
+
<Text_1.Text center>{t('general.consultation.videoConsultation.hcpCanRecall')}</Text_1.Text>
|
|
25
|
+
</ScreenWrapper_1.ScreenWrapper>);
|
|
26
|
+
};
|
|
27
|
+
exports.PreparingSummaryScreen = PreparingSummaryScreen;
|
|
28
|
+
var getStyles = function (_a) {
|
|
29
|
+
var spacing = _a.spacing;
|
|
30
|
+
return react_native_1.StyleSheet.create({
|
|
31
|
+
container: {
|
|
32
|
+
rowGap: spacing.sm
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
45
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
46
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
47
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
48
|
+
function step(op) {
|
|
49
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
50
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
51
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
52
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
53
|
+
switch (op[0]) {
|
|
54
|
+
case 0: case 1: t = op; break;
|
|
55
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
56
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
57
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
58
|
+
default:
|
|
59
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
60
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
61
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
62
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
63
|
+
if (t[2]) _.ops.pop();
|
|
64
|
+
_.trys.pop(); continue;
|
|
65
|
+
}
|
|
66
|
+
op = body.call(thisArg, _);
|
|
67
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
68
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
72
|
+
exports.RatingScreen = void 0;
|
|
73
|
+
var react_1 = __importStar(require("react"));
|
|
74
|
+
var react_i18next_1 = require("react-i18next");
|
|
75
|
+
var react_native_1 = require("react-native");
|
|
76
|
+
var Button_1 = require("../components/Button");
|
|
77
|
+
var Header_1 = require("../components/Header");
|
|
78
|
+
var ScreenWrapper_1 = require("../components/ScreenWrapper");
|
|
79
|
+
var Text_1 = require("../components/Text");
|
|
80
|
+
var useConsultation_1 = require("../hooks/useConsultation");
|
|
81
|
+
var useTheme_1 = require("../hooks/useTheme");
|
|
82
|
+
var RatingIcon_1 = require("../icons/RatingIcon");
|
|
83
|
+
var StarIcon_1 = require("../icons/StarIcon");
|
|
84
|
+
var VideoConsultationIcon_1 = require("../icons/VideoConsultationIcon");
|
|
85
|
+
var RATINGS = [1, 2, 3, 4, 5];
|
|
86
|
+
var RatingScreen = function () {
|
|
87
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
88
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
89
|
+
var styles = getStyles(theme);
|
|
90
|
+
var _a = (0, useConsultation_1.useConsultation)(), rate = _a.rate, updateConsultation = _a.updateConsultation;
|
|
91
|
+
var _b = (0, react_1.useState)(false), loading = _b[0], setLoading = _b[1];
|
|
92
|
+
var _c = react_1.default.useState(null), selectedRating = _c[0], setSelectedRating = _c[1];
|
|
93
|
+
var _d = (0, react_1.useState)(false), showError = _d[0], setShowError = _d[1];
|
|
94
|
+
var shakeAnimation = new react_native_1.Animated.Value(0);
|
|
95
|
+
var startShake = function () {
|
|
96
|
+
react_native_1.Animated.sequence([
|
|
97
|
+
react_native_1.Animated.timing(shakeAnimation, { toValue: 10, duration: 50, useNativeDriver: true }),
|
|
98
|
+
react_native_1.Animated.timing(shakeAnimation, { toValue: -10, duration: 50, useNativeDriver: true }),
|
|
99
|
+
react_native_1.Animated.timing(shakeAnimation, { toValue: 10, duration: 50, useNativeDriver: true }),
|
|
100
|
+
react_native_1.Animated.timing(shakeAnimation, { toValue: -10, duration: 50, useNativeDriver: true }),
|
|
101
|
+
react_native_1.Animated.timing(shakeAnimation, { toValue: 10, duration: 50, useNativeDriver: true }),
|
|
102
|
+
react_native_1.Animated.timing(shakeAnimation, { toValue: 0, duration: 50, useNativeDriver: true })
|
|
103
|
+
]).start();
|
|
104
|
+
};
|
|
105
|
+
(0, react_1.useEffect)(function () {
|
|
106
|
+
if (showError)
|
|
107
|
+
startShake();
|
|
108
|
+
}, [showError]);
|
|
109
|
+
var handleRate = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
110
|
+
return __generator(this, function (_a) {
|
|
111
|
+
switch (_a.label) {
|
|
112
|
+
case 0:
|
|
113
|
+
if (!selectedRating) {
|
|
114
|
+
setShowError(true);
|
|
115
|
+
return [2 /*return*/];
|
|
116
|
+
}
|
|
117
|
+
_a.label = 1;
|
|
118
|
+
case 1:
|
|
119
|
+
_a.trys.push([1, , 3, 4]);
|
|
120
|
+
setLoading(true);
|
|
121
|
+
return [4 /*yield*/, rate(selectedRating)];
|
|
122
|
+
case 2:
|
|
123
|
+
_a.sent();
|
|
124
|
+
updateConsultation(null);
|
|
125
|
+
return [3 /*break*/, 4];
|
|
126
|
+
case 3:
|
|
127
|
+
setLoading(false);
|
|
128
|
+
return [7 /*endfinally*/];
|
|
129
|
+
case 4: return [2 /*return*/];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}); };
|
|
133
|
+
var handleSkip = function () {
|
|
134
|
+
updateConsultation(null);
|
|
135
|
+
};
|
|
136
|
+
return (<ScreenWrapper_1.ScreenWrapper header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />}/>} containerStyle={styles.container}>
|
|
137
|
+
<react_native_1.View style={styles.innerContainer}>
|
|
138
|
+
<RatingIcon_1.RatingIcon />
|
|
139
|
+
|
|
140
|
+
<react_native_1.View>
|
|
141
|
+
<Text_1.Text variant="h2" center>
|
|
142
|
+
{t('rating.title')}
|
|
143
|
+
</Text_1.Text>
|
|
144
|
+
<Text_1.Text center>{t('rating.subtitle')}</Text_1.Text>
|
|
145
|
+
</react_native_1.View>
|
|
146
|
+
<react_native_1.View style={styles.ratingContainer}>
|
|
147
|
+
<react_native_1.Animated.View style={[styles.starsContainer, { transform: [{ translateX: shakeAnimation }] }]}>
|
|
148
|
+
{Object.values(RATINGS).map(function (rating) { return (<react_native_1.TouchableOpacity key={rating} onPress={function () {
|
|
149
|
+
setSelectedRating(rating);
|
|
150
|
+
setShowError(false);
|
|
151
|
+
}}>
|
|
152
|
+
<StarIcon_1.StarIcon selected={selectedRating >= rating}/>
|
|
153
|
+
</react_native_1.TouchableOpacity>); })}
|
|
154
|
+
</react_native_1.Animated.View>
|
|
155
|
+
{showError && (<Text_1.Text center color={theme.colors.warning} variant="sm" style={styles.error}>
|
|
156
|
+
{t('rating.validation')}
|
|
157
|
+
</Text_1.Text>)}
|
|
158
|
+
</react_native_1.View>
|
|
159
|
+
</react_native_1.View>
|
|
160
|
+
<react_native_1.View style={styles.buttonsContainer}>
|
|
161
|
+
<Button_1.Button radio onPress={handleRate} loading={loading}>
|
|
162
|
+
{t('button.submit')}
|
|
163
|
+
</Button_1.Button>
|
|
164
|
+
<Button_1.Button variant="secondary" radio onPress={handleSkip} disabled={loading}>
|
|
165
|
+
{t('button.skip')}
|
|
166
|
+
</Button_1.Button>
|
|
167
|
+
</react_native_1.View>
|
|
168
|
+
</ScreenWrapper_1.ScreenWrapper>);
|
|
169
|
+
};
|
|
170
|
+
exports.RatingScreen = RatingScreen;
|
|
171
|
+
var getStyles = function (_a) {
|
|
172
|
+
var spacing = _a.spacing;
|
|
173
|
+
return react_native_1.StyleSheet.create({
|
|
174
|
+
container: {
|
|
175
|
+
paddingTop: spacing.xxl,
|
|
176
|
+
rowGap: spacing.xxl
|
|
177
|
+
},
|
|
178
|
+
innerContainer: {
|
|
179
|
+
rowGap: spacing.xl,
|
|
180
|
+
alignItems: 'center'
|
|
181
|
+
},
|
|
182
|
+
starsContainer: {
|
|
183
|
+
flexDirection: 'row',
|
|
184
|
+
justifyContent: 'center',
|
|
185
|
+
columnGap: spacing.sm
|
|
186
|
+
},
|
|
187
|
+
buttonsContainer: {
|
|
188
|
+
width: '100%',
|
|
189
|
+
rowGap: spacing.sm
|
|
190
|
+
},
|
|
191
|
+
ratingContainer: {
|
|
192
|
+
rowGap: 0
|
|
193
|
+
},
|
|
194
|
+
error: {
|
|
195
|
+
paddingVertical: spacing.xs
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCommonScreen = void 0;
|
|
4
|
+
var consultation_1 = require("../types/consultation");
|
|
5
|
+
var AnswerScreen_1 = require("./AnswerScreen");
|
|
6
|
+
var MatchingScreen_1 = require("./MatchingScreen");
|
|
7
|
+
var MatchScreen_1 = require("./MatchScreen");
|
|
8
|
+
var NoConsultationFoundScreen_1 = require("./NoConsultationFoundScreen");
|
|
9
|
+
var RatingScreen_1 = require("./RatingScreen");
|
|
10
|
+
var getCommonScreen = function (consultation) {
|
|
11
|
+
if (!consultation)
|
|
12
|
+
return <NoConsultationFoundScreen_1.NoConsultationFoundScreen />;
|
|
13
|
+
var status = consultation.status, professional = consultation.professional, questions = consultation.questions;
|
|
14
|
+
switch (status) {
|
|
15
|
+
case consultation_1.CONSULTATION_STATUS.OPEN:
|
|
16
|
+
if (professional)
|
|
17
|
+
return <MatchScreen_1.MatchScreen professional={professional}/>;
|
|
18
|
+
return <MatchingScreen_1.MatchingScreen />;
|
|
19
|
+
case consultation_1.CONSULTATION_STATUS.RESOLVED:
|
|
20
|
+
return <AnswerScreen_1.AnswerScreen questions={questions} professional={professional}/>;
|
|
21
|
+
case consultation_1.CONSULTATION_STATUS.CLOSED:
|
|
22
|
+
return <RatingScreen_1.RatingScreen />;
|
|
23
|
+
case consultation_1.CONSULTATION_STATUS.CANCELED:
|
|
24
|
+
return <NoConsultationFoundScreen_1.NoConsultationFoundScreen />;
|
|
25
|
+
default:
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.getCommonScreen = getCommonScreen;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Prescription } from './prescription';
|
|
3
|
+
import { Professional } from './professional';
|
|
4
|
+
export declare enum CASE_TYPE {
|
|
5
|
+
MEDICAL = "medicalConsultation",
|
|
6
|
+
PRESCRIPTION = "prescriptionRequest",
|
|
7
|
+
VIDEO = "videoConsultation",
|
|
8
|
+
VOICE = "voiceConsultation",
|
|
9
|
+
MENTAL = "mentalHealthEvaluation"
|
|
10
|
+
}
|
|
11
|
+
export declare enum IndicationFileStatus {
|
|
12
|
+
CREATING = "CREATING",
|
|
13
|
+
CREATED = "CREATED",
|
|
14
|
+
ERROR = "ERROR"
|
|
15
|
+
}
|
|
16
|
+
export type IndicationFiles = {
|
|
17
|
+
status: IndicationFileStatus.CREATING;
|
|
18
|
+
} | {
|
|
19
|
+
status: IndicationFileStatus.CREATED;
|
|
20
|
+
url: string;
|
|
21
|
+
} | {
|
|
22
|
+
status: IndicationFileStatus.ERROR;
|
|
23
|
+
message: string;
|
|
24
|
+
};
|
|
25
|
+
export type License = {
|
|
26
|
+
licenseNumber: string;
|
|
27
|
+
countries: string[];
|
|
28
|
+
};
|
|
29
|
+
export type Question = {
|
|
30
|
+
createdAt?: number;
|
|
31
|
+
question: string;
|
|
32
|
+
attachments: string[];
|
|
33
|
+
answer?: string;
|
|
34
|
+
};
|
|
35
|
+
export declare enum DELIVERY_ADDRESS_STATUS {
|
|
36
|
+
PENDING = "pending",
|
|
37
|
+
REJECTED = "rejected",
|
|
38
|
+
APPROVED = "approved"
|
|
39
|
+
}
|
|
40
|
+
export declare enum CONSULTATION_STATUS {
|
|
41
|
+
NEW = "new",
|
|
42
|
+
OPEN = "open",
|
|
43
|
+
RESOLVED = "resolved",
|
|
44
|
+
CANCELED = "canceled",
|
|
45
|
+
CLOSED = "closed",
|
|
46
|
+
CLOSED_WORATING = "closedworating",
|
|
47
|
+
ONGOING_VIDEO_CALL = "onGoingVideoCall",
|
|
48
|
+
VIDEO_CALL_ENDED = "videoCallEnded",
|
|
49
|
+
WAITING_FOR_INFO = "waitingForInfo",
|
|
50
|
+
WAITING_FOR_SWAP = "waitingForSwap",
|
|
51
|
+
WAITING_FOR_CONSULTATION_PAYMENT = "waitingForConsultationPayment"
|
|
52
|
+
}
|
|
53
|
+
type PaymentInformation = {
|
|
54
|
+
userIsRequiredToPay: boolean;
|
|
55
|
+
url: string | undefined;
|
|
56
|
+
currency: string;
|
|
57
|
+
price: number;
|
|
58
|
+
};
|
|
59
|
+
type VideoCall = {
|
|
60
|
+
room: string;
|
|
61
|
+
uuid: number;
|
|
62
|
+
appId: string;
|
|
63
|
+
provider: string;
|
|
64
|
+
patientStartedAt: string;
|
|
65
|
+
patientToken: string;
|
|
66
|
+
isRejoin: boolean;
|
|
67
|
+
patientHangout?: boolean;
|
|
68
|
+
};
|
|
69
|
+
type Pdf = {
|
|
70
|
+
status: string;
|
|
71
|
+
fileName: string;
|
|
72
|
+
};
|
|
73
|
+
export type Consultation = {
|
|
74
|
+
type: CASE_TYPE;
|
|
75
|
+
id: string;
|
|
76
|
+
createdAt: number;
|
|
77
|
+
questions: Question[];
|
|
78
|
+
status: CONSULTATION_STATUS;
|
|
79
|
+
userId: string;
|
|
80
|
+
professional?: Professional;
|
|
81
|
+
prescription?: Prescription;
|
|
82
|
+
notify: boolean;
|
|
83
|
+
caseConsultationPdf?: IndicationFiles;
|
|
84
|
+
videoCall?: VideoCall;
|
|
85
|
+
conditionSymptoms?: string;
|
|
86
|
+
paymentInformation?: PaymentInformation;
|
|
87
|
+
pdf?: Pdf;
|
|
88
|
+
};
|
|
89
|
+
export declare enum CONSULTATION_EVENT {
|
|
90
|
+
CREATED = "created"
|
|
91
|
+
}
|
|
92
|
+
export type HeaderT = ReactNode | null;
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONSULTATION_EVENT = exports.CONSULTATION_STATUS = exports.DELIVERY_ADDRESS_STATUS = exports.IndicationFileStatus = exports.CASE_TYPE = void 0;
|
|
4
|
+
var CASE_TYPE;
|
|
5
|
+
(function (CASE_TYPE) {
|
|
6
|
+
CASE_TYPE["MEDICAL"] = "medicalConsultation";
|
|
7
|
+
CASE_TYPE["PRESCRIPTION"] = "prescriptionRequest";
|
|
8
|
+
CASE_TYPE["VIDEO"] = "videoConsultation";
|
|
9
|
+
CASE_TYPE["VOICE"] = "voiceConsultation";
|
|
10
|
+
CASE_TYPE["MENTAL"] = "mentalHealthEvaluation";
|
|
11
|
+
})(CASE_TYPE || (exports.CASE_TYPE = CASE_TYPE = {}));
|
|
12
|
+
var IndicationFileStatus;
|
|
13
|
+
(function (IndicationFileStatus) {
|
|
14
|
+
IndicationFileStatus["CREATING"] = "CREATING";
|
|
15
|
+
IndicationFileStatus["CREATED"] = "CREATED";
|
|
16
|
+
IndicationFileStatus["ERROR"] = "ERROR";
|
|
17
|
+
})(IndicationFileStatus || (exports.IndicationFileStatus = IndicationFileStatus = {}));
|
|
18
|
+
var DELIVERY_ADDRESS_STATUS;
|
|
19
|
+
(function (DELIVERY_ADDRESS_STATUS) {
|
|
20
|
+
DELIVERY_ADDRESS_STATUS["PENDING"] = "pending";
|
|
21
|
+
DELIVERY_ADDRESS_STATUS["REJECTED"] = "rejected";
|
|
22
|
+
DELIVERY_ADDRESS_STATUS["APPROVED"] = "approved";
|
|
23
|
+
})(DELIVERY_ADDRESS_STATUS || (exports.DELIVERY_ADDRESS_STATUS = DELIVERY_ADDRESS_STATUS = {}));
|
|
24
|
+
var CONSULTATION_STATUS;
|
|
25
|
+
(function (CONSULTATION_STATUS) {
|
|
26
|
+
CONSULTATION_STATUS["NEW"] = "new";
|
|
27
|
+
CONSULTATION_STATUS["OPEN"] = "open";
|
|
28
|
+
CONSULTATION_STATUS["RESOLVED"] = "resolved";
|
|
29
|
+
CONSULTATION_STATUS["CANCELED"] = "canceled";
|
|
30
|
+
CONSULTATION_STATUS["CLOSED"] = "closed";
|
|
31
|
+
CONSULTATION_STATUS["CLOSED_WORATING"] = "closedworating";
|
|
32
|
+
CONSULTATION_STATUS["ONGOING_VIDEO_CALL"] = "onGoingVideoCall";
|
|
33
|
+
CONSULTATION_STATUS["VIDEO_CALL_ENDED"] = "videoCallEnded";
|
|
34
|
+
CONSULTATION_STATUS["WAITING_FOR_INFO"] = "waitingForInfo";
|
|
35
|
+
CONSULTATION_STATUS["WAITING_FOR_SWAP"] = "waitingForSwap";
|
|
36
|
+
CONSULTATION_STATUS["WAITING_FOR_CONSULTATION_PAYMENT"] = "waitingForConsultationPayment";
|
|
37
|
+
})(CONSULTATION_STATUS || (exports.CONSULTATION_STATUS = CONSULTATION_STATUS = {}));
|
|
38
|
+
var CONSULTATION_EVENT;
|
|
39
|
+
(function (CONSULTATION_EVENT) {
|
|
40
|
+
CONSULTATION_EVENT["CREATED"] = "created";
|
|
41
|
+
})(CONSULTATION_EVENT || (exports.CONSULTATION_EVENT = CONSULTATION_EVENT = {}));
|