Skip to content

Commit

Permalink
General cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Apr 7, 2024
1 parent 020b6d0 commit 4203967
Show file tree
Hide file tree
Showing 24 changed files with 91 additions and 91 deletions.
8 changes: 4 additions & 4 deletions backend/src/components/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import React, { ReactNode, useEffect, useRef } from 'react'
import '../assets/css/accordion.css'

interface AccordionProps {
title?: string,
className?: string,
collapse?: boolean,
offsetHeight?: number,
title?: string
className?: string
collapse?: boolean
offsetHeight?: number
children: ReactNode
}

Expand Down
2 changes: 1 addition & 1 deletion backend/src/components/AvailabilityFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as helper from '../common/helper'
import '../assets/css/availability-filter.css'

interface AvailabilityFilterProps {
className?: string,
className?: string
onChange?: (values: movininTypes.Availablity[]) => void
}

Expand Down
28 changes: 14 additions & 14 deletions backend/src/components/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ import * as UserService from '../services/UserService'
import * as PropertyService from '../services/PropertyService'

interface AvatarProps {
width?: number,
height?: number,
mode?: 'create' | 'update',
type?: string,
record?: movininTypes.User | movininTypes.Property | null,
size: 'small' | 'medium' | 'large',
readonly?: boolean,
color?: 'disabled' | 'action' | 'inherit' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning',
className?: string,
verified?: boolean,
hideDelete?: boolean,
onValidate?: (valid: boolean) => void,
onBeforeUpload?: () => void,
onChange?: (param: string) => void,
width?: number
height?: number
mode?: 'create' | 'update'
type?: string
record?: movininTypes.User | movininTypes.Property | null
size: 'small' | 'medium' | 'large'
readonly?: boolean
color?: 'disabled' | 'action' | 'inherit' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning'
className?: string
verified?: boolean
hideDelete?: boolean
onValidate?: (valid: boolean) => void
onBeforeUpload?: () => void
onChange?: (param: string) => void
}

const Avatar = ({
Expand Down
6 changes: 3 additions & 3 deletions backend/src/components/BookingFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import Accordion from '../components/Accordion'
import '../assets/css/booking-filter.css'

interface BookingFilterProps {
collapse?: boolean,
className?: string,
language?: string,
collapse?: boolean
className?: string
language?: string
onSubmit?: (filter: movininTypes.Filter | null) => void
}

Expand Down
4 changes: 2 additions & 2 deletions backend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import { useGlobalContext, GlobalContextType } from '../context/GlobalContext'
import '../assets/css/header.css'

interface HeaderProps {
user?: movininTypes.User,
hidden?: boolean,
user?: movininTypes.User
hidden?: boolean
}

const ListItemLink = (props: any) => <ListItemButton component="a" {...props} />
Expand Down
10 changes: 5 additions & 5 deletions backend/src/components/ImageViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React, { KeyboardEvent, useCallback, useEffect, useMemo, useRef, useState
import '../assets/css/image-viewer.css'

interface ImageViewerProps {
title?: string,
currentIndex?: number,
src: string[],
closeOnClickOutside?: boolean,
disableScroll?: boolean,
title?: string
currentIndex?: number
src: string[]
closeOnClickOutside?: boolean
disableScroll?: boolean
backgroundStyle?: React.CSSProperties
closeComponent?: React.ReactNode
leftArrowComponent?: React.ReactNode
Expand Down
4 changes: 2 additions & 2 deletions backend/src/components/MultipleSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ interface MultipleSelectProps {
readOnly?: boolean
callbackFromMultipleSelect?: (newValue: any, _key: string, _reference: any) => void
onFocus?: React.FocusEventHandler<HTMLDivElement>
onInputChange?: ((event: React.SyntheticEvent<Element, Event>, value?: string, reason?: AutocompleteInputChangeReason) => void) | undefined
onInputChange?: (event: React.SyntheticEvent<Element, Event>, value?: string, reason?: AutocompleteInputChangeReason) => void
onClear?: () => void
onOpen?: ((event: React.SyntheticEvent<Element, Event>) => void) | undefined
onOpen?: (event: React.SyntheticEvent<Element, Event>) => void
}

const ListBox: React.ComponentType<React.HTMLAttributes<HTMLElement>> = forwardRef((props, ref) => {
Expand Down
10 changes: 5 additions & 5 deletions backend/src/components/Pager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { strings as commonStrings } from '../lang/common'
import '../assets/css/pager.css'

interface PagerProps {
page: number,
pageSize: number,
totalRecords: number,
rowCount: number,
onNext: () => void,
page: number
pageSize: number
totalRecords: number
rowCount: number
onNext: () => void
onPrevious: () => void
}

Expand Down
2 changes: 1 addition & 1 deletion backend/src/components/PropertyInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import '../assets/css/property-info.css'

interface PropertyInfoProps {
property: movininTypes.Property
user?: movininTypes.User,
user?: movininTypes.User
booking?: movininTypes.Booking
description?: boolean
className?: string
Expand Down
4 changes: 2 additions & 2 deletions backend/src/components/PropertyTypeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import * as movininTypes from 'movinin-types'
import { strings } from '../lang/properties'

interface PropertyTypeListProps {
value?: string,
required?: boolean,
value?: string
required?: boolean
label?: string
variant?: 'filled' | 'standard' | 'outlined'
onChange?: (value: string) => void
Expand Down
4 changes: 2 additions & 2 deletions backend/src/components/RentalTermList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import * as movininTypes from 'movinin-types'
import { strings } from '../lang/rental-term'

interface RentalTermListProps {
value?: string,
required?: boolean,
value?: string
required?: boolean
label?: string
variant?: 'filled' | 'standard' | 'outlined'
onChange?: (value: string) => void
Expand Down
2 changes: 1 addition & 1 deletion backend/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { strings as commonStrings } from '../lang/common'
import '../assets/css/search.css'

interface SearchProps {
className?: string,
className?: string
onSubmit?: (value: string) => void
}

Expand Down
2 changes: 1 addition & 1 deletion backend/src/components/UserTypeFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as helper from '../common/helper'
import '../assets/css/user-type-filter.css'

interface UserTypeFilterProps {
className?: string,
className?: string
onChange?: (types: movininTypes.UserType[]) => void
}

Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import React, { ReactNode, useEffect, useRef } from 'react'
import '../assets/css/accordion.css'

interface AccordionProps {
title?: string,
className?: string,
collapse?: boolean,
offsetHeight?: number,
title?: string
className?: string
collapse?: boolean
offsetHeight?: number
children: ReactNode
}

Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/AgencySelectList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import MultipleSelect from './MultipleSelect'

interface AgencySelectListProps {
value?: movininTypes.Option | movininTypes.Option[]
multiple?: boolean,
label?: string,
required?: boolean,
readOnly?: boolean,
variant?: TextFieldVariants,
multiple?: boolean
label?: string
required?: boolean
readOnly?: boolean
variant?: TextFieldVariants
onChange?: (values: movininTypes.Option[]) => void
}

Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/BookingFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import Accordion from '../components/Accordion'
import '../assets/css/booking-filter.css'

interface BookingFilterProps {
collapse?: boolean,
className?: string,
language?: string,
collapse?: boolean
className?: string
language?: string
onSubmit?: (filter: movininTypes.Filter | null) => void
}

Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ import { useGlobalContext, GlobalContextType } from '../context/GlobalContext'
import '../assets/css/header.css'

interface HeaderProps {
user?: movininTypes.User,
hidden?: boolean,
hideSignin?: boolean,
user?: movininTypes.User
hidden?: boolean
hideSignin?: boolean
}

const ListItemLink = (props: any) => <ListItemButton component="a" {...props} />
Expand Down
22 changes: 11 additions & 11 deletions frontend/src/components/ImageViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import React, { KeyboardEvent, useCallback, useEffect, useMemo, useRef, useState
import '../assets/css/image-viewer.css'

interface ImageViewerProps {
title?: string,
currentIndex?: number,
src: string[],
closeOnClickOutside?: boolean,
disableScroll?: boolean,
backgroundStyle?: React.CSSProperties,
closeComponent?: React.ReactNode,
leftArrowComponent?: React.ReactNode,
rightArrowComponent?: React.ReactNode,
imageStyle?: React.CSSProperties,
onClose: () => void,
title?: string
currentIndex?: number
src: string[]
closeOnClickOutside?: boolean
disableScroll?: boolean
backgroundStyle?: React.CSSProperties
closeComponent?: React.ReactNode
leftArrowComponent?: React.ReactNode
rightArrowComponent?: React.ReactNode
imageStyle?: React.CSSProperties
onClose: () => void
}

const ImageViewer = ({
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/MultipleSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ interface MultipleSelectProps {
freeSolo?: boolean
callbackFromMultipleSelect?: (newValue: any, _key: string, _reference: any) => void
onFocus?: React.FocusEventHandler<HTMLDivElement>
onInputChange?: ((event: React.SyntheticEvent<Element, Event>, value?: string, reason?: AutocompleteInputChangeReason) => void) | undefined
onInputChange?: (event: React.SyntheticEvent<Element, Event>, value?: string, reason?: AutocompleteInputChangeReason) => void
onClear?: () => void
onOpen?: ((event: React.SyntheticEvent<Element, Event>) => void) | undefined
onOpen?: (event: React.SyntheticEvent<Element, Event>) => void
}

const ListBox: React.ComponentType<React.HTMLAttributes<HTMLElement>> = forwardRef((props, ref) => {
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/Pager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { strings as commonStrings } from '../lang/common'
import '../assets/css/pager.css'

interface PagerProps {
page: number,
pageSize: number,
totalRecords: number,
rowCount: number,
onNext: () => void,
page: number
pageSize: number
totalRecords: number
rowCount: number
onNext: () => void
onPrevious: () => void
}

Expand Down
10 changes: 5 additions & 5 deletions mobile/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { useGlobalContext, GlobalContextType } from '../context/GlobalContext'
import * as NotificationService from '../services/NotificationService'

interface HeaderProps {
title?: string,
hideTitle?: boolean,
loggedIn?: boolean,
reload?: boolean,
_avatar?: string | null,
title?: string
hideTitle?: boolean
loggedIn?: boolean
reload?: boolean
_avatar?: string | null
}

const Header = ({ title,
Expand Down
2 changes: 1 addition & 1 deletion mobile/components/Master.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as movininTypes from '../miscellaneous/movininTypes'
interface MasterProps {
navigation: NativeStackNavigationProp<StackParams, keyof StackParams>
strict?: boolean
route?: RouteProp<StackParams, keyof StackParams>,
route?: RouteProp<StackParams, keyof StackParams>
reload?: boolean
style?: object
title?: string
Expand Down
6 changes: 3 additions & 3 deletions mobile/components/NotificationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import Checkbox from '../components/Checkbox'
import { useGlobalContext, GlobalContextType } from '../context/GlobalContext'

interface NotificationListProps {
navigation: NativeStackNavigationProp<StackParams, keyof StackParams>,
user?: movininTypes.User,
locale: Locale,
navigation: NativeStackNavigationProp<StackParams, keyof StackParams>
user?: movininTypes.User
locale: Locale
}

const NotificationList = ({ user, locale, navigation }: NotificationListProps) => {
Expand Down
12 changes: 6 additions & 6 deletions mobile/components/Property.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import * as env from '../config/env.config'
import i18n from '../lang/i18n'

interface PropertyProps {
navigation: NativeStackNavigationProp<StackParams, keyof StackParams>,
fr: boolean,
property: movininTypes.Property,
from: Date,
to: Date,
location: string,
navigation: NativeStackNavigationProp<StackParams, keyof StackParams>
fr: boolean
property: movininTypes.Property
from: Date
to: Date
location: string
}

const iconSize = 24
Expand Down

0 comments on commit 4203967

Please sign in to comment.