Skip to content

Commit

Permalink
Format files
Browse files Browse the repository at this point in the history
  • Loading branch information
samau3 committed Oct 21, 2024
1 parent 2cf217d commit 7861aa6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion client/src/pages/patients/register/PatientRegistration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ export default function PatientRegistration() {

if (physician) {
const fullName = `${physician.firstName}${physician.middleName ? ` ${physician.middleName}` : ''} ${physician.lastName}`;
const hospital = physician.hospitals[0] ? physician.hospitals[0].name : '';
const hospital = physician.hospitals[0]
? physician.hospitals[0].name
: '';
const phone = physician.phone ? `${physician.phone} ` : '';
const physicianDetails = `${fullName}${hospital ? ` (${hospital})` : ''}${phone ? ` - ${phone}` : ''}`;
setInitialPhysicianData(physicianDetails);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,16 @@ export default function HealthcareChoicesSearch({ form, choice, initialData }) {

const handleSelectValue = (id, key) => {
const name = key.children;
setSearch(name.join(""));
setSearch(name.join(''));
form.setFieldValue(`healthcareChoices.${choice}Id`, id);
combobox.closeDropdown();
};

const options = (data || []).map((item) => (
<Combobox.Option value={item.id} key={item.id}>
{item.name}{item.hospital ? ` (${item.hospital})` : ''}{item.phone ? ` - ${item.phone}` : ''}
{item.name}
{item.hospital ? ` (${item.hospital})` : ''}
{item.phone ? ` - ${item.phone}` : ''}
</Combobox.Option>
));

Expand Down

0 comments on commit 7861aa6

Please sign in to comment.