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

Fix Button Overflow and Minor Responsive Issues on Mobile View #10546

Merged
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
19c9e9c
userDashboard page button overflow solved
modamaan Feb 10, 2025
4588408
translation added
modamaan Feb 10, 2025
01e947c
Merge remote-tracking branch 'upstream/develop' into issues/10524/min…
modamaan Feb 10, 2025
2326db1
Merge branch 'develop' into issues/10524/minor-responsive
modamaan Feb 10, 2025
dd68f65
questionnaire popover width adjusted
modamaan Feb 10, 2025
28e3f9f
Merge branch 'issues/10524/minor-responsive' of https://github.com/mo…
modamaan Feb 10, 2025
f1906fa
Merge branch 'develop' into issues/10524/minor-responsive
modamaan Feb 10, 2025
577ea9c
arrow position updated
modamaan Feb 11, 2025
e22af3c
Merge branch 'issues/10524/minor-responsive' of https://github.com/mo…
modamaan Feb 11, 2025
47d0e80
datepicker width updated
modamaan Feb 11, 2025
c3d29fa
translation added
modamaan Feb 11, 2025
e425125
input green border removed
modamaan Feb 11, 2025
2b0e659
Merge remote-tracking branch 'upstream/develop' into issues/10524/min…
modamaan Feb 11, 2025
4834acb
translation updated
modamaan Feb 11, 2025
2ca6cc2
Merge branch 'develop' into issues/10524/minor-responsive
modamaan Feb 11, 2025
88fbdd8
translation Singular / Plural updated based on documentation
modamaan Feb 12, 2025
5e52c04
translation updated on all language files
modamaan Feb 12, 2025
a2fdc2d
Merge branch 'issues/10524/minor-responsive' of https://github.com/mo…
modamaan Feb 12, 2025
e55c597
availability button overflow fixed
modamaan Feb 12, 2025
80c45b7
Merge remote-tracking branch 'upstream/develop' into issues/10524/min…
modamaan Feb 12, 2025
5e553a0
Merge branch 'develop' into issues/10524/minor-responsive
modamaan Feb 12, 2025
3dfef48
Merge remote-tracking branch 'upstream/develop' into issues/10524/min…
modamaan Feb 13, 2025
fa86810
newly added questionnaire translation removed
modamaan Feb 13, 2025
5aa2b88
Merge branch 'issues/10524/minor-responsive' of https://github.com/mo…
modamaan Feb 13, 2025
f9b7db4
galaxy z-fold responsiveness updated
modamaan Feb 14, 2025
220c924
galaxy z-fold responsiveness
modamaan Feb 14, 2025
024d0a5
Merge remote-tracking branch 'upstream/develop' into issues/10524/min…
modamaan Feb 14, 2025
87c0a60
Merge branch 'develop' into issues/10524/minor-responsive
modamaan Feb 14, 2025
7c094a9
Merge remote-tracking branch 'upstream/develop' into issues/10524/min…
modamaan Feb 17, 2025
a8465c7
Merge branch 'develop' into issues/10524/minor-responsive
modamaan Feb 17, 2025
534729e
minor changes updated
modamaan Feb 18, 2025
b09e38b
Merge branch 'issues/10524/minor-responsive' of https://github.com/mo…
modamaan Feb 18, 2025
6c4e2e1
Merge remote-tracking branch 'upstream/develop' into issues/10524/min…
modamaan Feb 19, 2025
f36aff1
Merge branch 'develop' into issues/10524/minor-responsive
modamaan Feb 19, 2025
9ff913d
ml translation removed
modamaan Feb 21, 2025
2b1a4ea
Merge branch 'issues/10524/minor-responsive' of https://github.com/mo…
modamaan Feb 21, 2025
aa46956
Merge remote-tracking branch 'upstream/develop' into issues/10524/min…
modamaan Feb 25, 2025
bb52739
questionnaire key updated accordingly
modamaan Feb 25, 2025
64633e8
Merge remote-tracking branch 'upstream/develop' into issues/10524/min…
modamaan Feb 28, 2025
66acf9b
translater updated
modamaan Feb 28, 2025
34e7f6c
merge conflic removed
modamaan Mar 3, 2025
3e057a7
Merge branch 'develop' into issues/10524/minor-responsive
nihal467 Mar 4, 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
8 changes: 7 additions & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@
"from_date_must_be_before_to_date": "From date must be before to date",
"from_user": "from User",
"fulfilled": "Fulfilled",
"full_day_unavailable": "Full Day Unavailable",
"full_name": "Full Name",
"full_screen": "Full Screen",
"gender": "Gender",
Expand Down Expand Up @@ -1730,9 +1731,10 @@
"quantity_approved": "Quantity Approved",
"quantity_requested": "Quantity Requested",
"quantity_required": "Quantity Required",
"questionnaire": "Questionnaire",
"questionnaire_error_loading": "Error loading questionnaire",
"questionnaire_not_exist": "The questionnaire you tried to access does not exist.",
"questionnaire_one": "Questionnaire",
"questionnaire_other": "Questionnaires",
"questionnaire_submission_failed": "Failed to submit questionnaire",
"questionnaire_submitted_successfully": "Questionnaire submitted successfully",
"questionnaires": "Questionnaires",
Expand Down Expand Up @@ -2344,6 +2346,7 @@
"view_dashboard": "View Dashboard",
"view_details": "View Details",
"view_facility": "View Facility",
"view_facility_details": "View facility details",
"view_files": "View Files",
"view_patient": "View Patient",
"view_patients": "View Patients",
Expand Down Expand Up @@ -2371,6 +2374,7 @@
"we_ve_sent_you_a_code_to": "We've sent you a code to",
"weekly_schedule": "Weekly Schedule",
"weekly_working_hours_error": "Average weekly working hours must be a number between 0 and 168",
"welcome_back": "Welcome back, {{name}}!",
"welcome_back_to_hospital_dashboard": "Welcome back to the overview ",
"what_facility_assign_the_patient_to": "What facility would you like to assign the patient to",
"whatsapp_number": "Whatsapp Number",
Expand All @@ -2390,6 +2394,8 @@
"yesterday": "Yesterday",
"yet_to_be_decided": "Yet to be decided",
"you_need_at_least_a_location_to_create_an_assest": "You need at least a location to create an assest.",
"your_facilities": "Your Facilities",
"your_organizations": "Your Organizations",
"zoom_in": "Zoom In",
"zoom_out": "Zoom Out"
}
2 changes: 1 addition & 1 deletion public/locale/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -801,4 +801,4 @@
"you_need_at_least_a_location_to_create_an_assest": "संपत्ति बनाने के लिए आपको कम से कम एक स्थान की आवश्यकता होगी।",
"zoom_in": "ज़ूम इन",
"zoom_out": "ज़ूम आउट"
}
}
3 changes: 2 additions & 1 deletion public/locale/ml.json
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,8 @@
"quantity_approved": "അളവ് അംഗീകരിച്ചു",
"quantity_requested": "അഭ്യർത്ഥിച്ച അളവ്",
"quantity_required": "ആവശ്യമായ അളവ്",
"questionnaire": "ചോദ്യാവലി",
"questionnaire_one": "ചോദ്യാവലി",
"questionnaire_other":"ചോദ്യാവലികൾ",
"questionnaire_error_loading": "ചോദ്യാവലി ലോഡുചെയ്യുന്നതിൽ പിശക്",
"questionnaire_not_exist": "നിങ്ങൾ ആക്സസ് ചെയ്യാൻ ശ്രമിച്ച ചോദ്യാവലി നിലവിലില്ല.",
"raise_consent_request": "ABDM വഴി രോഗിയുടെ രേഖകൾ ലഭ്യമാക്കാൻ സമ്മത അഭ്യർത്ഥന ഉന്നയിക്കുക",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Questionnaire/QuestionnaireSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ export function QuestionnaireSearch({
<CareIcon icon="l-arrow-down" className="ml-2 h-4 w-4" />
</Button>
</PopoverTrigger>
<PopoverContent className="w-[600px] p-0" align="start">
<PopoverContent className="w-full sm:w-[600px] p-0" align="start">
<div className="flex items-center border-b px-3">
<CareIcon
icon="l-search"
className="mr-2 h-4 w-4 shrink-0 text-gray-500"
/>
<input
className="flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-gray-500 disabled:cursor-not-allowed disabled:opacity-50"
className="flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-gray-500 disabled:cursor-not-allowed disabled:opacity-50 focus:ring-0 focus:border-transparent"
placeholder="Search questionnaires..."
value={search}
onChange={(e) => setSearch(e.target.value)}
Expand Down
13 changes: 10 additions & 3 deletions src/components/Users/UserAvailabilityTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,17 @@ export default function UserAvailabilityTab({ userData: user }: Props) {
/>

<div className="space-y-4">
<div className="flex items-end justify-between">
<div className="flex bg-gray-100 rounded-lg p-1 gap-1 max-w-min">
<div className="flex items-end justify-between gap-3 md:gap-0">
<div className="flex bg-gray-100 rounded-lg p-0 md:p-1 gap-1 max-w-min">
<Button
variant={view === "schedule" ? "outline" : "ghost"}
onClick={() => setQParams({ tab: "schedule" })}
className={cn(view === "schedule" && "shadow", "hover:bg-white")}
className={cn(
view === "schedule" && "shadow",
"hover:bg-white",
"text-xs sm:text-sm",
"px-2 md:px-4",
)}
>
{t("schedule")}
</Button>
Expand All @@ -190,6 +195,8 @@ export default function UserAvailabilityTab({ userData: user }: Props) {
className={cn(
view === "exceptions" && "shadow",
"hover:bg-white",
"text-xs sm:text-sm",
"px-2 md:px-4",
)}
>
{t("exceptions")}
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 @@ -164,7 +164,7 @@ export default function VerifyPatient(props: { facilityId: string }) {
data-cy="create-encounter-button"
className="group relative h-[100px] md:h-[120px] overflow-hidden border-0 bg-gradient-to-br from-emerald-50 to-teal-50 p-0 shadow-md hover:shadow-xl transition-all duration-300 justify-start"
>
<div className="p-4 md:p-6">
<div className="w-full p-4 md:p-6">
<div className="absolute inset-0 bg-gradient-to-br from-primary/80 to-primary opacity-0 transition-opacity duration-300 group-hover:opacity-10" />
<div className="relative flex w-full items-center gap-3 md:gap-4">
<div className="flex h-10 w-10 md:h-12 md:w-12 items-center justify-center rounded-xl bg-primary/10 group-hover:bg-primary/20 transition-colors">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export default function CreateScheduleExceptionSheet({
name="reason"
render={({ field }) => (
<FormItem>
<FormLabel required>Reason</FormLabel>
<FormLabel required>{t("reason")}</FormLabel>
<FormControl>
<Input
placeholder="e.g. Holiday Leave, Conference, etc."
Expand All @@ -210,8 +210,8 @@ export default function CreateScheduleExceptionSheet({
control={form.control}
name="valid_from"
render={({ field }) => (
<FormItem>
<FormLabel required>Valid From</FormLabel>
<FormItem className="flex flex-col">
<FormLabel required>{t("valid_from")}</FormLabel>
<DatePicker
date={field.value}
onChange={(date) => field.onChange(date)}
Expand All @@ -225,8 +225,8 @@ export default function CreateScheduleExceptionSheet({
control={form.control}
name="valid_to"
render={({ field }) => (
<FormItem>
<FormLabel required>Valid Till</FormLabel>
<FormItem className="flex flex-col">
<FormLabel required>{t("valid_to")}</FormLabel>
<DatePicker
date={field.value}
onChange={(date) => field.onChange(date)}
Expand All @@ -249,7 +249,7 @@ export default function CreateScheduleExceptionSheet({
/>
</FormControl>
<div className="space-y-1 leading-none">
<FormLabel>Full Day Unavailable</FormLabel>
<FormLabel>{t("full_day_unavailable")}</FormLabel>
</div>
</FormItem>
)}
Expand Down
20 changes: 12 additions & 8 deletions src/pages/UserDashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChevronRight, ClipboardList, LogOut, Settings } from "lucide-react";
import { Link } from "raviger";
import { useTranslation } from "react-i18next";

import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
Expand All @@ -16,6 +17,7 @@ export default function UserDashboard() {
const { signOut } = useAuthContext();
const facilities = user.facilities || [];
const organizations = user.organizations || [];
const { t } = useTranslation();

return (
<div className="container mx-auto space-y-4 md:space-y-8 max-w-5xl px-4 py-4 md:p-6">
Expand All @@ -29,7 +31,7 @@ export default function UserDashboard() {
/>
<div className="space-y-1">
<h1 className="text-xl md:text-2xl font-bold">
Welcome back, {user.first_name}!
{t("welcome_back", { name: user.first_name })}
</h1>
<p className="text-sm md:text-base text-gray-500">
{new Date().toLocaleDateString("en-US", {
Expand All @@ -41,7 +43,7 @@ export default function UserDashboard() {
</p>
</div>
</div>
<div className="flex gap-3">
<div className="flex flex-col sm:flex-row gap-3">
<Button
variant="outline"
size="sm"
Expand All @@ -53,7 +55,7 @@ export default function UserDashboard() {
className="gap-2 text-inherit"
>
<Settings className="h-4 w-4" />
Edit Profile
{t("edit_profile")}
</Link>
</Button>
{user.is_superuser && (
Expand All @@ -65,7 +67,7 @@ export default function UserDashboard() {
>
<Link href="/questionnaire" className="gap-2 text-inherit">
<ClipboardList className="h-4 w-4" />
Questionnaires
{t("questionnaire", { count: 2 })}
</Link>
</Button>
)}
Expand All @@ -76,15 +78,15 @@ export default function UserDashboard() {
onClick={() => signOut()}
>
<LogOut className="h-4 w-4" />
Sign Out
{t("sign_out")}
</Button>
</div>
</div>

{/* Facilities Section */}
{facilities.length > 0 && (
<section className="space-y-3 md:space-y-4">
<h2 className="text-lg font-semibold px-1">Your Facilities</h2>
<h2 className="text-lg font-semibold px-1">{t("your_facilities")}</h2>
<div
className="grid gap-3 md:gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"
data-cy="facility-list"
Expand All @@ -105,7 +107,7 @@ export default function UserDashboard() {
{facility.name}
</h3>
<p className="text-xs md:text-sm text-gray-500 truncate">
View facility details
{t("view_facility_details")}
</p>
</div>
<ChevronRight className="h-4 w-4 md:h-5 md:w-5 text-gray-500" />
Expand All @@ -120,7 +122,9 @@ export default function UserDashboard() {
{/* Organizations Section */}
{organizations.length > 0 && (
<section className="space-y-3 md:space-y-4">
<h2 className="text-lg font-semibold px-1">Your Organizations</h2>
<h2 className="text-lg font-semibold px-1">
{t("your_organizations")}
</h2>
<div
className="grid gap-3 md:gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"
data-cy="organization-list"
Expand Down
Loading