Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
salimkanoun committed Sep 1, 2024
1 parent 1b0226d commit 635bf17
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script src="./node_modules/preline/dist/preline.js"></script>
<script type="module" src="./node_modules/preline/dist/preline.js"></script>
</body>
</html>
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"type": "module",
"scripts": {
"start": "vite",
"build": "tsc && vite build",
"build": "vite build",
"strict-build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
Expand Down
2 changes: 1 addition & 1 deletion src/admin/users/user/EditUserForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const EditUserForm = ({ title, className, userData, onClose }: UserFormProps) =>
setLastName(user.lastname);
setEmail(user.email);
if (user && rolesOptions) {
setSelectedRole({ value: user.roleName, label: user.roleName } || "");
setSelectedRole({ value: user.roleName, label: user.roleName } || null);
}
}
}, [JSON.stringify(user), JSON.stringify(rolesOptions)]);
Expand Down
1 change: 0 additions & 1 deletion src/admin/users/user/Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ const Users = ({ className = "" }: UsersProps) => {
className="bg-gray-200"
onClose={() => {
setUserToEdit(null);
setIsCreating(false);
}}
userData={userToEdit}
/>
Expand Down
3 changes: 1 addition & 2 deletions src/content/studies/EditStudy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ const EditStudy: React.FC<EditStudyProps> = ({ studyId, onStudyUpdated, onClose,
{editingStudyDetails && (
<StudyEditForm
data={{...editingStudyDetails.mainDicomTags, id: editingStudyDetails.id}}
onSubmit={handleSubmit}
onCancel={onClose}
onSubmit={handleSubmit}
jobId={jobId ?? undefined}
onJobCompleted={handleJobCompletion}
/>
Expand Down
1 change: 0 additions & 1 deletion src/root/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ const Header: React.FC<HeaderProps> = ({ title }) => {
return (
<Banner
title={title}
leftIcon={leftIcon}
onLeftIconClick={handleLeftIconClick}
className="sticky top-0 z-50 bg-white"
>
Expand Down
7 changes: 3 additions & 4 deletions src/services/modalities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export const getModalities = (): Promise<ModalityExtended[]> => {
return axios
.get("/api/modalities?expand")
.then((response) => {
const data = response.data;
return Object.entries(data).map(([name, modality]: any) => ({
const data = response.data as Record<string,any>;
return Object.entries(data).map(([name, modality]: [string, any]) => ({
name : name,
aet: modality.AET,
allowEcho: modality.AllowEcho,
Expand All @@ -52,8 +52,7 @@ export const getModalities = (): Promise<ModalityExtended[]> => {
timeout: modality.Timeout,
useDicomTls: modality.UseDicomTls,
}));
})
.catch(handleAxiosError);
}).catch(handleAxiosError);
};

export const echoModality = (name: string): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion src/services/peers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const deletePeer = (name: string): Promise<void> => {
export const getPeers = (): Promise<Peer[]> => {
return axios.get("/api/peers?expand")
.then(response => {
return Object.entries(response.data).map(([name, peer]) => {
return Object.entries(response.data).map(([name, peer] : [string, any]) => {
return {
name : name,
url : peer.Url,
Expand Down
14 changes: 13 additions & 1 deletion src/ui/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,19 @@ const Button: React.FC<ButtonProps> = ({
red: "bg-red",
gray: "bg-gray",
light: "bg-light",
grayCustom: ""
grayCustom: "",
almondHover: '',
dangerHover: '',
lightGray: '',
warningHover: '',
primaryActive: '',
primaryHover: '',
secondaryLight: '',
secondaryHover: '',
successHover: '',
sucessLight: '',
white: '',
transparent: ''
};

const isDisabled = props.disabled;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/SelectInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface OptionType {
interface SelectInputProps {
value: string|null;
options: OptionType[];
onChange: (selectedOption: OptionType | null) => void;
onChange: (selectedOption: OptionType | OptionType[] | null) => void;
placeholder?: string;
rounded?: boolean;
isClearable?: boolean
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"baseUrl": "./",
"target": "ES2020",
"useDefineForClassFields": true,
"checkJs": false,
"lib": [
"ES2020",
"DOM",
Expand Down

0 comments on commit 635bf17

Please sign in to comment.