Skip to content

Commit

Permalink
Merge pull request #87 from NUTFes/feature/imai/86-add-first-second-day
Browse files Browse the repository at this point in the history
[feature]当日の一日目と二日目のタブを追加(#86)
  • Loading branch information
mashita1023 authored Sep 4, 2022
2 parents a4d251a + 10b2020 commit 8f9e8f3
Show file tree
Hide file tree
Showing 7 changed files with 205 additions and 8 deletions.
6 changes: 4 additions & 2 deletions lib/pages/my_shift_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import 'package:seeft_mobile/configs/importer.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:http/http.dart' as http;
import 'package:seeft_mobile/pages/my_shift_page_preparation_day.dart';
import 'package:seeft_mobile/pages/my_shift_page_current_day.dart';
import 'package:seeft_mobile/pages/my_shift_page_current_first_day.dart';
import 'package:seeft_mobile/pages/my_shift_page_current_second_day.dart';
import 'package:seeft_mobile/pages/pre_preparation_day_shift.dart';
import 'package:seeft_mobile/pages/cleanup_day_time_schedule.dart';
/*
Expand All @@ -29,7 +30,8 @@ class _MyShiftPageState extends State<MyShiftPage>
final List<TabInfo> _tabs = [
TabInfo("準々備日", PrePreparationDayShift()),
TabInfo("準備日", MyShiftPagePreparationDay()),
TabInfo("当日", MyShiftPageCurrentDay()),
TabInfo("当日 1日目", MyShiftPageCurrentFirstDay()),
TabInfo("当日 2日目", MyShiftPageCurrentSecondDay()),
TabInfo("片付け日", CleanUpDayTimeSchedule()),
];
late TabController _tabController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import 'package:seeft_mobile/configs/importer.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:http/http.dart' as http;

class MyShiftPageCurrentDay extends StatefulWidget {
class MyShiftPageCurrentFirstDay extends StatefulWidget {
@override
_MyShiftPageState createState() => _MyShiftPageState();
}

class _MyShiftPageState extends State<MyShiftPageCurrentDay> {
class _MyShiftPageState extends State<MyShiftPageCurrentFirstDay> {
// notification関連をinitStateに書き出さなきゃいけないので書いてたけどutilとかに書いてもいいかもね

// FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import 'package:seeft_mobile/configs/importer.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:http/http.dart' as http;

class MyShiftPageCurrentDayRainy extends StatefulWidget {
class MyShiftPageCurrentFirstDayRainy extends StatefulWidget {
@override
_MyShiftPageState createState() => _MyShiftPageState();
}

class _MyShiftPageState extends State<MyShiftPageCurrentDayRainy> {
class _MyShiftPageState extends State<MyShiftPageCurrentFirstDayRainy> {
// notification関連をinitStateに書き出さなきゃいけないので書いてたけどutilとかに書いてもいいかもね

// FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import 'package:seeft_mobile/configs/importer.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:http/http.dart' as http;

class MyShiftPageCurrentDaySunny extends StatefulWidget {
class MyShiftPageCurrentFirstDaySunny extends StatefulWidget {
@override
_MyShiftPageState createState() => _MyShiftPageState();
}

class _MyShiftPageState extends State<MyShiftPageCurrentDaySunny> {
class _MyShiftPageState extends State<MyShiftPageCurrentFirstDaySunny> {
// notification関連をinitStateに書き出さなきゃいけないので書いてたけどutilとかに書いてもいいかもね

// FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
Expand Down
65 changes: 65 additions & 0 deletions lib/pages/my_shift_page_current_second_day.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import 'dart:developer';

import 'package:seeft_mobile/configs/importer.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:http/http.dart' as http;

class MyShiftPageCurrentSecondDay extends StatefulWidget {
@override
_MyShiftPageState createState() => _MyShiftPageState();
}

class _MyShiftPageState extends State<MyShiftPageCurrentSecondDay> {
// notification関連をinitStateに書き出さなきゃいけないので書いてたけどutilとかに書いてもいいかもね

// FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
// NotificationDetails platformChannelSpecifics;

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
final Size size = MediaQuery.of(context).size;
return FutureBuilder(
future: getData(),
builder: (ctx, snapshot) {
if (snapshot.connectionState == AsyncSnapshot.waiting()) {
logger.w("message");
}
if (!snapshot.hasData) {
return CircularProgressIndicator();
}
return Container(
padding: const EdgeInsets.all(40.0),
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
// height: size.height - 200,
// width: size.width - 80,
// padding: const EdgeInsets.all(10.0),
// decoration: BoxDecoration(
// border: Border.all(color: Colors.black),
// ),
// child: _contents(size, snapshot.data)),
child: table.shiftTable(snapshot.data, context)),
],
),
));
},
);
}
}

Future getData() async {
try {
var userID = await store.getUserID();
var res = await api.getMyShiftCurrentDay(userID.toString());
return res;
} catch (err) {
logger.e('don`t response. error message: $err');
}
}
65 changes: 65 additions & 0 deletions lib/pages/my_shift_page_current_second_day_rainy.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import 'dart:developer';

import 'package:seeft_mobile/configs/importer.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:http/http.dart' as http;

class MyShiftPageCurrentSecondDayRainy extends StatefulWidget {
@override
_MyShiftPageState createState() => _MyShiftPageState();
}

class _MyShiftPageState extends State<MyShiftPageCurrentSecondDayRainy> {
// notification関連をinitStateに書き出さなきゃいけないので書いてたけどutilとかに書いてもいいかもね

// FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
// NotificationDetails platformChannelSpecifics;

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
final Size size = MediaQuery.of(context).size;
return FutureBuilder(
future: getData(),
builder: (ctx, snapshot) {
if (snapshot.connectionState == AsyncSnapshot.waiting()) {
logger.w("message");
}
if (!snapshot.hasData) {
return CircularProgressIndicator();
}
return Container(
padding: const EdgeInsets.all(40.0),
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
// height: size.height - 200,
// width: size.width - 80,
// padding: const EdgeInsets.all(10.0),
// decoration: BoxDecoration(
// border: Border.all(color: Colors.black),
// ),
// child: _contents(size, snapshot.data)),
child: table.shiftTable(snapshot.data, context)),
],
),
));
},
);
}
}

Future getData() async {
try {
var userID = await store.getUserID();
var res = await api.getMyShiftCurrentDayRainy(userID.toString());
return res;
} catch (err) {
logger.e('don`t response. error message: $err');
}
}
65 changes: 65 additions & 0 deletions lib/pages/my_shift_page_current_second_day_sunny.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import 'dart:developer';

import 'package:seeft_mobile/configs/importer.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:http/http.dart' as http;

class MyShiftPageCurrentSecondDaySunny extends StatefulWidget {
@override
_MyShiftPageState createState() => _MyShiftPageState();
}

class _MyShiftPageState extends State<MyShiftPageCurrentSecondDaySunny> {
// notification関連をinitStateに書き出さなきゃいけないので書いてたけどutilとかに書いてもいいかもね

// FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
// NotificationDetails platformChannelSpecifics;

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
final Size size = MediaQuery.of(context).size;
return FutureBuilder(
future: getData(),
builder: (ctx, snapshot) {
if (snapshot.connectionState == AsyncSnapshot.waiting()) {
logger.w("message");
}
if (!snapshot.hasData) {
return CircularProgressIndicator();
}
return Container(
padding: const EdgeInsets.all(40.0),
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
// height: size.height - 200,
// width: size.width - 80,
// padding: const EdgeInsets.all(10.0),
// decoration: BoxDecoration(
// border: Border.all(color: Colors.black),
// ),
// child: _contents(size, snapshot.data)),
child: table.shiftTable(snapshot.data, context)),
],
),
));
},
);
}
}

Future getData() async {
try {
var userID = await store.getUserID();
var res = await api.getMyShiftCurrentDaySunny(userID.toString());
return res;
} catch (err) {
logger.e('don`t response. error message: $err');
}
}

0 comments on commit 8f9e8f3

Please sign in to comment.