-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feat/#12 update meeting
- Loading branch information
Showing
8 changed files
with
746 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
DateTime toNoDot(String date) { | ||
return DateTime(int.parse(date.substring(0, 4)), | ||
int.parse(date.substring(5, 7)), int.parse(date.substring(8, 10))); | ||
} | ||
|
||
void toDotFormat() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
class Meeting_Form_Model { | ||
List<String> repeatList = ['반복 없음', '매일 반복', '매주 반복', '매월 반복']; | ||
String repeat = '반복 없음'; | ||
List<String> startList = List.generate( | ||
48, | ||
(index) => | ||
'${(index ~/ 2).toString().padLeft(2, '0')}:${(index % 2 * 30).toString().padLeft(2, '0')}'); | ||
String start = '09:00'; | ||
List<String> endList = List.generate( | ||
48, | ||
(index) => | ||
'${(index ~/ 2).toString().padLeft(2, '0')}:${(index % 2 * 30).toString().padLeft(2, '0')}'); | ||
String end = '09:00'; | ||
List<String> gropList = [ | ||
'C-Level', | ||
'Frontend', | ||
'Backend', | ||
'Finance', | ||
'PM', | ||
'Infra', | ||
'Design', | ||
'Marketing', | ||
'BlockChain', | ||
'People', | ||
'Legal', | ||
'QA', | ||
'RealEstateCredit', | ||
'RealEstateInvestmentManagement' | ||
]; | ||
String? grop; | ||
List<String> roomList = ['Thield', 'Bezos', 'Musk']; | ||
String room = 'Thield'; | ||
List<String> userList = [ | ||
'류건열', | ||
'이채림', | ||
'김재훈', | ||
'이상호', | ||
'B_Item1', | ||
'B_Item2', | ||
'B_Item3', | ||
'B_Item4', | ||
]; | ||
|
||
String? user; | ||
|
||
String? date; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import 'package:app/view_model/update_metting_view_model.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:intl/intl.dart'; | ||
import 'package:table_calendar/table_calendar.dart'; | ||
|
||
class CalendarDialog extends StatefulWidget { | ||
CalendarDialog(this.updateMettingViewModel, {Key? key}) : super(key: key); | ||
final UpdateMettingViewModel updateMettingViewModel; | ||
@override | ||
State<CalendarDialog> createState() => | ||
_CalendarDialogState(updateMettingViewModel); | ||
} | ||
|
||
class _CalendarDialogState extends State<CalendarDialog> { | ||
_CalendarDialogState(this.updateMettingViewModel); | ||
final UpdateMettingViewModel updateMettingViewModel; | ||
String? date; | ||
DateTime? _focusedDay; | ||
DateTime? _selectedDay; | ||
|
||
@override | ||
void initState() { | ||
date = updateMettingViewModel.updateMeetingModel.date; | ||
print(date); | ||
_focusedDay = DateTime(int.parse(date!.substring(0, 4)), | ||
int.parse(date!.substring(4, 6)), int.parse(date!.substring(6, 8))); | ||
_selectedDay = _focusedDay; | ||
super.initState(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return AlertDialog( | ||
// RoundedRectangleBorder - Dialog 화면 모서리 둥글게 조절 | ||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)), | ||
content: Container( | ||
height: 400, | ||
child: TableCalendar( | ||
headerStyle: HeaderStyle(formatButtonVisible: false), | ||
calendarStyle: const CalendarStyle( | ||
weekendTextStyle: TextStyle(color: Colors.red)), | ||
locale: 'ko-KR', //한국어 | ||
currentDay: DateTime.now(), | ||
focusedDay: _focusedDay!, | ||
firstDay: DateTime.utc(2010, 10, 16), | ||
lastDay: DateTime.utc(2030, 3, 14), | ||
onDaySelected: (DateTime selectedDay, DateTime focusedDay) { | ||
if (!isSameDay(_selectedDay, selectedDay)) { | ||
setState(() { | ||
_selectedDay = selectedDay; | ||
_focusedDay = focusedDay; | ||
}); | ||
} | ||
}, | ||
selectedDayPredicate: (day) => isSameDay(_selectedDay, day), | ||
), | ||
), | ||
actions: <Widget>[ | ||
TextButton( | ||
child: new Text("확인"), | ||
onPressed: () { | ||
updateMettingViewModel.updateMeetingModel.date = | ||
DateFormat('yyyyMMdd').format(_selectedDay!); | ||
Navigator.pop(context, true); | ||
}, | ||
), | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.