Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

企業協賛フィルター実装リリース #839

Merged
merged 120 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
671ebe7
[fix] airのパスを変更
hikahana Jun 5, 2024
69bc2c5
[feat] teacherの複数削除の実装
hikahana Jun 5, 2024
8d7ea0d
[feat] is_deletedの追加
hikahana Jun 5, 2024
381dcb4
[feat] 複数削除の実装
hikahana Jun 5, 2024
407d9e4
[fix] is_deletedの追加
hikahana Jun 5, 2024
4f541bf
[feat] delの追加
hikahana Jun 5, 2024
182a89f
[fix] 教員を複数削除に変更
hikahana Jun 5, 2024
550b82a
Merge branch 'develop' of github:NUTFes/FinanSu into feat/hikahana/76…
hikahana Jun 5, 2024
e0fe86d
formatted by workflow
hikahana Jun 5, 2024
040a2be
Merge branch 'develop' of github:NUTFes/FinanSu into feat/hikahana/76…
hikahana Jun 21, 2024
4bde27b
[fix] DestroyTeahcerからDestroyTeahcerIdsへ変更
hikahana Jun 25, 2024
cb52d3f
[fix] isDeletedをオプショナルに変更
hikahana Jun 25, 2024
564bf3d
[fix] user,teacherのdelをapi_methodsに統合
hikahana Jun 25, 2024
83040c5
[fix] deleteHandlerに修正
hikahana Jun 25, 2024
b5e8372
[fix] IDsに名称変更
hikahana Jun 25, 2024
0d2d3f1
formatted by workflow
hikahana Jun 25, 2024
be9bb62
[fix] 削除ボタンの位置修正
hikahana Jun 25, 2024
1541923
Merge branch 'feat/hikahana/769-teacher-logical-delete' of github:NUT…
hikahana Jun 25, 2024
9134fbb
[fix] handler動かした
hikahana Jun 25, 2024
5c10ad2
formatted by workflow
hikahana Jun 25, 2024
8f908a7
[fix] delsをmultiDelへ名称修正
hikahana Jun 27, 2024
9c7b105
[fix] 配置の修正
hikahana Jun 27, 2024
71e20d1
[add]index.ts
Ryotakobayash Jun 28, 2024
45ac6c5
[add]AddModal.stories.tsx
Ryotakobayash Jun 28, 2024
da3a372
[add]DeleteModal.stories.tsx
Ryotakobayash Jun 28, 2024
f70a556
[add]EditModal.stories.tsx
Ryotakobayash Jun 28, 2024
92aca2a
[add]OpenAddModalButton.stories.tsx
Ryotakobayash Jun 28, 2024
398e8ec
[add]OpenDeleteModalButton.stories.tsx
Ryotakobayash Jun 28, 2024
00d2f28
[add]OpenEditModalButton.stories.tsx
Ryotakobayash Jun 28, 2024
eaa8fca
[fix]見た目を少し修正
Kubosaka Jul 1, 2024
e3c5c2a
Merge branch 'develop' into feat/hikahana/769-teacher-logical-delete
Kubosaka Jul 1, 2024
c6651c5
[fix]インデント追加
Kubosaka Jul 1, 2024
4c572c8
[fix]列の間隔修正
Kubosaka Jul 1, 2024
ec320e2
Merge pull request #775 from NUTFes/feat/hikahana/769-teacher-logical…
Kubosaka Jul 1, 2024
e3bae6c
[feat]makefileのコマンド追加
Kubosaka Jul 1, 2024
afe460e
[feat]フィルタありのAPI実装
KazumaSun Jul 2, 2024
002bce6
[add]DeleteModal.stories.tsx
Ryotakobayash Jul 2, 2024
0593129
[fix]lint-error
Ryotakobayash Jul 2, 2024
1d4812c
db入るコマンド追加
Kubosaka Jul 2, 2024
7b4cce5
[fix]sbのmakeコマンド修正
Kubosaka Jul 2, 2024
2850bd9
Merge pull request #816 from NUTFes/feature/kubosaka/811-add_makefile…
Kubosaka Jul 2, 2024
f4c6a25
[mod]main.ts
Ryotakobayash Jul 2, 2024
f83b50b
[mod]DtailModal.tsx
Ryotakobayash Jul 2, 2024
10ce632
[mod]DetailModal.tsx
Ryotakobayash Jul 2, 2024
580f74b
[add]DetailModal.stories.tsx
Ryotakobayash Jul 2, 2024
b8c575b
[add]EditModal.stories.tsx
Ryotakobayash Jul 2, 2024
aed9a90
[add]OpenAddModalButton.stories.tsx
Ryotakobayash Jul 2, 2024
1339e55
[add]OpenDeleteModalButton.stories.tsx
Ryotakobayash Jul 2, 2024
0b7468f
[add]OpenEditModalButton.stories.tsx
Ryotakobayash Jul 2, 2024
1976196
[add]PurchaseItemNumModal.stories.tsx
Ryotakobayash Jul 2, 2024
e93b8c6
[add]PurchaseOrderAddModal.stories.tsx
Ryotakobayash Jul 2, 2024
41c663f
[mod]DetailModal.tsx
Ryotakobayash Jul 2, 2024
343ec94
[feat] 年度別で募金登録済みの教員Idを配列で返すAPIの作成
hikahana Jul 2, 2024
58bcaa5
[fix] PurchaseItemNumModal.stories.tsx lint-error
Ryotakobayash Jul 3, 2024
fdcd99e
formatted by workflow
Ryotakobayash Jul 3, 2024
0606d27
[fix]makefileの修正
Kubosaka Jul 3, 2024
fd423e1
minioの初期設定をSDKで行う
Kubosaka Jul 3, 2024
818e97f
docker-compose.prod.ymlの本番の環境変数は不要であるため削除
Kubosaka Jul 3, 2024
eb09288
[fix]不要なコード削除
Kubosaka Jul 3, 2024
341839e
[feat]dbとアプリでdocker-compose.ymlファイルを変更
Kubosaka Jul 4, 2024
1d64cf0
ローカルでprodの設定変更
Kubosaka Jul 4, 2024
0581a83
[mod]DtailModal.stories.tsx
Ryotakobayash Jul 5, 2024
20ae0ce
Merge branch 'feat/kobayashi/CreatingstoriesFile/purchaseorders-803' …
Ryotakobayash Jul 5, 2024
7e9db5b
[feat]フィルタ実装
KazumaSun Jul 5, 2024
a4f1ee5
[fix]不要要素削除
KazumaSun Jul 5, 2024
32da5bb
Merge pull request #817 from NUTFes/feat/kobayashi/CreatingstoriesFil…
Kubosaka Jul 5, 2024
717094d
Merge pull request #802 from NUTFes/feat/kobayashi/CreatingstoriesFil…
Kubosaka Jul 5, 2024
359bb8b
[fix]indexでコンポーネントのexport
Kubosaka Jul 5, 2024
f8e8464
SelectとInputコンポーネントのcss修正
Kubosaka Jul 5, 2024
d7262c1
フィルターモーダル追加
Kubosaka Jul 5, 2024
069d5ca
[feat]yearのフィルタの追加
KazumaSun Jul 6, 2024
c0e565a
[fix]見た目の修正
Kubosaka Jul 6, 2024
bbb6bdb
[fix]year用のAPI追加
KazumaSun Jul 6, 2024
a5f211a
[fix]空白削除
KazumaSun Jul 6, 2024
bed0ae5
[fix]WHRE文修正
KazumaSun Jul 6, 2024
d25183b
[fix]WHERE文修正
KazumaSun Jul 6, 2024
efaf2be
[fix]eslintの対応
Kubosaka Jul 6, 2024
d0aa597
[fix]yearのフィルタの修正
KazumaSun Jul 6, 2024
34faead
Merge branch 'develop' into feat/sato/800-fitering-sponsor-activites-api
KazumaSun Jul 6, 2024
98177fa
[fix]重複したデータを出ないように修正
KazumaSun Jul 6, 2024
6152f32
Merge pull request #812 from NUTFes/feat/sato/800-fitering-sponsor-ac…
Kubosaka Jul 6, 2024
5af1917
Merge branch 'develop' into feat/kubosaka/add_acitivity_filter_modal
Kubosaka Jul 6, 2024
29ccb52
Merge pull request #819 from NUTFes/fix-makefile
Kubosaka Jul 6, 2024
2c93919
Merge pull request #820 from NUTFes/initial-minio-settings
Kubosaka Jul 6, 2024
4837dd9
[fix]フィルター機能追加
Kubosaka Jul 6, 2024
6c64596
[feat]ユーザ一覧ページにおいて学科ごとのフィルタ機能を追加
TakuyaNakakura Jul 6, 2024
9c72291
formatted by workflow
TakuyaNakakura Jul 6, 2024
dac31d8
sortの追加
Kubosaka Jul 6, 2024
1d8c45a
フィルターのバグ修正
Kubosaka Jul 6, 2024
a4a70b2
[fix]BUREAUS使っている部分をリファクタリング
TakuyaNakakura Jul 6, 2024
8a14ae3
年度の切り替え機能修復
Kubosaka Jul 6, 2024
3dd4d26
formatted by workflow
Kubosaka Jul 6, 2024
39e8a4d
Merge pull request #828 from NUTFes/feat/nakakura/827-add-users-filters
Kubosaka Jul 6, 2024
882e020
スタイルの選択数表示
Kubosaka Jul 6, 2024
2061127
協賛活動のリファクタリング
Kubosaka Jul 6, 2024
3712682
formatted by workflow
Kubosaka Jul 6, 2024
09cceeb
[feat]デフォルトのソートに固定
Kubosaka Jul 6, 2024
134202f
Merge pull request #822 from NUTFes/fix/kubosaka/db-api-connect-bug
Kubosaka Jul 6, 2024
41a6481
環境構築コマンドの修正
Kubosaka Jul 6, 2024
6d60f5b
Merge pull request #829 from NUTFes/fix-read_me
Ryotakobayash Jul 6, 2024
a6f244f
Merge branch 'develop' into feat/kubosaka/add_acitivity_filter_modal
Kubosaka Jul 6, 2024
3483f11
[fix]ビルド時のstorybookを無視
Kubosaka Jul 6, 2024
601aff0
storiesをeslintから除外
Kubosaka Jul 6, 2024
3aadebb
エラー解消
Kubosaka Jul 6, 2024
195baba
storybookno
Kubosaka Jul 6, 2024
830a110
[fix] 初期化時に空配列を定義
hikahana Jul 6, 2024
91a682b
Merge pull request #818 from NUTFes/feat/hikahana/815-create-teachers…
Kubosaka Jul 7, 2024
cac5a3f
[feat]フィルター設定中の表示
Kubosaka Jul 7, 2024
bf707ee
formatted by workflow
Kubosaka Jul 7, 2024
d031eb8
[fix]listOff削除
Kubosaka Jul 7, 2024
199883f
formatted by workflow
Kubosaka Jul 7, 2024
4c763f3
Merge pull request #825 from NUTFes/feat/kubosaka/add_acitivity_filte…
Kubosaka Jul 7, 2024
22dd2db
[fix]協賛一覧のmodalclose
Kubosaka Jul 7, 2024
4515ea2
Merge pull request #833 from NUTFes/feature/kubosaka/click-close-modal
Kubosaka Jul 7, 2024
c9c7e38
local-prodの設定追加
Kubosaka Jul 7, 2024
f14314b
Merge pull request #835 from NUTFes/develop-connect-test-db
Kubosaka Jul 7, 2024
4962666
バグ修正
Kubosaka Jul 7, 2024
c20af22
[fix]ローディング追加
Kubosaka Jul 8, 2024
3b82e25
docker-compose.ymlを間違えて修正したため戻す
Kubosaka Jul 8, 2024
bcd0ff9
Merge pull request #836 from NUTFes/fix-rendaring
Kubosaka Jul 8, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/.idea/
FinanSu.iml
finansu.env
finansu.local.env
api/tmp

# cloudflare
Expand Down
63 changes: 58 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,74 @@
# アプリコンテナ=view,api、DBコンテナ=db,minio

# アプリコンテナのイメージのビルド
build:
docker compose build
docker compose run --rm view npm install

# アプリコンテナの起動
run:
docker compose up
run-api:
docker compose up -d db
sleep 4
docker compose up api

# アプリコンテナの停止
down:
docker compose down

# dbコンテナの起動(基本ずっと起動しておく)
run-db:
docker compose -f docker-compose.db.yml up -d

# dbコンテナの停止(ずっと起動したくない時はこっちで停止)
stop-db:
docker compose -f docker-compose.db.yml down

# ビルドと起動
build-run:
docker compose -f docker-compose.db.yml up -d
docker compose up --build

# アプリコンテナボリュームの削除
del-vol:
docker compose down -v

# 生成したコンテナ、イメージ、ボリューム、ネットワークを一括削除
del-all:
docker-compose down --rmi all --volumes --remove-orphans

# ボリューム削除→ビルド→起動
run-rebuild:
docker compose down -v
docker compose up --build

# dbとminioの停止とボリューム削除(dbを初期化したい時)
del-db:
docker-compose -f docker-compose.db.yml down --volumes

# apiの起動(db起動後)
run-api:
docker compose up api

# StoryBookの起動
run-sb:
docker compose run --rm -p6006:6006 view npm run storybook

seed:
docker compose run --rm api go mod tidy
docker compose run --rm api go run /app/tools/seeds/teacher_seeds.go

# 本番環境デプロイ
deploy:
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d
local-deploy:

# ローカルで本番設定で起動
run-prod:
docker compose -f docker-compose.local-prod.yml build
docker compose -f docker-compose.local-prod.yml up

# DB入るコマンド
ent-db:
docker compose exec db mysql -u root -proot

# eslintの実行
run-eslint:
docker compose exec view npm run lint
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# FinanSu

## setting up
## 環境構築 (set up)

```
docker compose build
docker compose up
make run-db
make build
make run
```

or

```
make build
docker compose -f docker-compose.db.yml up -d
docker compose build
docker compose up
```

## documents
Expand Down
2 changes: 0 additions & 2 deletions api/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ RUN go install github.com/swaggo/swag/cmd/swag@latest
# Airをインストール
RUN go install github.com/air-verse/air@latest
CMD ["air", "-c", ".air.toml"]


184 changes: 169 additions & 15 deletions api/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,107 @@ const docTemplate = `{
}
},
},
"/activities/filtered_details": {
"get": {
tags: ["activity"],
"description": "activitiesとsponsor,sponsorStyle,userの一覧を取得",
"parameters": [
{
"name": "is_done",
"in": "query",
"description": "Filter by done status.[true, false, all]",
"required": false,
"schema": {
"type": "string",
"enum": ["true", "false", "all"]
}
},
{
"name": "sponsor_style_id",
"in": "query",
"description": "Filter by sponsor style IDs. ex.) 1,3,6,...",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "integer"
}
},
"style": "form",
"explode": true
},
{
"name": "keyword",
"in": "query",
"description": "Filter by keyword",
"required": false,
"schema": {
"type": "string"
}
},
],
"responses": {
"200": {
"description": "activitiesとsponsor,sponsorStyle,userの一覧の取得",
}
}
},
},
"/activities/filtered_details/{year}": {
"get": {
tags: ["activity"],
"description": "activitiesとsponsor,sponsorStyle,userの一覧を取得",
"parameters": [
{
"name": "year",
"in": "path",
"description": "Filter by year.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "is_done",
"in": "query",
"description": "Filter by done status.[true, false, all]",
"required": false,
"schema": {
"type": "string",
"enum": ["true", "false", "all"]
}
},
{
"name": "sponsor_style_id",
"in": "query",
"description": "Filter by sponsor style IDs. ex.) 1,3,6,...",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "integer"
}
},
"style": "form",
"explode": true
},
{
"name": "keyword",
"in": "query",
"description": "Filter by keyword",
"required": false,
"schema": {
"type": "string"
}
},
],
"responses": {
"200": {
"description": "activitiesとsponsor,sponsorStyle,userの一覧の取得",
}
}
},
},
"/activities/{id}": {
"get": {
tags: ["activity"],
Expand Down Expand Up @@ -2006,6 +2107,26 @@ const docTemplate = `{
],
},
},
"/teachers/delete": {
"delete": {
tags: ["teacher"],
"description": "teacherの複数削除",
responses: {
"200": {
"description": "複数のteacherをidで削除できる",
}
},
"parameters": [
{
"in": "body",
"name": "destroyTeacherIDs",
"schema":{
"$ref": "#/definitions/destroyTeacherIDs"
},
},
],
},
},
"/teachers/{id}": {
"get": {
tags: ["teacher"],
Expand Down Expand Up @@ -2100,6 +2221,26 @@ const docTemplate = `{
},
},
},
"/teachers/fundRegistered/{year}": {
"get": {
tags: ["teacher"],
"description": "募金登録済みのteacherのidを取得",
"parameters": [
{
"name": "year",
"in": "path",
"description": "year",
"required": true,
"type": "integer"
}
],
"responses": {
"200": {
"description": "募金登録済みのteacherのidを取得",
}
}
},
},
"/users": {
"get": {
tags: ["user"],
Expand Down Expand Up @@ -2428,7 +2569,6 @@ const docTemplate = `{
"feature":{
"type": "string",
"example": "なし",

},
"expense":{
"type": "int",
Expand Down Expand Up @@ -2618,20 +2758,34 @@ const docTemplate = `{
"purchaseOrderID"
},
},
"destroyUserIDs":{
"properties":{
"deleteIDs":{
"type": "array",
"items": {
"type": "number"
},
example: []
},
},
"required":{
"deleteIDs",
},
},
"destroyTeacherIDs":{
"properties":{
"deleteIDs":{
"type": "array",
"items": {
"type": "number"
},
example: []
},
},
"required":{
"deleteIDs",
},
},
"destroyUserIDs":{
"properties":{
"deleteIDs":{
"type": "array",
"items": {
"type": "number"
},
example: []
},
},
"required":{
"deleteIDs",
},
},
"year_periods":{
"properties":{
"year":{
Expand Down
25 changes: 25 additions & 0 deletions api/externals/controller/activity_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ type ActivityController interface {
DestroyActivity(echo.Context) error
IndexActivityDetail(echo.Context) error
IndexActivityDetailsByPeriod(echo.Context) error
IndexFilteredActivityDetail(echo.Context) error
IndexFilteredActivityDetailByPeriod(echo.Context) error
}

func NewActivityController(u usecase.ActivityUseCase) ActivityController {
Expand Down Expand Up @@ -104,3 +106,26 @@ func (a *activityController) IndexActivityDetailsByPeriod(c echo.Context) error
}
return c.JSON(http.StatusOK, activities)
}

func (a *activityController) IndexFilteredActivityDetail(c echo.Context) error {
isDone := c.QueryParam("is_done")
sponsorStyleIDs := c.QueryParams()["sponsor_style_id"]
keyword := c.QueryParam("keyword")
activities, err := a.u.GetFilteredActivityDetail(c.Request().Context(), isDone, sponsorStyleIDs, keyword)
if err != nil {
return err
}
return c.JSON(http.StatusOK, activities)
}

func (a *activityController) IndexFilteredActivityDetailByPeriod(c echo.Context) error {
isDone := c.QueryParam("is_done")
sponsorStyleIDs := c.QueryParams()["sponsor_style_id"]
year := c.Param("year")
keyword := c.QueryParam("keyword")
activities, err := a.u.GetFilteredActivityDetailByPeriod(c.Request().Context(), isDone, sponsorStyleIDs, year, keyword)
if err != nil {
return err
}
return c.JSON(http.StatusOK, activities)
}
Loading
Loading