Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed src/components/common/index.ts
Empty file.
135 changes: 134 additions & 1 deletion src/components/ui/table/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,140 @@ import { TableRowProps } from '@/components/ui/table/TableRowProps';
import { UserRole, UserType } from '@/types/user';
import { Meta, StoryObj } from '@storybook/nextjs';
import { useEffect, useState } from 'react';
import { fetchTableData } from './testApi';

const fetchTableData = async (userRole: UserRole) => {
return new Promise<{ headers: string[]; data: unknown[] }>(resolve => {
setTimeout(() => {
if (userRole === 'employer') {
resolve({
headers: ['μ‹ μ²­μž', 'μ†Œκ°œ', 'μ „ν™”λ²ˆν˜Έ', 'μƒνƒœ'],
data: [
{
name: 'κΉ€κ°•ν˜„',
bio: 'μ΅œμ„ μ„ λ‹€ν•΄ μ—΄μ‹¬νžˆ μΌν•©λ‹ˆλ‹€. λ‹€μˆ˜μ˜ 업무 κ²½ν—˜μ„ λ°”νƒ•μœΌλ‘œ ν™•μ‹€ν•œ 일처리 λ³΄μ—¬λ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€.',
phone: '010-1234-5678',
status: 'pending',
},
{
name: 'μ„œν˜œμ§„',
bio: 'μ—΄μ‹¬νžˆ ν•˜κ² μŠ΅λ‹ˆλ‹€!',
phone: '010-1111-2222',
status: 'rejected',
},
{
name: 'μ£Όμ§„ν˜',
bio: 'μ„±μ‹€ν•œ μžμ„Έλ‘œ μ—΄μ‹¬νžˆ μΌν•©λ‹ˆλ‹€.',
phone: '010-3333-4444',
status: 'approved',
},
{
name: 'μž₯민혁',
bio: '일을 κΌΌκΌΌν•˜κ²Œ ν•˜λŠ” μ„±κ²©μž…λ‹ˆλ‹€.',
phone: '010-5555-5555',
status: 'approved',
},
{
name: 'κ³ κΈ°ν›ˆ',
bio: 'ν•˜λ£¨λΌλ„ μ΅œμ„ μ„ λ‹€ν•΄μ„œ μΌν•˜κ² μŠ΅λ‹ˆλ‹€!',
phone: '010-6666-6666',
status: 'rejected',
},
{
name: 'μ΅œν˜„μˆ˜',
bio: 'μ—΄μ‹¬νžˆ ν•˜κ² μŠ΅λ‹ˆλ‹€!',
phone: '010-1123-5448',
status: 'pending',
},
{
name: 'κ°•μ£Όν•˜',
bio: 'μ„±μ‹€ν•œ μžμ„Έλ‘œ μ—΄μ‹¬νžˆ μΌν•©λ‹ˆλ‹€.',
phone: '010-4123-2323',
status: 'approved',
},
{
name: 'λ°°μˆ˜μ§€',
bio: 'μ—΄μ‹¬νžˆ 배우고 μΌν•˜κ² μŠ΅λ‹ˆλ‹€!',
phone: '010-3123-1111',
status: 'approved',
},
{
name: 'κ°•κ·œν•˜',
bio: 'κΌΌκΌΌν•œ 일처리 λ³΄μ—¬λ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€.',
phone: '010-5123-0098',
status: 'rejected',
},
{
name: 'κ³ μ„ μ˜',
bio: 'μ΅œμ„ μ„ λ‹€ν•΄μ„œ μΌν•˜κ² μŠ΅λ‹ˆλ‹€!',
phone: '010-6662-6326',
status: 'peding',
},
{
name: 'λ°•ν•˜μ—°',
bio: 'λ½‘μ•„μ£Όμ‹œλ©΄ μ—΄μ‹¬νžˆ ν•˜κ² μŠ΅λ‹ˆλ‹€.',
phone: '010-1277-1385',
status: 'pending',
},
{
name: 'κΉ€μ—°μ•„',
bio: '잘 λΆ€νƒλ“œλ¦½λ‹ˆλ‹€!',
phone: '010-1232-6216',
status: 'rejected',
},
],
});
} else {
resolve({
headers: ['κ°€κ²Œ', '일자', 'μ‹œκΈ‰', 'μƒνƒœ'],
data: [
{
name: 'λ„ˆκ΅¬λ¦¬λ„€ 라면집',
startsAt: '2025-10-01T11:00',
workhour: 2,
hourlyPay: '12,500원',
status: 'pending',
},
{
name: 'λ„ˆκ΅¬λ¦¬λ„€ 라면집',
startsAt: '2025-10-01T11:00',
workhour: 2,
hourlyPay: '12,500원',
status: 'rejected',
},
{
name: 'λ„ˆκ΅¬λ¦¬λ„€ 라면집',
startsAt: '2025-10-01T11:00',
workhour: 2,
hourlyPay: '12,500원',
status: 'approved',
},
{
name: 'λ„ˆκ΅¬λ¦¬λ„€ 라면집',
startsAt: '2025-10-01T11:00',
workhour: 2,
hourlyPay: '12,500원',
status: 'rejected',
},
{
name: 'λ„ˆκ΅¬λ¦¬λ„€ 라면집',
startsAt: '2025-10-01T11:00',
workhour: 2,
hourlyPay: '12,500원',
status: 'approved',
},
{
name: 'λ„ˆκ΅¬λ¦¬λ„€ 라면집',
startsAt: '2025-10-01T11:00',
workhour: 2,
hourlyPay: '12,500원',
status: 'approved',
},
],
});
}
});
});
};

const meta: Meta<typeof Table> = {
title: 'UI/Table',
Expand Down
135 changes: 0 additions & 135 deletions src/components/ui/table/testApi.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/context/appProviderWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from 'react';
import AuthProvider from './authProvider';
import { ToastProvider } from './toastContext';
import ToastProvider from './toastContext';
import { UserApplicationsProvider } from './userApplicationsProvider';

const AppProviderWrapper = ({ children }: { children: ReactNode }) => {
Expand Down
38 changes: 0 additions & 38 deletions src/context/mockAuthProvider/authRolePreview.tsx

This file was deleted.

70 changes: 0 additions & 70 deletions src/context/mockAuthProvider/authState_stories.tsx

This file was deleted.

Loading
Loading