Skip to content

Commit

Permalink
Merge pull request #39 from nadavWeisler/wizrad-ui
Browse files Browse the repository at this point in the history
Wizrad UI
  • Loading branch information
ShlomiShitrit authored Oct 11, 2023
2 parents 02fddb0 + 1c5b293 commit 526eb0f
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 56 deletions.
25 changes: 25 additions & 0 deletions psych-info-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions psych-info-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@mui/icons-material": "^5.14.12",
"@mui/material": "^5.14.12",
"@reduxjs/toolkit": "^1.9.7",
"encoding": "^0.1.13",
"firebase": "^10.4.0",
"i18next": "^23.5.1",
"next": "13.5.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import { useState, useEffect, Fragment } from "react";
import { Content } from "@/app/General/interfaces";
import { Content } from "@/app/general/interfaces";
import { Typography } from "@mui/material";
import RequestAccordion from "@/app/Components/AdminComp/RequestAccordion";
import { getPendingContent } from "@/app/firebase/commands";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Button,
} from "@mui/material";
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
import { RequestAccordionProps } from "@/app/General/interfaces";
import { RequestAccordionProps } from "@/app/general/interfaces";
import AccordionContent from "@/app/Components/ResultComp/AccordionContent";
import { deletePendingContent, createContent } from "@/app/firebase/commands";

Expand Down
2 changes: 1 addition & 1 deletion psych-info-ui/src/app/Components/AdminComp/SigninForm.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";
import { useState, useEffect } from "react";
import { Button, TextField, Box } from "@mui/material";
import { AdminSignInFormProps } from "@/app/General/interfaces";
import { AdminSignInFormProps } from "@/app/general/interfaces";

function SigninForm({
handleSubmit = () => null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Typography, Box } from "@mui/material";
import { Content } from "@/app/General/interfaces";
import { Content } from "@/app/general/interfaces";

function AccordionContent({
title = "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useSelector } from "react-redux";
import { Typography, Button } from "@mui/material";
import ResultAccordion from "@/app/Components/ResultComp/ResultAccordion";
import { getContent } from "@/app/firebase/commands";
import { Content, Operator } from "@/app/General/interfaces";
import { Content, Operator } from "@/app/general/interfaces";

const operator = Operator.AND;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
LinkedinIcon,
TelegramIcon,
} from "react-share";
import { ShareDialogProps } from "@/app/General/interfaces";
import { ShareDialogProps } from "@/app/general/interfaces";

function ShareDialog({
open = false,
Expand Down
5 changes: 2 additions & 3 deletions psych-info-ui/src/app/Components/UI/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
AppBar,
Toolbar,
Typography,
Button,
Select,
MenuItem,
Container,
Expand All @@ -25,12 +24,12 @@ function Navbar() {
const handleOpenMenu = () => setOpenMenu(true);
const handleCloseMenu = () => setOpenMenu(false);
const [authUser, setAuthUser] = useState<User | null>(null);
const [width, setWidth] = useState<number>(window?.innerWidth);
const [width, setWidth] = useState<number>(window.innerWidth);

const { user } = useContext(AuthContext);

function handleWindowSizeChange() {
setWidth();
setWidth(window.innerWidth);
}

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion psych-info-ui/src/app/Components/Wizard/steps/LangStep.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, useEffect, Fragment } from "react";
import { Chip, Grid, Typography } from "@mui/material";
import { Language, Tag } from "@/app/general/interfaces";
import { GetAllDisplays, ListContainsById } from "@/app/General/utils";
import { GetAllDisplays, ListContainsById } from "@/app/general/utils";
import { useTranslation } from "react-i18next";

interface LangStepProps {
Expand Down
2 changes: 1 addition & 1 deletion psych-info-ui/src/app/Components/Wizard/steps/OrgsStep.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, useEffect, Fragment } from "react";
import { Chip, Grid, Typography } from "@mui/material";
import { Organization } from "@/app/general/interfaces";
import { GetAllDisplays, ListContainsById } from "@/app/General/utils";
import { GetAllDisplays, ListContainsById } from "@/app/general/utils";
import { useTranslation } from "react-i18next";

interface OrganizationStepProps {
Expand Down
2 changes: 1 addition & 1 deletion psych-info-ui/src/app/Components/Wizard/steps/TagsStep.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, useEffect, Fragment } from "react";
import { Chip, Grid, Typography } from "@mui/material";
import { Tag } from "@/app/general/interfaces";
import { GetAllDisplays, ListContainsById } from "@/app/General/utils";
import { GetAllDisplays, ListContainsById } from "@/app/general/utils";
import { useTranslation } from "react-i18next";

interface TagsStepProps {
Expand Down
2 changes: 1 addition & 1 deletion psych-info-ui/src/app/General/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Filter, Language, Organization, StringObject, Tag } from "./interfaces";
import { Filter, Language, Organization, StringObject, Tag } from "@/app/general/interfaces";

export function ListContainsById(StringObjectList: Tag[] | Organization[] | StringObject[], id: string): boolean {
return StringObjectList.some((item) => item.id === id);
Expand Down
2 changes: 1 addition & 1 deletion psych-info-ui/src/app/firebase/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Operator,
Organization,
Tag,
} from "@/app/General/interfaces";
} from "@/app/general/interfaces";

export async function getAllTags(used: boolean): Promise<Tag[]> {
try {
Expand Down
37 changes: 0 additions & 37 deletions psych-info-ui/src/app/firebase/utils.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion psych-info-ui/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AuthProvider from "@/app/context/AuthContext";

import "../i18n/config";
import { ThemeProvider } from "@mui/material/styles";
import { appTheme } from "./General/styles";
import { appTheme } from "./general/styles";

const inter = Inter({ subsets: ["latin"] });

Expand Down
2 changes: 1 addition & 1 deletion psych-info-ui/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Wizrad from "@/app/Components/Wizard/Wizard";
import WelcomeMsg from "@/app/Components/UI/WelcomeMsg";
import { Provider } from "react-redux";
import store from "@/app/store";
import { Filter } from "./General/interfaces";
import { Filter } from "./general/interfaces";
import Gallary from "./Components/gallary/gallary";
import { GetFilters } from "./general/utils";

Expand Down
6 changes: 3 additions & 3 deletions psych-info-ui/src/app/upload/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ import {
SelectChangeEvent,
Theme,
} from "@mui/material";
import { appTheme } from "@/app/General/styles";
import { appTheme } from "@/app/general/styles";
import { AddString } from "../Components/addString";
import {
Content,
Language,
Organization,
StringObject,
Tag,
} from "@/app/General/interfaces";
} from "@/app/general/interfaces";
import {
EMPTY_LANGUAGE,
EMPTY_ORGANIZATION,
EMPTY_TAG,
} from "@/app/General/utils";
} from "@/app/general/utils";
import {
createLanguage,
createOrganization,
Expand Down

0 comments on commit 526eb0f

Please sign in to comment.