Skip to content

Commit

Permalink
Merge pull request #40 from brunotot/frontend-hotfix
Browse files Browse the repository at this point in the history
chore: hotfix
  • Loading branch information
brunotot authored Nov 26, 2024
2 parents 0426776 + f81356f commit 47d76fd
Show file tree
Hide file tree
Showing 48 changed files with 134 additions and 149 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { NavigationRouteProtectParam } from "@org/app-vite-react/server/route-typings";
import type { NavigationRouteProtectParam } from "@/server/route-typings";

import { LoaderSuspense } from "../LoaderSuspense";
import { Protect } from "../Protect";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { DatatableFilterProps } from "../DatatableFilter/DatatableFilter";

import * as icons from "@mui/icons-material";
import * as mui from "@mui/material";
import { FixedBadge } from "@org/app-vite-react/app/pages/admin-settings/manage-users/components";
import { FixedBadge } from "@/app/pages/admin-settings/manage-users/components";
import React from "react";

import { DatatableFilters } from "../DatatableFilters";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import type {
DtBaseColumnAlign,
DtBaseColumnRenderHeader,
} from "@org/app-vite-react/app/components/Datatable";
import type { DtBaseColumnAlign, DtBaseColumnRenderHeader } from "@/app/components/Datatable";
import type { MouseEvent } from "react";

import { TableCell, Box, TableSortLabel } from "@mui/material";
import { useCallback, useState } from "react";


export type DtSortableCellProps = {
id: string;
align?: DtBaseColumnAlign;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ClientDatatableProps } from "@org/app-vite-react/app/components/Datatable/impl/ClientDatatable/types";
import type { DtBaseOrder } from "@org/app-vite-react/app/components/Datatable/types";
import type { ClientDatatableProps } from "@/app/components/Datatable/impl/ClientDatatable/types";
import type { DtBaseOrder } from "@/app/components/Datatable/types";
import type { MouseEvent } from "react";

import * as mui from "@mui/material";
Expand All @@ -12,8 +12,8 @@ import {
TableBody,
TablePagination,
} from "@mui/material";
import { DtSortableCell } from "@org/app-vite-react/app/components/Datatable/components/DtSortableCell/DtSortableCell";
import { ClientResponsiveTable } from "@org/app-vite-react/app/pages/admin-settings/manage-users/components";
import { DtSortableCell } from "@/app/components/Datatable/components/DtSortableCell/DtSortableCell";
import { ClientResponsiveTable } from "@/app/pages/admin-settings/manage-users/components";
import { Fragment, useMemo, useState } from "react";

export function ClientDatatable<T>(props: ClientDatatableProps<T>) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DtBaseProps } from "@org/app-vite-react/app/components/Datatable/types";
import type { DtBaseProps } from "@/app/components/Datatable/types";

export type ClientDatatableProps<T> = DtBaseProps<T, (o1: T, o2: T) => number> & {
sync: true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ServerDatatableProps } from "@org/app-vite-react/app/components/Datatable/impl/ServerDatatable/types";
import type { DtBaseSortItem } from "@org/app-vite-react/app/components/Datatable/types";
import type { ServerDatatableProps } from "@/app/components/Datatable/impl/ServerDatatable/types";
import type { DtBaseSortItem } from "@/app/components/Datatable/types";
import type { MouseEvent } from "react";

import {
Expand All @@ -11,7 +11,7 @@ import {
TableBody,
TablePagination,
} from "@mui/material";
import { DtSortableCell } from "@org/app-vite-react/app/components/Datatable/components/DtSortableCell";
import { DtSortableCell } from "@/app/components/Datatable/components/DtSortableCell";
import { type TODO } from "@org/lib-commons";
import { Fragment, useCallback } from "react";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DtBaseProps } from "@org/app-vite-react/app/components/Datatable/types";
import type { DtBaseProps } from "@/app/components/Datatable/types";

export type ServerDatatableProps<T> = DtBaseProps<T, string> & {
sync?: false;
Expand Down
4 changes: 2 additions & 2 deletions apps/app-vite-react/src/app/components/Flag/Flag.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { I18nLocale } from "@org/app-vite-react/lib/i18next";
import type { I18nLocale } from "@/lib/i18next";

import { getLocaleFlag } from "@org/app-vite-react/lib/i18next";
import { getLocaleFlag } from "@/lib/i18next";
import React from "react";

export type FlagProps = {
Expand Down
2 changes: 1 addition & 1 deletion apps/app-vite-react/src/app/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Breakpoint } from "@mui/material";
import type { MuiSxProps } from "@org/app-vite-react/app/components/Header";
import type { MuiSxProps } from "@/app/components/Header";

import { Box, Container, Link, Typography } from "@mui/material";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { NavigationRouteHandle } from "@org/app-vite-react/server/route-typings";
import type { NavigationRouteHandle } from "@/server/route-typings";
import type { TODO } from "@org/lib-commons";

import * as icons from "@mui/icons-material";
import * as mui from "@mui/material";
import { sigDirection } from "@org/app-vite-react/app/signals/sigDirection";
import { useTranslation } from "@org/app-vite-react/lib/i18next";
import { sigDirection } from "@/app/signals/sigDirection";
import { useTranslation } from "@/lib/i18next";
import { useMemo, useState } from "react";
import { Link as RouterLink } from "react-router-dom";
import { type UIMatch, useMatches } from "react-router-dom";
Expand Down
16 changes: 8 additions & 8 deletions apps/app-vite-react/src/app/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import type { Breakpoint, SxProps, Theme } from "@mui/material";

import * as icons from "@mui/icons-material";
import * as mui from "@mui/material";
import { InputDarkThemeToggle } from "@org/app-vite-react/app/inputs/InputDarkThemeToggle";
import { InputLayoutToggle } from "@org/app-vite-react/app/inputs/InputLayoutToggle";
import { InputLocaleSelect } from "@org/app-vite-react/app/inputs/InputLocaleSelect";
import { sigLayoutVariant } from "@org/app-vite-react/app/signals/sigLayoutVariant";
import { sigLayoutWidth } from "@org/app-vite-react/app/signals/sigLayoutWidth";
import { getFontFamily, sigLocale } from "@org/app-vite-react/app/signals/sigLocale";
import { sigSidebarOpen } from "@org/app-vite-react/app/signals/sigSidebarOpen";
import { sigThemeOpts } from "@org/app-vite-react/app/signals/sigTheme";
import { InputDarkThemeToggle } from "@/app/inputs/InputDarkThemeToggle";
import { InputLayoutToggle } from "@/app/inputs/InputLayoutToggle";
import { InputLocaleSelect } from "@/app/inputs/InputLocaleSelect";
import { sigLayoutVariant } from "@/app/signals/sigLayoutVariant";
import { sigLayoutWidth } from "@/app/signals/sigLayoutWidth";
import { getFontFamily, sigLocale } from "@/app/signals/sigLocale";
import { sigSidebarOpen } from "@/app/signals/sigSidebarOpen";
import { sigThemeOpts } from "@/app/signals/sigTheme";

import { UserMenuButton } from "./UserMenuButton";
import { Logo } from "../Logo";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import Avatar from "@mui/material/Avatar";
import Box from "@mui/material/Box";
import IconButton from "@mui/material/IconButton";
import Menu from "@mui/material/Menu";
import { sigUser } from "@org/app-vite-react/app/signals/sigUser";
import { keycloakLogout } from "@org/app-vite-react/lib/keycloak-js";
import { sigUser } from "@/app/signals/sigUser";
import { keycloakLogout } from "@/lib/keycloak-js";
import React from "react";

import LogoutButton from "./LogoutButton";
Expand Down
6 changes: 3 additions & 3 deletions apps/app-vite-react/src/app/components/Protect/Protect.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { KeycloakUser } from "@org/app-vite-react/lib/keycloak-js";
import type { NavigationRouteProtectParam } from "@org/app-vite-react/server/route-typings";
import type { KeycloakUser } from "@/lib/keycloak-js";
import type { NavigationRouteProtectParam } from "@/server/route-typings";
import type { ReactNode } from "react";

import * as mui from "@mui/material";
import { sigUser } from "@org/app-vite-react/app/signals/sigUser";
import { sigUser } from "@/app/signals/sigUser";

export type ProtectProps = {
children: ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion apps/app-vite-react/src/app/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ReactNode } from "react";

import { SwipeableDrawer, useMediaQuery } from "@mui/material";
import { sigLayoutVariant } from "@org/app-vite-react/app/signals/sigLayoutVariant";
import { sigLayoutVariant } from "@/app/signals/sigLayoutVariant";

export type SidebarProps = {
width?: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import type {
CombinedInputProps,
ValueType,
} from "@org/app-vite-react/app/forms/input/Input/Input";
import type { CombinedInputProps, ValueType } from "@/app/forms/input/Input/Input";
import type * as rhf from "react-hook-form";

import * as mui from "@mui/material";
import { Input } from "@org/app-vite-react/app/forms/input/Input/Input";
import { Input } from "@/app/forms/input/Input/Input";

export type InputSelectProps<
TInput,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type * as rhf from "react-hook-form";

import * as mui from "@mui/material";
import { Input, type CombinedInputProps } from "@org/app-vite-react/app/forms/input/Input/Input";
import { Input, type CombinedInputProps } from "@/app/forms/input/Input/Input";

export type InputTextProps<
TInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import type { TODO } from "@org/lib-commons";
import type * as rhf from "react-hook-form";

import * as mui from "@mui/material";
import {
Input,
type ValueType,
type CombinedInputProps,
} from "@org/app-vite-react/app/forms/input/Input/Input";
import { Input, type ValueType, type CombinedInputProps } from "@/app/forms/input/Input/Input";

export type InputToggleProps<
TInput,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DarkMode, LightMode } from "@mui/icons-material";
import { Box, IconButton, Tooltip } from "@mui/material";
import { useTranslation } from "@org/app-vite-react/lib/i18next";
import { useTranslation } from "@/lib/i18next";

export type InputDarkThemeToggleProps = {
value: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { LayoutVariant } from "@org/app-vite-react/app/models";
import type { LayoutVariant } from "@/app/models";

import { TableChart, ViewSidebar } from "@mui/icons-material";
import { IconButton, Tooltip } from "@mui/material";
import { useTranslation } from "@org/app-vite-react/lib/i18next";
import { useTranslation } from "@/lib/i18next";

export type InputLayoutToggleProps = {
value: LayoutVariant;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { I18nLocale } from "@org/app-vite-react/lib/i18next";
import type { I18nLocale } from "@/lib/i18next";

import { Translate } from "@mui/icons-material";
import { Box, IconButton, Menu, MenuItem, Tooltip } from "@mui/material";
import { I18N_LANGUAGE_LIST, useTranslation } from "@org/app-vite-react/lib/i18next";
import { I18N_LANGUAGE_LIST, useTranslation } from "@/lib/i18next";
import { useMemo, useState } from "react";

import { Flag } from "../../components/Flag/Flag";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { Breakpoint } from "@mui/material";
import type * as RouteTypes from "@org/app-vite-react/server/route-typings";
import type * as RouteTypes from "@/server/route-typings";

import { ChevronRight, ExpandMore } from "@mui/icons-material";
import * as mui from "@mui/material";
import { sigUser } from "@org/app-vite-react/app/signals/sigUser";
import { useTranslation } from "@org/app-vite-react/lib/i18next";
import { reactServer } from "@org/app-vite-react/server/server";
import { sigUser } from "@/app/signals/sigUser";
import { useTranslation } from "@/lib/i18next";
import { reactServer } from "@/server/server";
import { Fragment } from "react";
import { useNavigate } from "react-router-dom";

Expand Down
16 changes: 8 additions & 8 deletions apps/app-vite-react/src/app/layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { PropsWithChildren } from "react";

import { Box, type Breakpoint, Container, useMediaQuery } from "@mui/material";
import { Footer } from "@org/app-vite-react/app/components/Footer";
import { Header } from "@org/app-vite-react/app/components/Header";
import { Logo } from "@org/app-vite-react/app/components/Logo";
import { Sidebar } from "@org/app-vite-react/app/components/Sidebar";
import { sigLayoutVariant } from "@org/app-vite-react/app/signals/sigLayoutVariant";
import { sigLayoutWidth } from "@org/app-vite-react/app/signals/sigLayoutWidth";
import { sigSidebarOpen } from "@org/app-vite-react/app/signals/sigSidebarOpen";
import { type NavigationRoute } from "@org/app-vite-react/server/route-typings";
import { Footer } from "@/app/components/Footer";
import { Header } from "@/app/components/Header";
import { Logo } from "@/app/components/Logo";
import { Sidebar } from "@/app/components/Sidebar";
import { sigLayoutVariant } from "@/app/signals/sigLayoutVariant";
import { sigLayoutWidth } from "@/app/signals/sigLayoutWidth";
import { sigSidebarOpen } from "@/app/signals/sigSidebarOpen";
import { type NavigationRoute } from "@/server/route-typings";

import { HorizontalLayout } from "./HorizontalLayout";
import { SidebarLayout } from "./SidebarLayout";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type * as RouteTypes from "@org/app-vite-react/server/route-typings";
import type * as RouteTypes from "@/server/route-typings";

import { ExpandLess, ExpandMore } from "@mui/icons-material";
import { Collapse, Divider, List, ListItemButton, ListItemIcon, ListItemText } from "@mui/material";
import { isAnyRouteActive } from "@org/app-vite-react/app/layout/Layout";
import { sigUser } from "@org/app-vite-react/app/signals/sigUser";
import { useTranslation } from "@org/app-vite-react/lib/i18next";
import { reactServer } from "@org/app-vite-react/server/server";
import { useState } from "react";
import { Fragment } from "react/jsx-runtime";
import { useLocation, useNavigate } from "react-router-dom";
import { isAnyRouteActive } from "@/app/layout/Layout";
import { sigUser } from "@/app/signals/sigUser";
import { useTranslation } from "@/lib/i18next";
import { reactServer } from "@/server/server";

export type SidebarNavItemProps = {
item: RouteTypes.NavigationRoute & { accumulatedPath: string };
Expand Down
2 changes: 1 addition & 1 deletion apps/app-vite-react/src/app/models/ConstraintViolation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ConstraintViolationExecOptions } from "@org/lib-api-client";

import { tsrClient } from "@org/app-vite-react/lib/@ts-rest";
import { tsrClient } from "@/lib/@ts-rest";

export async function executeConstraintValidation({
body,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ClientDatatableProps } from "@org/app-vite-react/app/components/Datatable";
import type { ClientDatatableProps } from "@/app/components/Datatable";

import * as icons from "@mui/icons-material";
import * as mui from "@mui/material";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as mui from "@mui/material";
import * as inputs from "@org/app-vite-react/app/forms/input";
import { executeConstraintValidation } from "@org/app-vite-react/app/models/ConstraintViolation";
import { useZodForm, type FormProps } from "@org/app-vite-react/lib/react-hook-form";
import * as inputs from "@/app/forms/input";
import { executeConstraintValidation } from "@/app/models/ConstraintViolation";
import { useZodForm, type FormProps } from "@/lib/react-hook-form";
import { ROLE_LIST, UserForm as UserFormModel } from "@org/lib-api-client";
import { z, debounce } from "@org/lib-commons";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@ import type { PaginationOptions, zod } from "@org/lib-commons";

import * as icons from "@mui/icons-material";
import * as mui from "@mui/material";
import {
DatatableContainer,
DEFAULT_PAGINATION_OPTIONS,
} from "@org/app-vite-react/app/components/Datatable";
import { DatatableFilterButton } from "@org/app-vite-react/app/components/Datatable/components/DatatableFilterButton";
import { Datatable } from "@org/app-vite-react/app/components/Datatable/Datatable";
import { InputText } from "@org/app-vite-react/app/forms";
import { useConfirm } from "@org/app-vite-react/app/provider/ConfirmProvider";
import { useSnackbar } from "@org/app-vite-react/app/provider/SnackbarProvider";
import { sigDirection } from "@org/app-vite-react/app/signals/sigDirection";
import { sigUser } from "@org/app-vite-react/app/signals/sigUser";
import { tsrClient, tsrQuery } from "@org/app-vite-react/lib/@ts-rest";
import { useZodForm } from "@org/app-vite-react/lib/react-hook-form";
import { DatatableContainer, DEFAULT_PAGINATION_OPTIONS } from "@/app/components/Datatable";
import { DatatableFilterButton } from "@/app/components/Datatable/components/DatatableFilterButton";
import { Datatable } from "@/app/components/Datatable/Datatable";
import { InputText } from "@/app/forms";
import { useConfirm } from "@/app/provider/ConfirmProvider";
import { useSnackbar } from "@/app/provider/SnackbarProvider";
import { sigDirection } from "@/app/signals/sigDirection";
import { sigUser } from "@/app/signals/sigUser";
import { tsrClient, tsrQuery } from "@/lib/@ts-rest";
import { useZodForm } from "@/lib/react-hook-form";
import { type UserDto } from "@org/lib-api-client";
import { z } from "@org/lib-commons";
import React from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useSnackbar } from "@org/app-vite-react/app/provider/SnackbarProvider";
import { tsrClient } from "@org/app-vite-react/lib/@ts-rest";
import { DEFAULT_USER_FORM_STATE, type UserForm as UserFormModel } from "@org/lib-api-client";
import { useNavigate } from "react-router-dom";

import { UserForm } from "../../components";
import { useSnackbar } from "@/app/provider/SnackbarProvider";
import { tsrClient } from "@/lib/@ts-rest";

export default function CreateUserPage() {
const navigate = useNavigate();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { UserForm as UserFormModel } from "@org/lib-api-client";

import { Card } from "@mui/material";
import { useSnackbar } from "@org/app-vite-react/app/provider/SnackbarProvider";
import { tsrClient } from "@org/app-vite-react/lib/@ts-rest";
import { useSnackbar } from "@/app/provider/SnackbarProvider";
import { tsrClient } from "@/lib/@ts-rest";
import React from "react";
import { useNavigate, useParams } from "react-router-dom";

Expand Down
17 changes: 7 additions & 10 deletions apps/app-vite-react/src/app/pages/visual-preferences/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import type { LayoutWidth, Locale } from "@org/app-vite-react/app/models";
import type { LayoutWidth, Locale } from "@/app/models";

import * as mui from "@mui/material";
import * as inputs from "@org/app-vite-react/app/forms/input";
import { sigLayoutVariant } from "@org/app-vite-react/app/signals/sigLayoutVariant";
import {
LAYOUT_WIDTH_OPTIONS,
sigLayoutWidth,
} from "@org/app-vite-react/app/signals/sigLayoutWidth";
import { sigLocale } from "@org/app-vite-react/app/signals/sigLocale";
import { sigThemeOpts } from "@org/app-vite-react/app/signals/sigTheme";
import { I18N_LANGUAGE_LIST } from "@org/app-vite-react/lib/i18next";
import * as inputs from "@/app/forms/input";
import { sigLayoutVariant } from "@/app/signals/sigLayoutVariant";
import { LAYOUT_WIDTH_OPTIONS, sigLayoutWidth } from "@/app/signals/sigLayoutWidth";
import { sigLocale } from "@/app/signals/sigLocale";
import { sigThemeOpts } from "@/app/signals/sigTheme";
import { I18N_LANGUAGE_LIST } from "@/lib/i18next";

import { LabelInputGroup } from "./LabelInputGroup";
import { Flag } from "../../components/Flag/Flag";
Expand Down
Loading

0 comments on commit 47d76fd

Please sign in to comment.