Skip to content

Commit

Permalink
[feature]add first and second day (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
imaimai17468 committed Sep 4, 2022
1 parent 2aa3ab4 commit 10b2020
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 16 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');
}
}
8 changes: 0 additions & 8 deletions windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_windows
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
)

set(PLUGIN_BUNDLED_LIBRARIES)

foreach(plugin ${FLUTTER_PLUGIN_LIST})
Expand All @@ -17,8 +14,3 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)

foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)

0 comments on commit 10b2020

Please sign in to comment.