-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from ryanaidilp/4.2.1
Add new features & some improvements from 4.1.8 to 4.2.1
- Loading branch information
Showing
46 changed files
with
4,337 additions
and
888 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
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,38 @@ | ||
import 'package:spo_balaesang/models/user.dart'; | ||
import 'package:spo_balaesang/utils/app_const.dart'; | ||
|
||
class PaidLeave { | ||
const PaidLeave( | ||
{this.title, | ||
this.id, | ||
this.category, | ||
this.photo, | ||
this.description, | ||
this.startDate, | ||
this.dueDate, | ||
this.isApproved, | ||
this.user}); | ||
|
||
final int id; | ||
final String title; | ||
final String category; | ||
final String description; | ||
final bool isApproved; | ||
final DateTime startDate; | ||
final DateTime dueDate; | ||
final String photo; | ||
final User user; | ||
|
||
factory PaidLeave.fromJson(Map<String, dynamic> json) => PaidLeave( | ||
id: json[PAID_LEAVE_ID_FIELD] as int, | ||
title: json[PAID_LEAVE_TITLE_FIELD] as String, | ||
category: json[PAID_LEAVE_CATEGORY_FIELD] as String, | ||
description: json[PAID_LEAVE_DESCRIPTION_FIELD] as String, | ||
isApproved: json[PAID_LEAVE_IS_APPROVED_FIELD] as bool, | ||
startDate: DateTime.parse(json[PAID_LEAVE_START_DATE_FIELD]), | ||
dueDate: DateTime.parse(json[PAID_LEAVE_DUE_DATE_FIELD]), | ||
photo: json[PAID_LEAVE_PHOTO_FIELD] as String, | ||
user: json[PAID_LEAVE_USER_FIELD] != null | ||
? User.fromJson(json[PAID_LEAVE_USER_FIELD]) | ||
: null); | ||
} |
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
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 |
---|---|---|
@@ -1,13 +1,22 @@ | ||
import 'package:spo_balaesang/utils/app_const.dart'; | ||
|
||
class Monthly { | ||
const Monthly({this.lateCount, this.attendancePercentage}); | ||
const Monthly( | ||
{this.lateCount, | ||
this.attendancePercentage, | ||
this.leaveEarlyCount, | ||
this.notMorningParadeCount}); | ||
|
||
final double attendancePercentage; | ||
final int lateCount; | ||
final int leaveEarlyCount; | ||
final int notMorningParadeCount; | ||
|
||
factory Monthly.fromJson(Map<String, dynamic> json) => Monthly( | ||
attendancePercentage: | ||
double.parse(json[REPORT_ATTENDANCE_PERCENTAGE_FIELD].toString()), | ||
lateCount: json[REPORT_LATE_COUNT_FIELD] as int); | ||
lateCount: json[REPORT_LATE_COUNT_FIELD] as int, | ||
leaveEarlyCount: json[REPORT_LEAVE_EARLY_COUNT_FIELD] as int, | ||
notMorningParadeCount: | ||
json[REPORT_NOT_MORNING_PARADE_COUNT_FIELD] as int); | ||
} |
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
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
Oops, something went wrong.