@unite-us/app-create-referral 0.13.9 → 0.13.10
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.
|
@@ -40,35 +40,37 @@ export function ChooseOneServiceTypeModal(_ref) {
|
|
|
40
40
|
className: "bg-white border border-solid border-blue-border rounded mt-6 p-4 w-full h-full box-border"
|
|
41
41
|
}, /*#__PURE__*/React.createElement("h2", {
|
|
42
42
|
className: "text-base mb-1 text-text-blue font-proxima font-bold"
|
|
43
|
-
}, "Program: ".concat(program.name)), /*#__PURE__*/React.createElement("p", null,
|
|
43
|
+
}, "Program: ".concat(program.name)), /*#__PURE__*/React.createElement("p", null, "Select one service type that meets the client's needs."), program.services.map(function (serviceToFind) {
|
|
44
44
|
return renderServiceCheckbox(program, serviceToFind);
|
|
45
45
|
}));
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
var getDialogMessage = function getDialogMessage() {
|
|
49
|
-
return
|
|
49
|
+
return "Sending multiple referrals to the same program increases the likelihood of rejection.";
|
|
50
50
|
};
|
|
51
51
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
52
52
|
ref: modalRef,
|
|
53
|
-
title: "
|
|
53
|
+
title: "Simplify your referrals",
|
|
54
54
|
close: closeDialog,
|
|
55
55
|
dataTestId: "auth-requests-details-dialog",
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
titleClass: "text-2xl font-semibold font-black",
|
|
57
|
+
dialogContentStyles: {
|
|
58
|
+
background: '#FAFBFC',
|
|
59
|
+
paddingBottom: '110px'
|
|
60
|
+
},
|
|
61
|
+
customSize: {
|
|
62
|
+
width: '650px'
|
|
61
63
|
},
|
|
62
64
|
actions: /*#__PURE__*/React.createElement("div", {
|
|
63
65
|
className: "confirmation-dialog__actions"
|
|
64
66
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
65
67
|
className: "confirmation-dialog__actions--skip mr-6",
|
|
66
|
-
label: "Skip",
|
|
68
|
+
label: "Skip, send multiple referrals",
|
|
67
69
|
onClick: closeDialog
|
|
68
70
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
69
71
|
className: "confirmation-dialog__actions--apply",
|
|
70
72
|
onClick: onConfirm,
|
|
71
|
-
label: "Apply
|
|
73
|
+
label: "Apply selections",
|
|
72
74
|
primary: true
|
|
73
75
|
}))
|
|
74
76
|
}, /*#__PURE__*/React.createElement("p", null, getDialogMessage()), programs.map(renderProgram));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChooseOneServiceTypeModal.js","names":["React","PropTypes","Dialog","Button","ChooseOneServiceTypeModal","_ref","programs","modalRef","servicesState","findServiceName","onServiceSelectionChange","onConfirm","closeDialog","renderServiceCheckbox","program","serviceToFind","_servicesState$find","serviceName","isSelected","find","service","programId","id","serviceId","selected","createElement","key","concat","className","type","checked","onChange","htmlFor","renderProgram","services","length","name","map","getDialogMessage","ref","title","close","dataTestId","
|
|
1
|
+
{"version":3,"file":"ChooseOneServiceTypeModal.js","names":["React","PropTypes","Dialog","Button","ChooseOneServiceTypeModal","_ref","programs","modalRef","servicesState","findServiceName","onServiceSelectionChange","onConfirm","closeDialog","renderServiceCheckbox","program","serviceToFind","_servicesState$find","serviceName","isSelected","find","service","programId","id","serviceId","selected","createElement","key","concat","className","type","checked","onChange","htmlFor","renderProgram","services","length","name","map","getDialogMessage","ref","title","close","dataTestId","titleClass","dialogContentStyles","background","paddingBottom","customSize","width","actions","label","onClick","primary","propTypes","array","isRequired","referrals","object","func"],"sources":["../../../src/pages/builder/ChooseOneServiceTypeModal.js"],"sourcesContent":["import React from 'react';\nimport { PropTypes } from 'prop-types';\nimport Dialog from '../../components/modal/Dialog';\nimport { Button } from '@unite-us/ui';\n\nexport function ChooseOneServiceTypeModal({ programs, modalRef, servicesState, findServiceName, onServiceSelectionChange, onConfirm, closeDialog }) {\n \n const renderServiceCheckbox = (program, serviceToFind) => {\n const serviceName = findServiceName({ serviceToFind });\n const isSelected = servicesState.find(service =>\n service?.programId === program.id && service?.serviceId === serviceToFind\n )?.selected || false;\n\n return (\n <div key={`${program.id}-${serviceToFind}`} className=\"ui-checkbox-field pt-4\">\n <input\n id={`service-${program.id}-${serviceToFind}`}\n type=\"checkbox\"\n checked={isSelected}\n onChange={() => onServiceSelectionChange(program.id, serviceToFind)}\n />\n <label\n htmlFor={`service-${program.id}-${serviceToFind}`}\n className=\"ui-form-field__label\"\n >\n {serviceName}\n </label>\n </div>\n );\n };\n\n const renderProgram = (program) => {\n if (program.services.length > 1) {\n return (\n <div key={program.id} className=\"bg-white border border-solid border-blue-border rounded mt-6 p-4 w-full h-full box-border\">\n <h2 className=\"text-base mb-1 text-text-blue font-proxima font-bold\">\n {`Program: ${program.name}`}\n </h2>\n <p>Select one service type that meets the client's needs.</p>\n {program.services.map(serviceToFind => renderServiceCheckbox(program, serviceToFind))}\n </div>\n )\n }\n } \n\n const getDialogMessage = () => \"Sending multiple referrals to the same program increases the likelihood of rejection.\";\n\n return (\n <Dialog\n ref={modalRef}\n title=\"Simplify your referrals\"\n close={closeDialog}\n dataTestId=\"auth-requests-details-dialog\"\n titleClass=\"text-2xl font-semibold font-black\"\n dialogContentStyles={{\n background: '#FAFBFC',\n paddingBottom: '110px',\n }}\n customSize={{ \n width: '650px',\n }}\n actions={(\n <div className=\"confirmation-dialog__actions\">\n <Button\n className=\"confirmation-dialog__actions--skip mr-6\"\n label=\"Skip, send multiple referrals\"\n onClick={closeDialog}\n />\n <Button\n className=\"confirmation-dialog__actions--apply\"\n onClick={onConfirm}\n label=\"Apply selections\"\n primary\n />\n </div>\n )}\n >\n <p>{getDialogMessage()}</p>\n {programs.map(renderProgram)}\n </Dialog>\n )\n}\n\nChooseOneServiceTypeModal.propTypes = {\n programs: PropTypes.array.isRequired,\n referrals: PropTypes.array.isRequired,\n modalRef: PropTypes.object.isRequired,\n servicesState: PropTypes.array.isRequired,\n findServiceName: PropTypes.func.isRequired,\n onServiceSelect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