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: Organization Users page needs responsiveness #10413

Merged
merged 28 commits into from
Feb 20, 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
ea4a69b
improved tablet view responsiveness
Tanuj1718 Feb 3, 2025
85bfad8
solved i18n issue
Tanuj1718 Feb 4, 2025
09f613a
Merge branch 'develop' into develop
Tanuj1718 Feb 4, 2025
158d709
update mobile view responsiveness
Tanuj1718 Feb 4, 2025
b39654d
Merge branch 'develop' into develop
Tanuj1718 Feb 4, 2025
c4586e6
added responsiveness in organization users page
Tanuj1718 Feb 5, 2025
ea48433
Merge branch 'develop' into develop
Tanuj1718 Feb 5, 2025
73c1773
minor change in button
Tanuj1718 Feb 5, 2025
5283828
Merge branch 'develop' of https://github.com/Tanuj1718/care_fe into d…
Tanuj1718 Feb 5, 2025
2b7ad7d
added responsiveness
Tanuj1718 Feb 6, 2025
318447b
Merge branch 'develop' into develop
Tanuj1718 Feb 6, 2025
a803f4c
Merge branch 'develop' into develop
Tanuj1718 Feb 6, 2025
5a25496
Merge remote-tracking branch 'upstream/develop' into develop
Tanuj1718 Feb 8, 2025
4d85716
minor cleanup
Tanuj1718 Feb 8, 2025
c2c26c3
remove unwanted changes
Tanuj1718 Feb 8, 2025
837a6c9
added truncate class
Tanuj1718 Feb 8, 2025
f459bc1
done requested changes
Tanuj1718 Feb 12, 2025
3a20f25
Merge branch 'develop' into develop
Tanuj1718 Feb 12, 2025
24c2d48
done requested changes
Tanuj1718 Feb 13, 2025
5c41290
Merge branch 'develop' of https://github.com/Tanuj1718/care_fe into d…
Tanuj1718 Feb 13, 2025
7b5d1df
Merge branch 'develop' into develop
Tanuj1718 Feb 13, 2025
0f0087e
minor updates
Tanuj1718 Feb 14, 2025
d1eed22
Merge branch 'develop' of https://github.com/Tanuj1718/care_fe into d…
Tanuj1718 Feb 14, 2025
f622dae
Merge branch 'develop' into develop
Tanuj1718 Feb 14, 2025
bdd985c
Merge remote-tracking branch 'upstream/develop' into develop
Tanuj1718 Feb 17, 2025
0773ebc
Merge branch 'develop' of https://github.com/Tanuj1718/care_fe into d…
Tanuj1718 Feb 17, 2025
6a34c98
adjust flex
Jacobjeevan Feb 19, 2025
3bfbc87
Merge branch 'develop' into develop
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
2 changes: 1 addition & 1 deletion src/components/Common/UserSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function UserSelector({
className="size-6 rounded-full"
/>
<TooltipComponent content={formatName(selected)} side="bottom">
<p className="font-medium text-gray-900 truncate max-w-56 sm:max-w-48 md:max-w-64 lg:max-w-64 xl:max-w-36">
<p className="font-medium text-gray-900 truncate max-w-48 sm:max-w-56 md:max-w-64">
{formatName(selected)}
</p>
</TooltipComponent>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Users/UserListAndCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export const UserStatusIndicator = ({
</span>
</Badge>
) : (
<Badge variant="secondary" className="bg-gray-100 whitespace-nowrap">
<Badge
variant="secondary"
className="bg-gray-100 whitespace-nowrap text-wrap"
>
<span className="inline-block h-2 w-2 shrink-0 rounded-full bg-gray-500 mr-2" />
<span className="text-xs text-gray-700">{t("never_logged_in")}</span>
</Badge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,22 @@ export default function EditUserRoleSheet({
</div>
</div>

<div className="grid grid-cols-2 gap-4 pt-2 border-t">
<div>
<span className="text-sm text-gray-500">{t("username")}</span>
<p className="text-sm font-medium">{userRole.user.username}</p>
<div className="flex flex-col flex-wrap gap-2 pt-2 border-t">
<div className="flex flex-wrap">
<div className="mr-3">
<span className="text-sm text-gray-500">{t("username")}</span>
<p className="text-sm font-medium truncate ">
{userRole.user.username}
</p>
</div>
<div>
<span className="text-sm text-gray-500">
{t("current_role")}
</span>
<p className="text-sm font-medium">{userRole.role.name}</p>
</div>
</div>
<div>
<span className="text-sm text-gray-500">
{t("current_role")}
</span>
<p className="text-sm font-medium">{userRole.role.name}</p>
</div>
<div className="col-span-2">
<span className="text-sm text-gray-500">
{t("last_login")}{" "}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,24 +136,24 @@ export default function LinkFacilityUserSheet({
{selectedUser && (
<div className="space-y-4">
<div className="rounded-lg border p-4 space-y-4">
<div className="flex items-start gap-4">
<div className="flex gap-4 flex-row">
<Avatar
imageUrl={selectedUser.profile_picture_url}
name={formatName(selectedUser)}
className="h-12 w-12"
/>
<div className="flex flex-col flex-1">
<span className="font-medium text-lg">
<div className="w-3/4">
<p className="font-medium text-lg truncate">
{selectedUser.first_name} {selectedUser.last_name}
</span>
</p>
<span className="text-sm text-gray-500">
{selectedUser.email}
</span>
</div>
</div>

<div className="grid grid-cols-2 gap-4 pt-2 border-t">
<div>
<div className="truncate">
<span className="text-sm text-gray-500">Username</span>
<p className="text-sm font-medium">
{selectedUser.username}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Organization/OrganizationUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function OrganizationUsers({ id, navOrganizationId }: Props) {
return (
<OrganizationLayout id={id} navOrganizationId={navOrganizationId}>
<div className="space-y-6">
<div className="flex justify-between items-center">
<div className="justify-between items-center flex flex-wrap">
<div className="mt-1 flex flex-col justify-start space-y-2 md:flex-row md:justify-between md:space-y-0">
<EntityBadge
title={t("users")}
Expand All @@ -111,7 +111,7 @@ export default function OrganizationUsers({ id, navOrganizationId }: Props) {
translationParams={{ entity: "User" }}
/>
</div>
<div className="flex gap-2">
<div className="gap-2 flex flex-wrap mt-2">
<AddUserSheet
open={openAddUserSheet}
setOpen={(open) => {
Expand Down
13 changes: 6 additions & 7 deletions src/pages/Organization/components/LinkUserSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function LinkUserSheet({
return (
<Sheet open={open} onOpenChange={setOpen}>
<SheetTrigger asChild>
<Button>
<Button variant="primary_gradient">
<CareIcon icon="l-plus" className="mr-2 h-4 w-4" />
Link User
</Button>
Expand All @@ -135,16 +135,16 @@ export default function LinkUserSheet({
{selectedUser && (
<div className="space-y-4">
<div className="rounded-lg border p-4 space-y-4">
<div className="flex items-start gap-4">
<div className="flex gap-4 flex-row">
<Avatar
name={`${selectedUser.first_name} ${selectedUser.last_name}`}
imageUrl={selectedUser.profile_picture_url}
className="h-12 w-12"
/>
<div className="flex flex-col flex-1">
<span className="font-medium text-lg">
<div className="w-3/4">
<p className="font-medium text-lg truncate">
{selectedUser.first_name} {selectedUser.last_name}
</span>
</p>
<span className="text-sm text-gray-500">
{selectedUser.email}
</span>
Expand All @@ -154,7 +154,7 @@ export default function LinkUserSheet({
<div className="grid grid-cols-2 gap-4 pt-2 border-t">
<div>
<span className="text-sm text-gray-500">Username</span>
<p className="text-sm font-medium">
<p className="text-sm font-medium truncate">
{selectedUser.username}
</p>
</div>
Expand Down Expand Up @@ -192,7 +192,6 @@ export default function LinkUserSheet({
</SelectContent>
</Select>
</div>

<Button
className="w-full"
onClick={handleAddUser}
Expand Down
Loading