浏览代码

Update 13/2 16.30

dienianindya 1年前
父节点
当前提交
4bdac78089

+ 28
- 5
lib/Screens/ForgotPassword/forgotPassword_screen.dart 查看文件

@@ -145,7 +145,8 @@ class ForgotPasswordScreen extends StatelessWidget {
145 145
                                       // set up the AlertDialog
146 146
                                       AlertDialog alert = AlertDialog(
147 147
                                         title: Text("Employee Self Service"),
148
-                                        content: Text(message),
148
+                                        //content: Text(message),
149
+                                        content: Text("Link for reset password has been sent to your email address"),
149 150
                                         actions: [
150 151
                                           okButton,
151 152
                                         ],
@@ -158,15 +159,37 @@ class ForgotPasswordScreen extends StatelessWidget {
158 159
                                         },
159 160
                                       );
160 161
                                     } else if (status == "failed") {
161
-                                      String message = object['result']['message'].toString();
162
-                                      Fluttertoast.showToast(
162
+                                      await loading.hide();
163
+                                      Widget okButton = TextButton(
164
+                                        child: Text("Back"),
165
+                                        onPressed: () {
166
+                                          Navigator.of(context, rootNavigator: true).pop();
167
+                                        },
168
+                                      );
169
+
170
+                                      // set up the AlertDialog
171
+                                      AlertDialog alert = AlertDialog(
172
+                                        title: Text("Employee Self Service"),
173
+                                        //content: Text(message),
174
+                                        content: Text("Your email has not been registered"),
175
+                                        actions: [
176
+                                          okButton,
177
+                                        ],
178
+                                      );
179
+                                      // show the dialog
180
+                                      showDialog(
181
+                                        context: context,
182
+                                        builder: (BuildContext context) {
183
+                                          return alert;
184
+                                        },
185
+                                      );
186
+                                      /*Fluttertoast.showToast(
163 187
                                           msg: message,
164 188
                                           toastLength: Toast.LENGTH_SHORT,
165 189
                                           gravity: ToastGravity.CENTER,
166 190
                                           timeInSecForIosWeb: 1,
167 191
                                           textColor: Colors.white,
168
-                                          fontSize: 16.0);
169
-                                      await loading.hide();
192
+                                          fontSize: 16.0);*/
170 193
                                     }
171 194
                                   } else {
172 195
                                     Fluttertoast.showToast(

+ 19
- 19
lib/Screens/Home/home_screen.dart 查看文件

@@ -34,7 +34,13 @@ class HomeView extends StatefulWidget {
34 34
   @override
35 35
   _HomeView createState() => _HomeView();
36 36
 }
37
-/*WidgetsBinding.instance.addPostFrameCallback((_) async {
37
+
38
+class _HomeView extends State<HomeView> {
39
+  @override
40
+  initState() {
41
+    getDetail();
42
+    _imageToShow = AssetImage('assets/images/ic_administrator.png');
43
+    /*WidgetsBinding.instance.addPostFrameCallback((_) async {
38 44
       ProgressDialog loading = ProgressDialog(context);
39 45
       loading = ProgressDialog(context,
40 46
           type: ProgressDialogType.normal,
@@ -59,12 +65,6 @@ class HomeView extends StatefulWidget {
59 65
       loading.show();
60 66
       _imageToShow = getProfileImage();
61 67
     });*/
62
-
63
-class _HomeView extends State<HomeView> {
64
-  @override
65
-  initState() {
66
-    getDetail();
67
-    _imageToShow = AssetImage('assets/images/ic_administrator.png');
68 68
     super.initState();
69 69
   }
70 70
 
@@ -73,7 +73,7 @@ class _HomeView extends State<HomeView> {
73 73
     final SharedPreferences prefs = await SharedPreferences.getInstance();
74 74
     final session = prefs.getString('session');
75 75
 
76
-    ProgressDialog loading = ProgressDialog(context);
76
+    /*ProgressDialog loading = ProgressDialog(context);
77 77
     loading = ProgressDialog(context,
78 78
         type: ProgressDialogType.normal,
79 79
         isDismissible: false,
@@ -93,7 +93,7 @@ class _HomeView extends State<HomeView> {
93 93
         messageTextStyle: TextStyle(
94 94
             color: Colors.black,
95 95
             fontSize: 15.0,
96
-            fontWeight: FontWeight.w600));
96
+            fontWeight: FontWeight.w600));*/
97 97
 
98 98
     GetProfileImage_Post.connectToAPI(session!).then((valueResult) async {
99 99
       Map<String, dynamic> object = json.decode(valueResult);
@@ -115,7 +115,7 @@ class _HomeView extends State<HomeView> {
115 115
                   .image;
116 116
             });
117 117
           }
118
-          loading.hide();
118
+          //loading.hide();
119 119
         } else if (status == "failed") {
120 120
           String message = object['result']['message'].toString();
121 121
           Fluttertoast.showToast(
@@ -126,7 +126,7 @@ class _HomeView extends State<HomeView> {
126 126
               textColor: Colors.white,
127 127
               fontSize: 16.0);
128 128
         }
129
-        loading.hide();
129
+        //loading.hide();
130 130
       } else {
131 131
         Fluttertoast.showToast(
132 132
             msg: "Server Response Error",
@@ -135,7 +135,7 @@ class _HomeView extends State<HomeView> {
135 135
             timeInSecForIosWeb: 1,
136 136
             textColor: Colors.white,
137 137
             fontSize: 16.0);
138
-        loading.hide();
138
+        //loading.hide();
139 139
       }
140 140
     });
141 141
     return _imageToShow;
@@ -220,7 +220,7 @@ class _HomeScreenState extends State<HomeScreen> {
220 220
     final SharedPreferences prefs = await SharedPreferences.getInstance();
221 221
     final session = prefs.getString('session');
222 222
 
223
-    ProgressDialog loading = ProgressDialog(context);
223
+    /*ProgressDialog loading = ProgressDialog(context);
224 224
     loading = ProgressDialog(context,
225 225
         type: ProgressDialogType.normal,
226 226
         isDismissible: false,
@@ -242,7 +242,7 @@ class _HomeScreenState extends State<HomeScreen> {
242 242
             fontSize: 15.0,
243 243
             fontWeight: FontWeight.w600));
244 244
 
245
-    loading.show();
245
+    loading.show();*/
246 246
     GetProfileImage_Post.connectToAPI(session!).then((valueResult) async {
247 247
       Map<String, dynamic> object = json.decode(valueResult);
248 248
       if (object.containsKey("result").toString() == "true") {
@@ -273,7 +273,7 @@ class _HomeScreenState extends State<HomeScreen> {
273 273
               textColor: Colors.white,
274 274
               fontSize: 16.0);
275 275
         }
276
-        loading.hide();
276
+        //loading.hide();
277 277
       } else {
278 278
         Fluttertoast.showToast(
279 279
             msg: "Server Response Error",
@@ -282,7 +282,7 @@ class _HomeScreenState extends State<HomeScreen> {
282 282
             timeInSecForIosWeb: 1,
283 283
             textColor: Colors.white,
284 284
             fontSize: 16.0);
285
-        loading.hide();
285
+        //loading.hide();
286 286
       }
287 287
     });
288 288
     return _imageToShow;
@@ -292,7 +292,7 @@ class _HomeScreenState extends State<HomeScreen> {
292 292
   Widget build(BuildContext context) {
293 293
     var size = MediaQuery.of(context).size;
294 294
 
295
-    ProgressDialog loading = ProgressDialog(context);
295
+    /*ProgressDialog loading = ProgressDialog(context);
296 296
     loading = ProgressDialog(context,
297 297
     type: ProgressDialogType.normal,
298 298
     isDismissible: false,
@@ -312,7 +312,7 @@ class _HomeScreenState extends State<HomeScreen> {
312 312
     messageTextStyle: TextStyle(
313 313
     color: Colors.black,
314 314
     fontSize: 15.0,
315
-    fontWeight: FontWeight.w600));
315
+    fontWeight: FontWeight.w600));*/
316 316
 
317 317
     return FocusDetector(
318 318
       /*onVisibilityGained: (){
@@ -329,7 +329,7 @@ class _HomeScreenState extends State<HomeScreen> {
329 329
       },*/
330 330
       onFocusGained: (){
331 331
         getProfileImage();
332
-        loading.hide();
332
+        //loading.hide();
333 333
       },
334 334
 /*      onForegroundLost: (){
335 335
         getProfileImage();

+ 1
- 0
lib/Screens/Login/background.dart 查看文件

@@ -46,6 +46,7 @@ class Background extends StatelessWidget {
46 46
 }
47 47
 
48 48
 const List<Color> orangeGradients = [
49
+  Color(0xFF4858A7),
49 50
   Color(0xFF4858A7),
50 51
   Color(0xFF6474C6),
51 52
 ];

+ 5
- 3
lib/Screens/Menu/Absensi/RequestHttp/checkIn_post.dart 查看文件

@@ -8,10 +8,11 @@ import 'package:shared_preferences/shared_preferences.dart';
8 8
 
9 9
 class CheckIn_Post {
10 10
   late String session;
11
+  late String coordinate;
11 12
 
12 13
   CheckIn_Post({required this.session});
13 14
 
14
-  static Future<String> connectToAPI() async {
15
+  static Future<String> connectToAPI(String coordinate) async {
15 16
     String URL = baseURL + "/api/v1/check_in";
16 17
 
17 18
     final SharedPreferences prefs = await SharedPreferences.getInstance();
@@ -20,7 +21,8 @@ class CheckIn_Post {
20 21
     var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
21 22
       "data": [
22 23
         {
23
-          "session": session
24
+          "session" : session,
25
+          "coordinate" : coordinate
24 26
         }
25 27
       ]
26 28
     }), headers: {
@@ -28,7 +30,7 @@ class CheckIn_Post {
28 30
       "Api-key": apiKey
29 31
     });
30 32
 
31
-    //developer.log(sendData.body, name: "Get Check In Result");
33
+    developer.log(sendData.body, name: "Get Check In Result");
32 34
     return sendData.body;
33 35
   }
34 36
 }

+ 4
- 2
lib/Screens/Menu/Absensi/RequestHttp/checkOut_post.dart 查看文件

@@ -8,10 +8,11 @@ import 'package:shared_preferences/shared_preferences.dart';
8 8
 
9 9
 class CheckOut_Post {
10 10
   late String session;
11
+  late String coordinate;
11 12
 
12 13
   CheckOut_Post({required this.session});
13 14
 
14
-  static Future<String> connectToAPI() async {
15
+  static Future<String> connectToAPI(String coordinate) async {
15 16
     String URL = baseURL + "/api/v1/check_out";
16 17
 
17 18
     final SharedPreferences prefs = await SharedPreferences.getInstance();
@@ -20,7 +21,8 @@ class CheckOut_Post {
20 21
     var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
21 22
       "data": [
22 23
         {
23
-          "session": session
24
+          "session": session,
25
+          "coordinate" : coordinate
24 26
         }
25 27
       ]
26 28
     }), headers: {

+ 14
- 4
lib/Screens/Menu/Absensi/absensi_history_screen.dart 查看文件

@@ -93,8 +93,6 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
93 93
               double hours = double.parse(worked_hours);
94 94
 
95 95
               if (check_in != "false"){
96
-                //Get Day
97
-                String dayDate = DateFormat('EEEE').format(DateTime.parse(check_in));
98 96
                 String date = DateFormat('dd').format(DateTime.parse(check_in));
99 97
                 String month = DateFormat('MMM').format(DateTime.parse(check_in));
100 98
 
@@ -104,7 +102,6 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
104 102
                 String showCheckInTime = checkInTimeLocal.substring(11, 19);
105 103
                 //logDev.log(showCheckInTime.substring(0,5), name: "SHOW CHECK IN TIME");
106 104
 
107
-                dayDate_List.add(dayDate.substring(0,3));
108 105
                 date_List.add(date);
109 106
                 month_List.add(month);
110 107
                 showCheckIn_List.add(showCheckInTime.substring(0,5));
@@ -117,8 +114,18 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
117 114
                 String checkOutTimeLocal = checkOutTime.toLocal().toString();
118 115
                 String showCheckOutTime = checkOutTimeLocal.substring(11, 19);
119 116
                 //logDev.log(showCheckOutTime, name: "SHOW CHECK OUT TIME");
120
-
121 117
                 showCheckOut_List.add(showCheckOutTime.substring(0,5));
118
+
119
+                if (check_in.substring(0, 10) == check_out.substring(0,10)){
120
+                  //Get Day Check In
121
+                  String dayDate = DateFormat('EEEE').format(DateTime.parse(check_in));
122
+                  dayDate_List.add(dayDate.substring(0,3));
123
+                } else if (check_in.substring(0, 10) != check_out.substring(0,10)){
124
+                  //Get Day Check In & Check Out
125
+                  String dayDateIn = DateFormat('EEEE').format(DateTime.parse(check_in));
126
+                  String dayDateOut = DateFormat('EEEE').format(DateTime.parse(check_in));
127
+                  dayDate_List.add(dayDateIn.substring(0,3) + "\t" + dayDateOut.substring(0,3));
128
+                }
122 129
               }
123 130
               if (check_in == "false"){
124 131
                 String show_check_in = "-";
@@ -129,6 +136,9 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
129 136
                 //String workingHours = "-";
130 137
                 //workingHours_List.add(workingHours);
131 138
                 showCheckOut_List.add(show_check_out);
139
+
140
+                String dayDate = DateFormat('EEEE').format(DateTime.parse(check_in));
141
+                dayDate_List.add(dayDate.substring(0,3));
132 142
               }
133 143
               if (check_in != "false" && check_out != "false"){
134 144
                 DateFormat format = DateFormat("HH:mm");

+ 103
- 15
lib/Screens/Menu/Absensi/absensi_screen.dart 查看文件

@@ -8,12 +8,14 @@ import 'package:google_fonts/google_fonts.dart';
8 8
 import 'package:hris_selfservice_mobile/Screens/Menu/Absensi/RequestHttp/checkIn_post.dart';
9 9
 import 'package:hris_selfservice_mobile/Screens/Menu/Absensi/RequestHttp/checkStatus_post.dart';
10 10
 import 'package:hris_selfservice_mobile/Screens/Menu/Absensi/absensi_history_screen.dart';
11
+import 'package:intl/intl.dart';
11 12
 import 'package:latlong2/latlong.dart' as latlong;
12 13
 import 'dart:developer' as logDev;
13 14
 
14 15
 import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
15 16
 
16 17
 import 'RequestHttp/checkOut_post.dart';
18
+import 'RequestHttp/historyAbsensi_post.dart';
17 19
 
18 20
 class AbsensiScreen extends StatefulWidget {
19 21
   const AbsensiScreen({Key? key}) : super(key: key);
@@ -30,10 +32,15 @@ class _AbsensiScreenState extends State<AbsensiScreen> {
30 32
   latlong.LatLng point = latlong.LatLng(-6.183580253674716, 106.93103973792664);
31 33
   late Position position;
32 34
 
35
+  late String showCheckIn_List;
36
+  late String showCheckOut_List;
37
+
33 38
   MapController _mapController = MapController();
34 39
 
35 40
   @override
36 41
   void initState() {
42
+    showCheckIn_List = "";
43
+    showCheckOut_List = "";
37 44
     WidgetsBinding.instance.addPostFrameCallback((_) {
38 45
       determinePosition();
39 46
     });
@@ -102,18 +109,23 @@ class _AbsensiScreenState extends State<AbsensiScreen> {
102 109
         if (object.containsKey("result").toString() == "true") {
103 110
           String result = object['result'].toString();
104 111
           logDev.log(result, name: "Status Absensi Result");
105
-          if (result.contains("belum")) {
112
+          if (result.contains("not_checked_in")) {
106 113
             setState(() {
107 114
               visibleCheckIn = !visibleCheckIn;
108 115
               visibleCheckOut = visibleCheckOut;
109 116
             });
110 117
             loading.hide();
111
-          } else if (result.contains("sudah")) {
118
+          } else if (result.contains("checked_in")) {
112 119
             setState(() {
113 120
               visibleCheckIn = visibleCheckIn;
114 121
               visibleCheckOut = !visibleCheckOut;
115 122
             });
116 123
             loading.hide();
124
+          } else {
125
+            setState(() {
126
+              alertDialogFailedResponse(context);
127
+            });
128
+            loading.hide();
117 129
           }
118 130
         } else {
119 131
           setState(() {
@@ -123,6 +135,54 @@ class _AbsensiScreenState extends State<AbsensiScreen> {
123 135
         }
124 136
       });
125 137
 
138
+      //History
139
+      HistoryAbsensi_Post.connectToAPI().then((valueResult) async {
140
+        Map<String, dynamic> object = jsonDecode(valueResult);
141
+        if (object.containsKey("result").toString() == "true") {
142
+          String result = object['result'].toString();
143
+          if (result.contains("failed")) {
144
+            loading.hide();
145
+            alertDialogFailedRetrievedData(context);
146
+          } else {
147
+            List <dynamic> historyAbsensi = object['result'];
148
+            loading.hide();
149
+            setState(() {
150
+              String check_in = historyAbsensi[0]['check_in'].toString();
151
+              String check_out = historyAbsensi[0]['check_out'].toString();
152
+              logDev.log(historyAbsensi[0]['check_in'].toString(), name: "CHECK IN TIME");
153
+
154
+              if (check_in != "false") {
155
+                //Convert UTC to Local Time - Check In Time
156
+                DateTime checkInTime = DateFormat("yyyy-MM-dd HH:mm:ss").parse(
157
+                    check_in, true);
158
+                String checkInTimeLocal = checkInTime.toLocal().toString();
159
+                String showCheckInTime = checkInTimeLocal.substring(11, 19);
160
+                //logDev.log(showCheckInTime.substring(0,5), name: "SHOW CHECK IN TIME");
161
+                showCheckIn_List = showCheckInTime.substring(0, 5);
162
+              } else if (check_in == "false") {
163
+                String show_check_in = "-";
164
+                showCheckIn_List = show_check_in;
165
+              }
166
+
167
+              if (check_out != "false") {
168
+                //Convert UTC to Local Time - Check Out Time
169
+                DateTime checkOutTime = DateFormat("yyyy-MM-dd HH:mm:ss").parse(
170
+                    check_out, true);
171
+                String checkOutTimeLocal = checkOutTime.toLocal().toString();
172
+                String showCheckOutTime = checkOutTimeLocal.substring(11, 19);
173
+                //logDev.log(showCheckOutTime, name: "SHOW CHECK OUT TIME");
174
+                showCheckOut_List = showCheckOutTime.substring(0, 5);
175
+              } else if (check_out == "false") {
176
+                String show_check_out = "-";
177
+                showCheckOut_List = show_check_out;
178
+              }
179
+            });
180
+          }
181
+        } else {
182
+          alertDialogFailedRetrievedData(context);
183
+        }
184
+      });
185
+
126 186
       //loading.hide();
127 187
     }
128 188
   }
@@ -160,35 +220,32 @@ class _AbsensiScreenState extends State<AbsensiScreen> {
160 220
 
161 221
     if (permission == LocationPermission.deniedForever) {
162 222
       loading.hide();
163
-      //return Future.error('Location permissions are permanently denied, we cannot request permissions.');
164 223
       return alertDialogPermissionDeniedForever(context);
165 224
     } else if (permission == LocationPermission.denied) {
166 225
       permission = await Geolocator.requestPermission();
167 226
       if (permission != LocationPermission.whileInUse && permission != LocationPermission.always) {
168 227
         loading.hide();
169
-        //return Future.error('Location permissions are denied (actual value: $permission).');
170 228
         return alertDialogPermissionDenied(context);
171 229
       }
172 230
     }
173 231
 
174 232
     position = await Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
175
-    logDev.log(position.toString(), name: "Position GEOLOCATOR");
176 233
     if (position.isMocked) {
177 234
       loading.hide();
178 235
       setState(() {
179 236
         alertDialogFakeGPSDetected(context);
180 237
       });
181 238
     } else {
239
+      loading.hide();
182 240
       setState((){
183 241
         point = latlong.LatLng(position.latitude, position.longitude);
184
-        logDev.log(point.toString(), name: "POINT GEOLOCATOR");
242
+        logDev.log(point.toString(), name: "UPDATE POINT GEOLOCATOR");
185 243
         _mapController.move(point, 18);
186 244
       });
187
-      loading.hide();
188 245
     }
189 246
   }
190 247
 
191
-  goCheckIn() {
248
+  goCheckIn() async {
192 249
     ProgressDialog loading = ProgressDialog(context);
193 250
     loading = ProgressDialog(context,
194 251
         type: ProgressDialogType.normal, isDismissible: false, showLogs: true);
@@ -208,7 +265,22 @@ class _AbsensiScreenState extends State<AbsensiScreen> {
208 265
             color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
209 266
 
210 267
     loading.show();
211
-    CheckIn_Post.connectToAPI().then((valueResult) async {
268
+    position = await Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
269
+    if (position.isMocked) {
270
+      loading.hide();
271
+      setState(() {
272
+        alertDialogFakeGPSDetected(context);
273
+      });
274
+    } else {
275
+      loading.hide();
276
+      setState((){
277
+        point = latlong.LatLng(position.latitude, position.longitude);
278
+        _mapController.move(point, 18);
279
+      });
280
+    }
281
+    String coordinate = point.latitude.toString()+", "+ point.longitude.toString();
282
+
283
+    CheckIn_Post.connectToAPI(coordinate).then((valueResult) async {
212 284
       Map<String, dynamic> object = json.decode(valueResult);
213 285
       if (object.containsKey("result").toString() == "true") {
214 286
         String result = object['result'].toString();
@@ -238,7 +310,7 @@ class _AbsensiScreenState extends State<AbsensiScreen> {
238 310
     });
239 311
   }
240 312
 
241
-  goCheckOut() {
313
+  goCheckOut() async {
242 314
     ProgressDialog loading = ProgressDialog(context);
243 315
     loading = ProgressDialog(context,
244 316
         type: ProgressDialogType.normal, isDismissible: false, showLogs: true);
@@ -258,7 +330,23 @@ class _AbsensiScreenState extends State<AbsensiScreen> {
258 330
             color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
259 331
 
260 332
     loading.show();
261
-    CheckOut_Post.connectToAPI().then((valueResult) async {
333
+
334
+    position = await Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
335
+    if (position.isMocked) {
336
+      loading.hide();
337
+      setState(() {
338
+        alertDialogFakeGPSDetected(context);
339
+      });
340
+    } else {
341
+      loading.hide();
342
+      setState((){
343
+        point = latlong.LatLng(position.latitude, position.longitude);
344
+        _mapController.move(point, 18);
345
+      });
346
+    }
347
+    String coordinate = point.latitude.toString()+", "+ point.longitude.toString();
348
+
349
+    CheckOut_Post.connectToAPI(coordinate).then((valueResult) async {
262 350
       Map<String, dynamic> object = json.decode(valueResult);
263 351
       if (object.containsKey("result").toString() == "true") {
264 352
         String result = object['result'].toString();
@@ -359,7 +447,7 @@ class _AbsensiScreenState extends State<AbsensiScreen> {
359 447
                 children: <Widget>[
360 448
                   Container(
361 449
                     child: Text(
362
-                      "Attendance Today",
450
+                      "Last Attendance",
363 451
                       style: GoogleFonts.patrickHand(
364 452
                           fontSize: 21, color: Colors.white),
365 453
                     ),
@@ -394,7 +482,7 @@ class _AbsensiScreenState extends State<AbsensiScreen> {
394 482
                                     Text('Check In',
395 483
                                         style: GoogleFonts.fredokaOne(
396 484
                                             fontSize: 19)),
397
-                                    Text('07.15',
485
+                                    Text(showCheckIn_List,
398 486
                                         style: GoogleFonts.barlowSemiCondensed(
399 487
                                             fontSize: 19)),
400 488
                                   ],
@@ -406,7 +494,7 @@ class _AbsensiScreenState extends State<AbsensiScreen> {
406 494
                                     Text('Check Out',
407 495
                                         style: GoogleFonts.fredokaOne(
408 496
                                             fontSize: 19)),
409
-                                    Text('16.45',
497
+                                    Text(showCheckOut_List,
410 498
                                         style: GoogleFonts.barlowSemiCondensed(
411 499
                                             fontSize: 19)),
412 500
                                   ],
@@ -869,7 +957,7 @@ alertDialogPermissionDeniedForever(BuildContext context) {
869 957
   AlertDialog alert = AlertDialog(
870 958
     title: Text("Employee Self Service"),
871 959
     content: Text(
872
-        "Location permissions are permanently denied, we cannot request permissions.\nPlease configure it in your device settings."),
960
+        "Location permissions are permanently denied, we cannot request permissions. Please configure it in your device settings."),
873 961
     actions: [noButton],
874 962
   );
875 963
 

+ 6
- 4
lib/Screens/Menu/SlipGaji/slipgaji_screen.dart 查看文件

@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
5 5
 import 'package:fluttertoast/fluttertoast.dart';
6 6
 import 'package:google_fonts/google_fonts.dart';
7 7
 import 'package:hris_selfservice_mobile/Screens/Menu/SlipGaji/RequestHttp/detailSlipGaji_post.dart';
8
+import 'package:hris_selfservice_mobile/Screens/Menu/SlipGaji/RequestHttp/downloadSlipGaji_post.dart';
8 9
 import 'package:hris_selfservice_mobile/Screens/Menu/SlipGaji/RequestHttp/historySlipGaji_post.dart';
9 10
 import 'package:hris_selfservice_mobile/Screens/Menu/SlipGaji/background.dart';
10 11
 import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
@@ -132,7 +133,6 @@ class _SlipGajiScreenState extends State<SlipGajiScreen> {
132 133
               String bulanTahun = bulanStr + " " + tahun;
133 134
               dateTo_List.add(bulanTahun);
134 135
               batchID_List.add(batchID);
135
-
136 136
             }
137 137
             dateTo_List.removeAt(0);
138 138
             batchID_List.removeAt(0);
@@ -145,13 +145,13 @@ class _SlipGajiScreenState extends State<SlipGajiScreen> {
145 145
       } else {
146 146
         setState((){
147 147
           alertDialogFailedResponse(context);
148
-          Fluttertoast.showToast(
148
+         /* Fluttertoast.showToast(
149 149
               msg: "Server Response Error",
150 150
               toastLength: Toast.LENGTH_SHORT,
151 151
               gravity: ToastGravity.CENTER,
152 152
               timeInSecForIosWeb: 1,
153 153
               textColor: Colors.white,
154
-              fontSize: 16.0);
154
+              fontSize: 16.0);*/
155 155
         });
156 156
         loading.hide();
157 157
       }
@@ -390,7 +390,9 @@ class _SlipGajiScreenState extends State<SlipGajiScreen> {
390 390
                       child: Container(
391 391
                         alignment: Alignment.centerRight,
392 392
                         child: ElevatedButton(
393
-                          onPressed: () {},
393
+                          onPressed: () {
394
+                            DownloadSlipGaji_Post.connectToAPI(batch_id).then((value) => null)
395
+                          },
394 396
                           style: ElevatedButton.styleFrom(),
395 397
                           child: Text('Download Slip Gaji'),
396 398
                         ),

+ 1161
- 0
lib/Screens/Menu/SuratTugas/pengajuan_extendTanggalKembali.dart
文件差异内容过多而无法显示
查看文件


+ 1161
- 0
lib/Screens/Menu/SuratTugas/pengajuan_uangMukaTambahan.dart
文件差异内容过多而无法显示
查看文件


+ 2
- 1
lib/Screens/Splash/splash_screen.dart 查看文件

@@ -54,9 +54,10 @@ class SplashScreen extends StatelessWidget {
54 54
               begin: Alignment.topRight,
55 55
               end: Alignment.bottomRight,
56 56
               colors: [
57
+                Color(0xFF4858A7),
57 58
                 Color(0xFF4858A7),
58 59
                 Color(0xFF6474C6),
59
-                Color(0xFF8C99DD),
60
+                //Color(0xFF8C99DD),
60 61
                 //Color(0xFFFFFFFF)
61 62
           ])),
62 63
       child: Center(

+ 0
- 0
lib/noInternetConnection.dart 查看文件


+ 42
- 42
pubspec.lock 查看文件

@@ -5,10 +5,10 @@ packages:
5 5
     dependency: transitive
6 6
     description:
7 7
       name: _flutterfire_internals
8
-      sha256: "3ff770dfff04a67b0863dff205a0936784de1b87a5e99b11c693fc10e66a9ce3"
8
+      sha256: "6215ac7d00ed98300b72f45ed2b38c2ca841f9f4e6965fab33cbd591e45e4473"
9 9
       url: "https://pub.dev"
10 10
     source: hosted
11
-    version: "1.0.12"
11
+    version: "1.0.13"
12 12
   animated_splash_screen:
13 13
     dependency: "direct main"
14 14
     description:
@@ -37,10 +37,10 @@ packages:
37 37
     dependency: transitive
38 38
     description:
39 39
       name: args
40
-      sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611"
40
+      sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440"
41 41
       url: "https://pub.dev"
42 42
     source: hosted
43
-    version: "2.3.2"
43
+    version: "2.4.0"
44 44
   async:
45 45
     dependency: "direct main"
46 46
     description:
@@ -101,18 +101,18 @@ packages:
101 101
     dependency: "direct main"
102 102
     description:
103 103
       name: connectivity_plus
104
-      sha256: "745ebcccb1ef73768386154428a55250bc8d44059c19fd27aecda2a6dc013a22"
104
+      sha256: "8875e8ed511a49f030e313656154e4bbbcef18d68dfd32eb853fac10bce48e96"
105 105
       url: "https://pub.dev"
106 106
     source: hosted
107
-    version: "3.0.2"
107
+    version: "3.0.3"
108 108
   connectivity_plus_platform_interface:
109 109
     dependency: transitive
110 110
     description:
111 111
       name: connectivity_plus_platform_interface
112
-      sha256: b8795b9238bf83b64375f63492034cb3d8e222af4d9ce59dda085edf038fa06f
112
+      sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a
113 113
       url: "https://pub.dev"
114 114
     source: hosted
115
-    version: "1.2.3"
115
+    version: "1.2.4"
116 116
   convert:
117 117
     dependency: transitive
118 118
     description:
@@ -125,10 +125,10 @@ packages:
125 125
     dependency: transitive
126 126
     description:
127 127
       name: cross_file
128
-      sha256: f71079978789bc2fe78d79227f1f8cfe195b31bbd8db2399b0d15a4b96fb843b
128
+      sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9"
129 129
       url: "https://pub.dev"
130 130
     source: hosted
131
-    version: "0.3.3+2"
131
+    version: "0.3.3+4"
132 132
   crypto:
133 133
     dependency: transitive
134 134
     description:
@@ -165,10 +165,10 @@ packages:
165 165
     dependency: "direct main"
166 166
     description:
167 167
       name: device_info_plus
168
-      sha256: "7ff671ed0a6356fa8f2e1ae7d3558d3fb7b6a41e24455e4f8df75b811fb8e4ab"
168
+      sha256: "1d6e5a61674ba3a68fb048a7c7b4ff4bebfed8d7379dbe8f2b718231be9a7c95"
169 169
       url: "https://pub.dev"
170 170
     source: hosted
171
-    version: "8.0.0"
171
+    version: "8.1.0"
172 172
   device_info_plus_platform_interface:
173 173
     dependency: transitive
174 174
     description:
@@ -229,50 +229,50 @@ packages:
229 229
     dependency: "direct main"
230 230
     description:
231 231
       name: firebase_core
232
-      sha256: c129209ba55f3d4272c89fb4a4994c15bea77fb6de63a82d45fb6bc5c94e4355
232
+      sha256: be13e431c0c950f0fc66bdb67b41b8059121d7e7d8bbbc21fb59164892d561f8
233 233
       url: "https://pub.dev"
234 234
     source: hosted
235
-    version: "2.4.1"
235
+    version: "2.5.0"
236 236
   firebase_core_platform_interface:
237 237
     dependency: transitive
238 238
     description:
239 239
       name: firebase_core_platform_interface
240
-      sha256: "5fab93f5b354648efa62e7cc829c90efb68c8796eecf87e0888cae2d5f3accd4"
240
+      sha256: "5615b30c36f55b2777d0533771deda7e5730e769e5d3cb7fda79e9bed86cfa55"
241 241
       url: "https://pub.dev"
242 242
     source: hosted
243
-    version: "4.5.2"
243
+    version: "4.5.3"
244 244
   firebase_core_web:
245 245
     dependency: transitive
246 246
     description:
247 247
       name: firebase_core_web
248
-      sha256: "18b35ce111b0a4266abf723c825bcf9d4e2519d13638cc7f06f2a8dd960c75bc"
248
+      sha256: "4b3a41410f3313bb95fd560aa5eb761b6ad65c185de772c72231e8b4aeed6d18"
249 249
       url: "https://pub.dev"
250 250
     source: hosted
251
-    version: "2.1.0"
251
+    version: "2.1.1"
252 252
   firebase_messaging:
253 253
     dependency: "direct main"
254 254
     description:
255 255
       name: firebase_messaging
256
-      sha256: dc010a6436333029fba858415fe65887c3fe44d8f6e6ea162bb8d3dd764fbcb6
256
+      sha256: dbccddc62fef6f3745ba83062bfd1fbf2eb6a931db4c73d03f85c5772dfdec7f
257 257
       url: "https://pub.dev"
258 258
     source: hosted
259
-    version: "14.2.1"
259
+    version: "14.2.2"
260 260
   firebase_messaging_platform_interface:
261 261
     dependency: transitive
262 262
     description:
263 263
       name: firebase_messaging_platform_interface
264
-      sha256: abda2d766486096eb1c568c7b20aef46180596c8b0708190b929133ff03e0a8d
264
+      sha256: "564a47ea76db9cd2d17e7d95790428ad3de9d0075795d14c4c901ba0bf518e1a"
265 265
       url: "https://pub.dev"
266 266
     source: hosted
267
-    version: "4.2.10"
267
+    version: "4.2.11"
268 268
   firebase_messaging_web:
269 269
     dependency: transitive
270 270
     description:
271 271
       name: firebase_messaging_web
272
-      sha256: "7a0ce957bd2210e8636325152234728874dad039f1c7271ba1be5c752fdc5888"
272
+      sha256: "76291494583a003d4ce0d613c41cb87c58fab25773317daa66a245f537e1c3f7"
273 273
       url: "https://pub.dev"
274 274
     source: hosted
275
-    version: "3.2.11"
275
+    version: "3.2.12"
276 276
   flutter:
277 277
     dependency: "direct main"
278 278
     description: flutter
@@ -282,10 +282,10 @@ packages:
282 282
     dependency: "direct main"
283 283
     description:
284 284
       name: flutter_image
285
-      sha256: fa47ea2392de894efd41026b20c166af085d03077ddb8ac6dd73eb4c23bb97ca
285
+      sha256: "3161bf96fef90ec6d46a43879001d8a4c07aaa9d0aa2bd8ee85311f3b517e25f"
286 286
       url: "https://pub.dev"
287 287
     source: hosted
288
-    version: "4.1.4"
288
+    version: "4.1.5"
289 289
   flutter_launcher_icons:
290 290
     dependency: "direct main"
291 291
     description:
@@ -330,10 +330,10 @@ packages:
330 330
     dependency: "direct main"
331 331
     description:
332 332
       name: flutter_map_marker_cluster
333
-      sha256: a272a9f79ec4964272646a5ecad26108040ac2f489e58f1a28d67069b341c3f0
333
+      sha256: "793e68ccdb323f0e5059eecf3f8777892a9365186ab57c07ebe82e10ad7737ef"
334 334
       url: "https://pub.dev"
335 335
     source: hosted
336
-    version: "1.0.1"
336
+    version: "1.0.2"
337 337
   flutter_map_marker_popup:
338 338
     dependency: transitive
339 339
     description:
@@ -396,10 +396,10 @@ packages:
396 396
     dependency: "direct main"
397 397
     description:
398 398
       name: fluttertoast
399
-      sha256: "7cc92eabe01e3f1babe1571c5560b135dfc762a34e41e9056881e2196b178ec1"
399
+      sha256: "774fa28b07f3a82c93596bc137be33189fec578ed3447a93a5a11c93435de394"
400 400
       url: "https://pub.dev"
401 401
     source: hosted
402
-    version: "8.1.2"
402
+    version: "8.1.3"
403 403
   focus_detector:
404 404
     dependency: "direct main"
405 405
     description:
@@ -548,10 +548,10 @@ packages:
548 548
     dependency: transitive
549 549
     description:
550 550
       name: image_picker_android
551
-      sha256: b1cbfec0f5aef427a18eb573f5445af8c9c568626bf3388553e40c263d3f7368
551
+      sha256: "385f12ee9c7288575572c7873a332016ec45ebd092e1c2f6bd421b4a9ad21f1d"
552 552
       url: "https://pub.dev"
553 553
     source: hosted
554
-    version: "0.8.5+5"
554
+    version: "0.8.5+6"
555 555
   image_picker_for_web:
556 556
     dependency: transitive
557 557
     description:
@@ -564,10 +564,10 @@ packages:
564 564
     dependency: transitive
565 565
     description:
566 566
       name: image_picker_ios
567
-      sha256: "39c013200046d14c58b71dc4fa3d00e425fc9c699d589136cd3ca018727c0493"
567
+      sha256: "8ffb14b43713d7c43fb21299cc18181cc5b39bd3ea1cc427a085c6400fe5aa52"
568 568
       url: "https://pub.dev"
569 569
     source: hosted
570
-    version: "0.8.6+6"
570
+    version: "0.8.6+7"
571 571
   image_picker_platform_interface:
572 572
     dependency: transitive
573 573
     description:
@@ -764,10 +764,10 @@ packages:
764 764
     dependency: transitive
765 765
     description:
766 766
       name: path_provider_linux
767
-      sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379
767
+      sha256: "2e32f1640f07caef0d3cb993680f181c79e54a3827b997d5ee221490d131fbd9"
768 768
       url: "https://pub.dev"
769 769
     source: hosted
770
-    version: "2.1.7"
770
+    version: "2.1.8"
771 771
   path_provider_platform_interface:
772 772
     dependency: transitive
773 773
     description:
@@ -892,10 +892,10 @@ packages:
892 892
     dependency: transitive
893 893
     description:
894 894
       name: shared_preferences_foundation
895
-      sha256: "1ffa239043ab8baf881ec3094a3c767af9d10399b2839020b9e4d44c0bb23951"
895
+      sha256: "2b55c18636a4edc529fa5cd44c03d3f3100c00513f518c5127c951978efcccd0"
896 896
       url: "https://pub.dev"
897 897
     source: hosted
898
-    version: "2.1.2"
898
+    version: "2.1.3"
899 899
   shared_preferences_linux:
900 900
     dependency: transitive
901 901
     description:
@@ -1025,10 +1025,10 @@ packages:
1025 1025
     dependency: "direct main"
1026 1026
     description:
1027 1027
       name: url_launcher
1028
-      sha256: "698fa0b4392effdc73e9e184403b627362eb5fbf904483ac9defbb1c2191d809"
1028
+      sha256: e8f2efc804810c0f2f5b485f49e7942179f56eabcfe81dce3387fec4bb55876b
1029 1029
       url: "https://pub.dev"
1030 1030
     source: hosted
1031
-    version: "6.1.8"
1031
+    version: "6.1.9"
1032 1032
   url_launcher_android:
1033 1033
     dependency: transitive
1034 1034
     description:
@@ -1041,10 +1041,10 @@ packages:
1041 1041
     dependency: transitive
1042 1042
     description:
1043 1043
       name: url_launcher_ios
1044
-      sha256: bb328b24d3bccc20bdf1024a0990ac4f869d57663660de9c936fb8c043edefe3
1044
+      sha256: "0a5af0aefdd8cf820dd739886efb1637f1f24489900204f50984634c07a54815"
1045 1045
       url: "https://pub.dev"
1046 1046
     source: hosted
1047
-    version: "6.0.18"
1047
+    version: "6.1.0"
1048 1048
   url_launcher_linux:
1049 1049
     dependency: transitive
1050 1050
     description:

+ 3
- 3
pubspec.yaml 查看文件

@@ -47,8 +47,6 @@ dependencies:
47 47
   intl: ^0.17.0
48 48
   dio: ^4.0.6
49 49
   get_it: ^7.2.0
50
-  firebase_messaging: ^14.1.3
51
-  flutter_local_notifications: ^13.0.0
52 50
   shared_preferences: ^2.0.15
53 51
   # device_information: ^0.0.4
54 52
   device_imei: ^0.0.2
@@ -80,11 +78,13 @@ dependencies:
80 78
   flutter_map_marker_cluster: ^1.0.1
81 79
   flutter_polyline_points: ^1.0.0
82 80
   provider: ^6.0.5
83
-  connectivity_plus: ^3.0.2
81
+  connectivity_plus: ^3.0.3
84 82
   internet_connection_checker: ^1.0.0+1
85 83
   #plain_notification_token: ^0.0.4
86 84
   focus_detector: ^2.0.1
87 85
   firebase_core: ^2.4.1
86
+  flutter_local_notifications: ^13.0.0
87
+  firebase_messaging: ^14.1.3
88 88
 
89 89
 dev_dependencies:
90 90
   flutter_test:

正在加载...
取消
保存