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

feat: Add cancel button for ValueSet Creation #10917

Closed
wants to merge 32 commits into from
Closed
Changes from all commits
Commits
Show all changes
32 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
65db1ae
Merge branch 'ohcnetwork:develop' into develop
Tanuj1718 Feb 21, 2025
60b419c
Merge remote-tracking branch 'upstream/develop' into develop
Tanuj1718 Feb 24, 2025
582fb5c
Merge remote-tracking branch 'upstream/develop' into develop
Tanuj1718 Feb 28, 2025
c64905f
add cancel button
Tanuj1718 Mar 1, 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
23 changes: 19 additions & 4 deletions src/components/ValueSet/ValueSetForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { PlusIcon, TrashIcon, UpdateIcon } from "@radix-ui/react-icons";
import { useMutation } from "@tanstack/react-query";
import { t } from "i18next";
import { useNavigate } from "raviger";
import { useFieldArray, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import * as z from "zod";

import CareIcon from "@/CAREUI/icons/CareIcon";

import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import {
Expand Down Expand Up @@ -400,6 +403,7 @@ export function ValueSetForm({
isSubmitting,
}: ValueSetFormProps) {
const { t } = useTranslation();
const navigate = useNavigate();

const form = useForm<ValuesetFormType>({
resolver: zodResolver(valuesetFormSchema),
Expand Down Expand Up @@ -489,10 +493,21 @@ export function ValueSetForm({
<RuleFields type="include" form={form} />
<RuleFields type="exclude" form={form} />
</div>

<Button type="submit" disabled={isSubmitting}>
{isSubmitting ? t("saving") : t("save_valueset")}
</Button>
<div className="flex items-center">
<Button type="submit" disabled={isSubmitting}>
{isSubmitting ? t("saving") : t("save_valueset")}
</Button>
<Button
variant="outline"
className="m-4"
onClick={() => {
navigate(`/admin/valuesets`);
}}
>
<CareIcon icon="l-arrow-left" className="h-4 w-4" />
{t("cancel")}
</Button>
</div>
</form>
</Form>
);
Expand Down
Loading