Browse Source

공통 컴포넌트 수정 및 추가

master
박상현 8 months ago
parent
commit
04e61b5b64
  1. 2
      src/@core/layouts/components/navbar/NavbarUser.js
  2. 2
      src/@core/layouts/components/navbar/UserDropdown.js
  3. 11
      src/components/ui/dropdown/CustomDropdownItem.tsx
  4. 14
      src/components/ui/dropdown/CustomDropdownMenu.tsx
  5. 18
      src/components/ui/dropdown/CustomDropdownToggle.tsx
  6. 7
      src/components/ui/dropdown/CustomUncontrolledDropdown.tsx
  7. 6
      src/modules/laanc/models/laancModels.ts

2
src/@core/layouts/components/navbar/NavbarUser.js

@ -3,7 +3,7 @@ import { Fragment } from 'react';
// ** Third Party Components
import { Menu, Moon, Sun } from 'react-feather';
import { useDispatch, useSelector } from 'react-redux';
import { Nav, NavItem, NavLink } from 'reactstrap';
import { Nav, NavItem, NavLink } from '@component/ui';
import * as Actions from '../../../../modules/menu/actions/menuAction';
import UserDropdown from './UserDropdown';

2
src/@core/layouts/components/navbar/UserDropdown.js

@ -16,7 +16,7 @@ import {
DropdownMenu,
DropdownToggle,
UncontrolledDropdown
} from 'reactstrap';
} from '@component/ui';
import * as Actions from '../../../../modules/account/auth/actions';
const UserDropdown = () => {

11
src/components/ui/dropdown/CustomDropdownItem.tsx

@ -7,6 +7,8 @@ interface Props {
style?: React.CSSProperties;
header?: boolean;
onClick?: MouseEventHandler<HTMLButtonElement>;
tag?: any;
to?: string;
}
/**
@ -15,6 +17,7 @@ interface Props {
* @param className?:string
* @param style?: React.CSSProperties
* @param header?: boolean
* @param onClick?: MouseEventHandler<HTMLButtonElement>
*
*/
@ -22,15 +25,19 @@ export default function CustomDropdownItem({
children,
className,
style,
header,
onClick
header = false,
tag,
onClick,
to
}: Props) {
return (
<DropdownItem
className={className}
style={style}
tag={tag}
header={header}
onClick={onClick}
to={to}
>
{children}
</DropdownItem>

14
src/components/ui/dropdown/CustomDropdownMenu.tsx

@ -4,15 +4,25 @@ import { ReactNode } from 'react';
interface Props {
children: ReactNode;
className?: string;
right?: boolean;
}
/**
*
* @param children: ReactNode
* @param className?:string
* @param right?: boolean
*
*/
export default function CustomDropdownMenu({ children, className }: Props) {
return <DropdownMenu className={className}>{children}</DropdownMenu>;
export default function CustomDropdownMenu({
children,
className,
right
}: Props) {
return (
<DropdownMenu className={className} right={right}>
{children}
</DropdownMenu>
);
}

18
src/components/ui/dropdown/CustomDropdownToggle.tsx

@ -1,10 +1,13 @@
import { DropdownToggle } from 'reactstrap';
import { ReactNode } from 'react';
import { MouseEventHandler, ReactNode } from 'react';
interface Props {
children: ReactNode;
className?: string;
color?: 'primary';
tag?: any;
onClick?: MouseEventHandler<HTMLButtonElement>;
href?: string;
}
/**
@ -17,10 +20,19 @@ interface Props {
export default function CustomDropdownToggle({
children,
className,
color
color,
tag,
onClick,
href
}: Props) {
return (
<DropdownToggle className={className} color={color}>
<DropdownToggle
className={className}
color={color}
tag={tag}
href={href}
onClick={onClick}
>
{children}
</DropdownToggle>
);

7
src/components/ui/dropdown/CustomUncontrolledDropdown.tsx

@ -5,6 +5,7 @@ interface Props {
children: ReactNode;
className?: string;
direction?: 'up' | 'down' | 'left' | 'right';
tag?: any;
}
/**
@ -12,16 +13,18 @@ interface Props {
* @param children: ReactNode
* @param className?:string
* @param direction?: 'up' | 'down' | 'left' | 'right';
* @param tag?: any
*
*/
export default function CustomUncontrolledDropdown({
children,
className,
direction
direction,
tag
}: Props) {
return (
<UncontrolledDropdown className={className} direction={direction}>
<UncontrolledDropdown className={className} direction={direction} tag={tag}>
{children}
</UncontrolledDropdown>
);

6
src/modules/laanc/models/laancModels.ts

@ -298,6 +298,7 @@ export const LaancFlightData = {
]
}
};
export interface weatherData {
serviceKey: string;
numOfRows: string;
@ -308,10 +309,12 @@ export interface weatherData {
nx: string;
ny: string;
}
export interface LaancPdf {
address: string;
pdfUrl: string;
}
// laanc 승인 model
export interface LaancApproval {
validatedRs: {
@ -341,9 +344,6 @@ export interface LaancApproval {
flight: boolean; // 무조건 날 수 있음
};
}
// valid false 이면서 flight true이면 승인 불필요 조건 성립
// valid false 이면 laanc가 필요 없는 것도 걸러줌
// 만약 둘 다 false이면 뭐 땜에 안되는지 정의 필요
export interface FlightPlanData {
planSno?: number;

Loading…
Cancel
Save