From d2ad1fd7b621fd1cb40051a91898fb2eb1d9ff08 Mon Sep 17 00:00:00 2001 From: Admin Date: Fri, 17 Jul 2026 10:58:04 +0330 Subject: [PATCH] improvement: loading state added to buttons who interact with backend. --- .cursor/rules/frontend-components.mdc | 1 + .../[locale]/(public)/accept-invite/page.tsx | 2 +- .../accept-organization-invite/page.tsx | 2 +- .../(public)/forgot-password/page.tsx | 2 +- .../appointments/AppointmentBookingModal.tsx | 4 +- .../ui/appointments/AppointmentsPage.tsx | 2 +- .../ui/dashboard/DashboardAccountMenu.tsx | 21 ++-- .../ui/lab/LabCaseAttachmentsDialog.tsx | 2 +- .../ui/lab/LabCaseCommentsPanel.tsx | 26 ++-- .../ui/lab/LabCaseShareQrDialog.tsx | 2 +- frontend/src/components/ui/lab/TaskRow.tsx | 2 +- frontend/src/components/ui/lab/TasksPage.tsx | 2 +- .../OrganizationConnectionsMobileList.tsx | 8 +- .../ui/organizations/OrganizationsPage.tsx | 116 +++++++++--------- .../components/ui/patient/PatientsPage.tsx | 2 +- .../ui/settings/AccountSettingsPage.tsx | 2 +- .../ui/settings/OwnerWorkingHoursDialog.tsx | 4 +- frontend/src/components/ui/shared/Button.tsx | 52 ++++++-- .../components/ui/shared/LanguageToggle.tsx | 2 +- .../src/components/ui/staff/StaffPage.tsx | 72 ++++++----- .../ui/treatment/LabCasesDispatchPanel.tsx | 4 +- .../ui/treatment/TreatmentWorkspace.tsx | 4 +- frontend/src/lib/hooks/useAsyncAction.ts | 50 ++++++++ 23 files changed, 240 insertions(+), 144 deletions(-) create mode 100644 frontend/src/lib/hooks/useAsyncAction.ts diff --git a/.cursor/rules/frontend-components.mdc b/.cursor/rules/frontend-components.mdc index f338867..a523428 100644 --- a/.cursor/rules/frontend-components.mdc +++ b/.cursor/rules/frontend-components.mdc @@ -60,5 +60,6 @@ Reference: `app/.../treatment/page.tsx` + `components/ui/treatment/TreatmentWork | Filter or inline `