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

Support For BULK beds creation in location #10815

Open
wants to merge 44 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b7b861a
bulk beds creation
AdityaJ2305 Feb 25, 2025
f511fe0
a few changes
AdityaJ2305 Feb 25, 2025
672f64b
a few changes number type
AdityaJ2305 Feb 25, 2025
1740aad
merge develop
AdityaJ2305 Feb 25, 2025
a132d72
move out schema
AdityaJ2305 Feb 25, 2025
00e1dd6
move out schema
AdityaJ2305 Feb 25, 2025
ae84991
unwanted changes
AdityaJ2305 Feb 25, 2025
537c806
on error notify
AdityaJ2305 Feb 25, 2025
0eb4f45
typo fix
AdityaJ2305 Feb 25, 2025
bbf4206
typo fix
AdityaJ2305 Feb 25, 2025
ba1cead
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Feb 26, 2025
74c7579
shared data and rm preview
AdityaJ2305 Feb 26, 2025
8e9b796
Merge branch 'bulk_beds_creation' of https://github.com/AdityaJ2305/c…
AdityaJ2305 Feb 26, 2025
7648bf4
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Feb 27, 2025
58621f8
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Feb 27, 2025
46c6c5f
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Feb 27, 2025
3039f72
ref id updated
AdityaJ2305 Feb 27, 2025
74a8924
multiple input for beds
AdityaJ2305 Feb 27, 2025
3caf90c
hide inputs on empty name
AdityaJ2305 Feb 27, 2025
d53c120
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Feb 27, 2025
181faa1
name trim space
AdityaJ2305 Feb 27, 2025
695dd54
Merge branch 'bulk_beds_creation' of https://github.com/AdityaJ2305/c…
AdityaJ2305 Feb 27, 2025
71c9642
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Feb 27, 2025
f9becac
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Feb 28, 2025
5346206
add accordion and ux update to support bulk beds creation
AdityaJ2305 Feb 28, 2025
97ef52c
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Feb 28, 2025
cd7120a
full width when checkbox is hidden
AdityaJ2305 Feb 28, 2025
7ae7bfa
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Feb 28, 2025
7bda0ad
typo fix
AdityaJ2305 Mar 1, 2025
ec69f5f
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Mar 1, 2025
9447a6d
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Mar 3, 2025
509ec9f
rm onError
AdityaJ2305 Mar 3, 2025
7db4ee0
use useFieldArray
AdityaJ2305 Mar 3, 2025
bf75218
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Mar 3, 2025
f20a3be
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Mar 3, 2025
078150d
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Mar 4, 2025
8172195
bed names updating on changing main name input
AdityaJ2305 Mar 4, 2025
cc1ad46
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Mar 5, 2025
6de7dd9
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Mar 6, 2025
305e1bf
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Mar 6, 2025
a9ab2a2
minor css change
AdityaJ2305 Mar 6, 2025
68a1dc1
Merge branch 'develop' into bulk_beds_creation
AdityaJ2305 Mar 9, 2025
4d95cb8
rm accordion
AdityaJ2305 Mar 9, 2025
fa64ec4
undo lock file
AdityaJ2305 Mar 9, 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
32 changes: 32 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@headlessui/react": "^2.2.0",
"@hookform/resolvers": "^4.0.0",
"@originjs/vite-plugin-federation": "^1.3.7",
"@radix-ui/react-accordion": "^1.2.3",
"@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-avatar": "^1.1.2",
"@radix-ui/react-checkbox": "^1.1.3",
Expand Down
14 changes: 14 additions & 0 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -480,17 +480,21 @@
"basic_info": "Basic Information",
"basic_information": "Basic Information",
"bed_capacity": "Bed Capacity",
"bed_count_validation_error": "Number of beds must be greater than 0",
"bed_created_notification_one": "{{count}} Bed created successfully",
"bed_created_notification_other": "{{count}} Beds created successfully",
"bed_history": "Bed History",
"bed_name_placeholder": "Name of Bed no. {{number}}",
"bed_not_linked_to_camera": "This bed has not been linked to this camera.",
"bed_number": "Bed Number {{number}}",
"bed_search_placeholder": "Search by beds name",
"bed_type": "Bed Type",
"bed_type__100": "ICU Bed",
"bed_type__200": "Ordinary Bed",
"bed_type__300": "Oxygen Supported Bed",
"bed_type__400": "Isolation Bed",
"bed_type__500": "Others",
"beds_creation_failed": "Failed to create beds",
"before": "before",
"begin_clinical_encounter": "Begin a new clinical encounter for {{patientName}}. Select the appropriate encounter type, status, and priority to ensure proper documentation and care delivery.",
"beta": "beta",
Expand All @@ -512,6 +516,7 @@
"booked_by": "Booked by",
"bradycardia": "Bradycardia",
"breathlessness_level": "Breathlessness level",
"bulk_bed_creation_info": "You are about to create multiple beds. Each bed will have a unique name based on the beds names you provided.",
"by_name": "by <strong>{{by}}</strong>",
"camera": "Camera",
"camera_bed_link_success": "Camera linked to bed successfully.",
Expand Down Expand Up @@ -709,6 +714,8 @@
"create_encounter": "Create Encounter",
"create_facility": "Create Facility",
"create_location_association": "Create Location Association",
"create_multiple_beds": "Create Multiple Beds",
"create_multiple_beds_description": "Enable this option to create multiple beds at once",
"create_new": "Create New",
"create_new_asset": "Create New Asset",
"create_new_encounter": "Create a new encounter to get started",
Expand Down Expand Up @@ -745,6 +752,8 @@
"customer_support_email": "Customer Support Email",
"customer_support_name": "Customer Support Name",
"customer_support_number": "Customer support number",
"customize_bed_names": "Customize individual bed names",
"customize_bed_names_description": "Edit names of each bed individually",
"cylinders": "Cylinders",
"cylinders_per_day": "Cylinders/day",
"daily_rounds": "Daily Rounds",
Expand Down Expand Up @@ -882,6 +891,7 @@
"edit_avatar_note": "Change the avatar of the user",
"edit_avatar_note_self": "Change your avatar",
"edit_avatar_permission_error": "You do not have permissions to edit the avatar of this user",
"edit_bed_names": "Edit {{count}} bed names ",
"edit_caution_note": "A new prescription will be added to the consultation with the edited details and the current prescription will be discontinued.",
"edit_cover_photo": "Edit Cover Photo",
"edit_device": "Edit Device",
Expand Down Expand Up @@ -1264,6 +1274,7 @@
"inconsistent_dosage_units_error": "Dosage units must be same",
"indian_mobile": "Indian Mobile",
"indicator": "Indicator",
"individual_bed_names": "Individual Bed Names",
"information_source": "Information Source",
"information_source_patient": "Patient",
"information_source_related_person": "Related Person",
Expand Down Expand Up @@ -1888,6 +1899,7 @@
"preset_name_placeholder": "Specify an identifiable name for the new preset",
"preset_updated": "Preset updated",
"prev_sessions": "Prev Sessions",
"preview_bed_names": "Preview Bed Names",
"preview": "Preview",
"preview_form": "Preview form",
"previous": "Previous",
Expand Down Expand Up @@ -2028,6 +2040,7 @@
"reset": "Reset",
"reset_password": "Reset Password",
"reset_password_note_self": "Enter your current password, then create and confirm your new password",
"reset_to_default": "Reset to Default",
"resolved": "Resolved",
"resource": "Resource",
"resource_approving_facility": "Resource approving facility",
Expand Down Expand Up @@ -2378,6 +2391,7 @@
"tomorrow": "Tomorrow",
"total_amount": "Total Amount",
"total_beds": "Total Beds",
"total_number_of_beds": "Total number of beds",
"total_patients": "Total Patients",
"total_slots": "Total Slots",
"total_staff": "Total Staff",
Expand Down
58 changes: 58 additions & 0 deletions src/components/ui/accordion.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import * as AccordionPrimitive from "@radix-ui/react-accordion";
import { ChevronDown } from "lucide-react";
import * as React from "react";

import { cn } from "@/lib/utils";

const Accordion = AccordionPrimitive.Root;

const AccordionItem = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
>(({ className, ...props }, ref) => (
<AccordionPrimitive.Item
ref={ref}
className={cn("border-b", className)}
{...props}
/>
));
AccordionItem.displayName = "AccordionItem";

const AccordionTrigger = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Header className="flex">
<AccordionPrimitive.Trigger
ref={ref}
className={cn(
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
className,
)}
{...props}
>
{children}
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
));
AccordionTrigger.displayName = "AccordionTrigger";

const AccordionContent = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Content
ref={ref}
className={cn(
"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
className,
)}
{...props}
>
<div className="pb-4 pt-0">{children}</div>
</AccordionPrimitive.Content>
));
AccordionContent.displayName = "AccordionContent";

export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
Loading
Loading