Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fallback url for goBack() #10146

Merged
merged 28 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f71c397
fallback url in goBack and user search feature
Rishith25 Jan 24, 2025
407dfd4
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Jan 24, 2025
e44190c
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Jan 25, 2025
adb0e2f
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Jan 28, 2025
6561701
qParams undefined resolved
Rishith25 Jan 28, 2025
24df168
Merge branch 'fallbackurl-in-goBack' of https://github.com/Rishith25/…
Rishith25 Jan 28, 2025
d509275
changes
Rishith25 Jan 28, 2025
f7d3575
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Feb 3, 2025
05da6fc
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Feb 5, 2025
3bbfd43
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Feb 7, 2025
3dac6e7
suggested change
Rishith25 Feb 7, 2025
9c2e5f7
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Feb 10, 2025
b85ddae
i8n added for search users
Rishith25 Feb 10, 2025
5faa9ae
small change
Rishith25 Feb 10, 2025
44b7cf1
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Feb 11, 2025
021aaff
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Feb 11, 2025
88b2d5c
fixed broken search
Rishith25 Feb 11, 2025
ac488ba
Merge branch 'fallbackurl-in-goBack' of https://github.com/Rishith25/…
Rishith25 Feb 11, 2025
ec6787e
removed the search input
Rishith25 Feb 12, 2025
68f004a
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Feb 12, 2025
04686e9
gaback in questionnaire fixed
Rishith25 Feb 12, 2025
0f7a9b8
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Feb 14, 2025
e22bcc8
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Feb 16, 2025
b5e4210
removed facility username searching
Rishith25 Feb 16, 2025
a084c93
commit
Rishith25 Feb 16, 2025
aa719c7
Merge branch 'develop' into fallbackurl-in-goBack
Rishith25 Feb 18, 2025
7a0c85a
Merge branch 'develop' into fallbackurl-in-goBack
nihal467 Feb 19, 2025
6637943
Merge branch 'develop' into fallbackurl-in-goBack
nihal467 Feb 20, 2025
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
1 change: 1 addition & 0 deletions src/components/Auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@
const { reCaptchaSiteKey, urls, stateLogo, customLogo, customLogoAlt } =
careConfig;
const customDescriptionHtml = __CUSTOM_DESCRIPTION_HTML__;
const initForm: any = {

Check warning on line 75 in src/components/Auth/Login.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (1)

Unexpected any. Specify a different type
username: "",
password: "",
};
const { forgot } = props;
const [params] = useQueryParams();
const { mode } = params;
const initErr: any = {};

Check warning on line 82 in src/components/Auth/Login.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (1)

Unexpected any. Specify a different type
const [form, setForm] = useState(initForm);
const [errors, setErrors] = useState(initErr);
const [isCaptchaEnabled, setCaptcha] = useState(false);
Expand Down Expand Up @@ -107,7 +107,7 @@
setOtpError("");
toast.success(t("send_otp_success"));
},
onError: (error: any) => {

Check warning on line 110 in src/components/Auth/Login.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (1)

Unexpected any. Specify a different type
const errors = error?.data || [];
if (Array.isArray(errors) && errors.length > 0) {
const firstError = errors[0] as OtpError;
Expand Down Expand Up @@ -633,6 +633,7 @@
}}
maxLength={5}
placeholder="Enter 5-digit OTP"
autoFocus
/>
{otpValidationError && (
<p className="text-sm text-red-500">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Patient/PatientRegistration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ export default function PatientRegistration(
<Button
variant={"secondary"}
type="button"
onClick={() => goBack()}
onClick={() => goBack(`/facility/${facilityId}/patients`)}
>
{t("cancel")}
</Button>
Expand Down
10 changes: 9 additions & 1 deletion src/pages/Appointments/BookAppointment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,15 @@ export default function BookAppointment(props: Props) {
</div>

<div className="flex justify-end gap-4">
<Button variant="outline" type="button" onClick={() => goBack()}>
<Button
variant="outline"
type="button"
onClick={() =>
goBack(
`/facility/${props.facilityId}/patient/${props.patientId}/appointments`,
)
}
>
{t("cancel")}
</Button>
<Button
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Patients/VerifyPatient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export default function VerifyPatient(props: { facilityId: string }) {
<Button
variant={"primary_gradient"}
className="gap-3 group"
onClick={() => goBack()}
onClick={() => goBack(`/facility/${props.facilityId}/patients`)}
>
{t("go_back")}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/PublicAppointments/Schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export function ScheduleAppointment(props: AppointmentsProps) {
<Button
variant="outline"
className="border border-secondary-400"
onClick={() => goBack()}
onClick={() => goBack(`/facility/${facilityId}`)}
>
<span className="text-sm underline">{t("back")}</span>
</Button>
Expand Down
9 changes: 7 additions & 2 deletions src/pages/PublicAppointments/auth/PatientLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ export default function PatientLogin({
{t("enter_the_verification_code")}
</FormLabel>
<FormControl>
<InputOTP maxLength={5} {...field} className="focus:ring-0">
<InputOTP
maxLength={5}
{...field}
className="focus:ring-0"
autoFocus
>
<InputOTPGroup>
<InputOTPSlot index={0} />
</InputOTPGroup>
Expand Down Expand Up @@ -229,7 +234,7 @@ export default function PatientLogin({
className="border border-secondary-400"
onClick={() =>
page === "send"
? goBack()
? goBack(`/facility/${facilityId}`)
: navigate(
`/facility/${facilityId}/appointments/${staffId}/otp/send`,
)
Expand Down
Loading