athrainsky hai 7 meses
pai
achega
df7d91a535

+ 21 - 1
lib/bug/addbug.dart

@@ -2,11 +2,22 @@ import 'package:flutter/material.dart';
 import 'package:namer_app/footer.dart';
 import 'package:namer_app/header.dart';
 
+import '../service/addbug_serv.dart';
+
 class AddBugPage extends StatelessWidget {
   const AddBugPage({super.key});
 
   @override
   Widget build(BuildContext context) {
+    var bugdesc = TextEditingController();
+    var bugqc = TextEditingController();
+    var bugdev = TextEditingController();
+    var bugplatform = TextEditingController();
+    var buggoodday = TextEditingController();
+    var bugimage = TextEditingController();
+    var buglevel = TextEditingController();
+    var bugstatus = TextEditingController();
+    var bugdevStatus = TextEditingController();
     return Scaffold(
       appBar: CustomAppbar(),
       backgroundColor: Colors.white,
@@ -48,6 +59,7 @@ class AddBugPage extends StatelessWidget {
                             fillColor: Colors.white.withOpacity(0.25)),
                         cursorColor: Colors.black,
                         style: TextStyle(color: Colors.black),
+                        controller: bugdesc,
                       ),
                     ),
                   ),
@@ -72,6 +84,7 @@ class AddBugPage extends StatelessWidget {
                             fillColor: Colors.white.withOpacity(0.25)),
                         cursorColor: Colors.black,
                         style: TextStyle(color: Colors.black),
+                        controller: bugqc,
                       ),
                     ),
                   ),
@@ -96,6 +109,7 @@ class AddBugPage extends StatelessWidget {
                             fillColor: Colors.white.withOpacity(0.25)),
                         cursorColor: Colors.black,
                         style: TextStyle(color: Colors.black),
+                        controller: bugdev,
                       ),
                     ),
                   ),
@@ -120,6 +134,7 @@ class AddBugPage extends StatelessWidget {
                             fillColor: Colors.white.withOpacity(0.25)),
                         cursorColor: Colors.black,
                         style: TextStyle(color: Colors.black),
+                        controller: bugplatform,
                       ),
                     ),
                   ),
@@ -144,6 +159,7 @@ class AddBugPage extends StatelessWidget {
                             fillColor: Colors.white.withOpacity(0.25)),
                         cursorColor: Colors.black,
                         style: TextStyle(color: Colors.black),
+                        controller: buggoodday,
                       ),
                     ),
                   ),
@@ -168,6 +184,7 @@ class AddBugPage extends StatelessWidget {
                             fillColor: Colors.white.withOpacity(0.25)),
                         cursorColor: Colors.black,
                         style: TextStyle(color: Colors.black),
+                        controller: bugimage,
                       ),
                     ),
                   ),
@@ -192,6 +209,7 @@ class AddBugPage extends StatelessWidget {
                             fillColor: Colors.white.withOpacity(0.25)),
                         cursorColor: Colors.black,
                         style: TextStyle(color: Colors.black),
+                        controller: buglevel,
                       ),
                     ),
                   ),
@@ -216,6 +234,7 @@ class AddBugPage extends StatelessWidget {
                             fillColor: Colors.white.withOpacity(0.25)),
                         cursorColor: Colors.black,
                         style: TextStyle(color: Colors.black),
+                        controller: bugstatus,
                       ),
                     ),
                   ),
@@ -240,6 +259,7 @@ class AddBugPage extends StatelessWidget {
                             fillColor: Colors.white.withOpacity(0.25)),
                         cursorColor: Colors.black,
                         style: TextStyle(color: Colors.black),
+                        controller: bugdevStatus,
                       ),
                     ),
                   ),
@@ -249,7 +269,7 @@ class AddBugPage extends StatelessWidget {
                       width: 396,
                       height: 61,
                       child: ElevatedButton(
-                        onPressed: null, //todo save edit
+                        onPressed: () => addbug(context, bugdesc.text, bugqc.text, bugdev.text, bugplatform.text, buggoodday.text, bugimage.text, buglevel.text, bugstatus.text, bugdevStatus.text), //todo save edit
                         style: ElevatedButton.styleFrom(
                           backgroundColor: Colors.black, //todo putih lage
                           side: BorderSide(color: Colors.white),

+ 2 - 2
lib/bug/listbug.dart

@@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
 import 'package:go_router/go_router.dart';
 import 'package:namer_app/footer.dart';
 import 'package:namer_app/header.dart';
-
+import 'package:namer_app/service/delete_bug.dart';
 import '../globals.dart';
 
 class ListBugPage extends StatefulWidget {
@@ -136,7 +136,7 @@ class ButtonUser extends StatelessWidget {
           ),
         ),
         ElevatedButton(
-          onPressed: null,
+          onPressed: () => delbug(context, items['id']),
           style: ElevatedButton.styleFrom(
             backgroundColor: Colors.black,
           ),

+ 6 - 1
lib/bug/listcomment.dart

@@ -3,9 +3,14 @@ import 'package:namer_app/data/datacomment.dart';
 import 'package:namer_app/footer.dart';
 import 'package:namer_app/header.dart';
 
-class ListCommentPage extends StatelessWidget {
+class ListCommentPage extends StatefulWidget {
   const ListCommentPage({super.key});
 
+  @override
+  State<ListCommentPage> createState() => _ListCommentPageState();
+}
+
+class _ListCommentPageState extends State<ListCommentPage> {
   @override
   Widget build(BuildContext context) {
     return Scaffold(

+ 0 - 26
lib/data/databug.dart

@@ -1,26 +0,0 @@
-// ignore_for_file: file_names
-
-final List bugs = [
-  {
-    'bug':
-        'Harta tetap > Cek field "Penyusutan Dimulai Bulan Depan" - tambah harta tetap > Saat ini label field "Penyusutan Dimulai Bulan Depan" sebaiknya dibuat 1 baris',
-    'goodday': 'https://www.goodday.work/t/42cTCS',
-    'created': '5 apr 2024 13:22:34',
-    'level': 'Minor',
-    'qc': 'Irma',
-    'status': 'On Progress',
-    'programmer': 'Arif',
-    'dev_status': 'Not Start'
-  },
-  {
-    'bug':
-        'Billing > invoice penghuni > Saat ini pembayaran detail debit kredit ada double',
-    'goodday': 'https://www.goodday.work/t/YsjiiE',
-    'created': '5 jun 2024 08:22:34',
-    'level': 'Major',
-    'qc': 'Mita',
-    'status': 'Done',
-    'programmer': 'Agus',
-    'dev_status': 'On Progress'
-  },
-];

+ 0 - 8
lib/data/dataplatform.dart

@@ -1,8 +0,0 @@
-// ignore_for_file: file_names
-
-final List platforms = [
-  {'platform': 'Web', 'project': 'TelMessenger', 'owner': 'Yulianto'},
-  {'platform': 'Mobile', 'project': 'TelMessenger', 'owner': 'Yulianto'},
-  {'platform': 'Apartemen', 'project': 'PropInspector', 'owner': 'Tanto'},
-  {'platform': 'Hotel', 'project': 'PropInspector', 'owner': 'Tanto'},
-];

+ 0 - 40
lib/data/datauser.dart

@@ -1,40 +0,0 @@
-// ignore_for_file: file_names
-
-final List users = [
-  {
-    'user': 'Irma Trias',
-    'username': 'irma',
-  },
-  {
-    'user': 'Agus Sol',
-    'username': 'agus',
-  },
-  {
-    'user': 'Abidzar',
-    'username': 'abi',
-  },
-  {
-    'user': 'Arif Yu',
-    'username': 'arif',
-  },
-  {
-    'user': 'Yulianto',
-    'username': 'yul',
-  },
-  {
-    'user': 'Tantowi',
-    'username': 'tanto',
-  },
-  {
-    'user': 'Sasmita',
-    'username': 'mita',
-  },
-  {
-    'user': 'Tiyan',
-    'username': 'tiyan',
-  },
-  {
-    'user': 'Agus Sol',
-    'username': 'agus',
-  },
-];

+ 78 - 0
lib/header.dart

@@ -115,6 +115,39 @@ class _CustomAppbarState extends State<CustomAppbar> {
             ),
           ),
         ),
+        Padding(
+          padding: const EdgeInsets.symmetric(horizontal: 8.0),
+          child: DropdownButtonHideUnderline(
+            child: DropdownButton2(
+              customButton: const Icon(Icons.build),
+              items: [
+                ...ProjectItems.firstItems.map(
+                  (item) => DropdownMenuItem<MenuItem>(
+                    value: item,
+                    child: ProjectItems.buildItem(item),
+                  ),
+                ),
+              ],
+              onChanged: (value) {
+                ProjectItems.onChanged(context, value!);
+              },
+              dropdownStyleData: DropdownStyleData(
+                width: 150,
+                padding: const EdgeInsets.symmetric(vertical: 6),
+                decoration: BoxDecoration(
+                  borderRadius: BorderRadius.circular(4),
+                ),
+                offset: const Offset(0, 8),
+              ),
+              menuItemStyleData: MenuItemStyleData(
+                customHeights: [
+                  ...List<double>.filled(ProjectItems.firstItems.length, 48),
+                ],
+                padding: const EdgeInsets.only(left: 16, right: 16),
+              ),
+            ),
+          ),
+        ),
         Padding(
           padding: const EdgeInsets.symmetric(horizontal: 8.0),
           child: DropdownButtonHideUnderline(
@@ -314,4 +347,49 @@ mixin UserItems {
         break;
     }
   }
+}
+
+mixin ProjectItems {
+  static const List<MenuItem> firstItems = [add, edit, list, addMember, listMember];
+
+  static const add = MenuItem(text: 'Add Project');
+  static const edit = MenuItem(text: 'Edit Project');
+  static const list = MenuItem(text: 'List Project');
+  static const addMember = MenuItem(text: 'Add Member');
+  static const listMember = MenuItem(text: 'List Member');
+
+  static Widget buildItem(MenuItem item) {
+    return Row(
+      children: [
+        Expanded(
+          child: Text(
+            item.text,
+            style: const TextStyle(
+              color: Colors.black,
+            ),
+          ),
+        ),
+      ],
+    );
+  }
+
+  static void onChanged(BuildContext context, MenuItem item) {
+    switch (item) {
+      case ProjectItems.add:
+        context.go('/addproject');
+        break;
+      case ProjectItems.edit:
+        context.go('/editproject');
+        break;
+      case ProjectItems.list:
+        context.go('/listproject');
+        break;
+      case ProjectItems.addMember:
+        context.go('/addmember');
+        break;
+      case ProjectItems.listMember:
+        context.go('/listplatform/listmember');
+        break;
+    }
+  }
 }

+ 18 - 3
lib/main.dart

@@ -6,12 +6,16 @@ import 'package:namer_app/bug/addbug.dart';
 import 'package:namer_app/platform/addplatform.dart';
 import 'package:namer_app/bug/editbug.dart';
 import 'package:namer_app/platform/editplatform.dart';
+import 'package:namer_app/project/addmember.dart';
+import 'package:namer_app/project/addproject.dart';
+import 'package:namer_app/project/editproject.dart';
+import 'package:namer_app/project/listproject.dart';
 import 'package:namer_app/user/edituser.dart';
 import 'package:namer_app/footer.dart';
 import 'package:namer_app/header.dart';
 import 'package:namer_app/bug/listbug.dart';
 import 'package:namer_app/bug/listcomment.dart';
-import 'package:namer_app/platform/listmember.dart';
+import 'package:namer_app/project/listmember.dart';
 import 'package:namer_app/platform/listplatform.dart';
 import 'package:namer_app/listtable.dart';
 import 'package:namer_app/user/listuser.dart';
@@ -24,8 +28,6 @@ void main() {
   runApp(MyApp());
 }
 
-
-
   // var jsonList;
   final _router = GoRouter(
   routes: [
@@ -88,6 +90,19 @@ void main() {
         path: 'addplatform',
         builder: (context, state) => AddPlatformPage(),
       ),
+      GoRoute(path: 'listproject',
+        builder: (context, state) => ListProjectPage(),
+        ),
+      GoRoute(path: 'addproject',
+        builder: (context, state) => AddProjectPage(),
+        ),
+      GoRoute(path: 'editproject',
+        builder: (context, state) => EditProjectPage(),
+        ),
+      GoRoute(path: 'addmember',
+        builder: (context, state) => AddMemberPage(),
+        ),
+
     ]),
   ],
 ); 

+ 6 - 23
lib/platform/addplatform.dart

@@ -1,12 +1,15 @@
 import 'package:flutter/material.dart';
 import 'package:namer_app/footer.dart';
 import 'package:namer_app/header.dart';
+import 'package:namer_app/service/addplatform_serv.dart';
 
 class AddPlatformPage extends StatelessWidget {
   const AddPlatformPage({super.key});
 
   @override
   Widget build(BuildContext context) {
+    var platname = TextEditingController();
+    var projname = TextEditingController();
     return Scaffold(
       appBar: CustomAppbar(),
       backgroundColor: Colors.white,
@@ -44,6 +47,7 @@ class AddPlatformPage extends StatelessWidget {
                         fillColor: Colors.white.withOpacity(0.25)),
                     cursorColor: Colors.black,
                     style: TextStyle(color: Colors.black),
+                    controller: platname,
                   ),
                 ),
               ),
@@ -66,28 +70,7 @@ class AddPlatformPage extends StatelessWidget {
                         fillColor: Colors.white.withOpacity(0.25)),
                     cursorColor: Colors.black,
                     style: TextStyle(color: Colors.black),
-                  ),
-                ),
-              ),
-              Padding(
-                padding: const EdgeInsets.all(8.0),
-                child: SizedBox(
-                  width: 396,
-                  child: TextField(
-                    decoration: InputDecoration(
-                        border: OutlineInputBorder(),
-                        focusedBorder: OutlineInputBorder(
-                            borderRadius: BorderRadius.all(Radius.circular(12)),
-                            borderSide: BorderSide(color: Colors.black)),
-                        enabledBorder: OutlineInputBorder(
-                            borderRadius: BorderRadius.all(Radius.circular(12)),
-                            borderSide: BorderSide(color: Colors.black)),
-                        labelText: 'Enter Project Description', //todo get data
-                        labelStyle: TextStyle(color: Colors.black),
-                        filled: true,
-                        fillColor: Colors.white.withOpacity(0.25)),
-                    cursorColor: Colors.black,
-                    style: TextStyle(color: Colors.black),
+                    controller: projname,
                   ),
                 ),
               ),
@@ -97,7 +80,7 @@ class AddPlatformPage extends StatelessWidget {
                   width: 396,
                   height: 61,
                   child: ElevatedButton(
-                    onPressed: null, //todo save edit
+                    onPressed: () => addplatform(context, platname.text, projname.text), 
                     style: ElevatedButton.styleFrom(
                       backgroundColor: Colors.black, //todo putih lage
                       side: BorderSide(color: Colors.white),

+ 40 - 20
lib/platform/listplatform.dart

@@ -1,12 +1,44 @@
+// ignore_for_file: prefer_typing_uninitialized_variables, must_call_super
+
+
+import 'package:dio/dio.dart';
 import 'package:flutter/material.dart';
 import 'package:go_router/go_router.dart';
-import 'package:namer_app/data/dataplatform.dart';
 import 'package:namer_app/footer.dart';
 import 'package:namer_app/header.dart';
+import 'package:namer_app/service/delete_platform.dart';
+import '../globals.dart';
 
-class ListPlatformPage extends StatelessWidget {
+class ListPlatformPage extends StatefulWidget {
   const ListPlatformPage({super.key});
 
+  @override
+  State<ListPlatformPage> createState() => _ListPlatformPageState();
+}
+
+class _ListPlatformPageState extends State<ListPlatformPage> {
+    var jsonList;
+  @override
+void initState(){
+  getData();
+}
+
+void getData() async { 
+    try { 
+      var response = await Dio() 
+          .get('http://localhost:8080/api/v1/platforms',
+          options: Options(headers: headers)); 
+      if (response.statusCode == 200) { 
+        setState(() { 
+          jsonList = response.data['results'] as List; 
+        }); 
+      } else { 
+        print(response.statusCode); 
+      } 
+    } catch (e) { 
+      print(e); 
+    } 
+  } 
   @override
   Widget build(BuildContext context) {
     return Scaffold(
@@ -27,24 +59,21 @@ class ListPlatformPage extends StatelessWidget {
               )),
               Column(
                 children: List.generate(
-                    4,
+                    jsonList == null ? 0 : jsonList.length,
                     (i) => SizedBox(
-                          // height: 80,
                           child: ListTile(
-                            // visualDensity: VisualDensity(vertical: 4),
                             leading: SizedBox(
                               child: Icon(Icons.phone),
                             ),
-                            title: Text(platforms[i]['platform']),
+                            title: Text(jsonList[i]['name']),
                             subtitle: Column(
                               crossAxisAlignment: CrossAxisAlignment.start,
                               children: [
-                                Text(platforms[i]['project']),
-                                Text(platforms[i]['owner'])
+                                Text(jsonList[i]['project'])
                               ],
                             ),
                             trailing: ButtonUser(
-                              items: platforms[i],
+                              items: jsonList[i],
                             ),
                           ),
                         )),
@@ -83,7 +112,7 @@ class ButtonUser extends StatelessWidget {
           ),
         ),
         ElevatedButton(
-          onPressed: null,
+          onPressed: () => delplatform(context, items['id']),
           style: ElevatedButton.styleFrom(
             backgroundColor: Colors.black,
           ),
@@ -92,16 +121,7 @@ class ButtonUser extends StatelessWidget {
             style: TextStyle(color: Colors.white),
           ),
         ),
-        ElevatedButton(
-          onPressed: () => context.go('/listplatform/listmember'),
-          style: ElevatedButton.styleFrom(
-            backgroundColor: Colors.black,
-          ),
-          child: Text(
-            'Member',
-            style: TextStyle(color: Colors.white),
-          ),
-        ),
+
       ],
     );
   }

+ 105 - 0
lib/project/addmember.dart

@@ -0,0 +1,105 @@
+import 'package:flutter/material.dart';
+import 'package:namer_app/footer.dart';
+import 'package:namer_app/header.dart';
+import 'package:namer_app/service/addproj_serv.dart';
+
+class AddMemberPage extends StatelessWidget {
+  const AddMemberPage({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    var projname = TextEditingController();
+    var projdesc = TextEditingController();
+    return Scaffold(
+      appBar: CustomAppbar(),
+      backgroundColor: Colors.white,
+      body: Column(
+        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+        children: [
+          Center(
+              child: Row(
+            mainAxisAlignment: MainAxisAlignment.center,
+            children: [
+              Text(
+                'ADD MEMBER',
+                style: TextStyle(color: Colors.black, fontSize: 48),
+              ),
+            ],
+          )),
+          Column(
+            children: [
+              Padding(
+                padding: const EdgeInsets.all(8.0),
+                child: SizedBox(
+                  width: 396,
+                  child: TextField(
+                    decoration: InputDecoration(
+                        border: OutlineInputBorder(),
+                        focusedBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        enabledBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        labelText: 'Enter User ID', //todo get data
+                        labelStyle: TextStyle(color: Colors.black),
+                        filled: true,
+                        fillColor: Colors.white.withOpacity(0.25)),
+                    cursorColor: Colors.black,
+                    style: TextStyle(color: Colors.black),
+                    controller: projname,
+                  ),
+                ),
+              ),
+              Padding(
+                padding: const EdgeInsets.all(8.0),
+                child: SizedBox(
+                  width: 396,
+                  child: TextField(
+                    decoration: InputDecoration(
+                        border: OutlineInputBorder(),
+                        focusedBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        enabledBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        labelText: 'Enter Role', //todo get data
+                        labelStyle: TextStyle(color: Colors.black),
+                        filled: true,
+                        fillColor: Colors.white.withOpacity(0.25)),
+                    cursorColor: Colors.black,
+                    style: TextStyle(color: Colors.black),
+                    controller: projdesc,
+                  ),
+                ),
+              ),
+              Padding(
+                padding: const EdgeInsets.all(20.0),
+                child: SizedBox(
+                  width: 396,
+                  height: 61,
+                  child: ElevatedButton(
+                    onPressed: () => addproject(context, projname.text, projdesc.text), 
+                    style: ElevatedButton.styleFrom(
+                      backgroundColor: Colors.black, //todo putih lage
+                      side: BorderSide(color: Colors.white),
+                      shape: RoundedRectangleBorder(
+                        borderRadius: BorderRadius.circular(12.0),
+                      ),
+                    ),
+                    child: Text(
+                      'Save',
+                      style: TextStyle(color: Colors.white),
+                    ),
+                  ),
+                ),
+              ),
+            ],
+          ),
+        ],
+      ),
+      bottomNavigationBar: Footer(),
+    );
+  }
+}

+ 105 - 0
lib/project/addproject.dart

@@ -0,0 +1,105 @@
+import 'package:flutter/material.dart';
+import 'package:namer_app/footer.dart';
+import 'package:namer_app/header.dart';
+import 'package:namer_app/service/addproj_serv.dart';
+
+class AddProjectPage extends StatelessWidget {
+  const AddProjectPage({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    var projname = TextEditingController();
+    var projdesc = TextEditingController();
+    return Scaffold(
+      appBar: CustomAppbar(),
+      backgroundColor: Colors.white,
+      body: Column(
+        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+        children: [
+          Center(
+              child: Row(
+            mainAxisAlignment: MainAxisAlignment.center,
+            children: [
+              Text(
+                'ADD PROJECT',
+                style: TextStyle(color: Colors.black, fontSize: 48),
+              ),
+            ],
+          )),
+          Column(
+            children: [
+              Padding(
+                padding: const EdgeInsets.all(8.0),
+                child: SizedBox(
+                  width: 396,
+                  child: TextField(
+                    decoration: InputDecoration(
+                        border: OutlineInputBorder(),
+                        focusedBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        enabledBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        labelText: 'Enter Project Name', //todo get data
+                        labelStyle: TextStyle(color: Colors.black),
+                        filled: true,
+                        fillColor: Colors.white.withOpacity(0.25)),
+                    cursorColor: Colors.black,
+                    style: TextStyle(color: Colors.black),
+                    controller: projname,
+                  ),
+                ),
+              ),
+              Padding(
+                padding: const EdgeInsets.all(8.0),
+                child: SizedBox(
+                  width: 396,
+                  child: TextField(
+                    decoration: InputDecoration(
+                        border: OutlineInputBorder(),
+                        focusedBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        enabledBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        labelText: 'Enter Project Description', //todo get data
+                        labelStyle: TextStyle(color: Colors.black),
+                        filled: true,
+                        fillColor: Colors.white.withOpacity(0.25)),
+                    cursorColor: Colors.black,
+                    style: TextStyle(color: Colors.black),
+                    controller: projdesc,
+                  ),
+                ),
+              ),
+              Padding(
+                padding: const EdgeInsets.all(20.0),
+                child: SizedBox(
+                  width: 396,
+                  height: 61,
+                  child: ElevatedButton(
+                    onPressed: () => addproject(context, projname.text, projdesc.text), 
+                    style: ElevatedButton.styleFrom(
+                      backgroundColor: Colors.black, //todo putih lage
+                      side: BorderSide(color: Colors.white),
+                      shape: RoundedRectangleBorder(
+                        borderRadius: BorderRadius.circular(12.0),
+                      ),
+                    ),
+                    child: Text(
+                      'Save',
+                      style: TextStyle(color: Colors.white),
+                    ),
+                  ),
+                ),
+              ),
+            ],
+          ),
+        ],
+      ),
+      bottomNavigationBar: Footer(),
+    );
+  }
+}

+ 100 - 0
lib/project/editproject.dart

@@ -0,0 +1,100 @@
+import 'package:flutter/material.dart';
+import 'package:namer_app/footer.dart';
+import 'package:namer_app/header.dart';
+
+class EditProjectPage extends StatelessWidget {
+  const EditProjectPage({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: CustomAppbar(),
+      backgroundColor: Colors.white,
+      body: Column(
+        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+        children: [
+          Center(
+              child: Row(
+            mainAxisAlignment: MainAxisAlignment.center,
+            children: [
+              Text(
+                'EDIT PROJECT',
+                style: TextStyle(color: Colors.black, fontSize: 48),
+              ),
+            ],
+          )),
+          Column(
+            children: [
+              Padding(
+                padding: const EdgeInsets.all(8.0),
+                child: SizedBox(
+                  width: 396,
+                  child: TextField(
+                    decoration: InputDecoration(
+                        border: OutlineInputBorder(),
+                        focusedBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        enabledBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        labelText: 'Enter Project Name', //todo get data
+                        labelStyle: TextStyle(color: Colors.black),
+                        filled: true,
+                        fillColor: Colors.white.withOpacity(0.25)),
+                    cursorColor: Colors.black,
+                    style: TextStyle(color: Colors.black),
+                  ),
+                ),
+              ),
+              Padding(
+                padding: const EdgeInsets.all(8.0),
+                child: SizedBox(
+                  width: 396,
+                  child: TextField(
+                    decoration: InputDecoration(
+                        border: OutlineInputBorder(),
+                        focusedBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        enabledBorder: OutlineInputBorder(
+                            borderRadius: BorderRadius.all(Radius.circular(12)),
+                            borderSide: BorderSide(color: Colors.black)),
+                        labelText: 'Enter Project Description', //todo get data
+                        labelStyle: TextStyle(color: Colors.black),
+                        filled: true,
+                        fillColor: Colors.white.withOpacity(0.25)),
+                    cursorColor: Colors.black,
+                    style: TextStyle(color: Colors.black),
+                  ),
+                ),
+              ),
+              Padding(
+                padding: const EdgeInsets.all(20.0),
+                child: SizedBox(
+                  width: 396,
+                  height: 61,
+                  child: ElevatedButton(
+                    onPressed: null, //todo save edit
+                    style: ElevatedButton.styleFrom(
+                      backgroundColor: Colors.black, //todo putih lage
+                      side: BorderSide(color: Colors.white),
+                      shape: RoundedRectangleBorder(
+                        borderRadius: BorderRadius.circular(12.0),
+                      ),
+                    ),
+                    child: Text(
+                      'Edit',
+                      style: TextStyle(color: Colors.white),
+                    ),
+                  ),
+                ),
+              ),
+            ],
+          ),
+        ],
+      ),
+      bottomNavigationBar: Footer(),
+    );
+  }
+}

+ 35 - 2
lib/platform/listmember.dart

@@ -1,11 +1,44 @@
+// ignore_for_file: must_call_super, prefer_typing_uninitialized_variables
+
+import 'package:dio/dio.dart';
 import 'package:flutter/material.dart';
 import 'package:namer_app/data/datamember.dart';
 import 'package:namer_app/footer.dart';
 import 'package:namer_app/header.dart';
+import '../globals.dart';
+
+class ListMemberPage extends StatefulWidget {
+  final int id;
+  const ListMemberPage({super.key, required this.id});
+
+  @override
+  State<ListMemberPage> createState() => _ListMemberPageState();
+}
 
-class ListMemberPage extends StatelessWidget {
-  const ListMemberPage({super.key});
+class _ListMemberPageState extends State<ListMemberPage> {
+var jsonList;
+@override
+void initState(){
+  getData();
+}
 
+void getData() async { 
+    try { 
+      var response = await Dio() 
+          // .get('http://localhost:8080/api/v1/projects/$id/member',
+          .get('http://localhost:8080/api/v1/projects/member',
+          options: Options(headers: headers)); 
+      if (response.statusCode == 200) { 
+        setState(() { 
+          jsonList = response.data['results'] as List; 
+        }); 
+      } else { 
+        print(response.statusCode); 
+      } 
+    } catch (e) { 
+      print(e); 
+    } 
+  } 
   @override
   Widget build(BuildContext context) {
     return Scaffold(

+ 137 - 0
lib/project/listproject.dart

@@ -0,0 +1,137 @@
+// ignore_for_file: must_call_super, prefer_typing_uninitialized_variables
+
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import 'package:namer_app/footer.dart';
+import 'package:namer_app/header.dart';
+import 'package:namer_app/service/delete_project.dart';
+import '../globals.dart';
+
+class ListProjectPage extends StatefulWidget {
+  const ListProjectPage({super.key});
+
+  @override
+  State<ListProjectPage> createState() => _ListProjectPageState();
+}
+
+class _ListProjectPageState extends State<ListProjectPage> {
+  var jsonList;
+@override
+void initState(){
+  getData();
+}
+
+void getData() async { 
+    try { 
+      var response = await Dio() 
+          .get('http://localhost:8080/api/v1/projects',
+          options: Options(headers: headers)); 
+      if (response.statusCode == 200) { 
+        setState(() { 
+          jsonList = response.data['results'] as List; 
+        }); 
+      } else { 
+        print(response.statusCode); 
+      } 
+    } catch (e) { 
+      print(e); 
+    } 
+  } 
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: CustomAppbar(),
+      body: Stack(children: [
+        SingleChildScrollView(
+          child: Column(
+            children: [
+              Center(
+                  child: Row(
+                mainAxisAlignment: MainAxisAlignment.center,
+                children: [
+                  Text(
+                    'LIST PROJECT',
+                    style: TextStyle(color: Colors.black, fontSize: 48),
+                  ),
+                ],
+              )),
+              Column(
+                children: List.generate(
+                    jsonList == null ? 0 : jsonList.length,
+                    (i) => SizedBox(
+                          child: ListTile(
+                            leading: SizedBox(
+                              child: Icon(Icons.phone),
+                            ),
+                            title: Text(jsonList[i]['name']),
+                            subtitle: Column(
+                              crossAxisAlignment: CrossAxisAlignment.start,
+                              children: [
+                                Text(jsonList[i]['description']),
+                                Text(jsonList[i]['owner']['name'])
+                              ],
+                            ),
+                            trailing: ButtonUser(
+                              items: jsonList[i],
+                            ),
+                          ),
+                        )),
+              ),
+            ],
+          ),
+        ),
+      ]),
+      bottomNavigationBar: Footer(),
+    );
+  }
+}
+
+class ButtonUser extends StatelessWidget {
+  final Map<String, dynamic> items;
+  ButtonUser({
+    required this.items,
+    super.key,
+  });
+//todo edit platform
+  //todo tombol item
+  //todo tombol delete
+  @override
+  Widget build(BuildContext context) {
+    return Row(
+      mainAxisSize: MainAxisSize.min,
+      children: [
+        ElevatedButton(
+          onPressed: () => context.go('/editproject'),
+          style: ElevatedButton.styleFrom(
+            backgroundColor: Colors.black,
+          ),
+          child: Text(
+            'Edit',
+            style: TextStyle(color: Colors.white),
+          ),
+        ),
+        ElevatedButton(
+          onPressed: () => delproject(context, items['id']),
+          style: ElevatedButton.styleFrom(
+            backgroundColor: Colors.black,
+          ),
+          child: Text(
+            'Delete',
+            style: TextStyle(color: Colors.white),
+          ),
+        ),
+                ElevatedButton(
+          onPressed: () => context.go('/listplatform/listmember'),
+          style: ElevatedButton.styleFrom(
+            backgroundColor: Colors.black,
+          ),
+          child: Text(
+            'Member',
+            style: TextStyle(color: Colors.white),
+          ),
+        ),
+      ],
+    );
+  }
+}

+ 46 - 0
lib/service/addbug_serv.dart

@@ -0,0 +1,46 @@
+// ignore_for_file: use_build_context_synchronously
+
+import 'dart:convert';
+
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import '../globals.dart';
+
+Future<void> addbug(BuildContext context, String desc, String qc, String dev, String platform, String goodday, String image, String level, String status, String devStatus /*Map data*/) async {
+    final dio = Dio();
+    Response response;
+
+    AlertDialog alert2 = AlertDialog(
+      title: Text("Add Bug Gagal"),
+      content: Text("Data Invalid"),
+      actions: [
+        TextButton( 
+          child: Text('Ok'),
+          onPressed: () => Navigator.of(context).pop(),
+        ),
+      ],
+    );
+        var auth = 'Basic ${base64Encode(utf8.encode('$USER_LOGIN:$PASS_LOGIN'))}';
+        Map<String, String> headers = {
+          'content-type': 'application/json',
+          'accept': 'application/json',
+          'authorization': auth
+      };
+    try{
+      response = await dio.post("http://localhost:8080/api/v1/bugs", 
+                  options: Options(headers: headers),
+                  data: 
+                  // data 
+                  {'description':desc, 'qc': qc, 'dev': dev, 'platform':platform, 'goodday_url':goodday, 'image_url':image, 'level':level, 'status':status, 'dev_status':devStatus}
+                  );    
+      if (response.statusCode == 201){
+          return context.go('/listbug');
+      } 
+    } catch (error){     
+      
+      showDialog(context: context, builder: (context) => alert2);
+      }
+          
+  }
+

+ 46 - 0
lib/service/addplatform_serv.dart

@@ -0,0 +1,46 @@
+// ignore_for_file: use_build_context_synchronously
+
+import 'dart:convert';
+
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import '../globals.dart';
+
+Future<void> addplatform(BuildContext context, String name, String projName /*Map data*/) async {
+    final dio = Dio();
+    Response response;
+
+    AlertDialog alert2 = AlertDialog(
+      title: Text("Add Platform Gagal"),
+      content: Text("Data Invalid"),
+      actions: [
+        TextButton( 
+          child: Text('Ok'),
+          onPressed: () => Navigator.of(context).pop(),
+        ),
+      ],
+    );
+        var auth = 'Basic ${base64Encode(utf8.encode('$USER_LOGIN:$PASS_LOGIN'))}';
+        Map<String, String> headers = {
+          'content-type': 'application/json',
+          'accept': 'application/json',
+          'authorization': auth
+      };
+    try{
+      response = await dio.post("http://localhost:8080/api/v1/platforms", 
+                  options: Options(headers: headers),
+                  data: 
+                  // data 
+                  {'name':name,'project_name':projName}
+                  );    
+      if (response.statusCode == 201){
+          return context.go('/listplatform');
+      } 
+    } catch (error){     
+      
+      showDialog(context: context, builder: (context) => alert2);
+      }
+          
+  }
+

+ 46 - 0
lib/service/addproj_serv.dart

@@ -0,0 +1,46 @@
+// ignore_for_file: use_build_context_synchronously
+
+import 'dart:convert';
+
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import '../globals.dart';
+
+Future<void> addproject(BuildContext context, String name, String description /*Map data*/) async {
+    final dio = Dio();
+    Response response;
+
+    AlertDialog alert2 = AlertDialog(
+      title: Text("Add Project Gagal"),
+      content: Text("Data Invalid"),
+      actions: [
+        TextButton( 
+          child: Text('Ok'),
+          onPressed: () => Navigator.of(context).pop(),
+        ),
+      ],
+    );
+        var auth = 'Basic ${base64Encode(utf8.encode('$USER_LOGIN:$PASS_LOGIN'))}';
+        Map<String, String> headers = {
+          'content-type': 'application/json',
+          'accept': 'application/json',
+          'authorization': auth
+      };
+    try{
+      response = await dio.post("http://localhost:8080/api/v1/projects", 
+                  options: Options(headers: headers),
+                  data: 
+                  // data 
+                  {'name':name,'description':description}
+                  );    
+      if (response.statusCode == 201){
+          return context.go('/listproject');
+      } 
+    } catch (error){     
+      
+      showDialog(context: context, builder: (context) => alert2);
+      }
+          
+  }
+

+ 49 - 0
lib/service/delete_bug.dart

@@ -0,0 +1,49 @@
+
+// ignore_for_file: use_build_context_synchronously
+
+import 'dart:convert';
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import '../globals.dart';
+
+Future<void> delbug(BuildContext context, int id) async{
+  final dio = Dio();
+  Response response;
+    AlertDialog alert = AlertDialog(
+      title: Text("Delete Sukses"),
+      content: Text("Data terhapus"),
+      actions: [
+        TextButton( 
+          child: Text('Ok'),
+          onPressed: () => Navigator.of(context).pop(),
+        ),
+      ],
+    );
+        AlertDialog alert2 = AlertDialog(
+      title: Text("Delete Gagal"),
+      content: Text("Data Invalid"),
+      actions: [
+        TextButton( 
+          child: Text('Ok'),
+          onPressed: () => Navigator.of(context).pop(),
+        ),
+      ],
+    );
+            var auth = 'Basic ${base64Encode(utf8.encode('$USER_LOGIN:$PASS_LOGIN'))}';
+        Map<String, String> headers = {
+          'content-type': 'application/json',
+          'accept': 'application/json',
+          'authorization': auth
+      };
+try {
+  response = await dio.delete("http://localhost:8080/api/v1/bugs/$id",
+              options: Options(headers: headers)
+              );
+  if(response.statusCode == 200){
+    showDialog(context: context, builder: (context) => alert);
+    
+  }
+} catch (error){
+  showDialog(context: context, builder: (context) => alert2);
+}
+} 

+ 49 - 0
lib/service/delete_platform.dart

@@ -0,0 +1,49 @@
+
+// ignore_for_file: use_build_context_synchronously
+
+import 'dart:convert';
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import '../globals.dart';
+
+Future<void> delplatform(BuildContext context, int id) async{
+  final dio = Dio();
+  Response response;
+    AlertDialog alert = AlertDialog(
+      title: Text("Delete Sukses"),
+      content: Text("Data terhapus"),
+      actions: [
+        TextButton( 
+          child: Text('Ok'),
+          onPressed: () => Navigator.of(context).pop(),
+        ),
+      ],
+    );
+        AlertDialog alert2 = AlertDialog(
+      title: Text("Delete Gagal"),
+      content: Text("Data Invalid"),
+      actions: [
+        TextButton( 
+          child: Text('Ok'),
+          onPressed: () => Navigator.of(context).pop(),
+        ),
+      ],
+    );
+            var auth = 'Basic ${base64Encode(utf8.encode('$USER_LOGIN:$PASS_LOGIN'))}';
+        Map<String, String> headers = {
+          'content-type': 'application/json',
+          'accept': 'application/json',
+          'authorization': auth
+      };
+try {
+  response = await dio.delete("http://localhost:8080/api/v1/platforms/$id",
+              options: Options(headers: headers)
+              );
+  if(response.statusCode == 200){
+    showDialog(context: context, builder: (context) => alert);
+    
+  }
+} catch (error){
+  showDialog(context: context, builder: (context) => alert2);
+}
+} 

+ 49 - 0
lib/service/delete_project.dart

@@ -0,0 +1,49 @@
+
+// ignore_for_file: use_build_context_synchronously
+
+import 'dart:convert';
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import '../globals.dart';
+
+Future<void> delproject(BuildContext context, int id) async{
+  final dio = Dio();
+  Response response;
+    AlertDialog alert = AlertDialog(
+      title: Text("Delete Sukses"),
+      content: Text("Data terhapus"),
+      actions: [
+        TextButton( 
+          child: Text('Ok'),
+          onPressed: () => Navigator.of(context).pop(),
+        ),
+      ],
+    );
+        AlertDialog alert2 = AlertDialog(
+      title: Text("Delete Gagal"),
+      content: Text("Data Invalid"),
+      actions: [
+        TextButton( 
+          child: Text('Ok'),
+          onPressed: () => Navigator.of(context).pop(),
+        ),
+      ],
+    );
+            var auth = 'Basic ${base64Encode(utf8.encode('$USER_LOGIN:$PASS_LOGIN'))}';
+        Map<String, String> headers = {
+          'content-type': 'application/json',
+          'accept': 'application/json',
+          'authorization': auth
+      };
+try {
+  response = await dio.delete("http://localhost:8080/api/v1/projects/$id",
+              options: Options(headers: headers)
+              );
+  if(response.statusCode == 200){
+    showDialog(context: context, builder: (context) => alert);
+    
+  }
+} catch (error){
+  showDialog(context: context, builder: (context) => alert2);
+}
+} 

+ 1 - 1
lib/service/delete_user.dart

@@ -6,7 +6,7 @@ import 'package:dio/dio.dart';
 import 'package:flutter/material.dart';
 import '../globals.dart';
 
-Future<void> delete(BuildContext context, int id) async{
+Future<void> deluser(BuildContext context, int id) async{
   final dio = Dio();
   Response response;
     AlertDialog alert = AlertDialog(

+ 1 - 1
lib/user/listuser.dart

@@ -105,7 +105,7 @@ class ButtonUser extends StatelessWidget {
         ),
         ElevatedButton(
           //todo tombol item
-          onPressed: () => delete(context, items['id']),
+          onPressed: () => deluser(context, items['id']),
           style: ElevatedButton.styleFrom(
             backgroundColor: Colors.black,
           ),