Skip to content

Commit

Permalink
Merge pull request #79 from NKUST-ITC/develop
Browse files Browse the repository at this point in the history
Update to v3.2.8
  • Loading branch information
abc873693 authored Oct 6, 2019
2 parents 8089bee + 9840758 commit be1b491
Show file tree
Hide file tree
Showing 73 changed files with 964 additions and 638 deletions.
9 changes: 4 additions & 5 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/rainvisitor/development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/rainvisitor/Documents/GitHub-NKUST-ITC/NKUST-AP-Flutter"
export "FLUTTER_TARGET=/Users/rainvisitor/Documents/GitHub-NKUST-ITC/NKUST-AP-Flutter/lib/main.dart"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_FRAMEWORK_DIR=/Users/rainvisitor/development/flutter/bin/cache/artifacts/engine/ios"
export "FLUTTER_BUILD_NAME=3.2.6"
export "FLUTTER_BUILD_NUMBER=30206"
export "TRACK_WIDGET_CREATION=true"
export "FLUTTER_FRAMEWORK_DIR=/Users/rainvisitor/development/flutter/bin/cache/artifacts/engine/ios-release"
export "FLUTTER_BUILD_NAME=3.2.8"
export "FLUTTER_BUILD_NUMBER=30208"
5 changes: 3 additions & 2 deletions lib/api/helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Helper {

Helper() {
options = new BaseOptions(
baseUrl: 'https://$HOST:$PORT',
baseUrl: 'https://$HOST:$PORT/$VERSION',
connectTimeout: 10000,
receiveTimeout: 10000,
);
Expand Down Expand Up @@ -441,7 +441,8 @@ class Helper {
'leavesData': data.toJson(),
'leavesProof': image == null
? null
: UploadFileInfo(image, image.path.split('/').last),
: MultipartFile.fromFile(image.path,
filename: image.path.split('/').last),
},
cancelToken: cancelToken,
);
Expand Down
3 changes: 3 additions & 0 deletions lib/config/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,7 @@ class Constants {

static const DONATE_URL =
'https://payment.ecpay.com.tw/QuickCollect/PayData?mLM7iy8RpUGk%2fyBotSDMdvI0qGI5ToToqBW%2bOQbOE80%3d';

static const MAX_IMAGE_SIZE = 4.0;
static const IMAGE_RESIZE_RATE = 2.5;
}
16 changes: 8 additions & 8 deletions lib/models/leaves_campus_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,25 @@ class LeavesDepartment {
}

class LeavesTeacher {
String teacherName;
String teacherId;
String name;
String id;

LeavesTeacher({
this.teacherName,
this.teacherId,
this.name,
this.id,
});

factory LeavesTeacher.fromRawJson(String str) => LeavesTeacher.fromJson(json.decode(str));

String toRawJson() => json.encode(toJson());

factory LeavesTeacher.fromJson(Map<String, dynamic> json) => LeavesTeacher(
teacherName: json["teacherName"] == null ? null : json["teacherName"],
teacherId: json["teacherId"] == null ? null : json["teacherId"],
name: json["teacherName"] == null ? null : json["teacherName"],
id: json["teacherId"] == null ? null : json["teacherId"],
);

Map<String, dynamic> toJson() => {
"teacherName": teacherName == null ? null : teacherName,
"teacherId": teacherId == null ? null : teacherId,
"teacherName": name == null ? null : name,
"teacherId": id == null ? null : id,
};
}
17 changes: 15 additions & 2 deletions lib/models/leaves_submit_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class LeavesSubmitData {
leaveTypeId: json["leaveType"],
teacherId: json["teacherId"],
reasonText: json["reasonText"],
delayReasonText: json["delayReason"],
delayReasonText: json["delayReasonText"],
);

Map<String, dynamic> toJson() => {
"days": new List<dynamic>.from(days.map((x) => x.toJson())),
"leaveType": leaveTypeId,
"teacherId": teacherId,
"reasonText": reasonText,
"delayReason": delayReasonText,
"delayReasonText": delayReasonText,
};
}

Expand All @@ -64,4 +64,17 @@ class Day {
"day": day,
"class": new List<dynamic>.from(dayClass.map((x) => x)),
};

@override
String toString() {
if (day == null && dayClass == null)
return 'empty';
else {
String text = day;
dayClass.forEach((item) {
text = '$text ($item)';
});
return text;
}
}
}
2 changes: 1 addition & 1 deletion lib/pages/home/about/about_us_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AboutUsPageState extends State<AboutUsPage> {
}

String get sectionImage {
final department = ShareDataWidget.of(context).data.userInfo.department;
final department = ShareDataWidget.of(context).data.userInfo?.department ?? '';
Random random = Random();
bool halfSnapFingerChance = random.nextInt(2000) % 2 == 0;
if (department.contains('建工') || department.contains('燕巢'))
Expand Down
72 changes: 71 additions & 1 deletion lib/pages/home/about/open_source_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,77 @@ class OpenSourcePageState extends State<OpenSourcePage> {
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" +
"See the License for the specific language governing permissions and\n" +
"limitations under the License.",
)
),
_Item(
'photo_view',
"Copyright 2018 Renan C. Araújo\n" +
"\n" +
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n" +
"\n" +
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n" +
"\n" +
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
),
_Item(
'date_range_picker',
"The MIT License (MIT)\n" +
"\n" +
"Copyright (c) 2018 anicdh\n" +
"\n" +
"Permission is hereby granted, free of charge, to any person obtaining a copy\n" +
"of this software and associated documentation files (the \"Software\"), to deal\n" +
"in the Software without restriction, including without limitation the rights\n" +
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n" +
"copies of the Software, and to permit persons to whom the Software is\n" +
"furnished to do so, subject to the following conditions:\n" +
"\n" +
"The above copyright notice and this permission notice shall be included in all\n" +
"copies or substantial portions of the Software.\n" +
"\n" +
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" +
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" +
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n" +
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n" +
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n" +
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n" +
"SOFTWARE.",
),
_Item(
'flutter_autofill',
"Copyright 2019-present Applaud Software Inc.\n" +
"\n" +
"Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n" +
"\n" +
"1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n" +
"\n" +
"2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n" +
"\n" +
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
),
_Item(
'flutter_native_image',
"MIT License\n" +
"\n" +
"Copyright (c) 2018 Ben Konsemüller\n" +
"\n" +
"Permission is hereby granted, free of charge, to any person obtaining a copy\n" +
"of this software and associated documentation files (the \"Software\"), to deal\n" +
"in the Software without restriction, including without limitation the rights\n" +
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n" +
"copies of the Software, and to permit persons to whom the Software is\n" +
"furnished to do so, subject to the following conditions:\n" +
"\n" +
"The above copyright notice and this permission notice shall be included in all\n" +
"copies or substantial portions of the Software.\n" +
"\n" +
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" +
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" +
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n" +
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n" +
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n" +
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n" +
"SOFTWARE.",
),
];

AppLocalizations app;
Expand Down
Loading

0 comments on commit be1b491

Please sign in to comment.