dienianindya před 1 rokem
rodič
revize
3defa2f3d1

+ 0
- 39
android/app/google-services.json Zobrazit soubor

@@ -1,39 +0,0 @@
1
-{
2
-  "project_info": {
3
-    "project_number": "476641837995",
4
-    "project_id": "employee-self-service-8280b",
5
-    "storage_bucket": "employee-self-service-8280b.appspot.com"
6
-  },
7
-  "client": [
8
-    {
9
-      "client_info": {
10
-        "mobilesdk_app_id": "1:476641837995:android:667f14658e56d0350e08ee",
11
-        "android_client_info": {
12
-          "package_name": "com.urp.hris"
13
-        }
14
-      },
15
-      "oauth_client": [
16
-        {
17
-          "client_id": "476641837995-sggr0a4kamrivljkugc8392sobp4jq4d.apps.googleusercontent.com",
18
-          "client_type": 3
19
-        }
20
-      ],
21
-      "api_key": [
22
-        {
23
-          "current_key": "AIzaSyDKZ2NozLQUpWeH2Cv17kuJz1f_MsG-p1Y"
24
-        }
25
-      ],
26
-      "services": {
27
-        "appinvite_service": {
28
-          "other_platform_oauth_client": [
29
-            {
30
-              "client_id": "476641837995-sggr0a4kamrivljkugc8392sobp4jq4d.apps.googleusercontent.com",
31
-              "client_type": 3
32
-            }
33
-          ]
34
-        }
35
-      }
36
-    }
37
-  ],
38
-  "configuration_version": "1"
39
-}

+ 0
- 40
android/app/google-services_lama.json Zobrazit soubor

@@ -1,40 +0,0 @@
1
-{
2
-  "project_info": {
3
-    "project_number": "372840384875",
4
-    "firebase_url": "https://gsi---employee-self-service-default-rtdb.asia-southeast1.firebasedatabase.app",
5
-    "project_id": "gsi---employee-self-service",
6
-    "storage_bucket": "gsi---employee-self-service.appspot.com"
7
-  },
8
-  "client": [
9
-    {
10
-      "client_info": {
11
-        "mobilesdk_app_id": "1:372840384875:android:cbf80d0700f53d3ffd642e",
12
-        "android_client_info": {
13
-          "package_name": "com.example.hris_selfservice_mobile"
14
-        }
15
-      },
16
-      "oauth_client": [
17
-        {
18
-          "client_id": "372840384875-6pj63n6au94f00vr8lirqgvo9i82lvh0.apps.googleusercontent.com",
19
-          "client_type": 3
20
-        }
21
-      ],
22
-      "api_key": [
23
-        {
24
-          "current_key": "AIzaSyDUzNWQ2cvWrL77QHekf_FASfMb5KTDnuY"
25
-        }
26
-      ],
27
-      "services": {
28
-        "appinvite_service": {
29
-          "other_platform_oauth_client": [
30
-            {
31
-              "client_id": "372840384875-6pj63n6au94f00vr8lirqgvo9i82lvh0.apps.googleusercontent.com",
32
-              "client_type": 3
33
-            }
34
-          ]
35
-        }
36
-      }
37
-    }
38
-  ],
39
-  "configuration_version": "1"
40
-}

binární
android/app/src/main/res/drawable/logo.png Zobrazit soubor


binární
assets/icons/menu/ic_about.png Zobrazit soubor


binární
assets/icons/menu/ic_about_2.png Zobrazit soubor


binární
assets/icons/menu/ic_slipgaji.png Zobrazit soubor


binární
assets/icons/menu/ic_surattugas.png Zobrazit soubor


binární
ess_keystore.jks Zobrazit soubor


+ 0
- 58
lib/NotificationService/local_notification_service.dart Zobrazit soubor

@@ -1,58 +0,0 @@
1
-import 'package:firebase_messaging/firebase_messaging.dart';
2
-import 'package:flutter/material.dart';
3
-import 'package:flutter_local_notifications/flutter_local_notifications.dart';
4
-
5
-import '../Screens/Settings/settings_screen.dart';
6
-
7
-class LocalNotificationService{
8
-  static final FlutterLocalNotificationsPlugin _notificationsPlugin = FlutterLocalNotificationsPlugin();
9
-
10
-  static void initialize() {
11
-    // initializationSettings  for Android
12
-    const InitializationSettings initializationSettings = InitializationSettings(
13
-      android: AndroidInitializationSettings("@mipmap/ic_launcher"),
14
-    );
15
-
16
-    _notificationsPlugin.initialize(initializationSettings, onDidReceiveNotificationResponse:  (details) {
17
-      print("onSelectNotification");
18
-        var context;
19
-        Navigator.push(context as BuildContext, MaterialPageRoute(
20
-                builder: (context) => SettingsScreen()));
21
-
22
-      },
23
-    );
24
-    _notificationsPlugin.initialize(initializationSettings, onDidReceiveBackgroundNotificationResponse:  (details) {
25
-      print("onSelectNotification-Background");
26
-      var context;
27
-      Navigator.push(context as BuildContext, MaterialPageRoute(
28
-          builder: (context) => SettingsScreen()));
29
-    },);
30
-  }
31
-
32
-  static void createanddisplaynotification(RemoteMessage message) async {
33
-    try {
34
-      final id = DateTime.now().millisecondsSinceEpoch ~/ 1000;
35
-      const NotificationDetails notificationDetails = NotificationDetails(
36
-        android: AndroidNotificationDetails(
37
-          "pushnotificationapp",
38
-          "pushnotificationappchannel",
39
-          //icon: "@mipmap/ic_launcher",
40
-          largeIcon: DrawableResourceAndroidBitmap('assets/images/sindi_icon.png'),
41
-          enableVibration: true,
42
-          importance: Importance.max,
43
-          priority: Priority.high,
44
-        ),
45
-      );
46
-
47
-      await _notificationsPlugin.show(
48
-        id,
49
-        message.notification!.title,
50
-        message.notification!.body,
51
-        notificationDetails,
52
-        payload: message.data['_id'],
53
-      );
54
-    } on Exception catch (e) {
55
-      print(e);
56
-    }
57
-  }
58
-}

+ 0
- 10
lib/Screens/Menu/Berita/berita_screen.dart Zobrazit soubor

@@ -1,10 +0,0 @@
1
-import 'package:flutter/material.dart';
2
-
3
-class BeritaScreen extends StatelessWidget {
4
-  const BeritaScreen({Key? key}) : super(key: key);
5
-
6
-  @override
7
-  Widget build(BuildContext context) {
8
-    return Container();
9
-  }
10
-}

+ 0
- 36
lib/Screens/Menu/SuratTugas/RequestHttp/detailST_post.dart Zobrazit soubor

@@ -1,36 +0,0 @@
1
-import 'dart:convert';
2
-import 'dart:core';
3
-import 'package:http/http.dart' as http;
4
-import 'package:employee_selfservice_mobile/constants.dart';
5
-import 'dart:developer' as developer;
6
-
7
-import 'package:shared_preferences/shared_preferences.dart';
8
-
9
-class DetailST_Post {
10
-  late String id;
11
-  late String session;
12
-
13
-  DetailST_Post({required this.session});
14
-
15
-  static Future<String> connectToAPI(String id) async {
16
-    String URL = baseURL + "/api/v1/detail_st";
17
-
18
-    final SharedPreferences prefs = await SharedPreferences.getInstance();
19
-    final session = prefs.getString('session');
20
-
21
-    var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
22
-      "data": [
23
-        {
24
-          "id" : id,
25
-          "session": session
26
-        }
27
-      ]
28
-    }), headers: {
29
-      "Content-Type": "application/json",
30
-      "Api-key": apiKey
31
-    });
32
-
33
-    developer.log(sendData.body, name: "Detail ST Result");
34
-    return sendData.body;
35
-  }
36
-}

+ 0
- 34
lib/Screens/Menu/SuratTugas/RequestHttp/historyST_post.dart Zobrazit soubor

@@ -1,34 +0,0 @@
1
-import 'dart:convert';
2
-import 'dart:core';
3
-import 'package:http/http.dart' as http;
4
-import 'package:employee_selfservice_mobile/constants.dart';
5
-import 'dart:developer' as developer;
6
-
7
-import 'package:shared_preferences/shared_preferences.dart';
8
-
9
-class HistoryST_Post {
10
-  late String session;
11
-
12
-  HistoryST_Post({required this.session});
13
-
14
-  static Future<String> connectToAPI() async {
15
-    String URL = baseURL + "/api/v1/history_st";
16
-
17
-    final SharedPreferences prefs = await SharedPreferences.getInstance();
18
-    final session = prefs.getString('session');
19
-
20
-    var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
21
-      "data": [
22
-        {
23
-          "session": session
24
-        }
25
-      ]
26
-    }), headers: {
27
-      "Content-Type": "application/json",
28
-      "Api-key": apiKey
29
-    });
30
-
31
-    //developer.log(sendData.body, name: "Get History ST Result");
32
-    return sendData.body;
33
-  }
34
-}

+ 0
- 62
lib/Screens/Menu/SuratTugas/RequestHttp/pengajuanST_post.dart Zobrazit soubor

@@ -1,62 +0,0 @@
1
-import 'dart:convert';
2
-import 'dart:core';
3
-import 'package:http/http.dart' as http;
4
-import 'package:employee_selfservice_mobile/constants.dart';
5
-import 'dart:developer' as developer;
6
-
7
-import 'package:shared_preferences/shared_preferences.dart';
8
-
9
-class PengajuanST_Post {
10
-  late String session;
11
-  late String tanggal_st;
12
-  late String uang_muka;
13
-  late String keperluan;
14
-  late String tanggal_berangkat;
15
-  late String tanggal_kembali;
16
-  late String tujuan;
17
-  late String ticket_type;
18
-  late String ticket_from;
19
-  late String ticket_to;
20
-  late String date;
21
-  late String harga;
22
-
23
-  PengajuanST_Post({required this.session});
24
-
25
-  static Future<String> connectToAPI(String tanggal_st, String uang_muka, String keperluan,
26
-      String tanggal_berangkat, String tanggal_kembali, String tujuan, String ticket_type,
27
-      String ticket_from, String ticket_to, String date, String harga) async {
28
-    String URL = baseURL + "/api/v1/pengajuan_st";
29
-
30
-    final SharedPreferences prefs = await SharedPreferences.getInstance();
31
-    final session = prefs.getString('session');
32
-
33
-    var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
34
-      "data": [
35
-        {
36
-          "tanggal_st" : tanggal_st,
37
-          "uang_muka" : uang_muka,
38
-          "keperluan" : keperluan,
39
-          "tanggal_berangkat" : tanggal_berangkat,
40
-          "tanggal_kembali" : tanggal_kembali,
41
-          "tujuan" : tujuan,
42
-          "tiketnya" : [
43
-            {
44
-              "ticket_type" : ticket_type,
45
-              "ticket_from" : ticket_from,
46
-              "ticket_to" : ticket_to,
47
-              "date" : date,
48
-              "harga" : harga
49
-            }
50
-          ],
51
-          "session" : "fsfssdfsdfsdf"
52
-        }
53
-      ]
54
-    }), headers: {
55
-      "Content-Type": "application/json",
56
-      "Api-key": apiKey
57
-    });
58
-
59
-    //developer.log(sendData.body, name: "Get Jenis Cuti Result");
60
-    return sendData.body;
61
-  }
62
-}

+ 0
- 516
lib/Screens/Menu/SuratTugas/deklarasi_st.dart Zobrazit soubor

@@ -1,516 +0,0 @@
1
-import 'dart:convert';
2
-import 'dart:io';
3
-import 'package:file_picker/file_picker.dart';
4
-import 'package:flutter/cupertino.dart';
5
-import 'package:flutter/material.dart';
6
-import 'package:fluttertoast/fluttertoast.dart';
7
-import 'package:google_fonts/google_fonts.dart';
8
-import 'package:employee_selfservice_mobile/Screens/Menu/SuratTugas/RequestHttp/pengajuanST_post.dart';
9
-import 'package:intl/intl.dart';
10
-import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
11
-
12
-import 'dart:developer' as logDev;
13
-import '../SlipGaji/background.dart';
14
-
15
-List<String> fileAttach = [""];
16
-TextEditingController keperluanTeksController = TextEditingController();
17
-TextEditingController tujuanTeksController = TextEditingController();
18
-TextEditingController uangMukaTeksController = TextEditingController();
19
-TextEditingController ticketFromTeksController = TextEditingController();
20
-TextEditingController ticketToTeksController = TextEditingController();
21
-TextEditingController ticketPriceTeksController = TextEditingController();
22
-
23
-
24
-class DeklarasiST_Screen extends StatefulWidget {
25
-  const DeklarasiST_Screen({Key? key}) : super(key: key);
26
-
27
-  @override
28
-  State<DeklarasiST_Screen> createState() => _DeklarasiST_Screen_State();
29
-}
30
-
31
-class _DeklarasiST_Screen_State extends State<DeklarasiST_Screen> {
32
-  String _fileText = "";
33
-  String _totalFile= "";
34
-
35
-  bool visibleDateST = false;
36
-  bool visibleDateDeparture = false;
37
-  bool visibleDateReturn = false;
38
-  bool visibleDateTicket = false;
39
-
40
-  DateTime dateFrom = DateTime.now();
41
-
42
-  late String formattedDateST = "";
43
-  late String formattedDateDeparture = "";
44
-  late String formattedDateReturn = "";
45
-  late String formattedDateTicket = "";
46
-
47
-  late String kendaraan;
48
-
49
-  var selectedTicketType;
50
-
51
-  initState(){
52
-    keperluanTeksController.clear();
53
-    tujuanTeksController.clear();
54
-    uangMukaTeksController.clear();
55
-    super.initState();
56
-  }
57
-
58
-  @override
59
-  Widget build(BuildContext context) {
60
-    var size = MediaQuery.of(context).size;
61
-    return Scaffold(
62
-      body: SingleChildScrollView(
63
-          child: Column(
64
-            children: <Widget>[
65
-              Stack(
66
-                children: [
67
-                  WavyHeader(),
68
-                  Container(
69
-                      margin: EdgeInsets.only(top: MediaQuery.of(context).size.height/6 - 20),
70
-                      padding: EdgeInsets.fromLTRB(20, 5, 25, 5),
71
-                      child: Row(
72
-                        mainAxisAlignment: MainAxisAlignment.end,
73
-                        crossAxisAlignment: CrossAxisAlignment.end,
74
-                        children: [
75
-                          Text(
76
-                            'Declaration of\nAssignment Letter\t\t',
77
-                            maxLines: 2,
78
-                            style: GoogleFonts.luckiestGuy(
79
-                              fontSize: 28,
80
-                              color: Color(0xFF4858A7),
81
-                              fontStyle: FontStyle.italic,
82
-                            ),
83
-                          ),
84
-                          Image.asset('assets/images/submit_st.png',
85
-                            width: 40,
86
-                            height: 40,
87
-                          ),
88
-                        ],
89
-                      )),
90
-                  SafeArea(
91
-                    child: Container(
92
-                      width: MediaQuery.of(context).size.width,
93
-                      margin: EdgeInsets.only(
94
-                          top: MediaQuery.of(context).size.height / 5, left: 10, right: 10, bottom: 10
95
-                      ),
96
-                      child: Column(
97
-                        children: [
98
-                          Container(
99
-                            child: Card(
100
-                              elevation: 10,
101
-                              child: Container(
102
-                                decoration: BoxDecoration(
103
-                                    color: Color(0XFFFAF7EE),
104
-                                    borderRadius: BorderRadius.circular(10)),
105
-                                child: Column(
106
-                                  children: [
107
-                                    Container(
108
-                                      margin: EdgeInsets.only(
109
-                                          left: 10, right: 10, top: 15, bottom: 10),
110
-                                      child: Text('Declaration of Assignment Letter', style:
111
-                                      GoogleFonts.josefinSans(fontSize: 19, fontWeight: FontWeight.bold, decoration: TextDecoration.underline,
112
-                                          decorationStyle: TextDecorationStyle.dashed),),
113
-                                    ),
114
-                                    Container(
115
-                                      margin: EdgeInsets.only(
116
-                                          left: 10, right: 10, top: 10, bottom: 10),
117
-                                      child: Column(
118
-                                        children: [
119
-                                          Align(
120
-                                              alignment: Alignment.centerLeft,
121
-                                              child: Text(
122
-                                                'Total Amount',
123
-                                                style: GoogleFonts.inconsolata(
124
-                                                    fontSize: 16, fontWeight: FontWeight.bold),
125
-                                              )),
126
-                                          Container(
127
-                                            margin: EdgeInsets.only(top: 7),
128
-                                            decoration: BoxDecoration(
129
-                                                color: Colors.white,
130
-                                                borderRadius:
131
-                                                BorderRadius.circular(5)),
132
-                                            child: Padding(
133
-                                              padding: EdgeInsets.only(
134
-                                                  left: 10,
135
-                                                  right: 10,
136
-                                                  top: 5,
137
-                                                  bottom: 5),
138
-                                              child: TextFormField(
139
-                                                  keyboardType:
140
-                                                  TextInputType.multiline,
141
-                                                  maxLines: 1,
142
-                                                  textInputAction:
143
-                                                  TextInputAction.next,
144
-                                                  controller: keperluanTeksController,
145
-                                                  decoration: InputDecoration(
146
-                                                      border:
147
-                                                      InputBorder.none,
148
-                                                      hintText: "ex. 2500750")),
149
-                                            )
150
-                                          )
151
-                                        ],
152
-                                      ),
153
-                                    ),
154
-                                    Container(
155
-                                      margin: EdgeInsets.only(
156
-                                          left: 10, right: 10, top: 10, bottom: 10),
157
-                                      child: Column(
158
-                                        children: [
159
-                                          Align(
160
-                                              alignment: Alignment.centerLeft,
161
-                                              child: Text(
162
-                                                'Description',
163
-                                                style: GoogleFonts.inconsolata(
164
-                                                    fontSize: 16, fontWeight: FontWeight.bold),
165
-                                              )),
166
-                                          Container(
167
-                                            margin: EdgeInsets.only(top: 7),
168
-                                            decoration: BoxDecoration(
169
-                                                color: Colors.white,
170
-                                                borderRadius:
171
-                                                BorderRadius.circular(5)),
172
-                                            child: Padding(
173
-                                              padding: EdgeInsets.only(
174
-                                                  left: 10,
175
-                                                  right: 10,
176
-                                                  top: 5,
177
-                                                  bottom: 5),
178
-                                              child: TextFormField(
179
-                                                  keyboardType:
180
-                                                  TextInputType.multiline,
181
-                                                  maxLines: null,
182
-                                                  textInputAction:
183
-                                                  TextInputAction.next,
184
-                                                  controller: tujuanTeksController,
185
-                                                  decoration: InputDecoration(
186
-                                                      border:
187
-                                                      InputBorder.none,
188
-                                                      hintText: "description")),
189
-                                            )
190
-                                          )
191
-                                        ],
192
-                                      ),
193
-                                    ),
194
-                                    Container(
195
-                                      margin: EdgeInsets.only(
196
-                                          left: 10, right: 10, top: 10),
197
-                                      child: Column(
198
-                                        children: [
199
-                                          Align(
200
-                                            alignment: Alignment.centerLeft,
201
-                                            child: Text(
202
-                                              'Attachment',
203
-                                              style: GoogleFonts.inconsolata(
204
-                                                  fontSize: 16, fontWeight: FontWeight.bold),
205
-                                            ),
206
-                                          ),
207
-                                          ElevatedButton(
208
-                                            onPressed: () {
209
-                                              _pickMultipleFiles();
210
-                                            },
211
-                                            /*style: ElevatedButton.styleFrom(
212
-                                                    backgroundColor:
213
-                                                        CupertinoColors
214
-                                                            .systemGrey2),*/
215
-                                            child: Container(
216
-                                              width: double.infinity,
217
-                                              child: Text("Choose File",
218
-                                                  style: TextStyle(
219
-                                                      color: Colors.white,
220
-                                                      fontSize: 16,
221
-                                                      fontWeight:
222
-                                                      FontWeight.w400)),
223
-                                            ),
224
-                                          ),
225
-                                          Container(
226
-                                            alignment:
227
-                                            Alignment.centerLeft,
228
-                                            margin: EdgeInsets.only(
229
-                                                left: 15,
230
-                                                right: 15,
231
-                                                bottom: 10),
232
-                                            child: Text(_totalFile + _fileText,
233
-                                              overflow:
234
-                                              TextOverflow.ellipsis,
235
-                                              /*maxLines: 7,*/
236
-                                              style: TextStyle(
237
-                                                  color: Colors.black54),
238
-                                            ),
239
-                                          ),
240
-                                        ],
241
-                                      ),
242
-                                    ),
243
-                                    InkWell(
244
-                                      child: Container(
245
-                                        margin: EdgeInsets.only(left: 10, right: 10, bottom: 15),
246
-                                        padding: EdgeInsets.fromLTRB(
247
-                                            10, 10, 10, 10),
248
-                                        width: double.infinity,
249
-                                        decoration: BoxDecoration(
250
-                                            borderRadius:
251
-                                            BorderRadius.circular(5),
252
-                                            gradient: LinearGradient(colors: [
253
-                                              Color(0xFFFF9945),
254
-                                              Color(0xFFFc6076)
255
-                                            ])),
256
-                                        child: Text('Submit',
257
-                                            textAlign: TextAlign.center,
258
-                                            style: TextStyle(
259
-                                                color: Colors.white,
260
-                                                fontSize: 17,
261
-                                                fontWeight: FontWeight.w500)),
262
-                                      ),
263
-                                      onTap: () {
264
-                                        ProgressDialog loading = ProgressDialog(context);
265
-                                        loading = ProgressDialog(context,
266
-                                            type: ProgressDialogType.normal, isDismissible: false, showLogs: true);
267
-                                        loading.style(
268
-                                            message: 'Please Wait .....',
269
-                                            borderRadius: 3,
270
-                                            backgroundColor: Colors.white,
271
-                                            progressWidget: CircularProgressIndicator(),
272
-                                            elevation: 10.0,
273
-                                            padding: EdgeInsets.all(10),
274
-                                            insetAnimCurve: Curves.easeInOut,
275
-                                            progress: 0.0,
276
-                                            maxProgress: 100.0,
277
-                                            progressTextStyle: TextStyle(
278
-                                                color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
279
-                                            messageTextStyle: TextStyle(
280
-                                                color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
281
-
282
-                                        //await loading.show();
283
-
284
-                                        /*if (!validateFormCuti(context)){
285
-                                                return;
286
-                                              } else if (validateFormCuti(context)){
287
-                                                await loading.show();
288
-                                                PengajuanCuti_Post.connectToAPI(idCuti, formattedDateFrom,
289
-                                                    formattedDateTo, deskripsiTeksController.text.toString(), fileAttach)
290
-                                                    .then((valueResult) async {
291
-                                                  Map<String, dynamic> object = json.decode(valueResult);
292
-                                                  logDev.log(fileAttach.toString(), name: "Attachment File Upload");
293
-                                                  if (object.containsKey("result").toString() == "true") {
294
-                                                    *//*String employee = object['result']['employee'].toString();
295
-                                              String tipe = object['result']['tipe'].toString();
296
-                                              String from = object['result']['from'].toString();
297
-                                              String to = object['result']['to'].toString();
298
-                                              String deskripsi = object['result']['deskripsi'].toString();
299
-                                              String attachment = object['result']['attachment'].toString();*//*
300
-                                                    await loading.hide();
301
-                                                    deskripsiTeksController.clear();
302
-                                                    Widget okButton = TextButton(
303
-                                                      child: Text("OK"),
304
-                                                      onPressed: () {
305
-                                                        Navigator.of(context, rootNavigator: true).pop();
306
-                                                        Navigator.pushReplacement(context, MaterialPageRoute(
307
-                                                            builder: (context) => AjukanCutiScreen()));
308
-                                                      },
309
-                                                    );
310
-
311
-                                                    // set up the AlertDialog
312
-                                                    AlertDialog alert = AlertDialog(
313
-                                                      title: Text("Employee Self Service"),
314
-                                                      content: Text("Success Submit Time Off"),
315
-                                                      actions: [
316
-                                                        okButton,
317
-                                                      ],
318
-                                                    );
319
-
320
-                                                    // show the dialog
321
-                                                    showDialog(
322
-                                                      context: context,
323
-                                                      builder: (BuildContext context) {
324
-                                                        return alert;
325
-                                                      },
326
-                                                    );
327
-                                                    *//* deskripsiTeksController.clear();
328
-                                                formattedDateFrom = "";
329
-                                                formattedDateTo = "";
330
-                                                visibleDateFrom = false;
331
-                                                visibleDateFrom = false;*//*
332
-                                                  } else if (object.containsKey("error").toString() == "true") {
333
-                                                    String errorMessage = object['error']['data']['message']
334
-                                                        .toString();
335
-                                                    await loading.hide();
336
-                                                    Widget okButton = TextButton(
337
-                                                      child: Text("OK"),
338
-                                                      onPressed: () {
339
-                                                        Navigator.of(context, rootNavigator: true).pop();
340
-                                                      },
341
-                                                    );
342
-
343
-                                                    // set up the AlertDialog
344
-                                                    AlertDialog alert = AlertDialog(
345
-                                                      title: Text("Employee Self Service"),
346
-                                                      content: Text(errorMessage),
347
-                                                      actions: [
348
-                                                        okButton,
349
-                                                      ],
350
-                                                    );
351
-
352
-                                                    // show the dialog
353
-                                                    showDialog(
354
-                                                      context: context,
355
-                                                      builder: (BuildContext context) {
356
-                                                        return alert;
357
-                                                      },
358
-                                                    );
359
-                                                  }
360
-                                                });
361
-                                              }*/
362
-                                      },
363
-                                    )
364
-                                  ],
365
-                                ),
366
-                              ),
367
-                            ),
368
-                          ),
369
-                        ],
370
-                      ),
371
-                    ),
372
-                  ),
373
-                ],
374
-              ),
375
-            ],
376
-          )),
377
-    );
378
-  }
379
-
380
-  void _pickMultipleFiles() async {
381
-    FilePickerResult? result = await FilePicker.platform.pickFiles(allowMultiple: true);
382
-
383
-    if (_fileText != ""){
384
-      _fileText = "";
385
-    }
386
-
387
-    if (result != null) {
388
-      List<File> files = result.paths.map((path) => File(path!)).toList();
389
-      for (int i = 0; i< files.length; i++){
390
-        String fileName = files[i].path.split('/').last;
391
-        _fileText = _fileText + "\n" + fileName;
392
-
393
-        List<int> fileInBytes = files[i].readAsBytesSync();
394
-        String toBase64 = base64Encode(fileInBytes);
395
-        fileAttach.add(toBase64);
396
-      }
397
-      fileAttach.removeAt(0);
398
-      logDev.log(fileAttach.length.toString(), name: "Length File Attach");
399
-      logDev.log(files.toString(), name: "Files Picked");
400
-
401
-      setState(() {
402
-        _fileText;
403
-        _totalFile = "Total File : " + files.length.toString();
404
-      });
405
-    } else {
406
-      // User canceled the picker
407
-    }
408
-  }
409
-
410
-  bool validateFormPengajuanST (BuildContext context) {
411
-    bool result = true;
412
-
413
-    if (formattedDateST == "") {
414
-      Fluttertoast.showToast(
415
-          msg: "Assignment Letter Date\nNot Selected",
416
-          toastLength: Toast.LENGTH_SHORT,
417
-          gravity: ToastGravity.CENTER,
418
-          timeInSecForIosWeb: 1,
419
-          textColor: Colors.white,
420
-          fontSize: 16.0);
421
-      result = false;
422
-    } else if (keperluanTeksController.text.toString().isEmpty) {
423
-      Fluttertoast.showToast(
424
-          msg: "Description of Needs Required!",
425
-          toastLength: Toast.LENGTH_SHORT,
426
-          gravity: ToastGravity.CENTER,
427
-          timeInSecForIosWeb: 1,
428
-          textColor: Colors.white,
429
-          fontSize: 16.0);
430
-      result = false;
431
-    }
432
-    return result;
433
-  }
434
-}
435
-
436
-
437
-alertDialogFailedRetrievedData(BuildContext context){
438
-  Widget okButton = TextButton(
439
-    child: Text("Refresh"),
440
-    onPressed: () {
441
-      /*Navigator.of(context, rootNavigator: true).pop();
442
-      Navigator.pushReplacement(context, MaterialPageRoute(
443
-          builder: (context) => AjukanCutiScreen()));*/
444
-    },
445
-  );
446
-
447
-  Widget noButton = TextButton(
448
-    child: Text("Back"),
449
-    onPressed: () {
450
-      Navigator.of(context, rootNavigator: true).pop();
451
-      Navigator.pop(context);
452
-
453
-    },
454
-  );
455
-
456
-  // set up the AlertDialog
457
-  AlertDialog alert = AlertDialog(
458
-    title: Text("Employee Self Service"),
459
-    content: Text("Failed to Retrieve Data"),
460
-    actions: [
461
-      noButton,
462
-      okButton,
463
-    ],
464
-  );
465
-
466
-  // show the dialog
467
-  showDialog(
468
-    context: context,
469
-    builder: (BuildContext context) {
470
-      return alert;
471
-    },
472
-  );
473
-}
474
-
475
-alertDialogFailedResponse(BuildContext context){
476
-  Widget okButton = TextButton(
477
-    child: Text("Refresh"),
478
-    onPressed: () {
479
-      /* Navigator.of(context, rootNavigator: true).pop();
480
-      Navigator.pushReplacement(context, MaterialPageRoute(
481
-          builder: (context) => AjukanCutiScreen()));*/
482
-    },
483
-  );
484
-
485
-  Widget noButton = TextButton(
486
-    child: Text("Back"),
487
-    onPressed: () {
488
-      Navigator.of(context, rootNavigator: true).pop();
489
-      Navigator.pop(context);
490
-
491
-    },
492
-  );
493
-
494
-  // set up the AlertDialog
495
-  AlertDialog alert = AlertDialog(
496
-    title: Text("Employee Self Service"),
497
-    content: Text("Server Response Error"),
498
-    actions: [
499
-      noButton,
500
-      okButton,
501
-    ],
502
-  );
503
-
504
-  // show the dialog
505
-  showDialog(
506
-    context: context,
507
-    builder: (BuildContext context) {
508
-      return alert;
509
-    },
510
-  );
511
-}
512
-
513
-List<String> ticketType = [
514
-  "airplane",
515
-  "train"
516
-];

+ 0
- 382
lib/Screens/Menu/SuratTugas/history_st.dart Zobrazit soubor

@@ -1,382 +0,0 @@
1
-import 'dart:convert';
2
-import 'dart:ui';
3
-
4
-import 'package:flutter/material.dart';
5
-import 'package:fluttertoast/fluttertoast.dart';
6
-import 'package:google_fonts/google_fonts.dart';
7
-import 'package:employee_selfservice_mobile/Screens/Menu/SuratTugas/RequestHttp/detailST_post.dart';
8
-import 'package:employee_selfservice_mobile/Screens/Menu/SuratTugas/RequestHttp/historyST_post.dart';
9
-import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
10
-import 'dart:developer' as logDev;
11
-
12
-import '../AjukanCuti/backgroundHistory.dart';
13
-
14
-class HistoryST extends StatefulWidget {
15
-  const HistoryST({Key? key}) : super(key: key);
16
-
17
-  @override
18
-  State<HistoryST> createState() => _HistoryST();
19
-}
20
-
21
-class _HistoryST extends State<HistoryST> {
22
-  late List <String> id_List;
23
-  late List <String> number_List;
24
-  late List <String> keperluan_List;
25
-  late List <String> tglDibuat_List;
26
-  late List <String> status_List;
27
-
28
-  late List <String> tglST_List;
29
-  late List <String> uMuka_List;
30
-  late List <String> tglBerangkat_List;
31
-  late List <String> tglKembali_List;
32
-  late List <String> tujuan_List;
33
-
34
-  late List <String> ticketType_List;
35
-  late List <String> ticketFrom_List;
36
-  late List <String> ticketTo_List;
37
-  late List <String> ticketDate_List;
38
-  late List <String> ticketPrice_List;
39
-
40
-  late List <Color> statusColor;
41
-  late List <bool> visible;
42
-
43
-  int HistoryLength = 0;
44
-
45
-  @override
46
-  initState() {
47
-    id_List = [""];
48
-    number_List = [""];
49
-    keperluan_List = [""];
50
-    tglDibuat_List = [""];
51
-    status_List = [""];
52
-
53
-    tglST_List = [""];
54
-    uMuka_List = [""];
55
-    tglBerangkat_List = [""];
56
-    tglKembali_List = [""];
57
-    tujuan_List = [""];
58
-
59
-    ticketType_List = [""];
60
-    ticketFrom_List = [""];
61
-    ticketTo_List = [""];
62
-    ticketDate_List = [""];
63
-    ticketPrice_List = [""];
64
-
65
-    statusColor = [Colors.black54];
66
-    visible = [false];
67
-
68
-    WidgetsBinding.instance.addPostFrameCallback((_) async {
69
-      getHistoryData();
70
-    });
71
-  }
72
-
73
-  getHistoryData() async {
74
-    ProgressDialog loading = ProgressDialog(context);
75
-    loading = ProgressDialog(context,
76
-        type: ProgressDialogType.normal, isDismissible: false, showLogs: true);
77
-    loading.style(
78
-        message: 'Please Wait .....',
79
-        borderRadius: 3,
80
-        backgroundColor: Colors.white,
81
-        progressWidget: CircularProgressIndicator(),
82
-        elevation: 10.0,
83
-        padding: EdgeInsets.all(10),
84
-        insetAnimCurve: Curves.easeInOut,
85
-        progress: 0.0,
86
-        maxProgress: 100.0,
87
-        progressTextStyle: TextStyle(
88
-            color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
89
-        messageTextStyle: TextStyle(
90
-            color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
91
-
92
-    await loading.show();
93
-    HistoryST_Post.connectToAPI().then((valueResult) async {
94
-      Map<String, dynamic> object = jsonDecode(valueResult);
95
-      if (object.containsKey("result").toString() == "true") {
96
-        String result = object['result'].toString();
97
-        if (result.contains("failed")) {
98
-          await loading.hide();
99
-          alertDialogFailedRetrievedData(context);
100
-        } else {
101
-          List <dynamic> historyST = object['result'];
102
-          setState(() async {
103
-            for (int i = 0; i < historyST.length; i++){
104
-              String id = historyST[i]['id'].toString();
105
-              String number = historyST[i]['number'].toString();
106
-              String keperluan = historyST[i]['keperluan'].toString();
107
-              String tglDibuat = historyST[i]['tgl_dibuat'].toString();
108
-              String status = historyST[i]['status'].toString();
109
-
110
-              id_List.add(id);
111
-              number_List.add(number);
112
-              keperluan_List.add(keperluan);
113
-              tglDibuat_List.add(tglDibuat);
114
-              status_List.add(status);
115
-              visible.add(false);
116
-
117
-              var statColor;
118
-              if (status == "draft"){
119
-                statColor = Colors.red;
120
-              } else if (status == "approved"){
121
-                statColor = Colors.green;
122
-              } else if (status == "advacanced"){
123
-                statColor = Colors.orangeAccent;
124
-              } else if (status == "done"){
125
-                statColor = Colors.blueAccent;
126
-              } else if (status == "close"){
127
-                statColor = Colors.deepPurple;
128
-              }
129
-              statusColor.add(statColor);
130
-            }
131
-
132
-            id_List.removeAt(0);
133
-            number_List.removeAt(0);
134
-            keperluan_List.removeAt(0);
135
-            tglDibuat_List.removeAt(0);
136
-            status_List.removeAt(0);
137
-
138
-            statusColor.removeAt(0);
139
-            visible.removeAt(0);
140
-
141
-            HistoryLength = historyST.length;
142
-            logDev.log(HistoryLength.toString(), name: "HISTORY LENGTH");
143
-
144
-            for (int i = 0; i < HistoryLength;i++){
145
-              DetailST_Post.connectToAPI(id_List[i]).then((valueResult) async {
146
-                Map<String, dynamic> object = jsonDecode(valueResult);
147
-                if (object.containsKey("result").toString() == "true") {
148
-                  String result = object['result'].toString();
149
-                  if (result.contains("failed")) {
150
-                    await loading.hide();
151
-                    alertDialogFailedRetrievedData(context);
152
-                  } else {
153
-                    List <dynamic> detailST = object['result'];
154
-                    await loading.hide();
155
-                    setState(() {
156
-                      for (int j = 0; j < HistoryLength; j++){
157
-                        String tglST = detailST[j]['tgl_st'].toString();
158
-                        String uMuka = detailST[j]['umuka'].toString();
159
-                        String tglBerangkat = detailST[j]['tgl_berangkat'].toString();
160
-                        String tglKembali = detailST[j]['tgl_kembali'].toString();
161
-                        String tujuan = detailST[j]['tujuan'].toString();
162
-
163
-                        List<dynamic> ticketID = object['result']['ticket_ids'];
164
-                        String ticketType = ticketID[j]['type'].toString();
165
-                        String ticketFrom = ticketID[j]['from'].toString();
166
-                        String ticketTo = ticketID[j]['to'].toString();
167
-                        String ticketDate = ticketID[j]['tgl'].toString();
168
-                        String ticketPrice = ticketID[j]['harga'].toString();
169
-
170
-                        tglST_List.add(tglST);
171
-                        uMuka_List.add(uMuka);
172
-                        tglBerangkat_List.add(tglBerangkat);
173
-                        tglKembali_List.add(tglKembali);
174
-                        tujuan_List.add(tujuan);
175
-
176
-                        ticketType_List.add(ticketType);
177
-                        ticketFrom_List.add(ticketFrom);
178
-                        ticketTo_List.add(ticketTo);
179
-                        ticketDate_List.add(ticketDate);
180
-                        ticketPrice_List.add(ticketPrice);
181
-
182
-                        logDev.log(tglST_List.toString(), name:"semua list");
183
-                      }
184
-                    });
185
-                  }
186
-                } else {
187
-                  Fluttertoast.showToast(
188
-                      msg: "Server Response Error",
189
-                      toastLength: Toast.LENGTH_SHORT,
190
-                      gravity: ToastGravity.CENTER,
191
-                      timeInSecForIosWeb: 1,
192
-                      textColor: Colors.white,
193
-                      fontSize: 16.0);
194
-                }
195
-              });
196
-            }
197
-            tglST_List.removeAt(0);
198
-            uMuka_List.removeAt(0);
199
-            tglBerangkat_List.removeAt(0);
200
-            tglKembali_List.removeAt(0);
201
-            tujuan_List.removeAt(0);
202
-
203
-            ticketType_List.removeAt(0);
204
-            ticketFrom_List.removeAt(0);
205
-            ticketTo_List.removeAt(0);
206
-            ticketDate_List.removeAt(0);
207
-            ticketPrice_List.removeAt(0);
208
-            await loading.hide();
209
-          });
210
-        }
211
-      } else {
212
-        Fluttertoast.showToast(
213
-            msg: "Server Response Error",
214
-            toastLength: Toast.LENGTH_SHORT,
215
-            gravity: ToastGravity.CENTER,
216
-            timeInSecForIosWeb: 1,
217
-            textColor: Colors.white,
218
-            fontSize: 16.0);
219
-      }
220
-      await loading.hide();
221
-    });
222
-  }
223
-
224
-  @override
225
-  Widget build(BuildContext context) {
226
-    var size = MediaQuery.of(context).size;
227
-    return Scaffold(
228
-      body: Stack(
229
-          children: [
230
-            Column(
231
-              children: <Widget>[
232
-                Stack(
233
-                  children: [
234
-                    WavyHeader(),
235
-                    Container(
236
-                        margin: EdgeInsets.only(
237
-                            top: (size.height / 6) - 20),
238
-                        padding: EdgeInsets.fromLTRB(0, 5, 25, 5),
239
-                        child: Row(
240
-                          mainAxisAlignment: MainAxisAlignment.end,
241
-                          crossAxisAlignment: CrossAxisAlignment.end,
242
-                          children: [
243
-                            Text(
244
-                              'History\t\t',
245
-                              maxLines: 1,
246
-                              style: GoogleFonts.luckiestGuy(
247
-                                fontSize: 28,
248
-                                color: Color(0xFF4858A7),
249
-                                fontStyle: FontStyle.italic,
250
-                              ),
251
-                            ),
252
-                            Image.asset(
253
-                              'assets/images/ic_history.png',
254
-                              width: 40,
255
-                              height: 40,
256
-                            ),
257
-                          ],
258
-                        )
259
-                    ),
260
-                  ],
261
-                ),
262
-              ],
263
-            ),
264
-            Container(
265
-              margin: EdgeInsets.only(top: (MediaQuery.of(context).size.height / 6) + 40, left: 5, right: 5, bottom: 10),
266
-              child: ListView.builder(
267
-                scrollDirection: Axis.vertical,
268
-                shrinkWrap: true,
269
-                itemCount: HistoryLength,
270
-                itemBuilder: (context, int i) {
271
-                  return Container(
272
-                    child: InkWell(
273
-                      child: Card(
274
-                        elevation: 10,
275
-                        child: Column(
276
-                          children: [
277
-                            Row(
278
-                              children: [
279
-                                Expanded(
280
-                                    flex: 8,
281
-                                    child: Padding(
282
-                                      padding: EdgeInsets.fromLTRB(10, 5, 5, 5),
283
-                                      child: Column(
284
-                                        mainAxisAlignment: MainAxisAlignment.center,
285
-                                        crossAxisAlignment: CrossAxisAlignment.start,
286
-                                        children: [
287
-                                          Text(number_List[i], style: GoogleFonts.rubikBubbles(fontSize: 16)),
288
-                                          Text(keperluan_List[i], style: GoogleFonts.nunito(fontSize: 15)),
289
-                                          Text("\nCreated : " + tglDibuat_List[i], style: GoogleFonts.nunito(fontSize: 15)),
290
-                                        ],
291
-                                      ),
292
-                                    )
293
-                                ),
294
-                                Expanded(
295
-                                    flex: 2,
296
-                                    child: Padding(
297
-                                      padding: EdgeInsets.fromLTRB(5, 5, 5, 5),
298
-                                      child: Text(status_List[i], textAlign: TextAlign.center, style: GoogleFonts.lilitaOne(color: statusColor[i], fontSize: 17),
299
-                                      ),
300
-                                    )
301
-                                ),
302
-                              ],
303
-                            ),
304
-                            /*Align(
305
-                              alignment: Alignment.centerLeft,
306
-                              child: Visibility(
307
-                                  visible: visible[i],
308
-                                  child: Padding(
309
-                                    padding: EdgeInsets.fromLTRB(10, 5, 5, 5),
310
-                                    child: Column(
311
-                                      mainAxisAlignment: MainAxisAlignment.start,
312
-                                      crossAxisAlignment: CrossAxisAlignment.start,
313
-                                      children: [
314
-                                        *//*Text("\nAssignment Letter Date\t : " + tglST_List[i], style: GoogleFonts.josefinSans(fontSize: 15, fontWeight: FontWeight.bold)),*//*
315
-                                        Text("Down Payment\t\t : " + uMuka_List[i], style: GoogleFonts.nunito(fontSize: 15)),
316
-                                        Text("Departure Date\t\t : " + tglBerangkat_List[i], style: GoogleFonts.yeonSung(fontSize: 14, fontStyle: FontStyle.italic)),
317
-                                        Text("Return Date\t\t : " + tglKembali_List[i], style: GoogleFonts.yeonSung(fontSize: 14, fontStyle: FontStyle.italic)),
318
-                                        Text("Destination\t\t : " + tujuan_List[i], style: GoogleFonts.yeonSung(fontSize: 14, fontStyle: FontStyle.italic)),
319
-                                        *//*Text("Ticket Type\t\t : " + ticketType_List[i], style: GoogleFonts.yeonSung(fontSize: 14, fontStyle: FontStyle.italic)),
320
-                                        Text("From\t\t\t : " + ticketFrom_List[i], style: GoogleFonts.yeonSung(fontSize: 14, fontStyle: FontStyle.italic)),
321
-                                        Text("To\t\t : " + ticketTo_List[i], style: GoogleFonts.yeonSung(fontSize: 14, fontStyle: FontStyle.italic)),
322
-                                        Text("Ticket Date\t\t : " + ticketDate_List[i], style: GoogleFonts.yeonSung(fontSize: 14, fontStyle: FontStyle.italic)),
323
-                                        Text("Ticket Price\t\t\t : " + ticketPrice_List[i], style: GoogleFonts.yeonSung(fontSize: 14, fontStyle: FontStyle.italic)),*//*
324
-                                      ],
325
-                                    ),
326
-                                  )
327
-                              ),
328
-                            )*/
329
-                          ],
330
-                        ),
331
-                      ),
332
-                      onTap: (){
333
-                        setState(() {
334
-                          visible[i] = !visible[i];
335
-                        });
336
-                      },
337
-                    ),
338
-                  );
339
-                },
340
-              ),
341
-            )
342
-          ]),
343
-    );
344
-  }
345
-}
346
-
347
-alertDialogFailedRetrievedData(BuildContext context) {
348
-  Widget okButton = TextButton(
349
-    child: Text("Refresh"),
350
-    onPressed: () {
351
-      Navigator.of(context, rootNavigator: true).pop();
352
-      Navigator.pushReplacement(
353
-          context, MaterialPageRoute(builder: (context) => HistoryST()));
354
-    },
355
-  );
356
-
357
-  Widget noButton = TextButton(
358
-    child: Text("Back"),
359
-    onPressed: () {
360
-      Navigator.of(context, rootNavigator: true).pop();
361
-      Navigator.pop(context);
362
-    },
363
-  );
364
-
365
-  // set up the AlertDialog
366
-  AlertDialog alert = AlertDialog(
367
-    title: Text("Employee Self Service"),
368
-    content: Text("Failed to Retrieve Data"),
369
-    actions: [
370
-      noButton,
371
-      okButton,
372
-    ],
373
-  );
374
-
375
-  // show the dialog
376
-  showDialog(
377
-    context: context,
378
-    builder: (BuildContext context) {
379
-      return alert;
380
-    },
381
-  );
382
-}

+ 0
- 1135
lib/Screens/Menu/SuratTugas/pengajuan_extendTanggalKembali.dart
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 0
- 1124
lib/Screens/Menu/SuratTugas/pengajuan_st.dart
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 0
- 1132
lib/Screens/Menu/SuratTugas/pengajuan_uangMukaTambahan.dart
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 0
- 605
lib/Screens/Menu/SuratTugas/surattugas_screen.dart Zobrazit soubor

@@ -1,605 +0,0 @@
1
-import 'package:flutter/cupertino.dart';
2
-import 'package:flutter/material.dart';
3
-import 'package:google_fonts/google_fonts.dart';
4
-import 'package:employee_selfservice_mobile/Screens/Menu/SuratTugas/history_st.dart';
5
-import 'package:employee_selfservice_mobile/Screens/Menu/SuratTugas/pengajuan_st.dart';
6
-
7
-import '../SlipGaji/background.dart';
8
-import 'deklarasi_st.dart';
9
-
10
-class SuratTugas_Screen extends StatefulWidget {
11
-  const SuratTugas_Screen({Key? key}) : super(key: key);
12
-
13
-  @override
14
-  State<SuratTugas_Screen> createState() => _SuratTugas_ScreenState();
15
-}
16
-
17
-class _SuratTugas_ScreenState extends State<SuratTugas_Screen> {
18
-  var selectedCategory;
19
-  var selectedDate;
20
-
21
-  int _value = 0;
22
-
23
-  @override
24
-  Widget build(BuildContext context) {
25
-    return Scaffold(
26
-      body: SingleChildScrollView(
27
-          child: Column(
28
-        children: <Widget>[
29
-          Stack(
30
-            children: [
31
-              WavyHeader(),
32
-              Container(
33
-                  margin: EdgeInsets.only(top: MediaQuery.of(context).size.height/6 - 20),
34
-                  padding: EdgeInsets.fromLTRB(20, 5, 25, 5),
35
-                  child: Row(
36
-                    mainAxisAlignment: MainAxisAlignment.end,
37
-                    crossAxisAlignment: CrossAxisAlignment.end,
38
-                    children: [
39
-                      Text(
40
-                        'Assignment\nLetter\t\t',
41
-                        style: GoogleFonts.luckiestGuy(
42
-                          fontSize: 28,
43
-                          color: Color(0xFF4858A7),
44
-                          fontStyle: FontStyle.italic,
45
-                        ),
46
-                      ),
47
-                      Image.asset(
48
-                        'assets/icons/menu/ic_menu_surattugas.png',
49
-                        width: 40,
50
-                        height: 40,
51
-                      ),
52
-                    ],
53
-                  )),
54
-              SafeArea(
55
-                child: Container(
56
-                  width: MediaQuery.of(context).size.width,
57
-                  margin: EdgeInsets.only(
58
-                    top: MediaQuery.of(context).size.height / 5,
59
-                    left: 10,
60
-                    right: 10,
61
-                  ),
62
-                  child: Column(
63
-                    children: [
64
-                      InkWell(
65
-                        child: Container(
66
-                            margin: EdgeInsets.fromLTRB(15, 15, 15, 5),
67
-                            padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
68
-                            width: double.infinity,
69
-                            decoration: BoxDecoration(
70
-                                borderRadius: BorderRadius.circular(5),
71
-                                gradient: LinearGradient(colors: [
72
-                                  Color(0xFF2D4059),
73
-                                  Color(0xFF2D4059),
74
-                                  /*Color(0xFFEAFFD0),
75
-                                  Color(0xFF95E1D3),*/
76
-                                ])),
77
-                            child: Row(
78
-                              mainAxisAlignment: MainAxisAlignment.center,
79
-                              children: [
80
-                                Flexible(
81
-                                    child: Text('Assignment Letter Submission\t\t',
82
-                                        textAlign: TextAlign.center,
83
-                                        style: TextStyle(
84
-                                            color: Colors.white,
85
-                                            fontSize: 17,
86
-                                            fontWeight: FontWeight.w500))),
87
-                                Image.asset('assets/images/submit_st.png',
88
-                                  width: 30,
89
-                                  height: 30,
90
-                                )
91
-                              ],
92
-                            )),
93
-                        onTap: () {
94
-                          Navigator.push(
95
-                              context,
96
-                              MaterialPageRoute(
97
-                                  builder: (context) => PengajuanST_Screen()));
98
-                        },
99
-                      ),
100
-                      InkWell(
101
-                        child: Container(
102
-                            margin: EdgeInsets.fromLTRB(15, 5, 15, 5),
103
-                            padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
104
-                            width: double.infinity,
105
-                            decoration: BoxDecoration(
106
-                                borderRadius: BorderRadius.circular(5),
107
-                                gradient: LinearGradient(colors: [
108
-                                  Color(0xFF2D4059),
109
-                                  Color(0xFF2D4059),
110
-                                  /*Color(0xFFEAFFD0),
111
-                                  Color(0xFF95E1D3),*/
112
-                                ])),
113
-                            child: Row(
114
-                              mainAxisAlignment: MainAxisAlignment.center,
115
-                              children: [
116
-                                Flexible(
117
-                                    child: Text('Declaration of Assignment Letter\t\t',
118
-                                        textAlign: TextAlign.center,
119
-                                        style: TextStyle(
120
-                                            color: Colors.white,
121
-                                            fontSize: 17,
122
-                                            fontWeight: FontWeight.w500))),
123
-                                Image.asset('assets/images/declaration.png',
124
-                                  width: 30,
125
-                                  height: 30,
126
-                                )
127
-                              ],
128
-                            )),
129
-                        onTap: () {
130
-                          Navigator.push(
131
-                              context,
132
-                              MaterialPageRoute(
133
-                                  builder: (context) => DeklarasiST_Screen()));
134
-                        },
135
-                      ),
136
-                      InkWell(
137
-                        child: Container(
138
-                            margin: EdgeInsets.fromLTRB(15, 5, 15, 5),
139
-                            padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
140
-                            width: double.infinity,
141
-                            decoration: BoxDecoration(
142
-                                borderRadius: BorderRadius.circular(5),
143
-                                gradient: LinearGradient(colors: [
144
-                                  Color(0xFF2D4059),
145
-                                  Color(0xFF2D4059),
146
-                                  /*Color(0xFFEAFFD0),
147
-                                  Color(0xFF95E1D3),*/
148
-                                ])),
149
-                            child: Row(
150
-                              mainAxisAlignment: MainAxisAlignment.center,
151
-                              children: [
152
-                                Flexible(
153
-                                    child: Text('See Assignment Letter History\t\t',
154
-                                        textAlign: TextAlign.center,
155
-                                        style: TextStyle(
156
-                                            color: Colors.white,
157
-                                            fontSize: 17,
158
-                                            fontWeight: FontWeight.w500))),
159
-                                Image.asset('assets/images/ic_history.png',
160
-                                  width: 30,
161
-                                  height: 30,
162
-                                )
163
-                              ],
164
-                            )),
165
-                        onTap: () {
166
-                          Navigator.push(
167
-                              context,
168
-                              MaterialPageRoute(
169
-                                  builder: (context) => HistoryST()));
170
-                        },
171
-                      ),
172
-                      InkWell(
173
-                        child: Container(
174
-                            margin: EdgeInsets.fromLTRB(15, 5, 15, 5),
175
-                            padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
176
-                            width: double.infinity,
177
-                            decoration: BoxDecoration(
178
-                                borderRadius: BorderRadius.circular(5),
179
-                                gradient: LinearGradient(colors: [
180
-                                  Color(0xFF2D4059),
181
-                                  Color(0xFF2D4059),
182
-                                  /*Color(0xFFEAFFD0),
183
-                                  Color(0xFF95E1D3),*/
184
-                                ])),
185
-                            child: Row(
186
-                              mainAxisAlignment: MainAxisAlignment.center,
187
-                              children: [
188
-                                Flexible(
189
-                                    child: Text('Additional Advance Payment\t\t',
190
-                                        textAlign: TextAlign.center,
191
-                                        style: TextStyle(
192
-                                            color: Colors.white,
193
-                                            fontSize: 17,
194
-                                            fontWeight: FontWeight.w500))),
195
-                                Image.asset('assets/images/extra_money.png',
196
-                                  width: 30,
197
-                                  height: 30,
198
-                                )
199
-                              ],
200
-                            )),
201
-                        onTap: () {},
202
-                      ),
203
-                      InkWell(
204
-                        child: Container(
205
-                            margin: EdgeInsets.fromLTRB(15, 5, 15, 5),
206
-                            padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
207
-                            width: double.infinity,
208
-                            decoration: BoxDecoration(
209
-                                borderRadius: BorderRadius.circular(5),
210
-                                gradient: LinearGradient(colors: [
211
-                                  Color(0xFF2D4059),
212
-                                  Color(0xFF2D4059),
213
-                                  /*Color(0xFFEAFFD0),
214
-                                  Color(0xFF95E1D3),*/
215
-                                ])),
216
-                            child: Row(
217
-                              mainAxisAlignment: MainAxisAlignment.center,
218
-                              children: [
219
-                                Flexible(
220
-                                    child: Text('Return Date Extension\t\t',
221
-                                        textAlign: TextAlign.center,
222
-                                        style: TextStyle(
223
-                                            color: Colors.white,
224
-                                            fontSize: 17,
225
-                                            fontWeight: FontWeight.w500))),
226
-                                Image.asset('assets/images/extend_tanggal.png',
227
-                                  width: 30,
228
-                                  height: 30,
229
-                                )
230
-                              ],
231
-                            )),
232
-                        onTap: () {}
233
-                      ),
234
-                      /*Container(
235
-                        child: Card(
236
-                          elevation: 10,
237
-                          child: Container(
238
-                            decoration: BoxDecoration(
239
-                                color: Color(0XFFFAF7EE),
240
-                                borderRadius: BorderRadius.circular(10)),
241
-                            child: Column(
242
-                              children: [
243
-                                Container(
244
-                                  margin: EdgeInsets.only(
245
-                                      left: 10, right: 10, top: 10, bottom: 10),
246
-                                  child: Row(
247
-                                    children: [
248
-                                      Expanded(
249
-                                          flex: 3,
250
-                                          child: Text(
251
-                                            'Kategori\t:\t',
252
-                                            style: GoogleFonts.inconsolata(
253
-                                                fontSize: 17),
254
-                                          )),
255
-                                      Expanded(
256
-                                          flex: 7,
257
-                                          child: Container(
258
-                                            decoration: BoxDecoration(
259
-                                                color:
260
-                                                    CupertinoColors.systemGrey2,
261
-                                                borderRadius:
262
-                                                    BorderRadius.circular(5)),
263
-                                            child: DropdownButton(
264
-                                              value: this.selectedCategory,
265
-                                              isExpanded: true,
266
-                                              underline: SizedBox(),
267
-                                              hint: Text(
268
-                                                '\t\t\tPilih Kategori',
269
-                                                style: TextStyle(
270
-                                                    color: Colors.black54),
271
-                                              ),
272
-                                              onChanged: (value) {
273
-                                                print(value);
274
-                                                setState(() {
275
-                                                  selectedCategory = value!;
276
-                                                });
277
-                                              },
278
-                                              items: reimburseCategory
279
-                                                  .map(
280
-                                                    (e) => DropdownMenuItem(
281
-                                                        value: e,
282
-                                                        child:
283
-                                                            Text("\t\t\t" + e)),
284
-                                                  )
285
-                                                  .toList(),
286
-                                            ),
287
-                                          )),
288
-                                    ],
289
-                                  ),
290
-                                ),
291
-                                Container(
292
-                                  margin: EdgeInsets.only(
293
-                                      left: 10, right: 10, top: 10, bottom: 10),
294
-                                  child: Column(
295
-                                    children: [
296
-                                      Row(
297
-                                        children: [
298
-                                          Expanded(
299
-                                              flex: 3,
300
-                                              child: Text(
301
-                                                'Tanggal\t:\t',
302
-                                                style: GoogleFonts.inconsolata(
303
-                                                    fontSize: 17),
304
-                                              )),
305
-                                          Expanded(
306
-                                              flex: 7,
307
-                                              child: Container(
308
-                                                decoration: BoxDecoration(
309
-                                                    color: CupertinoColors
310
-                                                        .systemGrey2,
311
-                                                    borderRadius:
312
-                                                        BorderRadius.circular(
313
-                                                            5)),
314
-                                                child: Column(
315
-                                                  children: [
316
-                                                    DropdownButton(
317
-                                                      value: this.selectedDate,
318
-                                                      isExpanded: true,
319
-                                                      underline: SizedBox(),
320
-                                                      hint: Text(
321
-                                                        '\t\t\tPilih Tanggal',
322
-                                                        style: TextStyle(
323
-                                                            color:
324
-                                                                Colors.black54),
325
-                                                      ),
326
-                                                      onChanged: (value) {
327
-                                                        print(value);
328
-                                                        setState(() {
329
-                                                          selectedDate = value!;
330
-                                                        });
331
-                                                      },
332
-                                                      items: reimburseCategory
333
-                                                          .map(
334
-                                                            (e) =>
335
-                                                                DropdownMenuItem(
336
-                                                                    value: e,
337
-                                                                    child: Text(
338
-                                                                        "\t\t\t" +
339
-                                                                            e)),
340
-                                                          )
341
-                                                          .toList(),
342
-                                                    ),
343
-                                                  ],
344
-                                                ),
345
-                                              )),
346
-                                        ],
347
-                                      ),
348
-                                    ],
349
-                                  ),
350
-                                ),
351
-                                Container(
352
-                                  margin: EdgeInsets.only(
353
-                                      left: 10, right: 10, top: 10, bottom: 10),
354
-                                  child: Row(
355
-                                    children: [
356
-                                      Expanded(
357
-                                          flex: 3,
358
-                                          child: Text(
359
-                                            'Total Harga\t:\t',
360
-                                            style: GoogleFonts.inconsolata(
361
-                                                fontSize: 17),
362
-                                          )),
363
-                                      Expanded(
364
-                                          flex: 7,
365
-                                          child: Container(
366
-                                              decoration: BoxDecoration(
367
-                                                  color: Colors.white,
368
-                                                  borderRadius:
369
-                                                      BorderRadius.circular(5)),
370
-                                              child: Padding(
371
-                                                padding: EdgeInsets.only(
372
-                                                    left: 10,
373
-                                                    right: 10,
374
-                                                    top: 5,
375
-                                                    bottom: 5),
376
-                                                child: TextFormField(
377
-                                                    keyboardType:
378
-                                                        TextInputType.number,
379
-                                                    maxLines: 1,
380
-                                                    textInputAction:
381
-                                                        TextInputAction.next,
382
-                                                    decoration: InputDecoration(
383
-                                                        border:
384
-                                                            InputBorder.none,
385
-                                                        hintText:
386
-                                                            "Masukkan tanpa tanda baca (.) atau (,)")),
387
-                                              ))),
388
-                                    ],
389
-                                  ),
390
-                                ),
391
-                                Container(
392
-                                  margin: EdgeInsets.only(
393
-                                      left: 10, right: 10, top: 10, bottom: 10),
394
-                                  child: Row(
395
-                                    children: [
396
-                                      Expanded(
397
-                                          flex: 3,
398
-                                          child: Text(
399
-                                            'Deskripsi\t:\t',
400
-                                            style: GoogleFonts.inconsolata(
401
-                                                fontSize: 17),
402
-                                          )),
403
-                                      Expanded(
404
-                                          flex: 7,
405
-                                          child: Container(
406
-                                              decoration: BoxDecoration(
407
-                                                  color: Colors.white,
408
-                                                  borderRadius:
409
-                                                      BorderRadius.circular(5)),
410
-                                              child: Padding(
411
-                                                padding: EdgeInsets.only(
412
-                                                    left: 10,
413
-                                                    right: 10,
414
-                                                    top: 5,
415
-                                                    bottom: 5),
416
-                                                child: TextFormField(
417
-                                                    keyboardType:
418
-                                                        TextInputType.multiline,
419
-                                                    maxLines: null,
420
-                                                    textInputAction:
421
-                                                        TextInputAction.done,
422
-                                                    decoration: InputDecoration(
423
-                                                        border:
424
-                                                            InputBorder.none,
425
-                                                        hintText: "Deskripsi")),
426
-                                              ))),
427
-                                    ],
428
-                                  ),
429
-                                ),
430
-                                Container(
431
-                                  margin: EdgeInsets.only(
432
-                                      left: 10, right: 10, top: 10, bottom: 10),
433
-                                  child: Column(
434
-                                    children: [
435
-                                      Row(
436
-                                        children: [
437
-                                          Expanded(
438
-                                              flex: 3,
439
-                                              child: Text(
440
-                                                'Pembayaran\t:',
441
-                                                style: GoogleFonts.inconsolata(
442
-                                                    fontSize: 17),
443
-                                              )),
444
-                                          Expanded(
445
-                                              flex: 7,
446
-                                              child: Container(
447
-                                                child: Column(
448
-                                                  children: [
449
-                                                    Row(
450
-                                                      children: [
451
-                                                        Radio(
452
-                                                          value: 1,
453
-                                                          groupValue: _value,
454
-                                                          onChanged: (value) {
455
-                                                            setState(() {
456
-                                                              _value = value!;
457
-                                                            });
458
-                                                          },
459
-                                                        ),
460
-                                                        Flexible(
461
-                                                            child: Text(
462
-                                                                "Karyawan (Perlu Reimburse)",
463
-                                                                style:
464
-                                                                    TextStyle(
465
-                                                                  color: Colors
466
-                                                                      .black54,
467
-                                                                ))),
468
-                                                      ],
469
-                                                    ),
470
-                                                    Row(
471
-                                                      children: [
472
-                                                        Radio(
473
-                                                          value: 2,
474
-                                                          groupValue: _value,
475
-                                                          onChanged: (value) {
476
-                                                            setState(() {
477
-                                                              _value = value!;
478
-                                                            });
479
-                                                          },
480
-                                                        ),
481
-                                                        Flexible(
482
-                                                            child: Text(
483
-                                                                "Perusahaan",
484
-                                                                style: TextStyle(
485
-                                                                    color: Colors
486
-                                                                        .black54)))
487
-                                                      ],
488
-                                                    ),
489
-                                                  ],
490
-                                                ),
491
-                                              )),
492
-                                        ],
493
-                                      ),
494
-                                    ],
495
-                                  ),
496
-                                ),
497
-                                Container(
498
-                                  margin: EdgeInsets.only(
499
-                                      left: 10, right: 10, top: 10, bottom: 10),
500
-                                  child: Column(
501
-                                    children: [
502
-                                      Row(
503
-                                        children: [
504
-                                          Expanded(
505
-                                            flex: 3,
506
-                                            child: Text(
507
-                                              'Lampiran\t:\t',
508
-                                              style: GoogleFonts.inconsolata(
509
-                                                  fontSize: 17),
510
-                                            ),
511
-                                          ),
512
-                                          Expanded(
513
-                                            flex: 7,
514
-                                            child: Container(
515
-                                              child: ElevatedButton(
516
-                                                onPressed: () {},
517
-                                                child: Container(
518
-                                                  width: double.infinity,
519
-                                                  child: Text("Pilih File"),
520
-                                                ),
521
-                                              ),
522
-                                            ),
523
-                                          )
524
-                                        ],
525
-                                      ),
526
-                                      Row(
527
-                                        children: [
528
-                                          Expanded(
529
-                                            flex: 3,
530
-                                            child: Text(
531
-                                              '',
532
-                                              style: GoogleFonts.inconsolata(
533
-                                                  fontSize: 17),
534
-                                            ),
535
-                                          ),
536
-                                          Expanded(
537
-                                            flex: 7,
538
-                                            child: Visibility(
539
-                                                visible: true,
540
-                                                child: Container(
541
-                                                  alignment:
542
-                                                      Alignment.centerLeft,
543
-                                                  margin: EdgeInsets.only(
544
-                                                      left: 15,
545
-                                                      right: 15,
546
-                                                      bottom: 10),
547
-                                                  child: Flexible(
548
-                                                    child: Text(
549
-                                                      "Selected File",
550
-                                                      style: TextStyle(
551
-                                                          color:
552
-                                                              Colors.black54),
553
-                                                    ),
554
-                                                  ),
555
-                                                )),
556
-                                          )
557
-                                        ],
558
-                                      ),
559
-                                      InkWell(
560
-                                        child: Container(
561
-                                          padding: EdgeInsets.fromLTRB(
562
-                                              10, 10, 10, 10),
563
-                                          width: double.infinity,
564
-                                          decoration: BoxDecoration(
565
-                                              borderRadius:
566
-                                                  BorderRadius.circular(5),
567
-                                              gradient: LinearGradient(colors: [
568
-                                                Color(0xFFFF9945),
569
-                                                Color(0xFFFc6076)
570
-                                              ])),
571
-                                          child: Text('Ajukan',
572
-                                              textAlign: TextAlign.center,
573
-                                              style: TextStyle(
574
-                                                  color: Colors.white,
575
-                                                  fontSize: 17,
576
-                                                  fontWeight: FontWeight.w500)),
577
-                                        ),
578
-                                        onTap: () {},
579
-                                      )
580
-                                    ],
581
-                                  ),
582
-                                ),
583
-                              ],
584
-                            ),
585
-                          ),
586
-                        ),
587
-                      ),*/
588
-                    ],
589
-                  ),
590
-                ),
591
-              ),
592
-            ],
593
-          ),
594
-        ],
595
-      )),
596
-    );
597
-  }
598
-}
599
-
600
-List<String> reimburseCategory = [
601
-  "Paid Time Off",
602
-  "Sick Time Off",
603
-  "Compensatory Days",
604
-  "Unpaid"
605
-];

+ 0
- 52
lib/Screens/NotificationCenter/NotificationCenter.dart Zobrazit soubor

@@ -1,52 +0,0 @@
1
-import 'package:flutter/material.dart';
2
-import 'package:google_fonts/google_fonts.dart';
3
-
4
-import '../Menu/SlipGaji/background.dart';
5
-
6
-class NotificationCenter_Screen extends StatefulWidget {
7
-  const NotificationCenter_Screen({super.key});
8
-
9
-  @override
10
-  State<NotificationCenter_Screen> createState() => _NotificationCenter_ScreenState();
11
-}
12
-
13
-class _NotificationCenter_ScreenState extends State<NotificationCenter_Screen> {
14
-  @override
15
-  Widget build(BuildContext context) {
16
-    return Scaffold(
17
-      body: SingleChildScrollView(
18
-          child: Column(
19
-            children: <Widget>[
20
-              Stack(
21
-                children: [
22
-                  WavyHeader(),
23
-                  Container(
24
-                      margin: EdgeInsets.only(top: MediaQuery.of(context).size.height/6 - 20),
25
-                      padding: EdgeInsets.fromLTRB(20, 5, 25, 5),
26
-                      child: Row(
27
-                        mainAxisAlignment: MainAxisAlignment.end,
28
-                        crossAxisAlignment: CrossAxisAlignment.end,
29
-                        children: [
30
-                          Text(
31
-                            'Notification Center',
32
-                            maxLines: 1,
33
-                            style: GoogleFonts.luckiestGuy(
34
-                              fontSize: 28,
35
-                              color: Color(0xFF4858A7),
36
-                              fontStyle: FontStyle.italic,
37
-                            ),
38
-                          ),
39
-                          Image.asset(
40
-                            'assets/icons/ic_notif.png',
41
-                            width: 40,
42
-                            height: 40,
43
-                          ),
44
-                        ],
45
-                      )),
46
-                ],
47
-              ),
48
-            ],
49
-          )),
50
-    );
51
-  }
52
-}

+ 0
- 178
lib/Screens/Splash/background.dart Zobrazit soubor

@@ -1,178 +0,0 @@
1
-import 'package:flutter/material.dart';
2
-
3
-class Background extends StatelessWidget {
4
-  const Background({Key? key}) : super(key: key);
5
-
6
-  @override
7
-  Widget build(BuildContext context) {
8
-    return Scaffold(
9
-      resizeToAvoidBottomInset: false,
10
-      backgroundColor: Colors.white,
11
-      body: Column(
12
-        children: <Widget>[
13
-          new Stack(
14
-            alignment: Alignment.bottomCenter,
15
-            children: <Widget>[
16
-              WavyHeader()
17
-            ],
18
-          ),
19
-          Expanded(
20
-            child: Container(),
21
-          ),
22
-          Stack(
23
-            alignment: Alignment.bottomLeft,
24
-            children: <Widget>[
25
-              WavyFooter(),
26
-              CirclePink(),
27
-              CircleYellow(),
28
-            ],
29
-          )
30
-        ],
31
-      ),
32
-    );
33
-  }
34
-}
35
-
36
-const List<Color> orangeGradients = [
37
-  /*Color(0xFFFF9844),
38
-  Color(0xFFFE8853),
39
-  Color(0xFFFD7267),*/
40
-  Color(0xFFD21404),
41
-  Color(0xFFFD7267)
42
-];
43
-
44
-const List<Color> aquaGradients = [
45
-  Color(0xFF8EF7DA),
46
-  Color(0xFF5AEAF1),
47
-  Colors.blueAccent,
48
-];
49
-
50
-class WavyHeader extends StatelessWidget {
51
-  @override
52
-  Widget build(BuildContext context) {
53
-    return ClipPath(
54
-      clipper: TopWaveClipper(),
55
-      child: Container(
56
-        decoration: BoxDecoration(
57
-          gradient: LinearGradient(
58
-              colors: orangeGradients,
59
-              begin: Alignment.topLeft,
60
-              end: Alignment.center),
61
-        ),
62
-        height: MediaQuery.of(context).size.height / 2.5,
63
-      ),
64
-    );
65
-  }
66
-}
67
-
68
-class WavyFooter extends StatelessWidget {
69
-  @override
70
-  Widget build(BuildContext context) {
71
-    return ClipPath(
72
-      clipper: FooterWaveClipper(),
73
-      child: Container(
74
-        decoration: BoxDecoration(
75
-          gradient: LinearGradient(
76
-              colors: aquaGradients,
77
-              begin: Alignment.center,
78
-              end: Alignment.bottomRight),
79
-        ),
80
-        height: MediaQuery.of(context).size.height / 3,
81
-      ),
82
-    );
83
-  }
84
-}
85
-
86
-class CirclePink extends StatelessWidget {
87
-  @override
88
-  Widget build(BuildContext context) {
89
-    return Transform.translate(
90
-      offset: Offset(-70.0, 90.0),
91
-      child: Material(
92
-        color: Color(0xFFFF9844),
93
-        child: Padding(padding: EdgeInsets.all(120)),
94
-        shape: CircleBorder(side: BorderSide(color: Colors.white, width: 15.0)),
95
-      ),
96
-    );
97
-  }
98
-}
99
-
100
-class CircleYellow extends StatelessWidget {
101
-  @override
102
-  Widget build(BuildContext context) {
103
-    return Transform.translate(
104
-      offset: Offset(0.0, 210.0),
105
-      child: Material(
106
-        color: Colors.yellow,
107
-        child: Padding(padding: EdgeInsets.all(140)),
108
-        shape: CircleBorder(side: BorderSide(color: Colors.white, width: 15.0)),
109
-      ),
110
-    );
111
-  }
112
-}
113
-
114
-class TopWaveClipper extends CustomClipper<Path> {
115
-  @override
116
-  Path getClip(Size size) {
117
-    // This is where we decide what part of our image is going to be visible.
118
-    var path = Path();
119
-    path.lineTo(0.0, size.height);
120
-
121
-    var firstControlPoint = new Offset(size.width / 7, size.height - 30);
122
-    var firstEndPoint = new Offset(size.width / 6, size.height / 1.5);
123
-
124
-    path.quadraticBezierTo(firstControlPoint.dx, firstControlPoint.dy,
125
-        firstEndPoint.dx, firstEndPoint.dy);
126
-
127
-    var secondControlPoint = Offset(size.width / 5, size.height / 4);
128
-    var secondEndPoint = Offset(size.width / 1.5, size.height / 5);
129
-    path.quadraticBezierTo(secondControlPoint.dx, secondControlPoint.dy,
130
-        secondEndPoint.dx, secondEndPoint.dy);
131
-
132
-    var thirdControlPoint =
133
-        Offset(size.width - (size.width / 9), size.height / 6);
134
-    var thirdEndPoint = Offset(size.width, 0.0);
135
-    path.quadraticBezierTo(thirdControlPoint.dx, thirdControlPoint.dy,
136
-        thirdEndPoint.dx, thirdEndPoint.dy);
137
-
138
-    ///move from bottom right to top
139
-    path.lineTo(size.width, 0.0);
140
-
141
-    ///finally close the path by reaching start point from top right corner
142
-    path.close();
143
-    return path;
144
-  }
145
-
146
-  @override
147
-  bool shouldReclip(CustomClipper<Path> oldClipper) => false;
148
-}
149
-
150
-class FooterWaveClipper extends CustomClipper<Path> {
151
-  @override
152
-  Path getClip(Size size) {
153
-    var path = Path();
154
-    path.moveTo(size.width, 0.0);
155
-    path.lineTo(size.width, size.height);
156
-    path.lineTo(0.0, size.height);
157
-    path.lineTo(0.0, size.height - 60);
158
-    var secondControlPoint = Offset(size.width - (size.width / 6), size.height);
159
-    var secondEndPoint = Offset(size.width, 0.0);
160
-    path.quadraticBezierTo(secondControlPoint.dx, secondControlPoint.dy,
161
-        secondEndPoint.dx, secondEndPoint.dy);
162
-
163
-    return path;
164
-  }
165
-
166
-  @override
167
-  bool shouldReclip(CustomClipper<Path> oldClipper) => false;
168
-}
169
-
170
-class YellowCircleClipper extends CustomClipper<Rect> {
171
-  @override
172
-  Rect getClip(Size size) {
173
-    throw UnimplementedError();
174
-  }
175
-
176
-  @override
177
-  bool shouldReclip(CustomClipper<Rect> oldClipper) => false;
178
-}

+ 0
- 40
lib/Screens/Splash/loginstatus_post.dart Zobrazit soubor

@@ -1,40 +0,0 @@
1
-import 'dart:convert';
2
-import 'dart:core';
3
-import 'package:http/http.dart' as http;
4
-import 'package:employee_selfservice_mobile/constants.dart';
5
-import 'dart:developer' as logDev;
6
-
7
-class LoginStatus_Post {
8
-  late String version;
9
-  late String device;
10
-  late String session;
11
-  late String notif_token;
12
-
13
-  LoginStatus_Post({
14
-    required this.version,
15
-    required this.device,
16
-    required this.session,
17
-    required this.notif_token});
18
-
19
-  static Future<String> connectToAPI(String version, String device, String session, String notif_token) async {
20
-    String URL = baseURL + "/api/v1/login_status";
21
-    print(URL);
22
-
23
-    var sendData = await http.post(Uri.parse(URL),
24
-        body: jsonEncode({
25
-          "data": [
26
-            {
27
-              "version": version,
28
-              "device": device,
29
-              "session": session,
30
-              "notif_token": notif_token
31
-            }
32
-          ]
33
-        }),
34
-        headers: {"Content-Type": "application/json", "Api-key": apiKey});
35
-
36
-
37
-    logDev.log(sendData.body, name: "Login Status");
38
-    return sendData.body;
39
-  }
40
-}

+ 0
- 337
lib/Screens/Splash/splash_screen.dart Zobrazit soubor

@@ -1,337 +0,0 @@
1
-import 'dart:async';
2
-import 'dart:convert';
3
-import 'dart:io';
4
-import 'package:connectivity_plus/connectivity_plus.dart';
5
-import 'package:flutter/cupertino.dart';
6
-import 'package:flutter/material.dart';
7
-import 'package:flutter/services.dart';
8
-import 'package:fluttertoast/fluttertoast.dart';
9
-import 'package:google_fonts/google_fonts.dart';
10
-import 'package:employee_selfservice_mobile/Screens/Login/login_screen.dart';
11
-import 'package:employee_selfservice_mobile/Screens/Splash/loginstatus_post.dart';
12
-import 'package:employee_selfservice_mobile/constants.dart';
13
-import 'package:internet_connection_checker/internet_connection_checker.dart';
14
-import 'package:lottie/lottie.dart';
15
-import 'package:shared_preferences/shared_preferences.dart';
16
-import '../Home/home_screen.dart';
17
-import '../Splash/background.dart';
18
-import 'package:url_launcher/url_launcher.dart';
19
-import 'dart:developer' as logDev;
20
-
21
-class Splash extends StatefulWidget {
22
-  const Splash({Key? key}) : super(key: key);
23
-
24
-  @override
25
-  _SplashState createState() => _SplashState();
26
-}
27
-
28
-class _SplashState extends State<Splash> {
29
-  late StreamSubscription subscription;
30
-  bool isDeviceConnected = false;
31
-  bool isAlertSet = false;
32
-
33
-  @override
34
-  void initState() {
35
-    //getConnectivity();
36
-    Timer(Duration(seconds: 10), () => loginStatus(context));
37
-    super.initState();
38
-  }
39
-
40
-  /*getConnectivity() =>
41
-      subscription = Connectivity().onConnectivityChanged.listen(
42
-            (ConnectivityResult result) async {
43
-          isDeviceConnected = await InternetConnectionChecker().hasConnection;
44
-          if (!isDeviceConnected && isAlertSet == false) {
45
-            showConnectivityDialogBox();
46
-            setState(() => isAlertSet = true);
47
-          }
48
-        },
49
-      );*/
50
-
51
-  @override
52
-  Widget build(BuildContext context) {
53
-    return Scaffold(
54
-        resizeToAvoidBottomInset: false,
55
-        body: Stack(
56
-          children: <Widget>[
57
-            Background(),
58
-            SplashScreen(),
59
-          ],
60
-        ));
61
-  }
62
-
63
-  /*showConnectivityDialogBox() =>
64
-      showCupertinoDialog<String>(
65
-        context: context,
66
-        builder: (BuildContext context) =>
67
-            CupertinoAlertDialog(
68
-              title: const Text('No Connection'),
69
-              content: const Text('Please check your internet connectivity'),
70
-              actions: <Widget>[
71
-                Column(
72
-                  children: [
73
-                    SizedBox(
74
-                      width: 250,
75
-                      height: 250,
76
-                      child: LottieBuilder.asset(
77
-                        //'assets/animation/animation_no_internet.json',
78
-                          'assets/animation/animation_no_internet_3.json',
79
-                          repeat: true),
80
-                    ),
81
-                  ],
82
-                ),
83
-                TextButton(
84
-                  onPressed: () async {
85
-                    Navigator.pop(context, 'Cancel');
86
-                    setState(() => isAlertSet = false);
87
-                    isDeviceConnected =
88
-                    await InternetConnectionChecker().hasConnection;
89
-                    if (!isDeviceConnected && isAlertSet == false) {
90
-                      showConnectivityDialogBox();
91
-                      setState(() => isAlertSet = true);
92
-                    }
93
-                  },
94
-                  child: const Text('Retry'),
95
-                ),
96
-              ],
97
-            ),
98
-      );*/
99
-}
100
-
101
-class SplashScreen extends StatelessWidget {
102
-  const SplashScreen({Key? key}) : super(key: key);
103
-
104
-  @override
105
-  Widget build(BuildContext context) {
106
-    var size = MediaQuery.of(context).size;
107
-
108
-    return Scaffold(
109
-        body: Container(
110
-      width: double.infinity,
111
-      height: double.infinity,
112
-      decoration: BoxDecoration(
113
-          gradient: LinearGradient(
114
-              begin: Alignment.topRight,
115
-              end: Alignment.bottomRight,
116
-              colors: [
117
-                Color(0xFF4858A7),
118
-                Color(0xFF4858A7),
119
-                Color(0xFF6474C6),
120
-                //Color(0xFF8C99DD),
121
-                //Color(0xFFFFFFFF)
122
-          ])),
123
-      child: Center(
124
-        child: Column(
125
-          mainAxisAlignment: MainAxisAlignment.center,
126
-          crossAxisAlignment: CrossAxisAlignment.center,
127
-          children: [
128
-            Container(
129
-              /*decoration: BoxDecoration(
130
-                shape: BoxShape.circle,
131
-                color: Colors.white
132
-              ),*/
133
-              child: SizedBox(
134
-                width: size.width * 0.55,
135
-                //height: 250,
136
-                child: /*Image.asset('assets/animation/iconapp2.gif')*/
137
-                LottieBuilder.asset('assets/animation/animation_4.json',
138
-                    repeat: true, ),
139
-              ),
140
-            ),
141
-            Text(appName,
142
-                style: GoogleFonts.carterOne(fontSize: 25, color: Colors.white))
143
-          ],
144
-        ),
145
-      ),
146
-    ));
147
-  }
148
-}
149
-
150
-Future<void> loginStatus(BuildContext context) async {
151
-  final SharedPreferences prefs = await SharedPreferences.getInstance();
152
-  String? version = prefs.getString('version');
153
-  String? device = prefs.getString('device');
154
-  String? session = prefs.getString('session');
155
-  String? notif_token = prefs.getString('notif_token');
156
-
157
-  if (session == null) {
158
-    version = "1.0.0";
159
-    session = "";
160
-    notif_token = "";
161
-
162
-    if (Platform.isAndroid){
163
-      device = "android";
164
-    } else if (Platform.isIOS){
165
-      device = "ios";
166
-    }
167
-
168
-  }
169
-
170
-  //logDev.log(session, name: "SESSIONNYA");
171
-
172
-  LoginStatus_Post.connectToAPI(version!, device!, session, notif_token!).then((valueResult) async {
173
-    Map<String, dynamic> object = json.decode(valueResult);
174
-    if (object.containsKey("result").toString() == "true") {
175
-      String status = object['result']['status'].toString();
176
-      if (status == "success") {
177
-        Fluttertoast.showToast(
178
-            msg: "You are already logged in",
179
-            toastLength: Toast.LENGTH_SHORT,
180
-            gravity: ToastGravity.CENTER,
181
-            timeInSecForIosWeb: 1,
182
-            textColor: Colors.white,
183
-            fontSize: 16.0);
184
-        Navigator.pushReplacement(
185
-            context, MaterialPageRoute(builder: (context) => HomeView()));
186
-      } else if (status == "failed") {
187
-        String message = object['result']['message'].toString();
188
-        if (message == "Not Logged In") {
189
-          Fluttertoast.showToast(
190
-              msg: message,
191
-              toastLength: Toast.LENGTH_SHORT,
192
-              gravity: ToastGravity.CENTER,
193
-              timeInSecForIosWeb: 1,
194
-              textColor: Colors.white,
195
-              fontSize: 16.0);
196
-          Navigator.pushReplacement(
197
-              context, MaterialPageRoute(builder: (context) => LoginView()));
198
-        } else {
199
-          String title = object['result']['title'].toString();
200
-          String action = object['result']['action'].toString();
201
-          String block = object['result']['block'].toString();
202
-          if (block == "false") {
203
-            Widget okButton = TextButton(
204
-              child: Text(action),
205
-              onPressed: () async {
206
-                Uri url = Uri.parse(Uri.encodeFull("https://play.google.com/store/apps"));
207
-                //final Uri uri = Uri(scheme: "https", host: "play.google.com");
208
-                if(!await launchUrl(url, mode: LaunchMode.externalApplication)) {
209
-                  throw "Can not launch url";
210
-                }
211
-              },
212
-            );
213
-
214
-            Widget noButton = TextButton(
215
-              child: Text("Later"),
216
-              onPressed: () {
217
-                if (session == ""){
218
-                  Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => LoginView()));
219
-                } else {
220
-                  Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => HomeView()));
221
-                }
222
-              },
223
-            );
224
-
225
-            // set up the AlertDialog
226
-            AlertDialog alert = AlertDialog(
227
-              title: Text(appName),
228
-              content: Text(title + "\n" + message),
229
-              actions: [noButton, okButton],
230
-
231
-            );
232
-
233
-            // show the dialog
234
-            showDialog(
235
-              context: context,
236
-              barrierDismissible: false,
237
-              builder: (BuildContext context) {
238
-                return alert;
239
-              },
240
-            );
241
-          } else if (block == "true") {
242
-            Widget okButton = TextButton(
243
-              child: Text(action),
244
-              onPressed: () async {
245
-                if (action == "update") {
246
-                  _launchURL(Uri.parse("https://play.google.com/store/apps"));
247
-                  SystemChannels.platform.invokeMethod('SystemNavigator.pop');
248
-                  Uri url = Uri.parse(Uri.encodeFull("https://play.google.com/store/apps"));
249
-                  //final Uri uri = Uri(scheme: "https",  host: "play.google.com");
250
-                  if(!await launchUrl(url, mode: LaunchMode.externalApplication)) {
251
-                    throw "Can not launch url";
252
-                  }
253
-                } else if (action == "close") {
254
-                  SystemChannels.platform.invokeMethod('SystemNavigator.pop');
255
-                }
256
-              },
257
-            );
258
-
259
-            // set up the AlertDialog
260
-            AlertDialog alert = AlertDialog(
261
-              title: Text(appName),
262
-              content: Text(title + "\n" + message),
263
-              actions: [okButton],
264
-            );
265
-
266
-            // show the dialog
267
-            showDialog(
268
-              context: context,
269
-              barrierDismissible: false,
270
-              builder: (BuildContext context) {
271
-                return alert;
272
-              },
273
-            );
274
-          }
275
-        }
276
-      }
277
-    } else {
278
-      alertDialogFailedResponse(context);
279
-      Fluttertoast.showToast(
280
-          msg: "Server Response Error",
281
-          toastLength: Toast.LENGTH_SHORT,
282
-          gravity: ToastGravity.CENTER,
283
-          timeInSecForIosWeb: 1,
284
-          textColor: Colors.white,
285
-          fontSize: 16.0);
286
-    }
287
-  });
288
-}
289
-
290
-_launchURL(Uri url) async {
291
-  if (await canLaunchUrl(url)) {
292
-    await launchUrl(url);
293
-  } else {
294
-    throw 'Could not launch $url';
295
-  }
296
-}
297
-
298
-alertDialogFailedResponse(BuildContext context){
299
-  Widget okButton = TextButton(
300
-    child: Text("Refresh"),
301
-    onPressed: () {
302
-      Navigator.of(context, rootNavigator: true).pop();
303
-      Navigator.pushReplacement(context, MaterialPageRoute(
304
-          builder: (context) => SplashScreen()));
305
-    },
306
-  );
307
-
308
-  Widget noButton = TextButton(
309
-    child: Text("Back"),
310
-    onPressed: () {
311
-      Navigator.of(context, rootNavigator: true).pop();
312
-      Navigator.pop(context);
313
-
314
-    },
315
-  );
316
-
317
-  // set up the AlertDialog
318
-  AlertDialog alert = AlertDialog(
319
-    title: Text(appName),
320
-    content: Text("Server Response Error"),
321
-    actions: [
322
-      noButton,
323
-      okButton,
324
-    ],
325
-  );
326
-
327
-  // show the dialog
328
-  showDialog(
329
-    context: context,
330
-    barrierDismissible: false,
331
-    builder: (BuildContext context) {
332
-      return alert;
333
-    },
334
-  );
335
-}
336
-
337
-

+ 0
- 71
lib/firebase_options.dart Zobrazit soubor

@@ -1,71 +0,0 @@
1
-// File generated by FlutterFire CLI.
2
-// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
3
-import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
4
-import 'package:flutter/foundation.dart'
5
-    show defaultTargetPlatform, kIsWeb, TargetPlatform;
6
-
7
-/// Default [FirebaseOptions] for use with your Firebase apps.
8
-///
9
-/// Example:
10
-/// ```dart
11
-/// import 'firebase_options.dart';
12
-/// // ...
13
-/// await Firebase.initializeApp(
14
-///   options: DefaultFirebaseOptions.currentPlatform,
15
-/// );
16
-/// ```
17
-class DefaultFirebaseOptions {
18
-  static FirebaseOptions get currentPlatform {
19
-    if (kIsWeb) {
20
-      throw UnsupportedError(
21
-        'DefaultFirebaseOptions have not been configured for web - '
22
-        'you can reconfigure this by running the FlutterFire CLI again.',
23
-      );
24
-    }
25
-    switch (defaultTargetPlatform) {
26
-      case TargetPlatform.android:
27
-        return android;
28
-      case TargetPlatform.iOS:
29
-        return ios;
30
-      case TargetPlatform.macOS:
31
-        throw UnsupportedError(
32
-          'DefaultFirebaseOptions have not been configured for macos - '
33
-          'you can reconfigure this by running the FlutterFire CLI again.',
34
-        );
35
-      case TargetPlatform.windows:
36
-        throw UnsupportedError(
37
-          'DefaultFirebaseOptions have not been configured for windows - '
38
-          'you can reconfigure this by running the FlutterFire CLI again.',
39
-        );
40
-      case TargetPlatform.linux:
41
-        throw UnsupportedError(
42
-          'DefaultFirebaseOptions have not been configured for linux - '
43
-          'you can reconfigure this by running the FlutterFire CLI again.',
44
-        );
45
-      default:
46
-        throw UnsupportedError(
47
-          'DefaultFirebaseOptions are not supported for this platform.',
48
-        );
49
-    }
50
-  }
51
-
52
-  static const FirebaseOptions android = FirebaseOptions(
53
-    apiKey: 'AIzaSyDUzNWQ2cvWrL77QHekf_FASfMb5KTDnuY',
54
-    appId: '1:372840384875:android:cbf80d0700f53d3ffd642e',
55
-    messagingSenderId: '372840384875',
56
-    projectId: 'gsi---employee-self-service',
57
-    databaseURL: 'https://gsi---employee-self-service-default-rtdb.asia-southeast1.firebasedatabase.app',
58
-    storageBucket: 'gsi---employee-self-service.appspot.com',
59
-  );
60
-
61
-  static const FirebaseOptions ios = FirebaseOptions(
62
-    apiKey: 'AIzaSyA2vkFoBVFd1B59MwvZlkkg0AgZpd6vzZw',
63
-    appId: '1:372840384875:ios:729b20a1d7ac16b0fd642e',
64
-    messagingSenderId: '372840384875',
65
-    projectId: 'gsi---employee-self-service',
66
-    databaseURL: 'https://gsi---employee-self-service-default-rtdb.asia-southeast1.firebasedatabase.app',
67
-    storageBucket: 'gsi---employee-self-service.appspot.com',
68
-    iosClientId: '372840384875-g36dgtu6u66umuvp045b6pivb58cldlp.apps.googleusercontent.com',
69
-    iosBundleId: 'com.example.hrisSelfserviceMobile',
70
-  );
71
-}

Loading…
Zrušit
Uložit