Skip to content

Commit 62712a9

Browse files
CP - US(#16438) story implementation and bug fix(#16072) and code cleanup
1 parent 7105506 commit 62712a9

28 files changed

Lines changed: 1016 additions & 1390 deletions
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Include any files or directories that you don't want to be copied to your
2+
# container here (e.g., local build artifacts, temporary files, etc.).
3+
#
4+
# For more help, visit the .dockerignore file reference guide at
5+
# https://docs.docker.com/engine/reference/builder/#dockerignore-file
6+
7+
8+
**/node_modules
9+
.env

src/ContentProcessorWeb/src/App.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ import * as React from "react";
22
import { useEffect } from "react";
33
import Header from "./Components/Header/Header.tsx"; // Import Header
44
import "./Styles/App.css";
5-
import "./Components/Panels/Panels.css";
65
import "./Components/Content/Content.css";
76
import HomePage from "./Pages/HomePage.tsx";
8-
import DefaultPage from "./Pages/DefaultPage/DefaultPage.tsx";
7+
import DefaultPage from "./Pages/DefaultPage";
98
//import AuxiliaryPage from "./Pages/AuxiliaryPage/AuxiliaryPage.tsx";
109
import NotFound from "./Pages/NotFound.tsx";
1110
import { ToastContainer } from "react-toastify";
@@ -18,7 +17,7 @@ import {
1817
} from "react-router-dom";
1918
import Spinner from "./Components/Spinner/Spinner.tsx";
2019

21-
import { useDispatch, useSelector,shallowEqual } from 'react-redux';
20+
import { useDispatch, useSelector, shallowEqual } from 'react-redux';
2221
import { RootState } from './store';
2322

2423

@@ -31,7 +30,7 @@ const App: React.FC<AppProps> = ({ isDarkMode, toggleTheme }) => {
3130

3231
const store = useSelector((state: RootState) => ({
3332
loader: state.loader.loadingStack
34-
}),shallowEqual );
33+
}), shallowEqual);
3534

3635
// Apply or remove the "dark-mode" class on the body element based on isDarkMode
3736
useEffect(() => {
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import * as React from "react";
2+
import {
3+
Dialog,
4+
DialogSurface,
5+
DialogTitle,
6+
DialogBody,
7+
DialogContent,
8+
DialogActions,
9+
Button,
10+
useId,
11+
} from "@fluentui/react-components";
12+
13+
interface FooterButton {
14+
text: string;
15+
appearance: "primary" | "secondary";
16+
onClick: () => void;
17+
}
18+
19+
interface ConfirmationProps {
20+
title: string;
21+
content: string;
22+
isDialogOpen: boolean; // Controlled state for dialog visibility
23+
onDialogClose: () => void; // Function to close the dialog
24+
footerButtons: FooterButton[]; // Array of footer buttons
25+
}
26+
27+
export const Confirmation: React.FC<ConfirmationProps> = ({
28+
title,
29+
content,
30+
isDialogOpen,
31+
onDialogClose,
32+
footerButtons,
33+
}) => {
34+
const dialogId = useId("dialog-");
35+
36+
return (
37+
<Dialog open={isDialogOpen} onOpenChange={onDialogClose}>
38+
<DialogSurface
39+
aria-labelledby={`${dialogId}-title`}
40+
aria-describedby={`${dialogId}-content`}
41+
>
42+
<DialogBody>
43+
<DialogTitle id={`${dialogId}-title`}>{title}</DialogTitle>
44+
<DialogContent id={`${dialogId}-content`}>{content}</DialogContent>
45+
<DialogActions>
46+
{/* Render the footer buttons dynamically */}
47+
{footerButtons.map((button, index) => (
48+
<Button
49+
key={index}
50+
appearance={button.appearance}
51+
onClick={() => {
52+
button.onClick();
53+
onDialogClose(); // Close the dialog after an action
54+
}}
55+
>
56+
{button.text}
57+
</Button>
58+
))}
59+
</DialogActions>
60+
</DialogBody>
61+
</DialogSurface>
62+
</Dialog>
63+
);
64+
};

src/ContentProcessorWeb/src/Components/DocumentViewer/DocumentViewer.styles.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,13 @@
4343

4444
}
4545

46+
.noDataDocContainer{
47+
display: flex;
48+
justify-content: center;
49+
height: 100%;
50+
border: 1px solid rgb(219, 219, 219);
51+
background: rgb(246, 246, 246);
52+
}
53+
4654

4755

src/ContentProcessorWeb/src/Components/DocumentViewer/DocumentViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const DocumentViewer = ({ className, metadata, urlWithSasToken, iframeKey }: IIF
2828

2929
const getContentComponent = () => {
3030
if (!metadata || !urlWithSasToken) {
31-
return <div style={{ textAlign: 'center' }}>{t("components.document.none", "No document available")}</div>;
31+
return <div className={"noDataDocContainer"}><p>{t("components.document.none", "No document available")}</p></div>;
3232
}
3333

3434
switch (metadata.mimeType) {

src/ContentProcessorWeb/src/Components/FluentComponents/Combobox/Combobox.tsx

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)