-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [IOCOM-922] Remove medical prescription (#5407)
## Short description This PR removes Medical prescription from the project ## List of changes proposed in this pull request - removed Medical prescription related files - removed translation keys ## How to test Tests should be solved correctly --------- Co-authored-by: Cristiano Tofani <[email protected]> Co-authored-by: Andrea <[email protected]>
- Loading branch information
1 parent
3a476ba
commit b68ed9d
Showing
20 changed files
with
21 additions
and
4,345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,24 +22,6 @@ export const message_1: CreatedMessageWithContentAndAttachments = { | |
sender_service_id: service_1.service_id | ||
}; | ||
|
||
export const medicalPrescription: CreatedMessageWithContentAndAttachments = { | ||
created_at: "2021-11-23T13:29:49.771Z", | ||
fiscal_code: "TAMMRA80A41H501I", | ||
id: "00000000000000000000000013", | ||
sender_service_id: "service2", | ||
time_to_live: 3600, | ||
content: { | ||
subject: "💊 medical prescription - 1", | ||
markdown: | ||
"\n# H1 \n\n## H2 \n\n### H3 \n\n#### H4\n\n-----\n\n### an image\n\n\n-----\n\n### item list\n\n- item1\n- item2 \n- item3 \n- item4 \n- item5 \n- item6 \n\n-----\n\n### enumerated list\n\n1. item1\n1. item2 \n1. item3 \n1. item4 \n1. item5 \n1. item6 \n\n-----\n\n### formatted text\nÈ universalmente **riconosciuto** che un _lettore_ che **osserva** il layout di una pagina viene distratto dal contenuto testuale se questo è leggibile. Lo scopo dell’utilizzo del Lorem Ipsum è che offre una normale distribuzione delle lettere (al contrario di quanto avviene se si utilizzano brevi frasi ripetute, ad esempio “testo qui”), apparendo come un normale blocco di testo leggibile. Molti software di impaginazione e di web design utilizzano Lorem Ipsum come testo modello. Molte versioni del testo sono state prodotte negli anni, a volte casualmente, a volte di proposito (ad esempio inserendo passaggi ironici).\n\n| copia e incolla il seguente link: `https://verylongurl.com/verylong_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_`\n\n-----\n\n### external links\n\na link must **always** include the protocol (`http://` or `https://`)\n\n[Google](https://www.google.it)\n\n[Invalid link -1](www.google.it)\n\n[Invalid link -2](google.it)\n\n-----\n\n### Internal navigation\n\n[BONUS_AVAILABLE_LIST](ioit://BONUS_AVAILABLE_LIST)\n\n[BONUS_CTA_ELIGILITY_START](ioit://BONUS_CTA_ELIGILITY_START)\n\n[MESSAGES_HOME](ioit://MESSAGES_HOME)\n\n[PROFILE_PREFERENCES_HOME](ioit://PROFILE_PREFERENCES_HOME)\n\n[SERVICES_HOME](ioit://SERVICES_HOME)\n\n[PROFILE_MAIN](ioit://PROFILE_MAIN)\n\n[PROFILE_PRIVACY](ioit://PROFILE_PRIVACY)\n\n[PROFILE_PRIVACY_MAIN](ioit://PROFILE_PRIVACY_MAIN)\n\n[WALLET_HOME](ioit://WALLET_HOME)\n\n[WALLET_LIST](ioit://WALLET_LIST)\n\n[PAYMENTS_HISTORY_SCREEN](ioit://PAYMENTS_HISTORY_SCREEN)\n\n[WALLET_HOME con parametri](ioit://WALLET_HOME?param1=a¶m2=b¶m3=c¶m4=100)\n\n[SERVICE WEBVIEW](ioit://SERVICE_WEBVIEW?url=https://www.google.com)\n\n[LINK CORROTTO](ioit://WRONG&$)\n\n### Handled link\n[http - google](iohandledlink://http://www.google.com)\n\n[https - google](iohandledlink://https://www.google.com)\n\n[clipboard](iohandledlink://copy:textcopy)\n\n[sms](iohandledlink://sms:+123456789)\n\n[tel](iohandledlink://tel:+123456789)\n\n[mailto](iohandledlink://mailto:[email protected])\n\n", | ||
prescription_data: { | ||
nre: "050A00854698121", | ||
iup: "0000X0NFM", | ||
prescriber_fiscal_code: "TAMMRA80A41H501I" | ||
} | ||
} | ||
} as any; | ||
|
||
export const paymentValidInvalidAfterDueDate: CreatedMessageWithContentAndAttachments = | ||
{ | ||
created_at: "2021-11-23T13:29:54.771Z", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 14 additions & 33 deletions
47
ts/features/messages/components/MessageDetail/HeaderDueDateBar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,26 @@ | ||
import * as React from "react"; | ||
import React from "react"; | ||
import { UIMessageDetails } from "../../types"; | ||
import { getPaymentExpirationInfo } from "../../utils"; | ||
import DueDateBar from "./DueDateBar"; | ||
import MedicalPrescriptionDueDateBar from "./MedicalPrescriptionDueDateBar"; | ||
import MedicalPrescriptionIdentifiersComponent from "./MedicalPrescriptionIdentifiersComponent"; | ||
|
||
type Props = { | ||
type HeaderDueDateBarProps = { | ||
messageDetails: UIMessageDetails; | ||
hasPaidBadge: boolean; | ||
}; | ||
|
||
/** | ||
* Groups all the possible combination of DueDate bars based (or not) on the prescriptionData | ||
* @param props | ||
* @constructor | ||
*/ | ||
export const HeaderDueDateBar = (props: Props): React.ReactElement => { | ||
const paymentExpirationInfo = getPaymentExpirationInfo(props.messageDetails); | ||
export const HeaderDueDateBar = ({ | ||
hasPaidBadge, | ||
messageDetails | ||
}: HeaderDueDateBarProps) => { | ||
if (messageDetails.dueDate === undefined) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<> | ||
{props.messageDetails.prescriptionData && ( | ||
<MedicalPrescriptionIdentifiersComponent | ||
prescriptionData={props.messageDetails.prescriptionData} | ||
/> | ||
)} | ||
|
||
{props.messageDetails.dueDate !== undefined && | ||
(props.messageDetails.prescriptionData === undefined ? ( | ||
<DueDateBar | ||
dueDate={props.messageDetails.dueDate} | ||
expirationInfo={paymentExpirationInfo} | ||
isPaid={props.hasPaidBadge} | ||
/> | ||
) : ( | ||
<MedicalPrescriptionDueDateBar | ||
dueDate={props.messageDetails.dueDate} | ||
messageDetails={props.messageDetails} | ||
paymentExpirationInfo={paymentExpirationInfo} | ||
/> | ||
))} | ||
</> | ||
<DueDateBar | ||
dueDate={messageDetails.dueDate} | ||
expirationInfo={getPaymentExpirationInfo(messageDetails)} | ||
isPaid={hasPaidBadge} | ||
/> | ||
); | ||
}; |
105 changes: 0 additions & 105 deletions
105
ts/features/messages/components/MessageDetail/MedicalPrescriptionAttachments.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.