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

20240415 Deploy #188

Merged
merged 75 commits into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
83585ef
refactor submit status
oka4shi Apr 6, 2024
859427a
Merge branch 'develop' into feat/forms-detail-logic
oka4shi Apr 10, 2024
9c0eaf6
fix: impl
WhatACotton Apr 10, 2024
9d5f990
fix: update condition
WhatACotton Apr 10, 2024
7319a4b
update
s7tya Apr 11, 2024
75e9610
Merge remote-tracking branch 'origin/develop' into feat/no-cache-link
appare45 Apr 11, 2024
b7677b5
merge develop branch
oka4shi Apr 11, 2024
32ed021
use react hook form
oka4shi Apr 11, 2024
7cf7b18
Merge pull request #163 from sohosai/feat/no-cache-link
appare45 Apr 11, 2024
79ecb9b
split out register form components
oka4shi Apr 11, 2024
db416fd
add form validation for number and text
oka4shi Apr 11, 2024
fc25997
fix: error message
Ryoga-exe Apr 11, 2024
9b9d12e
型定義を修正
s7tya Apr 12, 2024
7adc8d2
申請を作成できるように
s7tya Apr 12, 2024
7a6fba6
テキスト項目をサポート
s7tya Apr 12, 2024
9bac184
ちょっとだけフォームをスタイリング
s7tya Apr 12, 2024
df336cb
fix export
s7tya Apr 12, 2024
2b5c943
update styles
s7tya Apr 12, 2024
a7eb1cd
feat: 企画編集ページ
appare45 Apr 12, 2024
48690f5
Update src/app/committee/news/[news_id]/page.tsx
Ryoga-exe Apr 12, 2024
798a3ae
fix: news
Ryoga-exe Apr 12, 2024
307ed86
fix
s7tya Apr 12, 2024
6b15847
fix openapi
s7tya Apr 12, 2024
698c702
とりあえずロジックを実装
s7tya Apr 12, 2024
dc1f4e7
アイコンを更新
s7tya Apr 12, 2024
aef3c5e
format
s7tya Apr 12, 2024
fe520c6
improvement: 企画編集保存後にリダイレクト
appare45 Apr 13, 2024
f6037ba
implment file exteinsion validations for fileField
oka4shi Apr 13, 2024
b14a410
feat: 企画詳細ページに企画責任者の情報を追加
appare45 Apr 13, 2024
c751f6e
refactor: ファイル分割
appare45 Apr 13, 2024
f683929
fix: runtime
appare45 Apr 13, 2024
f72508a
improvement: エラーハンドリングを修正
appare45 Apr 13, 2024
e1a0dc2
feat: 企画番号を表示
appare45 Apr 13, 2024
15302ca
add: 404 page
WhatACotton Apr 13, 2024
bf80040
fix: unused imports
WhatACotton Apr 13, 2024
c839e9b
feat: wrangler.tomlを設定
appare45 Apr 13, 2024
9a73550
feat: CD
appare45 Apr 13, 2024
7254339
test
appare45 Apr 13, 2024
5d28540
fix
appare45 Apr 13, 2024
86a38bc
remvoe test
appare45 Apr 13, 2024
117f7ff
fix
appare45 Apr 13, 2024
2eadd75
Merge pull request #183 from sohosai/cd-beta
appare45 Apr 13, 2024
1a9a991
Update README.md
appare45 Apr 14, 2024
1c6372a
Merge pull request #171 from sohosai/fix/news-error
appare45 Apr 14, 2024
a26803b
Apply suggestions from code review
WhatACotton Apr 14, 2024
dbd069a
Merge pull request #181 from sohosai/feat/404-page
appare45 Apr 14, 2024
e3819b6
fix: apply sugetsion
appare45 Apr 14, 2024
a43d2e8
fix
s7tya Apr 14, 2024
63fe72f
impl
s7tya Apr 14, 2024
628f7e3
プルプルのimpl
s7tya Apr 14, 2024
4334480
フォ
s7tya Apr 14, 2024
d514251
fix
s7tya Apr 14, 2024
da64853
プル
s7tya Apr 14, 2024
f59213f
format
s7tya Apr 14, 2024
dddfd3f
Merge pull request #186 from sohosai/impl-#32
appare45 Apr 14, 2024
9e92360
Merge pull request #174 from sohosai/impl-#27
appare45 Apr 14, 2024
c2afc88
Merge remote-tracking branch 'origin/develop' into feat/committee-edi…
appare45 Apr 14, 2024
76e16cc
update the schema
oka4shi Apr 14, 2024
e6678eb
implement the form post feature
oka4shi Apr 14, 2024
7909d42
Merge branch 'develop' into feat/forms-detail-logic
oka4shi Apr 14, 2024
232b7f2
refactor submit status
oka4shi Apr 6, 2024
a3675f5
use react hook form
oka4shi Apr 11, 2024
629e422
split out register form components
oka4shi Apr 11, 2024
c973485
add form validation for number and text
oka4shi Apr 11, 2024
8dee3d1
implment file exteinsion validations for fileField
oka4shi Apr 13, 2024
3237ab2
update the schema
oka4shi Apr 14, 2024
105a0c9
implement the form post feature
oka4shi Apr 14, 2024
82b00e7
merge
oka4shi Apr 14, 2024
0f176eb
resolve conflicts
oka4shi Apr 14, 2024
466bea3
fix merge errors
oka4shi Apr 14, 2024
a6bb0c7
support optional items
oka4shi Apr 14, 2024
16fce49
fix #191
oka4shi Apr 14, 2024
235b66b
fix wrong property
oka4shi Apr 14, 2024
3446bc6
Merge pull request #165 from sohosai/feat/forms-detail-logic
oka4shi Apr 14, 2024
f0ed310
Merge pull request #180 from sohosai/feat/committee-edit-project
appare45 Apr 14, 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
38 changes: 38 additions & 0 deletions .github/workflows/cd-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CD(beta)

on:
workflow_dispatch:

jobs:
build_and_deploy:
runs-on: [self-hosted, portainer]
permissions:
contents: read
deployments: write
name: Publish to Cloudflare
steps:
- uses: actions/checkout@v4
with:
ref: develop
- uses: actions/setup-node@v4
with:
node-version: "latest"
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: build
run: npx @cloudflare/next-on-pages@1
env:
NEXT_PUBLIC_API_ENDPOINT: ${{vars.BETA_API_ENDPOINT}}
NEXT_PUBLIC_FIREBASE_API_KEY: ${{vars.BETA_FIREBASE_API_KEY}}
NEXT_PUBLIC_FIREBASE_APP_ID: ${{vars.BETA_FIREBASE_APP_ID}}
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{vars.BETA_FIREBASE_AUTH_DOMAIN}}
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{vars.BETA_FIREBASE_MESSAGING_SENDER_ID}}
NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{vars.BETA_FIREBASE_PROJECT_ID}}
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{vars.BETA_FIREBASE_STORAGE_BUCKET}}
- name: deploy
uses: cloudflare/pages-action@v1
with:
apiToken: ${{secrets.CLOUDFLARE_API_TOKEN}}
accountId: ${{vars.CLOUDFLARE_ACCOUNT_ID}}
projectName: ${{vars.CLOUDFLARE_BETA_PROJECT_NAME}}
directory: ".vercel/output/static"
7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",

"editor.tabSize": 2,
"files.insertFinalNewline": true
"files.insertFinalNewline": true,
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
59 changes: 36 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,49 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# sos24-client

## Getting Started
[![CD(beta)](https://github.com/sohosai/sos24-client/actions/workflows/cd-beta.yml/badge.svg)](https://github.com/sohosai/sos24-client/actions/workflows/cd-beta.yml)

First, run the development server:
雙峰祭オンラインシステムのクライアントです。

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
## 環境構築

### 環境変数
`.env.example`を参考にFirebase・バックエンドURLを設定します。

### セットアップ
`npm i`で依存関係がインストールされます。

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
`npm run dev`で開発用サーバが起動します。

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
### ビルド
`npm run build`でビルドできます

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
Cloudflare Pagesにデプロイする場合は`npx @cloudflare/next-on-pages@1`で静的アセットを生成できます。

## Learn More
## APIからのresponseにスキーマに応じた型を付ける方法
### SWRを使ってGETするとき編

To learn more about Next.js, take a look at the following resources:
```typescript
import { assignType } from "@/lib/openapi";

const newsId = "<uuid>"

const { data: newsRes, error: newsErr, isLoading } = useSWR(`/news/${newsId}`);
if (isLoading) {
// 読み込み時の処理
}
if (newsErr) {
// エラー時の処理
}
const news = assignType("/news/{news_id}", newsRes);
```

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
path parametersはurlに文字列として直接埋め込みます。

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
`assignType`には、openapiで定義されているパスと`newsRes`を渡します。

## Deploy on Vercel
## APIを安全に叩く方法(post、putなど)

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
openapi-fetchを使います。

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
## ベータについて
[GitHub Actions](https://github.com/sohosai/sos24-client/actions/workflows/cd-beta.yml)を手動実行することでベータをデプロイできます。
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions panda.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export default defineConfig({
orange: { value: "#ed6d1f" },
purple: { value: "#60C" },
},
tsukuba: {
purple: { value: "#60C" },
},
},
},
},
Expand Down
Loading
Loading