Files
rog_app/README.md
2024-09-02 21:25:19 +09:00

193 lines
7.4 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# gifunavi
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
## iOS のマニュアル更新内容
* Info.plist
<key>CFBundleDisplayName</key>
<string>岐阜ナビ</string>
<key>CFBundleName</key>
<string>岐阜ナビ</string>
<key>NSCameraUsageDescription</key>
<string>岐阜ナビはチェックポイントで撮影した写真を写真ライブラリに保存し、通過記録を保持し、競技結果として提出することができます。</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>岐阜ナビはアプリが閉じられているときでも位置情報へのアクセスが必要です。これにより、走行履歴の記録ができ、レビュー時の参考にすることができます。</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>このアプリではバックグラウンドで位置情報にアクセスします。</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>このアプリはチェックポイントへのチェックインや走行履歴を記録するために、位置情報にアクセスします。</string>
<key>NSMicrophoneUsageDescription</key>
<string>このアプリではカメラは使用しますが、マイクの使用は当面行いません。</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>撮影した写真はデバイスのアルバムに保存されます。これにより、不具合時の通過記録を安全に担保することができます。</string>
# 更新履歴
0. flutter_compass は pub.dev cache で 34 に変更。キャッシュをクリアしたら修正が必要。
1. 2024-8-17
・新規にプロジェクトを作り直し。
・ユーザー登録で13歳以上でないと登録できない様にした。
・生年月日の選択カレンダーを導入。
・エントリーカテゴリはメンバー構成によって自動修正できる様にした。(修正中)
・イベントの締め切りフィールドを追加し、この日以降のイベントの修正はできない様にした。
  ・エントリーに参加し、ゴールしたら、イベントの修正はできない様にする。必然的にチーム構成を変更する際には、エントリーが終了していれば、変更ができない様にして、新規追加を促す。
2.
#Server
# API仕様変更案
## 1. イベントAPI
### GET /api/events
- 変更点: レスポンスに `deadline_datetime` フィールドを追加
- レスポンス例:
```json
{
"id": 1,
"event_name": "サマーマラソン2024",
"start_datetime": "2024-07-01T09:00:00Z",
"end_datetime": "2024-07-01T17:00:00Z",
"deadline_datetime": "2024-06-15T23:59:59Z"
}
```
### POST /api/events
- 変更点: リクエストボディに `deadline_datetime` フィールドを追加
- リクエスト例:
```json
{
"event_name": "ウィンターラン2025",
"start_datetime": "2025-01-15T08:00:00Z",
"end_datetime": "2025-01-15T16:00:00Z",
"deadline_datetime": "2025-01-01T23:59:59Z"
}
```
## 2. エントリーAPI
### PUT /api/entries/{id}
- 変更点:
1. エントリー更新前にイベントの締め切り日時をチェック
2. 締め切りを過ぎている場合、400 Bad Requestを返す
- エラーレスポンス例:
```json
{
"error": "entry_update_closed",
"message": "エントリーの締め切りが過ぎているため、更新できません。",
"deadline": "2024-06-15T23:59:59Z"
}
```
## 3. チームAPI
### GET /api/teams/{id}/entries
- 新規エンドポイント: 指定されたチームの全エントリーを取得
- レスポンス例:
```json
[
{
"id": 1,
"team_id": 5,
"event": {
"id": 1,
"event_name": "サマーマラソン2024",
"start_datetime": "2024-07-01T09:00:00Z",
"end_datetime": "2024-07-01T17:00:00Z",
"deadline_datetime": "2024-06-15T23:59:59Z"
},
"category": {
"id": 3,
"category_name": "一般-5時間"
},
"date": "2024-07-01T09:00:00Z",
"zekken_number": "A-123"
}
]
```
### PUT /api/teams/{id}
- 変更点: チーム更新時に関連するエントリーの締め切りをチェック
- エラーレスポンス例:
```json
{
"error": "team_update_restricted",
"message": "締め切りを過ぎたエントリーが存在するため、チームの更新が制限されています。",
"closed_entries": [1, 2, 3]
}
```
## 4. 共通エラーレスポンス
- すべてのエンドポイントで、より詳細なエラー情報を提供
- エラーレスポンス構造:
{
"error": "error_code",
"message": "人間が読める詳細なエラーメッセージ",
"details": {
## エラーに関する追加情報(オプション)
}
}
## 5. 認証・認可
- すべてのエンドポイントで適切な認証・認可チェックを実施
- 権限不足の場合は403 Forbiddenを返す
マニュアル編集が必要な部分:
1. flutter_compass プラグインの build.gradle ファイルを直接編集します:
ファイルパス: /Volumes/PortableSSD1TB/main/flutter/.pub-cache/hosted/pub.dev/flutter_compass-0.8.0/android/build.gradle
このファイルを開き、jcenter() を mavenCentral() に置き換えます:
$ ./gradlew clean
$ ./gradlew clean build
2. image_gallery_saver の build.gradle ファイルを編集
/Volumes/PortableSSD1TB/main/flutter/.pub-cache/git/image_gallery_saver-24fd8207a4491c42ed907060bb5bf40c2430131f/android/build.gradle ファイル
ext.kotlin_version = '1.8.22' #'1.7.10'
$ ./gradlew clean
$ ./gradlew clean build
3. qr_code_scanner の問題解決:
/Volumes/PortableSSD1TB/main/flutter/.pub-cache/hosted/pub.dev/qr_code_scanner-[version]/android/build.gradle
ext.kotlin_version = '1.8.22' //'1.7.10'
4. flutter_keyboard_visibility:
vi /Volumes/PortableSSD1TB/main/flutter/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/android/build.gradle
minSDK = 21 ,SDKversion=34 にする。
5. device_info_plus は使用不可
6. geolocator_android:
vi /Volumes/PortableSSD1TB/main/flutter/.pub-cache/hosted/pub.dev/geolocator_android-4.6.1/android/build.gradle
minSdkVersion 21
テスト用位置情報:
大垣駅 35.36701369466119, 136.61783662683948
大垣城 35.36182698266251, 136.61558088722234
関ケ原駅35.36365422752628, 136.47061844402452
高山駅36.14130783620718, 137.25050201764944
ガソリンスタンド36.13826570797936, 137.21513450124928
バグ:
履歴の写真:アクセスエラー
バックアップをイベントごとに保存・レストア
ログインした際に、イベントが選択されていなければ、イベントを選択するように促す。
事前チェックインした写真が履歴に表示されない。