build_app

This commit is contained in:
risadmin_prod 2024-08-29 04:51:51 +00:00
parent 3a1c0bc279
commit 161c8fddbe
11 changed files with 31 additions and 332 deletions

View File

@ -49,6 +49,9 @@ public class BuilderService {
addCustomMenu( "Test1", "Transcations"); addCustomMenu( "Test1", "Transcations");
addCustomMenu( "Test1", "Transcations");

View File

@ -30,24 +30,12 @@ public class Test1Controller {
@PostMapping("/Test1") @PostMapping("/Test1")
public Test1 Savedata(@RequestBody Test1 data) { public Test1 Savedata(@RequestBody Test1 data) {
Test1 save = Service.Savedata(data) ; Test1 save = Service.Savedata(data) ;
System.out.println("data saved..." + save); System.out.println("data saved..." + save);
return save; return save;

View File

@ -9,12 +9,6 @@ import com.realnet.WhoColumn.Extension;
@Entity @Entity
@Data @Data
public class Test1 extends Extension { public class Test1 extends Extension {
@ -29,16 +23,9 @@ import com.realnet.WhoColumn.Extension;
private String sname; private String sname;
private int rollnumber;
private String monumber;
@Column(length = 2000) @Column(length = 2000)
private String parag; private String parag1;
@Column(length = 2000)
private String address;
} }

View File

@ -13,12 +13,6 @@ import com.realnet.users.entity1.AppUser;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service @Service
@ -30,23 +24,11 @@ private Test1Repository Repository;
public Test1 Savedata(Test1 data) { public Test1 Savedata(Test1 data) {
Test1 save = Repository.save(data); Test1 save = Repository.save(data);
return save; return save;
} }
@ -75,13 +57,7 @@ public Test1 update(Test1 data,Integer id) {
Test1 old = Repository.findById(id).get(); Test1 old = Repository.findById(id).get();
old.setSname(data.getSname()); old.setSname(data.getSname());
old.setRollnumber(data.getRollnumber()); old.setParag1(data.getParag1());
old.setMonumber(data.getMonumber());
old.setParag(data.getParag());
old.setAddress(data.getAddress());
final Test1 test = Repository.save(old); final Test1 test = Repository.save(old);
return test;} return test;}

View File

@ -1,2 +1,2 @@
CREATE TABLE db.Test1(id BIGINT NOT NULL AUTO_INCREMENT, Parag VARCHAR(400), address VARCHAR(400), sName VARCHAR(400), rollNumber VARCHAR(400), moNumber VARCHAR(400), PRIMARY KEY (id)); CREATE TABLE db.Test1(id BIGINT NOT NULL AUTO_INCREMENT, Parag1 VARCHAR(400), sName VARCHAR(400), PRIMARY KEY (id));

View File

@ -57,12 +57,6 @@ Future<List<Map<String, dynamic>>> getAllWithPagination(
Future<void> updateEntity(String token, int entityId, Map<String, dynamic> entity) async { Future<void> updateEntity(String token, int entityId, Map<String, dynamic> entity) async {
try { try {
@ -87,10 +81,4 @@ Future<List<Map<String, dynamic>>> getAllWithPagination(
} }

View File

@ -48,12 +48,6 @@ final Map<String, dynamic> formData = {};
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -61,12 +55,6 @@ final Map<String, dynamic> formData = {};
} }
Future<void> performOCR() async { Future<void> performOCR() async {
@ -162,12 +150,6 @@ final Map<String, dynamic> formData = {};
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Padding( child: Padding(
@ -186,50 +168,12 @@ final Map<String, dynamic> formData = {};
ReusableTextField( ReusableTextField(
onSaved:(value) => formData['rollnumber'] = value , onSaved:(value) => formData['parag1'] = value ,
label: "Enter rollNumber", label: "Enter Parag1",
keyboardType: TextInputType.number,
inputFormatters: [
FilteringTextInputFormatter.allow((RegExp(r'[0-9]'))),
],
// ValidationProperties
),
SizedBox(height: 16),
ReusableTextField(
onSaved:(value) => formData['monumber'] = value ,
label: "Enter moNumber",
keyboardType: TextInputType.number,
inputFormatters: [
FilteringTextInputFormatter.digitsOnly,
],
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter a number';
}
return null;
},
),
ReusableTextField(
onSaved:(value) => formData['parag'] = value ,
label: "Enter Parag",
maxLines: 5, maxLines: 5,
), ),
ReusableTextField(
onSaved:(value) => formData['address'] = value ,
label: "Enter address",
maxLines: 5,
// ValidationProperties
),
SizedBox(height: 16),
const SizedBox(width: 8), const SizedBox(width: 8),
CustomButton( CustomButton(
height: getVerticalSize(50), height: getVerticalSize(50),
@ -242,12 +186,6 @@ ReusableTextField(
final token = await TokenManager.getToken(); final token = await TokenManager.getToken();
try { try {
@ -257,12 +195,6 @@ ReusableTextField(
Navigator.pop(context); Navigator.pop(context);
@ -293,12 +225,6 @@ ReusableTextField(
], ],
), ),
), ),

View File

@ -55,12 +55,6 @@ class _test1_entity_list_screenState extends State<test1_entity_list_screen> {
Future<void> fetchwithoutpaging() async { Future<void> fetchwithoutpaging() async {
try { try {
final token = await TokenManager.getToken(); final token = await TokenManager.getToken();
@ -186,25 +180,7 @@ Future<void> fetchEntities() async {
entity['rollnumber'].toString().toLowerCase().contains(keyword.toLowerCase()) || entity['parag1'].toString().toLowerCase().contains(keyword.toLowerCase())
entity['monumber'].toString().toLowerCase().contains(keyword.toLowerCase()) ||
entity['parag'].toString().toLowerCase().contains(keyword.toLowerCase()) ||
entity['address'].toString().toLowerCase().contains(keyword.toLowerCase())
).toList(); ).toList();
@ -285,12 +261,6 @@ onTapArrowleft1(BuildContext context) {
], ],
), ], ), ],
), ),
@ -551,85 +521,13 @@ onTapArrowleft1(BuildContext context) {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Text(
"rollNumber : ", "Parag1 : ",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: AppStyle.txtGilroyMedium16, style: AppStyle.txtGilroyMedium16,
), ),
Text( Text(
entity['rollnumber'].toString() ?? 'No rollNumber Available', entity['parag1'] ?? 'No Parag1 Available',
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left,
style: AppStyle.txtGilroyMedium16Bluegray900,
),
],
),
),
Padding(
padding: getPadding(
top: 10,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"moNumber : ",
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left,
style: AppStyle.txtGilroyMedium16,
),
Text(
entity['monumber'] ?? 'No moNumber Available',
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left,
style: AppStyle.txtGilroyMedium16Bluegray900,
),
],
),
),
Padding(
padding: getPadding(
top: 10,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Parag : ",
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left,
style: AppStyle.txtGilroyMedium16,
),
Text(
entity['parag'] ?? 'No Parag Available',
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left,
style: AppStyle.txtGilroyMedium16Bluegray900,
),
],
),
),
Padding(
padding: getPadding(
top: 10,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"address : ",
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left,
style: AppStyle.txtGilroyMedium16,
),
Text(
entity['address'] ?? 'No address Available',
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: AppStyle.txtGilroyMedium16Bluegray900, style: AppStyle.txtGilroyMedium16Bluegray900,

View File

@ -41,12 +41,6 @@ class _test1UpdateEntityScreenState extends State<test1UpdateEntityScreen> {
@override @override
void initState() { void initState() {
@ -55,12 +49,6 @@ class _test1UpdateEntityScreenState extends State<test1UpdateEntityScreen> {
} }
@ -109,51 +97,11 @@ class _test1UpdateEntityScreenState extends State<test1UpdateEntityScreen> {
]), ]),
), ),
ReusableTextField(
initialValue: widget.entity['rollnumber'],
onSaved: (value) => widget.entity['rollnumber']= value,
label: "Enter rollNumber",
keyboardType: TextInputType.number,
inputFormatters: [
FilteringTextInputFormatter.allow((RegExp(r'[0-9]'))),
],
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter a number';
}
return null;
},
),
ReusableTextField(
initialValue: widget.entity['monumber'],
onSaved: (value) => widget.entity['monumber'] = value,
label: "Enter moNumber",
keyboardType: TextInputType.number,
inputFormatters: [
FilteringTextInputFormatter.digitsOnly,
],
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter a number';
}
return null;
},
),
// }), // }),
ReusableTextField( ReusableTextField(
initialValue: widget.entity['parag'], initialValue: widget.entity['parag1'],
onSaved: (value) => widget.entity['parag']= value, onSaved: (value) => widget.entity['parag1']= value,
label: "Enter Parag", label: "Enter Parag1",
maxLines: 5,
),
ReusableTextField(
initialValue: widget.entity['address'],
onSaved: (value) => widget.entity['address']= value,
label: "Enter address",
maxLines: 5, maxLines: 5,
), ),
@ -169,12 +117,6 @@ ReusableTextField(
final token = await TokenManager.getToken(); final token = await TokenManager.getToken();
try { try {
@ -186,12 +128,6 @@ ReusableTextField(
Navigator.pop(context); Navigator.pop(context);

View File

@ -1,4 +1,5 @@
import '../../Entity/fluttertesting/Test1/Test1_entity_list_screen.dart';
import '../../Entity/fluttertesting/Test1/Test1_entity_list_screen.dart';
import 'dart:io'; import 'dart:io';
import 'package:base_project/core/app_export.dart'; import 'package:base_project/core/app_export.dart';
@ -142,19 +143,21 @@ class _CustomDrawerState extends State<CustomDrawer> {
SizedBox(height: 18.v), SizedBox(height: 18.v),
// NEW MENU // NEW MENU
_myButton(
context,
"Test1", _myButton(
() { context,
Navigator.push( "Test1",
context, () {
MaterialPageRoute( Navigator.push(
builder: (context) => test1_entity_list_screen(), context,
), MaterialPageRoute(
); builder: (context) => test1_entity_list_screen(),
}, ),
false, );
), },
false,
),
SizedBox(height: 18.v), SizedBox(height: 18.v),