Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/frontend/src/components/Fields/SignatureField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const SignatureField = <T extends string>({
onChange(`${fieldId}.signatureCanvasWidth`, data.width)
onChange(`${fieldId}.signatureCanvasHeight`, data.height)

if (!!documentURL) {
if (documentURL) {
onChange(`${fieldId}.documentURL.EN`, documentURL.EN)
onChange(`${fieldId}.documentURL.AR`, documentURL.AR)
}
Expand Down
5 changes: 5 additions & 0 deletions apps/frontend/src/components/Icons/Icons.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import AddIcon from '@mui/icons-material/Add'
import Clear from '@mui/icons-material/Clear'
import CreateIcon from '@mui/icons-material/Create'
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'
Expand Down Expand Up @@ -35,3 +36,7 @@ export const ChevronRightIcon = styled(KeyboardArrowRightIcon)({
export const ClearIcon = styled(Clear)({
height: '100%',
})

export const PlusIcon = styled(AddIcon)({
height: '100%',
})
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const PatientDetailSidebar = ({ patientData, onViewPatient }: PatientDetailSideb
const [translations, selectedLang] = useTranslations()
const isArabic = selectedLang === LANGUAGES.AR


/**
* Expands the notes panel for the given step, or closes all panels
*/
Expand Down Expand Up @@ -76,9 +75,9 @@ const PatientDetailSidebar = ({ patientData, onViewPatient }: PatientDetailSideb
return (
<Drawer
className={selectedLang === LANGUAGES.EN ? 'drawer' : 'drawer-rtl'}
classes={{paper: 'drawer-paper'}}
classes={{ paper: 'drawer-paper' }}
variant="permanent"
anchor={isArabic ? 'right' : 'left'} // ← flips automatically
anchor={isArabic ? 'right' : 'left'} // ← flips automatically
>
<Toolbar />
<div className="drawer-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
ChevronRightIcon,
ChevronUpIcon,
PencilIcon,
PlusIcon,
} from '../Icons/Icons'

export interface StepManagementContentProps {
Expand Down Expand Up @@ -141,7 +142,7 @@ const StepManagementContent = ({
if (!isEditing) return null
return (
<div onClick={() => onAddSubfield(stepKey, root)} className="add-subfield-button">
<i className="chevron add icon" />
<PlusIcon />
</div>
)
}
Expand Down
30 changes: 17 additions & 13 deletions apps/frontend/src/pages/PatientDetail/PatientDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,22 +206,26 @@ const PatientDetail = () => {
onUploadProfilePicture={onUploadProfilePicture}
/>

<PatientDetailSidebar
patientData={patientData!}
onViewPatient={() => setManagePatientModalOpen(true)}
/>
<PatientDetailSidebar
patientData={patientData!}
onViewPatient={() => setManagePatientModalOpen(true)}
/>

<div className={`controller-content ${selectedLang === LANGUAGES.AR ? 'controller-content-ar' : ''}`}>
<ToggleButtons
step={selectedStep}
patientData={patientData!}
handleStep={onStepChange}
/>
{generateStepContent()}
</div>
<div
className={`controller-content ${
selectedLang === LANGUAGES.AR ? 'controller-content-ar' : ''
}`}
>
<ToggleButtons
step={selectedStep}
patientData={patientData!}
handleStep={onStepChange}
/>
{generateStepContent()}
</div>
</div>
</LoadWrapper>
)
}

export default PatientDetail
export default PatientDetail
Loading