-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #853 from NUTFes/feat/kobayashi/CreatingstoriesFil…
…e/sponsoractivities-805 Feat/kobayashi/creatingstories file/sponsoractivities 805
- Loading branch information
Showing
16 changed files
with
509 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,15 @@ import { | |
PurchaseOrder, | ||
PurchaseItem, | ||
Expense, | ||
Sponsor, | ||
SponsorActivity, | ||
SponsorActivityInformation, | ||
SponsorStyleDetail, | ||
ActivityStyle, | ||
SponsorStyle, | ||
SponsorActivityView, | ||
SponsorFilterType, | ||
YearPeriod, | ||
} from '../type/common'; | ||
|
||
export const USER = { | ||
|
@@ -24,6 +33,17 @@ export const EXPENSES = [ | |
}, | ||
] as Expense[]; | ||
|
||
export const YEAEPERIOD = [ | ||
{ | ||
id: 0, | ||
year: 2024, | ||
startedAt: '2024-01-01T00:00:00.000Z', | ||
endedAt: '2024-12-31T00:00:00.000Z', | ||
createdAt: '2024-12-31T00:00:00.000Z', | ||
updatedAt: '2024-12-31T00:00:00.000Z', | ||
}, | ||
] as YearPeriod[]; | ||
|
||
export const PURCHASE_REPORT = { | ||
id: 0, | ||
userID: 0, | ||
|
@@ -67,3 +87,77 @@ export const PURCHASE_REPORT_VIEW = { | |
reportUser: USER, | ||
purchaseItems: [PURCHASE_ITEM], | ||
} as PurchaseReportView; | ||
|
||
export const SPONSOR = { | ||
// // Sponsor(協賛企業) | ||
id: 1, | ||
name: 'test-name', | ||
tel: '080-1234-5678', | ||
email: '[email protected]', | ||
address: '東京都千代田区', | ||
representative: 'test-representative', | ||
createdAt: '2021-09-01T00:00:00.000Z', | ||
updatedAt: '2021-09-01T00:00:00.000Z', | ||
} as Sponsor; | ||
|
||
export const SPONSOR_ACTIVITY = { | ||
id: 1, | ||
sponsorID: 1, | ||
userID: 1, | ||
isDone: true, | ||
feature: 'test-feature', | ||
expense: 1000, | ||
remark: 'test-remark', | ||
design: 1, | ||
url: 'https://test.com', | ||
createdAt: '2021-09-01T00:00:00.000Z', | ||
updatedAt: '2021-09-01T00:00:00.000Z', | ||
} as SponsorActivity; | ||
|
||
export const SPONSOR_ACTIVITY_INFORMATION = { | ||
id: 1, | ||
activityID: 1, | ||
bucketName: 'test-bucket-name', | ||
fileName: 'test-file-name', | ||
fileType: 'test-file-type', | ||
designProgress: 1, | ||
fileInformation: 'test-file-information', | ||
createdAt: '2021-09-01T00:00:00.000Z', | ||
updatedAt: '2021-09-01T00:00:00.000Z', | ||
} as SponsorActivityInformation; | ||
|
||
export const ACTIVITY_STYLE = { | ||
id: 1, | ||
activityID: 1, | ||
sponsorStyleID: 1, | ||
createdAt: '2021-09-01T00:00:00.000Z', | ||
updatedAt: '2021-09-01T00:00:00.000Z', | ||
} as ActivityStyle; | ||
|
||
export const SPONSOR_STYLE = { | ||
id: 1, | ||
style: 'test-style', | ||
feature: 'test-feature', | ||
price: 10000, | ||
createdAt: '2021-09-01T00:00:00.000Z', | ||
updatedAt: '2021-09-01T00:00:00.000Z', | ||
} as SponsorStyle; | ||
|
||
export const SPONSOR_STYLE_DETAIL = { | ||
activityStyle: ACTIVITY_STYLE, | ||
sponsorStyle: SPONSOR_STYLE, | ||
} as SponsorStyleDetail; | ||
|
||
export const SPONSOR_ACTIVITY_VIEW = { | ||
user: USER, | ||
sponsor: SPONSOR, | ||
sponsorActivity: SPONSOR_ACTIVITY, | ||
sponsorActivityInformations: [SPONSOR_ACTIVITY_INFORMATION], | ||
styleDetail: [SPONSOR_STYLE_DETAIL], | ||
} as SponsorActivityView; | ||
|
||
export const SPONSOR_FILTERTYPE = { | ||
styleIds: [1], | ||
keyword: 'test-keyword', | ||
selectedSort: 'test-sort', | ||
} as SponsorFilterType; |
55 changes: 55 additions & 0 deletions
55
view/next-project/src/stories/sponsoractivities/AddPdfDetailModal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { AddPdfDetailModal } from '@components/sponsoractivities'; | ||
|
||
const meta: Meta<typeof AddPdfDetailModal> = { | ||
title: 'FinanSu/sponsoractivities/AddPdfDetailModal', | ||
component: AddPdfDetailModal, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
const Template: StoryFn<typeof AddPdfDetailModal> = (args) => <AddPdfDetailModal {...args} />; | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
sponsorActivitiesViewItem: { | ||
user: { | ||
id: 1, | ||
name: 'test', | ||
bureauID: 1, | ||
roleID: 1, | ||
}, | ||
sponsor: { | ||
name: 'test', | ||
tel: '080-1234-5678', | ||
email: '[email protected]', | ||
address: '東京都千代田区', | ||
representative: 'test', | ||
}, | ||
sponsorActivity: { | ||
sponsorID: 1, | ||
userID: 1, | ||
isDone: true, | ||
feature: 'test', | ||
expense: 1000, | ||
remark: 'test', | ||
design: 1, | ||
url: 'https://test.com', | ||
}, | ||
styleDetail: [ | ||
{ | ||
activityStyle: { | ||
activityID: 1, | ||
sponsorStyleID: 1, | ||
}, | ||
sponsorStyle: { | ||
style: 'test-style', | ||
feature: 'test-feature', | ||
price: 10000, | ||
}, | ||
}, | ||
], | ||
}, | ||
}; |
18 changes: 18 additions & 0 deletions
18
view/next-project/src/stories/sponsoractivities/DeleteModal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Meta } from '@storybook/react'; | ||
import { DeleteModal } from '@components/sponsoractivities'; | ||
|
||
const meta: Meta<typeof DeleteModal> = { | ||
title: 'FinanSu/sponsoractivities/DeleteModal', | ||
component: DeleteModal, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
className: 'm-10', | ||
children: <h1>children</h1>, | ||
}, | ||
}; |
55 changes: 55 additions & 0 deletions
55
view/next-project/src/stories/sponsoractivities/DetailModal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { DetailModal } from '@components/sponsoractivities'; | ||
|
||
const meta: Meta<typeof DetailModal> = { | ||
title: 'FinanSu/sponsoractivities/DetailModal', | ||
component: DetailModal, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
const Template: StoryFn<typeof DetailModal> = (args) => <DetailModal {...args} />; | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
sponsorActivitiesViewItem: { | ||
user: { | ||
id: 1, | ||
name: 'test', | ||
bureauID: 1, | ||
roleID: 1, | ||
}, | ||
sponsor: { | ||
name: 'test', | ||
tel: '080-1234-5678', | ||
email: '[email protected]', | ||
address: '東京都千代田区', | ||
representative: 'test', | ||
}, | ||
sponsorActivity: { | ||
sponsorID: 1, | ||
userID: 1, | ||
isDone: true, | ||
feature: 'test', | ||
expense: 1000, | ||
remark: 'test', | ||
design: 1, | ||
url: 'https://test.com', | ||
}, | ||
styleDetail: [ | ||
{ | ||
activityStyle: { | ||
activityID: 1, | ||
sponsorStyleID: 1, | ||
}, | ||
sponsorStyle: { | ||
style: 'test-style', | ||
feature: 'test-feature', | ||
price: 10000, | ||
}, | ||
}, | ||
], | ||
}, | ||
}; |
55 changes: 55 additions & 0 deletions
55
view/next-project/src/stories/sponsoractivities/DetailPage1.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { DetailPage1 } from '@components/sponsoractivities'; | ||
|
||
const meta: Meta<typeof DetailPage1> = { | ||
title: 'FinanSu/sponsoractivities/DetailPage1', | ||
component: DetailPage1, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
const Template: StoryFn<typeof DetailPage1> = (args) => <DetailPage1 {...args} />; | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
sponsorActivitiesViewItem: { | ||
user: { | ||
id: 1, | ||
name: 'test', | ||
bureauID: 1, | ||
roleID: 1, | ||
}, | ||
sponsor: { | ||
name: 'test', | ||
tel: '080-1234-5678', | ||
email: '[email protected]', | ||
address: '東京都千代田区', | ||
representative: 'test', | ||
}, | ||
sponsorActivity: { | ||
sponsorID: 1, | ||
userID: 1, | ||
isDone: true, | ||
feature: 'test', | ||
expense: 1000, | ||
remark: 'test', | ||
design: 1, | ||
url: 'https://test.com', | ||
}, | ||
styleDetail: [ | ||
{ | ||
activityStyle: { | ||
activityID: 1, | ||
sponsorStyleID: 1, | ||
}, | ||
sponsorStyle: { | ||
style: 'test-style', | ||
feature: 'test-feature', | ||
price: 10000, | ||
}, | ||
}, | ||
], | ||
}, | ||
}; |
23 changes: 23 additions & 0 deletions
23
view/next-project/src/stories/sponsoractivities/DetailPage2.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { SPONSOR_ACTIVITY_VIEW } from '../constants'; | ||
import { DetailPage2 } from '@components/sponsoractivities'; | ||
|
||
const meta: Meta<typeof DetailPage2> = { | ||
title: 'FinanSu/sponsoractivities/DetailPage2', | ||
component: DetailPage2, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
const Template: StoryFn<typeof DetailPage2> = (args) => <DetailPage2 {...args} />; | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
id: 1, | ||
sponsorActivitiesViewItem: SPONSOR_ACTIVITY_VIEW, | ||
setSponsorActivitiesView: () => { | ||
SPONSOR_ACTIVITY_VIEW; | ||
}, | ||
}; |
34 changes: 34 additions & 0 deletions
34
view/next-project/src/stories/sponsoractivities/EditModal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { | ||
USER, | ||
SPONSOR_ACTIVITY, | ||
SPONSOR_STYLE, | ||
SPONSOR, | ||
ACTIVITY_STYLE, | ||
YEAEPERIOD, | ||
} from '../constants'; | ||
import { EditModal } from '@components/sponsoractivities'; | ||
|
||
const meta: Meta<typeof EditModal> = { | ||
title: 'FinanSu/sponsoractivities/EditModal', | ||
component: EditModal, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
const Template: StoryFn<typeof EditModal> = (args) => <EditModal {...args} />; | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
sponsorActivityId: '1000', | ||
sponsorActivity: SPONSOR_ACTIVITY, | ||
sponsorStyles: [SPONSOR_STYLE], | ||
sponsors: [SPONSOR], | ||
users: [USER], | ||
sponsorStyleDetails: [ACTIVITY_STYLE], | ||
activityStyles: [ACTIVITY_STYLE], | ||
year: '2024', | ||
yearPeriods: YEAEPERIOD, | ||
}; |
21 changes: 21 additions & 0 deletions
21
view/next-project/src/stories/sponsoractivities/FilterModal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { SPONSOR_STYLE, SPONSOR_FILTERTYPE } from '../constants'; | ||
import { FilterModal } from '@components/sponsoractivities'; | ||
|
||
const meta: Meta<typeof FilterModal> = { | ||
title: 'FinanSu/sponsoractivities/FilterModal', | ||
component: FilterModal, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
const Template: StoryFn<typeof FilterModal> = (args) => <FilterModal {...args} />; | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
isOpen: true, | ||
sponsorStyles: [SPONSOR_STYLE], | ||
filterData: SPONSOR_FILTERTYPE, | ||
}; |
18 changes: 18 additions & 0 deletions
18
view/next-project/src/stories/sponsoractivities/OpenAddModalButton.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Meta } from '@storybook/react'; | ||
import { OpenAddModalButton } from '@components/sponsoractivities'; | ||
|
||
const meta: Meta<typeof OpenAddModalButton> = { | ||
title: 'FinanSu/sponsoractivities/OpenAddModalButton', | ||
component: OpenAddModalButton, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary = { | ||
args: { | ||
className: 'm-10', | ||
children: <h1>children</h1>, | ||
}, | ||
}; |
Oops, something went wrong.