build_app
This commit is contained in:
		
							parent
							
								
									5a8120e7be
								
							
						
					
					
						commit
						bf83908166
					
				| @ -72,6 +72,9 @@ public class BuilderService { | ||||
| addCustomMenu( "Forma",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| addCustomMenu( "Forma",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("dashboard and menu inserted..."); | ||||
| 
 | ||||
|  | ||||
| @ -24,12 +24,6 @@ import com.realnet.basic.Services.FormaService ; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/Forma") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| @ -48,12 +42,6 @@ public class FormaController { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Forma") | ||||
| 		  public Forma Savedata(@RequestBody Forma data) { | ||||
| 		Forma save = Service.Savedata(data)	; | ||||
| @ -64,12 +52,6 @@ public class FormaController { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| @ -122,10 +104,4 @@ public class FormaController { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -12,12 +12,6 @@ import com.realnet.WhoColumn.Entity.Extension; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  @Entity  | ||||
|  @Data | ||||
|  public class    Forma extends Extension {  | ||||
| @ -32,23 +26,6 @@ import com.realnet.WhoColumn.Entity.Extension; | ||||
| 
 | ||||
| private String  name; | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
|   | ||||
| 
 | ||||
| private String q; | ||||
|   | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| private String b; | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| private int numberd; | ||||
| 
 | ||||
| private int numberc; | ||||
|  | ||||
| @ -16,12 +16,6 @@ import java.util.*; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
|  | ||||
| @ -20,12 +20,6 @@ import com.realnet.users.entity1.AppUser; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| @Service | ||||
| @ -43,12 +37,6 @@ private FormaRepository Repository; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| public Forma Savedata(Forma data) { | ||||
| 
 | ||||
| 
 | ||||
| @ -58,12 +46,6 @@ public Forma Savedata(Forma data) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	data.setUpdatedBy(getUser().getUserId()); | ||||
| 		data.setCreatedBy(getUser().getUserId()); | ||||
| 		data.setAccountId(getUser().getAccount().getAccount_id()); | ||||
| @ -97,21 +79,6 @@ public Forma update(Forma data,Integer id) { | ||||
| 	Forma old = Repository.findById(id).get(); | ||||
| old.setName(data.getName()); | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| old.setQ(data.getQ()); | ||||
|   | ||||
| 
 | ||||
|   | ||||
| old.setB(data.getB()); | ||||
|   | ||||
| 
 | ||||
|    | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| old.setNumberd(data.getNumberd()); | ||||
| 
 | ||||
| old.setNumberc(data.getNumberc()); | ||||
| @ -129,12 +96,6 @@ final Forma test = Repository.save(old); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public AppUser getUser() { | ||||
| 		AppUser user = userService.getLoggedInUser(); | ||||
| 		return user; | ||||
|  | ||||
| @ -1,2 +1,2 @@ | ||||
| CREATE TABLE db.Forma(id BIGINT NOT NULL AUTO_INCREMENT, numberd int, q VARCHAR(400), numberc int, b VARCHAR(400), calculateadd VARCHAR(400), valuell VARCHAR(400), datagg VARCHAR(400), name VARCHAR(400),  PRIMARY KEY (id)); | ||||
| CREATE TABLE db.Forma(id BIGINT NOT NULL AUTO_INCREMENT, numberd int, numberc int, calculateadd VARCHAR(400), name VARCHAR(400),  PRIMARY KEY (id)); | ||||
| 
 | ||||
|  | ||||
| @ -59,12 +59,6 @@ Future<List<Map<String, dynamic>>> getAllWithPagination( | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   Future<void> updateEntity( int entityId, Map<String, dynamic> entity) async { | ||||
|     try { | ||||
| @ -91,10 +85,4 @@ Future<List<Map<String, dynamic>>> getAllWithPagination( | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -43,12 +43,6 @@ import '../../../../Reuseable/reusable_dropdown_field.dart'; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| class formaCreateEntityScreen extends StatefulWidget { | ||||
|   const formaCreateEntityScreen({super.key}); | ||||
| 
 | ||||
| @ -63,128 +57,6 @@ final Map<String, dynamic> formData = {}; | ||||
|   final TextEditingController nameController = TextEditingController(); | ||||
| 
 | ||||
| 
 | ||||
|   final TextEditingController fieldggController = TextEditingController(); | ||||
| 
 | ||||
| 
 | ||||
|   late Future<List<Map<String, dynamic>>> _valuelldataFuture; // Data from fetchData | ||||
| 
 | ||||
|   Future<List<Map<String, dynamic>>> valuellfetchData() async { | ||||
|      | ||||
|     final resp = await apiService.getEntities(); | ||||
| 
 | ||||
|       if (resp != null) { | ||||
|              return resp; | ||||
|       } else { | ||||
|         throw Exception('Failed to load data: '); | ||||
|       } | ||||
|    | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
|   void showvaluellDialog(BuildContext context) { | ||||
|     showDialog( | ||||
|       context: context, | ||||
|       builder: (BuildContext context) { | ||||
|         return SingleChildScrollView( | ||||
|           child: AlertDialog( | ||||
|             title: const Text('Select a record'), | ||||
|             content: FutureBuilder<List<Map<String, dynamic>>>( | ||||
|               future: _valuelldataFuture, | ||||
|               builder: (context, snapshot) { | ||||
|                 if (snapshot.connectionState == ConnectionState.waiting) { | ||||
|                   return const Center(child: CircularProgressIndicator()); | ||||
|                 } else if (snapshot.hasError) { | ||||
|                   return Center(child: Text('Error: ${snapshot.error}')); | ||||
|                 } else if (!snapshot.hasData || snapshot.data!.isEmpty) { | ||||
|                   return const Center(child: Text('No data available..')); | ||||
|                 } else { | ||||
| final List<String> columnsToShow = [ | ||||
| 
 | ||||
|                      | ||||
|   | ||||
| 
 | ||||
|                     'name',  | ||||
|                       | ||||
| 
 | ||||
|                     ]; | ||||
|                   return SingleChildScrollView( | ||||
|                     scrollDirection: Axis.horizontal, | ||||
|                     child: DataTable( | ||||
|                       columnSpacing: 30, | ||||
|                       headingRowColor: MaterialStateColor.resolveWith( | ||||
|                           (states) => Colors.blue.shade100), | ||||
|                       dataRowColor: MaterialStateColor.resolveWith( | ||||
|                           (states) => Colors.white), | ||||
|                       dividerThickness: 0.5, | ||||
|                       columns: columnsToShow | ||||
|                           .map( | ||||
|                             (key) => DataColumn( | ||||
|                               label: Text( | ||||
|                                 key, | ||||
|                                 style: const TextStyle( | ||||
|                                     fontWeight: FontWeight.bold, fontSize: 16), | ||||
|                               ), | ||||
|                             ), | ||||
|                           ) | ||||
|                           .toList(), | ||||
|                       rows: snapshot.data!.map((item) { | ||||
|                         return DataRow( | ||||
|                             cells: columnsToShow.map((key) { | ||||
|                           return DataCell( | ||||
|                             Text( | ||||
|                               item[key].toString(), | ||||
|                               style: const TextStyle(fontSize: 14), | ||||
|                             ), | ||||
|                             onTap: () { | ||||
|                               setState(() { | ||||
| 
 | ||||
|   | ||||
|                                 nameController.text = item['name'] ?? ''; | ||||
|   | ||||
| 
 | ||||
|                                 // Add more fields as needed | ||||
|                               }); | ||||
|                               Navigator.pop(context); | ||||
|                             }, | ||||
|                           ); | ||||
|                         }).toList()); | ||||
|                       }).toList(), | ||||
|                     ), | ||||
|                   ); | ||||
|                 } | ||||
|               }, | ||||
|             ), | ||||
|             actions: [ | ||||
|               TextButton( | ||||
|                 child: const Text('Close'), | ||||
|                 onPressed: () { | ||||
|                   Navigator.of(context).pop(); | ||||
|                 }, | ||||
|               ), | ||||
|             ], | ||||
|           ), | ||||
|         ); | ||||
|       }, | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
|   late Future<List<Map<String, dynamic>>> _dataggdataFuture; // Data from fetchData | ||||
| 
 | ||||
|   Future<List<Map<String, dynamic>>> dataggfetchData() async { | ||||
|      | ||||
| final provider = | ||||
|           Provider.of<FormaViewModelScreen>(context, listen: false); | ||||
|     final resp = await provider.getdataggGrid(); | ||||
| 
 | ||||
|       if (resp != null) { | ||||
|              return resp; | ||||
|       } else { | ||||
|         throw Exception('Failed to load data: '); | ||||
|       } | ||||
|    | ||||
|   } | ||||
| 
 | ||||
|   final TextEditingController numberdController = TextEditingController(); | ||||
| 
 | ||||
| 
 | ||||
| @ -290,14 +162,6 @@ int.parse(numbercController.text) / | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     _valuelldataFuture = valuellfetchData(); // Initialize _dataFuture with the function | ||||
| 
 | ||||
| 
 | ||||
|     _dataggdataFuture = dataggfetchData(); // Initialize _dataFuture with the function | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -326,19 +190,6 @@ int.parse(numbercController.text) / | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  actions: [ | ||||
|           IconButton( | ||||
|             icon: const Icon(Icons.grid_on), | ||||
|             onPressed: () { | ||||
|               showvaluellDialog(context); | ||||
|             }, | ||||
|           ), | ||||
|         ], | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -362,62 +213,6 @@ int.parse(numbercController.text) / | ||||
|   SizedBox(height: 16), | ||||
| 
 | ||||
| 
 | ||||
| Container( | ||||
|   padding: EdgeInsets.all(16.0), | ||||
|   decoration: BoxDecoration( | ||||
|     color: Colors.grey[200], | ||||
|     borderRadius: BorderRadius.circular(8.0), | ||||
|     boxShadow: [ | ||||
|       BoxShadow( | ||||
|         color: Colors.black.withOpacity(0.2), | ||||
|         spreadRadius: 2, | ||||
|         blurRadius: 4, | ||||
|         offset: Offset(0, 2), | ||||
|       ), | ||||
|     ], | ||||
|   ), | ||||
|   child: Column( | ||||
|     children: [ | ||||
|       Text( | ||||
|         "Fieldgg", | ||||
|         style: TextStyle( | ||||
|           fontSize: 18, | ||||
|           fontWeight: FontWeight.bold, | ||||
|         ), | ||||
|       ), | ||||
|       SizedBox(height: 16), | ||||
| 
 | ||||
|   | ||||
| ReusableTextField( | ||||
|   onSaved:(value) => formData['q'] = value , | ||||
|   label:"Enter Q", | ||||
|   // ValidationProperties | ||||
| ), | ||||
| 
 | ||||
|   SizedBox(height: 16), | ||||
|   | ||||
| 
 | ||||
|   | ||||
| ReusableTextField( | ||||
|   onSaved:(value) => formData['b'] = value , | ||||
|   label:"Enter B", | ||||
|   // ValidationProperties | ||||
| ), | ||||
| 
 | ||||
|   SizedBox(height: 16), | ||||
|   | ||||
| 
 | ||||
|  SizedBox(height: 16), | ||||
|     ], | ||||
|   ), | ||||
| ), | ||||
| const SizedBox(height: 16), | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ReusableTextField( | ||||
|                   controller: numberdController, | ||||
| 
 | ||||
| @ -498,12 +293,6 @@ SizedBox(height: 16), | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
|                       try { | ||||
|                         print(formData); | ||||
| @ -516,12 +305,6 @@ SizedBox(height: 16), | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
|                         Navigator.pop(context); | ||||
| @ -554,58 +337,6 @@ SizedBox(height: 16), | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|                 SizedBox(height: 16), | ||||
| 
 | ||||
| FutureBuilder<List<Map<String, dynamic>>>( | ||||
|       future: _dataggdataFuture, | ||||
|       builder: (context, snapshot) { | ||||
|         if (snapshot.connectionState == ConnectionState.waiting) { | ||||
|           return const Center(child: CircularProgressIndicator()); | ||||
|         } else if (snapshot.hasError) { | ||||
|           return Center(child: Text('Error: ${snapshot.error}')); | ||||
|         } else if (!snapshot.hasData || snapshot.data!.isEmpty) { | ||||
|           return const Center(child: Text('No data available..')); | ||||
|         } else { | ||||
|           final keys = snapshot.data!.first.keys.toList(); | ||||
| 
 | ||||
|           return SingleChildScrollView( | ||||
|             scrollDirection: Axis.horizontal, | ||||
|             child: DataTable( | ||||
|               columnSpacing: 30, | ||||
|               headingRowColor: MaterialStateColor.resolveWith((states) => Colors.blue.shade100), | ||||
|               dataRowColor: MaterialStateColor.resolveWith((states) => Colors.white), | ||||
|               dividerThickness: 0.5, | ||||
|               columns: keys.map( | ||||
|                     (key) => DataColumn( | ||||
|                   label: Text( | ||||
|                     key, | ||||
|                     style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 16), | ||||
|                   ), | ||||
|                 ), | ||||
|               ) | ||||
|                   .toList(), | ||||
|               rows: snapshot.data!.map((item) { | ||||
|                 return DataRow(cells: keys.map((key) { | ||||
|                   return DataCell( | ||||
|                     Text( | ||||
|                       item[key].toString(), | ||||
|                       style: const TextStyle(fontSize: 14), | ||||
|                     ), | ||||
|                   ); | ||||
|                 }).toList()); | ||||
|               }).toList(), | ||||
|             ), | ||||
|           ); | ||||
|         } | ||||
|       }, | ||||
|     ), | ||||
|                 SizedBox(height: 16), | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|    ], | ||||
|  | ||||
| @ -57,12 +57,6 @@ class _forma_entity_list_screenState extends State<forma_entity_list_screen> { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   Future<void> fetchwithoutpaging() async { | ||||
|     try { | ||||
|         final provider = | ||||
| @ -186,34 +180,6 @@ Future<void> fetchEntities() async { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
|               | ||||
|  entity['q'].toString().toLowerCase().contains(keyword.toLowerCase()) || | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
|               | ||||
|  entity['b'].toString().toLowerCase().contains(keyword.toLowerCase()) || | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|               | ||||
|  entity['datagg'].toString().toLowerCase().contains(keyword.toLowerCase()) || | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|               | ||||
|  entity['numberd'].toString().toLowerCase().contains(keyword.toLowerCase()) || | ||||
| @ -309,12 +275,6 @@ onTapArrowleft1(BuildContext context) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|             ], | ||||
|           ),        ], | ||||
|       ), | ||||
| @ -572,64 +532,6 @@ onTapArrowleft1(BuildContext context) { | ||||
|             ), | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
|   Padding( | ||||
|               padding: getPadding( | ||||
|                 top: 10, | ||||
|               ), | ||||
|               child: Row( | ||||
|                 mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                 children: [ | ||||
|                   Text( | ||||
|                     "Q : ", | ||||
|                     overflow: TextOverflow.ellipsis, | ||||
|                     textAlign: TextAlign.left, | ||||
|                     style: AppStyle.txtGilroyMedium16, | ||||
|                   ), | ||||
|                   Text( | ||||
|                     entity['q'].toString() ?? 'No Q Available', | ||||
|                     overflow: TextOverflow.ellipsis, | ||||
|                     textAlign: TextAlign.left, | ||||
|                     style: AppStyle.txtGilroyMedium16Bluegray900, | ||||
|                   ), | ||||
|                 ], | ||||
|               ), | ||||
|             ), | ||||
|   | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
|   Padding( | ||||
|               padding: getPadding( | ||||
|                 top: 10, | ||||
|               ), | ||||
|               child: Row( | ||||
|                 mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                 children: [ | ||||
|                   Text( | ||||
|                     "B : ", | ||||
|                     overflow: TextOverflow.ellipsis, | ||||
|                     textAlign: TextAlign.left, | ||||
|                     style: AppStyle.txtGilroyMedium16, | ||||
|                   ), | ||||
|                   Text( | ||||
|                     entity['b'].toString() ?? 'No B Available', | ||||
|                     overflow: TextOverflow.ellipsis, | ||||
|                     textAlign: TextAlign.left, | ||||
|                     style: AppStyle.txtGilroyMedium16Bluegray900, | ||||
|                   ), | ||||
|                 ], | ||||
|               ), | ||||
|             ), | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   Padding( | ||||
|               padding: getPadding( | ||||
|                 top: 10, | ||||
|  | ||||
| @ -40,12 +40,6 @@ class _formaUpdateEntityScreenState extends State<formaUpdateEntityScreen> { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -59,12 +53,6 @@ class _formaUpdateEntityScreenState extends State<formaUpdateEntityScreen> { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|    | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -97,12 +85,6 @@ class _formaUpdateEntityScreenState extends State<formaUpdateEntityScreen> { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|         ], | ||||
| ), | ||||
|       body:  SingleChildScrollView( | ||||
| @ -125,93 +107,6 @@ class _formaUpdateEntityScreenState extends State<formaUpdateEntityScreen> { | ||||
|                           SizedBox(height: 16), | ||||
| 
 | ||||
| 
 | ||||
| Container( | ||||
|   padding: EdgeInsets.all(16.0), | ||||
|   decoration: BoxDecoration( | ||||
|     color: Colors.grey[200], | ||||
|     borderRadius: BorderRadius.circular(8.0), | ||||
|     boxShadow: [ | ||||
|       BoxShadow( | ||||
|         color: Colors.black.withOpacity(0.2), | ||||
|         spreadRadius: 2, | ||||
|         blurRadius: 4, | ||||
|         offset: Offset(0, 2), | ||||
|       ), | ||||
|     ], | ||||
|   ), | ||||
|   child: Column( | ||||
|     children: [ | ||||
|       Text( | ||||
|         "Fieldgg", | ||||
|         style: TextStyle( | ||||
|           fontSize: 18, | ||||
|           fontWeight: FontWeight.bold, | ||||
|         ), | ||||
|       ), | ||||
|       SizedBox(height: 16), | ||||
|       | ||||
|        | ||||
|   | ||||
|       SizedBox(height: 16), | ||||
|       TextFormField( | ||||
|         initialValue: widget.entity['q'], | ||||
|         decoration: InputDecoration( | ||||
|           labelText: 'fieldgg q', | ||||
|         ), | ||||
|         onChanged: (value) { | ||||
|           setState(() { | ||||
|             widget.entity['q'] = value; | ||||
|           }); | ||||
|         }, | ||||
|       ), | ||||
|         | ||||
| 
 | ||||
|   | ||||
|       SizedBox(height: 16), | ||||
|       TextFormField( | ||||
|         initialValue: widget.entity['b'], | ||||
|         decoration: InputDecoration( | ||||
|           labelText: 'fieldgg b', | ||||
|         ), | ||||
|         onChanged: (value) { | ||||
|           setState(() { | ||||
|             widget.entity['b'] = value; | ||||
|           }); | ||||
|         }, | ||||
|       ), | ||||
|         | ||||
| 
 | ||||
|       SizedBox(height: 16), | ||||
|     ], | ||||
|   ), | ||||
| ), | ||||
| const SizedBox(height: 16), | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   Padding( | ||||
|                   padding: EdgeInsets.all(16), | ||||
|                   child: Column( | ||||
|                     crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                     children: <Widget>[ | ||||
|                        | ||||
| 
 | ||||
|                       ElevatedButton( | ||||
|                         onPressed: () { | ||||
|                           // Save changes logic here | ||||
|                            | ||||
| 
 | ||||
|                           Navigator.pop(context); | ||||
|                           // Implement API call to update data | ||||
|                         }, | ||||
|                         child: Text('Save'), | ||||
|                       ), | ||||
|                     ], | ||||
|                   ), | ||||
|                 ), | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  ReusableTextField( | ||||
|               initialValue: widget.entity['numberd'].toString(), | ||||
|               onSaved: (value) => widget.entity['numberd']= value, | ||||
| @ -262,12 +157,6 @@ const SizedBox(height: 16), | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|         | ||||
|                         try { | ||||
|                         await provider.updateEntity( | ||||
| @ -281,12 +170,6 @@ const SizedBox(height: 16), | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|                         Navigator.pop(context); | ||||
|  | ||||
| @ -65,20 +65,6 @@ class FormaRepoScreen { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  Future<dynamic> getdataggGrid() async { | ||||
|     try { | ||||
|       String apiUrl = "$baseUrl/Forma_ListFilter1/Forma_ListFilter1"; | ||||
|       final response = await _helper.getGetApiResponse(apiUrl); | ||||
|       return response; | ||||
|     } catch (e) { | ||||
|       throw Exception('Failed to Upload datagg: $e'); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -104,27 +104,6 @@ class FormaViewModelScreen extends ChangeNotifier{ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   late List<Map<String, dynamic>> dataggdataFuture = | ||||
|       []; // Data from fetchData | ||||
| 
 | ||||
|  Future<List<Map<String, dynamic>>>   getdataggGrid() async { | ||||
| 
 | ||||
|       try { | ||||
|      final value = await repo.getdataggGrid(); | ||||
|         dataggdataFuture =  (value as List) | ||||
|             .map((item) => item as Map<String, dynamic>) | ||||
|             .toList(); | ||||
| 
 | ||||
|    return dataggdataFuture; | ||||
|     } catch (e) { | ||||
|       throw Exception('Failed to get all: $e'); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -1,5 +1,6 @@ | ||||
| import '../../Entity/basic/Forma/FormaView/Forma_entity_list_screen.dart'; | ||||
| import '../../Entity/basic/Forma/Forma_viewModel/Forma_view_model_screen.dart'; | ||||
| 
 | ||||
| import '../../Entity/basic/Forma/FormaView/Forma_entity_list_screen.dart'; | ||||
| import '../../Entity/basic/Forma/Forma_viewModel/Forma_view_model_screen.dart'; | ||||
| 
 | ||||
| import 'package:base_project/utils/image_constant.dart'; | ||||
| import 'package:base_project/commans/widgets/custome_drawe_item.dart'; | ||||
| @ -73,22 +74,24 @@ Navigator.pushNamed(context, RouteNames.changePasswordView); | ||||
| ), | ||||
| 
 | ||||
| // NEW MENU | ||||
| DrawerItem( | ||||
|             color: AppColors.primary, | ||||
|             icon: Icons.chat_bubble, | ||||
|             title: 'Forma', | ||||
|             onTap: () { | ||||
|               Navigator.push( | ||||
|                 context, | ||||
|                 MaterialPageRoute( | ||||
|                   builder: (context) => ChangeNotifierProvider( | ||||
|                     create: (context) => FormaViewModelScreen(), | ||||
|                     child: forma_entity_list_screen(), | ||||
|                   ), | ||||
|                 ), | ||||
|               ); | ||||
|             }, | ||||
|           ), | ||||
| 
 | ||||
| 
 | ||||
| DrawerItem( | ||||
| color: AppColors.primary, | ||||
| icon: Icons.chat_bubble, | ||||
| title: 'Forma', | ||||
| onTap: () { | ||||
| Navigator.push( | ||||
| context, | ||||
| MaterialPageRoute( | ||||
| builder: (context) => ChangeNotifierProvider( | ||||
| create: (context) => FormaViewModelScreen(), | ||||
| child: forma_entity_list_screen(), | ||||
| ), | ||||
| ), | ||||
| ); | ||||
| }, | ||||
| ), | ||||
| 
 | ||||
| 
 | ||||
| DrawerItem( | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user