build_app
This commit is contained in:
parent
5a8120e7be
commit
bf83908166
@ -72,6 +72,9 @@ public class BuilderService {
|
|||||||
addCustomMenu( "Forma", "Transcations");
|
addCustomMenu( "Forma", "Transcations");
|
||||||
|
|
||||||
|
|
||||||
|
addCustomMenu( "Forma", "Transcations");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println("dashboard and menu inserted...");
|
System.out.println("dashboard and menu inserted...");
|
||||||
|
|
||||||
|
|||||||
@ -24,12 +24,6 @@ import com.realnet.basic.Services.FormaService ;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/Forma")
|
@RequestMapping(value = "/Forma")
|
||||||
@CrossOrigin("*")
|
@CrossOrigin("*")
|
||||||
@RestController
|
@RestController
|
||||||
@ -48,12 +42,6 @@ public class FormaController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/Forma")
|
@PostMapping("/Forma")
|
||||||
public Forma Savedata(@RequestBody Forma data) {
|
public Forma Savedata(@RequestBody Forma data) {
|
||||||
Forma save = Service.Savedata(data) ;
|
Forma save = Service.Savedata(data) ;
|
||||||
@ -64,12 +52,6 @@ public class FormaController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println("data saved..." + save);
|
System.out.println("data saved..." + save);
|
||||||
|
|
||||||
return save;
|
return save;
|
||||||
@ -122,10 +104,4 @@ public class FormaController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -12,12 +12,6 @@ import com.realnet.WhoColumn.Entity.Extension;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Data
|
@Data
|
||||||
public class Forma extends Extension {
|
public class Forma extends Extension {
|
||||||
@ -32,23 +26,6 @@ import com.realnet.WhoColumn.Entity.Extension;
|
|||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private String q;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private String b;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private int numberd;
|
private int numberd;
|
||||||
|
|
||||||
private int numberc;
|
private int numberc;
|
||||||
|
|||||||
@ -19,12 +19,6 @@ import java.util.*;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.realnet.basic.Entity.Forma;
|
import com.realnet.basic.Entity.Forma;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
|
|||||||
@ -20,12 +20,6 @@ import com.realnet.users.entity1.AppUser;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -43,12 +37,6 @@ private FormaRepository Repository;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Forma Savedata(Forma data) {
|
public Forma Savedata(Forma data) {
|
||||||
|
|
||||||
|
|
||||||
@ -58,12 +46,6 @@ public Forma Savedata(Forma data) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
data.setUpdatedBy(getUser().getUserId());
|
data.setUpdatedBy(getUser().getUserId());
|
||||||
data.setCreatedBy(getUser().getUserId());
|
data.setCreatedBy(getUser().getUserId());
|
||||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
data.setAccountId(getUser().getAccount().getAccount_id());
|
||||||
@ -97,21 +79,6 @@ public Forma update(Forma data,Integer id) {
|
|||||||
Forma old = Repository.findById(id).get();
|
Forma old = Repository.findById(id).get();
|
||||||
old.setName(data.getName());
|
old.setName(data.getName());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
old.setQ(data.getQ());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
old.setB(data.getB());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
old.setNumberd(data.getNumberd());
|
old.setNumberd(data.getNumberd());
|
||||||
|
|
||||||
old.setNumberc(data.getNumberc());
|
old.setNumberc(data.getNumberc());
|
||||||
@ -129,12 +96,6 @@ final Forma test = Repository.save(old);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public AppUser getUser() {
|
public AppUser getUser() {
|
||||||
AppUser user = userService.getLoggedInUser();
|
AppUser user = userService.getLoggedInUser();
|
||||||
return user;
|
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));
|
||||||
|
|
||||||
|
|||||||
@ -60,12 +60,6 @@ Future<List<Map<String, dynamic>>> getAllWithPagination(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Future<void> updateEntity( int entityId, Map<String, dynamic> entity) async {
|
Future<void> updateEntity( int entityId, Map<String, dynamic> entity) async {
|
||||||
try {
|
try {
|
||||||
await _helper.getPutApiResponse('$baseUrl/Forma/Forma/$entityId',
|
await _helper.getPutApiResponse('$baseUrl/Forma/Forma/$entityId',
|
||||||
@ -91,10 +85,4 @@ Future<List<Map<String, dynamic>>> getAllWithPagination(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -43,12 +43,6 @@ import '../../../../Reuseable/reusable_dropdown_field.dart';
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class formaCreateEntityScreen extends StatefulWidget {
|
class formaCreateEntityScreen extends StatefulWidget {
|
||||||
const formaCreateEntityScreen({super.key});
|
const formaCreateEntityScreen({super.key});
|
||||||
|
|
||||||
@ -63,128 +57,6 @@ final Map<String, dynamic> formData = {};
|
|||||||
final TextEditingController nameController = TextEditingController();
|
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();
|
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),
|
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(
|
ReusableTextField(
|
||||||
controller: numberdController,
|
controller: numberdController,
|
||||||
|
|
||||||
@ -499,12 +294,6 @@ SizedBox(height: 16),
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
print(formData);
|
print(formData);
|
||||||
Map<String, dynamic> createdEntity = await provider.createEntity(formData);
|
Map<String, dynamic> createdEntity = await provider.createEntity(formData);
|
||||||
@ -518,12 +307,6 @@ SizedBox(height: 16),
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// ignore: use_build_context_synchronously
|
// ignore: use_build_context_synchronously
|
||||||
@ -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 {
|
Future<void> fetchwithoutpaging() async {
|
||||||
try {
|
try {
|
||||||
final provider =
|
final provider =
|
||||||
@ -188,34 +182,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()) ||
|
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(
|
||||||
padding: getPadding(
|
padding: getPadding(
|
||||||
top: 10,
|
top: 10,
|
||||||
|
|||||||
@ -45,12 +45,6 @@ class _formaUpdateEntityScreenState extends State<formaUpdateEntityScreen> {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@ -63,12 +57,6 @@ class _formaUpdateEntityScreenState extends State<formaUpdateEntityScreen> {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -97,12 +85,6 @@ class _formaUpdateEntityScreenState extends State<formaUpdateEntityScreen> {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
@ -125,93 +107,6 @@ class _formaUpdateEntityScreenState extends State<formaUpdateEntityScreen> {
|
|||||||
SizedBox(height: 16),
|
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(
|
ReusableTextField(
|
||||||
initialValue: widget.entity['numberd'].toString(),
|
initialValue: widget.entity['numberd'].toString(),
|
||||||
onSaved: (value) => widget.entity['numberd']= value,
|
onSaved: (value) => widget.entity['numberd']= value,
|
||||||
@ -263,12 +158,6 @@ const SizedBox(height: 16),
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await provider.updateEntity(
|
await provider.updateEntity(
|
||||||
widget.entity[
|
widget.entity[
|
||||||
@ -283,12 +172,6 @@ const SizedBox(height: 16),
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// ignore: use_build_context_synchronously
|
// ignore: use_build_context_synchronously
|
||||||
|
|||||||
@ -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,3 +1,4 @@
|
|||||||
|
|
||||||
import '../../Entity/basic/Forma/FormaView/Forma_entity_list_screen.dart';
|
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/Forma_viewModel/Forma_view_model_screen.dart';
|
||||||
|
|
||||||
@ -73,22 +74,24 @@ Navigator.pushNamed(context, RouteNames.changePasswordView);
|
|||||||
),
|
),
|
||||||
|
|
||||||
// NEW MENU
|
// NEW MENU
|
||||||
|
|
||||||
|
|
||||||
DrawerItem(
|
DrawerItem(
|
||||||
color: AppColors.primary,
|
color: AppColors.primary,
|
||||||
icon: Icons.chat_bubble,
|
icon: Icons.chat_bubble,
|
||||||
title: 'Forma',
|
title: 'Forma',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => ChangeNotifierProvider(
|
builder: (context) => ChangeNotifierProvider(
|
||||||
create: (context) => FormaViewModelScreen(),
|
create: (context) => FormaViewModelScreen(),
|
||||||
child: forma_entity_list_screen(),
|
child: forma_entity_list_screen(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
DrawerItem(
|
DrawerItem(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user