From 95f0f059f6af2d81c3a0ca4211be0681667f5794 Mon Sep 17 00:00:00 2001 From: Tri Thien Nguyen <119530400+AndrewThien@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:01:10 +0000 Subject: [PATCH] Add more contextual helps (#924) --- .../(protected)/scanreports/create/page.tsx | 2 +- app/next-client-app/app/globals.css | 4 +- app/next-client-app/components/Modal.tsx | 37 -------- app/next-client-app/components/Tooltips.tsx | 2 +- .../components/core/footer.tsx | 1 - .../components/datasets/CreateDatasetForm.tsx | 24 +++-- .../scanreports/CreateScanReportForm.tsx | 93 ++++++++++++------- 7 files changed, 80 insertions(+), 83 deletions(-) delete mode 100644 app/next-client-app/components/Modal.tsx diff --git a/app/next-client-app/app/(protected)/scanreports/create/page.tsx b/app/next-client-app/app/(protected)/scanreports/create/page.tsx index 5bcdd75f7..2dc425dd0 100644 --- a/app/next-client-app/app/(protected)/scanreports/create/page.tsx +++ b/app/next-client-app/app/(protected)/scanreports/create/page.tsx @@ -17,7 +17,7 @@ export default async function ScanReports() {
-

New Scan Report

+

Upload Scan Report

diff --git a/app/next-client-app/app/globals.css b/app/next-client-app/app/globals.css index f6b5158aa..a2e642494 100644 --- a/app/next-client-app/app/globals.css +++ b/app/next-client-app/app/globals.css @@ -5,7 +5,7 @@ @tailwind components { @layer components { .my-react-select-container .my-react-select__control { - @apply bg-white dark:bg-carrot-950 rounded-md border border-carrot-200 dark:border-carrot-800 hover:border-carrot-400 dark:hover:border-carrot-500; + @apply bg-white dark:bg-carrot-950 rounded-md border border-carrot-200 dark:border-carrot-800 hover:border-carrot-600 dark:hover:border-carrot-400; } .my-react-select-container .my-react-select__control--is-disabled { @@ -13,7 +13,7 @@ } .my-react-select-container .my-react-select__control--is-focused { - @apply border-carrot-500 hover:border-carrot-500 dark:border-carrot-400 dark:hover:border-carrot-400 shadow-none; + @apply ring-2 ring-carrot-950 ring-offset-2 hover:border-carrot-500 dark:border-carrot-400 dark:hover:border-carrot-400 shadow-none; } .my-react-select-container .my-react-select__menu { diff --git a/app/next-client-app/components/Modal.tsx b/app/next-client-app/components/Modal.tsx deleted file mode 100644 index 1bc334865..000000000 --- a/app/next-client-app/components/Modal.tsx +++ /dev/null @@ -1,37 +0,0 @@ -"use client"; - -import { - Dialog, - DialogContent, - DialogDescription, - DialogHeader, - DialogTitle, -} from "./ui/dialog"; - -export function Modal({ children }: { children: React.ReactNode }) { - const handleOpenChange = () => - // The below logic makes sure that the dialog will be closed and not coming back the last URL with pagination param, e.g., without ?p1,?p2 - // --> Navigating to the new URL - (window.location.href = window.location.pathname.replace("summary", "")); - - return ( - - - - Summary of Mapping Rules list - - {" "} - The table below shows the list of mapping rules which have the Term - Map and have the Desination Field name without "_source_concept_id" - - - {children} - - - ); -} diff --git a/app/next-client-app/components/Tooltips.tsx b/app/next-client-app/components/Tooltips.tsx index f78a98033..52ce5b20f 100644 --- a/app/next-client-app/components/Tooltips.tsx +++ b/app/next-client-app/components/Tooltips.tsx @@ -15,7 +15,7 @@ export function Tooltips({ link?: string; }) { return ( - + diff --git a/app/next-client-app/components/core/footer.tsx b/app/next-client-app/components/core/footer.tsx index a610aacda..cad136baa 100644 --- a/app/next-client-app/components/core/footer.tsx +++ b/app/next-client-app/components/core/footer.tsx @@ -1,5 +1,4 @@ import Link from "next/link"; -import Image from "next/image"; import { ReceiptText, ShieldQuestion } from "lucide-react"; const Footer = () => { diff --git a/app/next-client-app/components/datasets/CreateDatasetForm.tsx b/app/next-client-app/components/datasets/CreateDatasetForm.tsx index b54687df6..48a9c6c75 100644 --- a/app/next-client-app/components/datasets/CreateDatasetForm.tsx +++ b/app/next-client-app/components/datasets/CreateDatasetForm.tsx @@ -195,13 +195,17 @@ export function CreateDatasetForm({ {" "} Viewers @@ -212,13 +216,17 @@ export function CreateDatasetForm({ {" "} Editors @@ -228,13 +236,17 @@ export function CreateDatasetForm({ {" "} Admins diff --git a/app/next-client-app/components/scanreports/CreateScanReportForm.tsx b/app/next-client-app/components/scanreports/CreateScanReportForm.tsx index bb82a24b0..f35f8b2f1 100644 --- a/app/next-client-app/components/scanreports/CreateScanReportForm.tsx +++ b/app/next-client-app/components/scanreports/CreateScanReportForm.tsx @@ -111,6 +111,19 @@ export function CreateScanReportForm({ encType="multipart/form-data" >
+
+

+ {" "} + Scan Report Name + +

+ +

Data Partner{" "} @@ -129,25 +142,34 @@ export function CreateScanReportForm({ />

-

- {" "} - Dataset - - {values.dataPartner !== 0 && ( - +

+ {" "} + Dataset + +

+ {values.dataPartner !== 0 && ( +
+ + +
)} -

+
@@ -205,28 +231,21 @@ export function CreateScanReportForm({

- {" "} - Scan Report Name - -

- -
-
-

- {" "} - WhiteRabbit Scan Report +
+ WhiteRabbit Scan Report{" "} + (.xlsx file) +

- {" "} - Data Dictionary +
+ Data Dictionary{" "} + + (.csv file, optional) + +