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 'Update Details' Button in Community Nurse Log Update Details Page #9094

Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
3b6d2c3
Add update button in log details page
kihan2518B Nov 12, 2024
97bb035
Merge branch 'develop' into issues/9060/add-update-button-log-details
kihan2518B Nov 13, 2024
e2f21e2
using translation for button text
kihan2518B Nov 13, 2024
350a1fe
Merge branch 'develop' into issues/9060/add-update-button-log-details
kihan2518B Nov 19, 2024
20cf310
fixed layout of button.
kihan2518B Nov 19, 2024
1ffa2e4
Merge branch 'develop' into issues/9060/add-update-button-log-details
kihan2518B Nov 20, 2024
dae6602
Using shadcn button in update-log-details.
kihan2518B Nov 20, 2024
8122f43
Merge branch 'develop' into issues/9060/add-update-button-log-details
nihal467 Nov 25, 2024
cfc629b
Merge branch 'develop' into issues/9060/add-update-button-log-details
kihan2518B Nov 27, 2024
a0b6e55
Changed button color.
kihan2518B Nov 27, 2024
725c2ab
Added primary button variant.
kihan2518B Nov 27, 2024
070cc54
Corrected implementation of link as child of button.
kihan2518B Nov 28, 2024
4d1456c
Merge branch 'develop' into issues/9060/add-update-button-log-details
kihan2518B Nov 29, 2024
d069e5d
fix outline variant button having no text color applied
rithviknishad Dec 3, 2024
680a123
improve buttons
rithviknishad Dec 3, 2024
71116e7
remove unrelated changes
rithviknishad Dec 3, 2024
265291b
use similar button in brief log update details page too
rithviknishad Dec 3, 2024
aa753ea
Merge remote-tracking branch 'origin' into issues/9060/add-update-but…
rithviknishad Dec 3, 2024
5abfa46
fix cypress
rithviknishad Dec 3, 2024
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
19 changes: 18 additions & 1 deletion src/components/LogUpdate/CriticalCarePreview.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Link } from "raviger";
import React, { useEffect } from "react";
import { useTranslation } from "react-i18next";

Expand All @@ -22,6 +23,8 @@ import {
rangeValueDescription,
} from "@/Utils/utils";

import { Button } from "../ui/button";

type Props = {
facilityId: string;
patientId: string;
Expand Down Expand Up @@ -49,14 +52,28 @@ export default function CriticalCarePreview(props: Props) {

return (
<div className="w-full transition-all duration-200 ease-in-out md:mx-auto md:max-w-5xl md:pt-8">
<div className="py-4">
<div className="py-4 flex items-center justify-between max-md:flex-col max-md:items-start">
<ButtonV2
id="back-to-consultation"
variant="secondary"
href={`/facility/${props.facilityId}/patient/${props.patientId}/consultation/${props.consultationId}`}
>
{t("back_to_consultation")}
</ButtonV2>
<Button
asChild
id="update-log"
variant={"primary"}
data-testid="update-log-button"
aria-label={t("update_log")}
>
<Link
className="mt-2"
href={`/facility/${props.facilityId}/patient/${props.patientId}/consultation/${props.consultationId}/log_updates/${props.id}/update`}
>
{t("update_log")}
</Link>
</Button>
</div>

<Card className="md:rounded-xl lg:p-8">
Expand Down
2 changes: 2 additions & 0 deletions src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const buttonVariants = cva(
variant: {
default:
"bg-gray-900 text-gray-50 shadow hover:bg-gray-900/90 dark:bg-gray-50 dark:text-gray-900 dark:hover:bg-gray-50/90",
primary:
"bg-primary-700 text-white shadow hover:bg-primary-700/90 dark:bg-primary-100 dark:text-primary-900 dark:hover:bg-primary-100/90",
destructive:
"bg-red-500 text-gray-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-gray-50 dark:hover:bg-red-900/90",
outline:
Expand Down
Loading