From 6afb75ef61af712236e32f4884f86c4ecae2bbfe Mon Sep 17 00:00:00 2001 From: shanthi123456 Date: Sat, 18 Feb 2023 10:55:34 +0530 Subject: [PATCH 1/2] overall_progress --- lib/Components/side_drawer.dart | 5 + lib/main.dart | 8 ++ lib/screens/Iwd/iwd_home_page.dart | 163 +++++++++++++++++++++++++++ lib/screens/Iwd/project.dart | 172 ++++++++++++++++++++++++++++ lib/screens/Iwd/view.dart | 175 +++++++++++++++++++++++++++++ 5 files changed, 523 insertions(+) create mode 100644 lib/screens/Iwd/iwd_home_page.dart create mode 100644 lib/screens/Iwd/project.dart create mode 100644 lib/screens/Iwd/view.dart diff --git a/lib/Components/side_drawer.dart b/lib/Components/side_drawer.dart index be08db0e..5dd67447 100644 --- a/lib/Components/side_drawer.dart +++ b/lib/Components/side_drawer.dart @@ -120,6 +120,11 @@ class _SideDrawerState extends State { line: 'Programme Curriculum', pageMover: '/programme_curriculum_home', isActive: true, + ), + ModulesPadding( + line: 'Iwd module', + pageMover: '/iwd_home_page', + isActive: true, ), ModulesPadding( line: 'Gymkhana Module', diff --git a/lib/main.dart b/lib/main.dart index 29a2c810..d0ba5bd3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -43,6 +43,10 @@ import 'package:fusion/screens/Healthcenter/history.dart'; import 'package:fusion/screens/Healthcenter/HealthCenter.dart'; import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/screens/Iwd/iwd_home_page.dart'; +import 'package:fusion/screens/Iwd/project.dart'; +import 'package:fusion/screens/Iwd/view.dart'; + void main() { WidgetsFlutterBinding.ensureInitialized(); setupLocator(); @@ -126,6 +130,10 @@ class MyApp extends StatelessWidget { '/health_center/feedback': (context) => FeedBack(), '/health_center/viewschedule': (context) => ViewSchedule(), '/health_center/history': (context) => History(), + + '/iwd_home_page': (context) => IwdHomePage(), + '/iwd_home_page/project': (context) => Project(), + '/iwd_home_page/view': (context) => view(), }, ), ); diff --git a/lib/screens/Iwd/iwd_home_page.dart b/lib/screens/Iwd/iwd_home_page.dart new file mode 100644 index 00000000..fa9e1293 --- /dev/null +++ b/lib/screens/Iwd/iwd_home_page.dart @@ -0,0 +1,163 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:http/http.dart'; + +class IwdHomePage extends StatefulWidget { + @override + _IwdHomePageState createState() => _IwdHomePageState(); +} + +class _IwdHomePageState extends State { + bool _loading1 = true; + + //integrating_api + late StreamController _profileController; + late ProfileService profileService; + late ProfileData data; + @override + void initState() { + // TODO: implement initState + super.initState(); + _profileController = StreamController(); + profileService = ProfileService(); + var service = locator(); + try { + data = service.profileData; + _loading1 = false; + } catch (e) { + getData(); + } + //TODO: Remove this? + getData(); + } + + getData() async { + try { + Response response = await profileService.getProfile(); + setState(() { + data = ProfileData.fromJson(jsonDecode(response.body)); + _loading1 = false; + }); + } catch (e) { + print(e); + } + } + + BoxDecoration myBoxDecoration() { + return BoxDecoration( + border: new Border.all( + color: Colors.deepOrangeAccent, + width: 2.0, + style: BorderStyle.solid, + ), + borderRadius: new BorderRadius.all(new Radius.circular(15.0))); + } + + Text myText(String text) { + return Text( + text, + style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.w500), + ); + } + + Padding myContainer(String text) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: myText(text), + ), + decoration: myBoxDecoration(), + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: ListView( + shrinkWrap: true, + physics: ClampingScrollPhysics(), + children: [ + Card( + elevation: 2.0, + margin: EdgeInsets.symmetric(horizontal: 50.0, vertical: 20.0), + shadowColor: Colors.black, + child: Column( + children: [ + Container( + margin: EdgeInsets.only(top: 20.0), + width: 170.0, + height: 170.0, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/unknown.jpg'), + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + height: 10.0, + ), + Text( + //NAME OF USER + // 'Rajat Gupta', + data.user!['first_name'] + ' ' + data.user!['last_name'], + style: TextStyle(fontSize: 20.0, color: Colors.black), + ), + SizedBox( + height: 10.0, + ), + Text( + // 'CSE', + data.profile!['department']!['name'] + + ' | ' + + data.profile!['user_type'], + style: TextStyle(fontSize: 15.0, color: Colors.black), + ), + SizedBox( + height: 10.0, + ), + ], + ), + ), + Card( + elevation: 2.0, + margin: EdgeInsets.symmetric(horizontal: 10.0, vertical: 10.0), + shadowColor: Colors.black, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + InkWell( + child: myContainer("Create Project requisition"), + onTap: () { + Navigator.pushNamed(context, '/iwd_home_page/project', + arguments: data); + }, + ), + InkWell( + child: myContainer("Create View Requisition"), + onTap: () { + Navigator.pushNamed(context, '/iwd_home_page/view', + arguments: data); + }, + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Iwd/project.dart b/lib/screens/Iwd/project.dart new file mode 100644 index 00000000..02c47a78 --- /dev/null +++ b/lib/screens/Iwd/project.dart @@ -0,0 +1,172 @@ + +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:http/http.dart'; + +class Project extends StatefulWidget { + @override + State createState() => _ProjectState(); +} + +class _ProjectState extends State { + bool _loading1 = true; + + + //integrating_api + late StreamController _profileController; + late ProfileService profileService; + late ProfileData data; + @override + void initState() { + // TODO: implement initState + super.initState(); + _profileController = StreamController(); + profileService = ProfileService(); + var service = locator(); + try { + data = service.profileData; + _loading1 = false; + } catch (e) { + getData(); + } + //TODO: Remove this? + getData(); + } + + getData() async { + try { + Response response = await profileService.getProfile(); + setState(() { + data = ProfileData.fromJson(jsonDecode(response.body)); + _loading1 = false; + }); + } catch (e) { + print(e); + } + } + + BoxDecoration myBoxDecoration() { + return BoxDecoration( + border: new Border.all( + color: Colors.deepOrangeAccent, + width: 2.0, + style: BorderStyle.solid, + ), + borderRadius: new BorderRadius.all(new Radius.circular(15.0))); + } + + Text myText(String text) { + return Text( + text, + style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.w500), + ); + } + + Padding myContainer(String text) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: myText(text), + ), + decoration: myBoxDecoration(), + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: ListView( + shrinkWrap: true, + physics: ClampingScrollPhysics(), + children: [ + Card( + elevation: 2.0, + margin: EdgeInsets.symmetric(horizontal: 50.0, vertical: 20.0), + shadowColor: Colors.black, + child: Column( + children: [ + Container( + margin: EdgeInsets.only(top: 20.0), + width: 170.0, + height: 170.0, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/unknown.jpg'), + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + height: 10.0, + ), + Text( + + data.user!['first_name'] + ' ' + data.user!['last_name'], + style: TextStyle(fontSize: 20.0, color: Colors.black), + ), + SizedBox( + height: 10.0, + ), + Text( + // 'CSE', + data.profile!['department']!['name'] + + ' | ' + + data.profile!['user_type'], + style: TextStyle(fontSize: 15.0, color: Colors.black), + ), + SizedBox( + height: 10.0, + ), + ], + ), + ), + Card( + elevation: 2.0, + margin: EdgeInsets.symmetric(horizontal: 10.0, vertical: 10.0), + shadowColor: Colors.black, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InkWell( + child: myContainer('Create project requisition:'), + ), + SizedBox( + width: 10.0, + ), + Row( + children: [ + ElevatedButton( + onPressed: () {}, child: const Text('Fill Page 1')), + SizedBox( + width: 10.0, + ), + ElevatedButton( + onPressed: () {}, child: const Text('Fill Page 2')), + SizedBox( + width: 10.0, + ), + ElevatedButton( + onPressed: () {}, child: const Text('Fill Page 3')), + ], + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/Iwd/view.dart b/lib/screens/Iwd/view.dart new file mode 100644 index 00000000..365c4f07 --- /dev/null +++ b/lib/screens/Iwd/view.dart @@ -0,0 +1,175 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:http/http.dart'; + +class view extends StatefulWidget { + @override + _ViewState createState() => _ViewState(); +} + +class _ViewState extends State { + bool _loading1 = true; + + //integrating_api + late StreamController _profileController; + late ProfileService profileService; + late ProfileData data; + @override + void initState() { + // TODO: implement initState + super.initState(); + _profileController = StreamController(); + profileService = ProfileService(); + var service = locator(); + try { + data = service.profileData; + _loading1 = false; + } catch (e) { + getData(); + } + //TODO: Remove this? + getData(); + } + + getData() async { + try { + Response response = await profileService.getProfile(); + setState(() { + data = ProfileData.fromJson(jsonDecode(response.body)); + _loading1 = false; + }); + } catch (e) { + print(e); + } + } + + BoxDecoration myBoxDecoration() { + return BoxDecoration( + border: new Border.all( + color: Colors.deepOrangeAccent, + width: 2.0, + style: BorderStyle.solid, + ), + borderRadius: new BorderRadius.all(new Radius.circular(15.0))); + } + + Text myText(String text) { + return Text( + text, + style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.w500), + ); + } + + Padding myContainer(String text) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: myText(text), + ), + decoration: myBoxDecoration(), + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: ListView( + shrinkWrap: true, + physics: ClampingScrollPhysics(), + children: [ + Card( + elevation: 2.0, + margin: EdgeInsets.symmetric(horizontal: 50.0, vertical: 20.0), + shadowColor: Colors.black, + child: Column( + children: [ + Container( + margin: EdgeInsets.only(top: 20.0), + width: 170.0, + height: 170.0, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/unknown.jpg'), + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + height: 10.0, + ), + Text( + //NAME OF USER + // 'Rajat Gupta', + data.user!['first_name'] + ' ' + data.user!['last_name'], + style: TextStyle(fontSize: 20.0, color: Colors.black), + ), + SizedBox( + height: 10.0, + ), + Text( + // 'CSE', + data.profile!['department']!['name'] + + ' | ' + + data.profile!['user_type'], + style: TextStyle(fontSize: 15.0, color: Colors.black), + ), + SizedBox( + height: 10.0, + ), + ], + ), + ), + Card( + + + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: + [ + TextField( + decoration: const InputDecoration( + labelText: 'Enter Project ID', + suffixText: '*', + suffixStyle: TextStyle( + color: Colors.red, + ), + ), + ), + SizedBox( + + height: 10.0, + ), + ElevatedButton( + + onPressed: () {}, + child: Text( + 'Submit', + style: Theme.of(context).textTheme.headline6, + ), + ) + + + + ], + ), + ), + ], + ), + ); + + } +} \ No newline at end of file From 04a59df121e9bba5b3de0b36edec0440e0d192a6 Mon Sep 17 00:00:00 2001 From: shanthi123456 Date: Wed, 19 Apr 2023 20:32:17 +0530 Subject: [PATCH 2/2] added screens --- lib/main.dart | 14 +- .../Iwd/ProjectRequisition/corrigendum.dart | 595 ++++++++++++++++++ lib/screens/Iwd/ProjectRequisition/page1.dart | 167 +++++ lib/screens/Iwd/ProjectRequisition/page2.dart | 0 lib/screens/Iwd/ProjectRequisition/page3.dart | 0 .../Iwd/{ => ProjectRequisition}/project.dart | 30 +- .../Iwd/{ => ViewRequisition}/view.dart | 96 +-- lib/screens/Iwd/iwd_home_page.dart | 11 +- 8 files changed, 814 insertions(+), 99 deletions(-) create mode 100644 lib/screens/Iwd/ProjectRequisition/corrigendum.dart create mode 100644 lib/screens/Iwd/ProjectRequisition/page1.dart create mode 100644 lib/screens/Iwd/ProjectRequisition/page2.dart create mode 100644 lib/screens/Iwd/ProjectRequisition/page3.dart rename lib/screens/Iwd/{ => ProjectRequisition}/project.dart (86%) rename lib/screens/Iwd/{ => ViewRequisition}/view.dart (54%) diff --git a/lib/main.dart b/lib/main.dart index d0ba5bd3..bced0e3d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,6 +5,8 @@ import 'package:fusion/screens/Complaint/ComplaintHistory/complain_history.dart' import 'package:fusion/screens/Complaint/Feedback/feedback.dart'; import 'package:fusion/screens/Complaint/LodgeComplaint/lodge_complaint.dart'; import 'package:fusion/screens/Establishment/establishment_home_page.dart'; +import 'package:fusion/screens/Iwd/ProjectRequisition/page1.dart'; + import 'package:fusion/screens/Library/Book_Search.dart'; import 'package:fusion/screens/Library/dues.dart'; import 'package:fusion/screens/Library/issued_items.dart'; @@ -44,8 +46,8 @@ import 'package:fusion/screens/Healthcenter/HealthCenter.dart'; import 'package:fusion/services/service_locator.dart'; import 'package:fusion/screens/Iwd/iwd_home_page.dart'; -import 'package:fusion/screens/Iwd/project.dart'; -import 'package:fusion/screens/Iwd/view.dart'; + +import 'package:fusion/screens/Iwd/ViewRequisition/view.dart'; void main() { WidgetsFlutterBinding.ensureInitialized(); @@ -76,7 +78,7 @@ class MyApp extends StatelessWidget { debugShowCheckedModeBanner: false, theme: ThemeData( // primarySwatch: Colors.blueGrey, - colorSchemeSeed: Color(0xFF2085D0), + colorSchemeSeed: Color.fromARGB(255, 58, 32, 208), fontFamily: 'Nunito', useMaterial3: true, ), @@ -132,8 +134,10 @@ class MyApp extends StatelessWidget { '/health_center/history': (context) => History(), '/iwd_home_page': (context) => IwdHomePage(), - '/iwd_home_page/project': (context) => Project(), - '/iwd_home_page/view': (context) => view(), + '/iwd_home_page/page1': (context) => page(), + '/iwd_home_page/view': (context) => View(), + + }, ), ); diff --git a/lib/screens/Iwd/ProjectRequisition/corrigendum.dart b/lib/screens/Iwd/ProjectRequisition/corrigendum.dart new file mode 100644 index 00000000..d4aa7127 --- /dev/null +++ b/lib/screens/Iwd/ProjectRequisition/corrigendum.dart @@ -0,0 +1,595 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:http/http.dart'; + +import 'package:flutter/material.dart'; + +class CorrigendumpageWidget extends StatefulWidget { + @override + _CorrigendumpageWidgetState createState() => _CorrigendumpageWidgetState(); +} + +class _CorrigendumpageWidgetState extends State { + @override + Widget build(BuildContext context) { + // Figma Flutter Generator CorrigendumpageWidget - FRAME + + return Container( + width: 360, + height: 640, + decoration: BoxDecoration( + color: Color.fromRGBO(255, 255, 255, 1), + ), + child: Stack(children: [ + Positioned( + top: -2, + left: 0, + child: Container( + width: 381, + height: 642, + decoration: BoxDecoration(), + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Container( + width: 360, + height: 80, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Container( + width: 360, + height: 80, + decoration: BoxDecoration( + color: Color.fromRGBO(243, 108, 53, 1), + ))), + Positioned( + top: 35, + left: 21, + child: Container( + width: 23.076923370361328, + height: 17, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + 'assets/images/Image3.png'), + fit: BoxFit.fitWidth), + ))), + Positioned( + top: 32, + left: 50, + child: Text( + 'Institute Works Department', + textAlign: TextAlign.center, + style: TextStyle( + color: Color.fromRGBO(255, 255, 255, 1), + fontFamily: 'Montserrat', + fontSize: 20, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + ]))), + Positioned( + top: 137, + left: 27, + child: Container( + width: 318, + height: 53, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Text( + 'Dated', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 14, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + Positioned( + top: 25, + left: 0, + child: Container( + width: 318, + height: 28, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Container( + width: 318, + height: 28, + decoration: BoxDecoration( + borderRadius: + BorderRadius.only( + topLeft: Radius.circular(8), + topRight: + Radius.circular(8), + bottomLeft: + Radius.circular(8), + bottomRight: + Radius.circular(8), + ), + color: Color.fromRGBO( + 243, 243, 243, 1), + ))), + ]))), + ]))), + Positioned( + top: 219, + left: 21, + child: Container( + width: 318, + height: 53, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Text( + 'Ref No: Our NIT NO.', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 14, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + Positioned( + top: 25, + left: 0, + child: Container( + width: 318, + height: 28, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Container( + width: 318, + height: 28, + decoration: BoxDecoration( + borderRadius: + BorderRadius.only( + topLeft: Radius.circular(8), + topRight: + Radius.circular(8), + bottomLeft: + Radius.circular(8), + bottomRight: + Radius.circular(8), + ), + color: Color.fromRGBO( + 243, 243, 243, 1), + ))), + ]))), + ]))), + Positioned( + top: 305, + left: 26, + child: Container( + width: 318, + height: 53, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Text( + 'Name of Work', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 14, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + Positioned( + top: 25, + left: 0, + child: Container( + width: 318, + height: 28, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Container( + width: 318, + height: 28, + decoration: BoxDecoration( + borderRadius: + BorderRadius.only( + topLeft: Radius.circular(8), + topRight: + Radius.circular(8), + bottomLeft: + Radius.circular(8), + bottomRight: + Radius.circular(8), + ), + color: Color.fromRGBO( + 243, 243, 243, 1), + ))), + ]))), + ]))), + Positioned( + top: 601, + left: 21, + child: Container( + width: 353, + height: 106, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Text( + 'Date of opening of bid(envelop-1):', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 14, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + Positioned( + top: 25, + left: 0, + child: Container( + width: 318, + height: 28, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + bottomLeft: Radius.circular(8), + bottomRight: Radius.circular(8), + ), + color: Color.fromRGBO(243, 243, 243, 1), + ))), + Positioned( + top: 25, + left: 0, + child: Text( + 'dd-mm-yyyy', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 8, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + Positioned( + top: 78, + left: 0, + child: Container( + width: 318, + height: 28, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + bottomLeft: Radius.circular(8), + bottomRight: Radius.circular(8), + ), + color: Color.fromRGBO(243, 243, 243, 1), + ))), + Positioned( + top: 78, + left: 3, + child: Text( + '--:--', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 17.5, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + ]))), + Positioned( + top: 729, + left: 21, + child: Container( + width: 353, + height: 106, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Text( + 'Date of opening of bid(envelop-2):', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 14, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + Positioned( + top: 25, + left: 0, + child: Container( + width: 318, + height: 28, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + bottomLeft: Radius.circular(8), + bottomRight: Radius.circular(8), + ), + color: Color.fromRGBO(243, 243, 243, 1), + ))), + Positioned( + top: 25, + left: 2, + child: Text( + 'dd-mm-yyyy', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 8, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + Positioned( + top: 78, + left: 0, + child: Container( + width: 318, + height: 28, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + bottomLeft: Radius.circular(8), + bottomRight: Radius.circular(8), + ), + color: Color.fromRGBO(243, 243, 243, 1), + ))), + Positioned( + top: 78, + left: 3, + child: Text( + '--:--', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 17.5, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + ]))), + Positioned( + top: 387, + left: 24, + child: Text( + 'This is for information to all: In reference to above work the crucial dates of tender are being changed as under. The other terms & conditions of the tender shall remain the same.', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 12, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + Positioned( + top: 473, + left: 27, + child: Container( + width: 354, + height: 106, + child: Stack(children: [ + Positioned( + top: 0, + left: 1, + child: Text( + 'Last Date & Time of sumbission of bid', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 14, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + Positioned( + top: 25, + left: 1, + child: Container( + width: 318, + height: 28, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + bottomLeft: Radius.circular(8), + bottomRight: Radius.circular(8), + ), + color: Color.fromRGBO(243, 243, 243, 1), + ))), + Positioned( + top: 78, + left: 1, + child: Container( + width: 318, + height: 28, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + bottomLeft: Radius.circular(8), + bottomRight: Radius.circular(8), + ), + color: Color.fromRGBO(243, 243, 243, 1), + ))), + Positioned( + top: 78, + left: 4, + child: Text( + '--:--', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 17.5, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + Positioned( + top: 27, + left: 0, + child: Text( + 'dd-mm-yyyy', + textAlign: TextAlign.left, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 8, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + ]))), + Positioned( + top: 886, + left: 242, + child: Container( + width: 97, + height: 28, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Container( + width: 97, + height: 28, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(4), + topRight: Radius.circular(4), + bottomLeft: Radius.circular(4), + bottomRight: Radius.circular(4), + ), + color: Color.fromRGBO(243, 108, 53, 1), + ))), + Positioned( + top: 6, + left: 33, + child: Text( + 'Next', + textAlign: TextAlign.center, + style: TextStyle( + color: Color.fromRGBO(255, 255, 255, 1), + fontFamily: 'Montserrat', + fontSize: 13, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + ]))), + Positioned( + top: 886, + left: 21, + child: Container( + width: 97, + height: 28, + child: Stack(children: [ + Positioned( + top: 0, + left: 0, + child: Container( + width: 97, + height: 28, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(4), + topRight: Radius.circular(4), + bottomLeft: Radius.circular(4), + bottomRight: Radius.circular(4), + ), + color: Color.fromRGBO(96, 97, 98, 1), + ))), + Positioned( + top: 6, + left: 20, + child: Text( + 'Previous', + textAlign: TextAlign.center, + style: TextStyle( + color: Color.fromRGBO(255, 255, 255, 1), + fontFamily: 'Montserrat', + fontSize: 13, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + ]))), + Positioned( + top: 98, + left: 128, + child: Text( + 'Corrigendum', + textAlign: TextAlign.center, + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontFamily: 'Montserrat', + fontSize: 14, + letterSpacing: + 0 /*percentages not used in flutter. defaulting to zero*/, + fontWeight: FontWeight.normal, + height: 1), + )), + ]))), + ])); + } +} \ No newline at end of file diff --git a/lib/screens/Iwd/ProjectRequisition/page1.dart b/lib/screens/Iwd/ProjectRequisition/page1.dart new file mode 100644 index 00000000..ca7ef3d1 --- /dev/null +++ b/lib/screens/Iwd/ProjectRequisition/page1.dart @@ -0,0 +1,167 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:http/http.dart'; + +class page extends StatefulWidget { + @override + Page_1 createState() => Page_1(); +} + +class Page_1 extends State { + bool _loading1 = true; + + //integrating_api + late StreamController _profileController; + late ProfileService profileService; + late ProfileData data; + @override + void initState() { + // TODO: implement initState + super.initState(); + _profileController = StreamController(); + profileService = ProfileService(); + var service = locator(); + try { + data = service.profileData; + _loading1 = false; + } catch (e) { + getData(); + } + //TODO: Remove this? + getData(); + } + + getData() async { + try { + Response response = await profileService.getProfile(); + setState(() { + data = ProfileData.fromJson(jsonDecode(response.body)); + _loading1 = false; + }); + } catch (e) { + print(e); + } + } + + BoxDecoration myBoxDecoration() { + return BoxDecoration( + border: new Border.all( + color: Colors.deepOrangeAccent, + width: 2.0, + style: BorderStyle.solid, + ), + borderRadius: new BorderRadius.all(new Radius.circular(15.0))); + } + + Text myText(String text) { + return Text( + text, + style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.w500), + ); + } + + Padding myContainer(String text) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: myText(text), + ), + decoration: myBoxDecoration(), + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: ListView( + physics: ClampingScrollPhysics(), + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + InkWell( + child: myContainer('Create project requisition:'), + ), + SizedBox( + height: 10.0, + ), + Row( + children: [ + ElevatedButton( + onPressed: () { + Navigator.pushNamed(context, '/iwd_home_page/page1', + arguments: data); + }, + child: const Text('Fill Page 1')), + SizedBox( + width: 10.0, + ), + ElevatedButton( + onPressed: () {}, child: const Text('Fill Page 2')), + SizedBox( + width: 10.0, + ), + ElevatedButton( + onPressed: () {}, child: const Text('Fill Page 3')), + ], + ), + ]), + SizedBox( + height: 10.0, + ), + Text('AES'), + SizedBox( + height: 10.0, + ), + Text('SI. NO.'), + TextFormField(), + SizedBox( + height: 10.0, + ), + Text('Description of item'), + TextFormField(), + SizedBox( + height: 10.0, + ), + Text('Unit'), + TextFormField(), + SizedBox( + height: 10.0, + ), + Text('Quantity'), + TextFormField(), + SizedBox( + height: 10.0, + ), + Text('Amount'), + TextFormField(), + SizedBox( + height: 10.0, + ), + Row( + children: [ + ElevatedButton(onPressed: () {}, child: const Text('Previous')), + SizedBox( + width: 10.0, + ), + ElevatedButton(onPressed: () {}, child: const Text('Submit')), + ], + ), + ], + ), + ); + } +} diff --git a/lib/screens/Iwd/ProjectRequisition/page2.dart b/lib/screens/Iwd/ProjectRequisition/page2.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/screens/Iwd/ProjectRequisition/page3.dart b/lib/screens/Iwd/ProjectRequisition/page3.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/screens/Iwd/project.dart b/lib/screens/Iwd/ProjectRequisition/project.dart similarity index 86% rename from lib/screens/Iwd/project.dart rename to lib/screens/Iwd/ProjectRequisition/project.dart index 02c47a78..b4993f7b 100644 --- a/lib/screens/Iwd/project.dart +++ b/lib/screens/Iwd/ProjectRequisition/project.dart @@ -1,4 +1,3 @@ - import 'dart:async'; import 'dart:convert'; @@ -17,8 +16,7 @@ class Project extends StatefulWidget { } class _ProjectState extends State { - bool _loading1 = true; - + bool _loading1 = true; //integrating_api late StreamController _profileController; @@ -113,7 +111,6 @@ class _ProjectState extends State { height: 10.0, ), Text( - data.user!['first_name'] + ' ' + data.user!['last_name'], style: TextStyle(fontSize: 20.0, color: Colors.black), ), @@ -133,7 +130,7 @@ class _ProjectState extends State { ], ), ), - Card( + Card( elevation: 2.0, margin: EdgeInsets.symmetric(horizontal: 10.0, vertical: 10.0), shadowColor: Colors.black, @@ -147,21 +144,14 @@ class _ProjectState extends State { width: 10.0, ), Row( - children: [ - ElevatedButton( - onPressed: () {}, child: const Text('Fill Page 1')), - SizedBox( - width: 10.0, - ), - ElevatedButton( - onPressed: () {}, child: const Text('Fill Page 2')), - SizedBox( - width: 10.0, - ), - ElevatedButton( - onPressed: () {}, child: const Text('Fill Page 3')), - ], - ), + children: [ + ElevatedButton(onPressed: () {}, child: const Text('Previous')), + SizedBox( + width: 10.0, + ), + ElevatedButton(onPressed: () {}, child: const Text('Submit')), + ], + ), ], ), ), diff --git a/lib/screens/Iwd/view.dart b/lib/screens/Iwd/ViewRequisition/view.dart similarity index 54% rename from lib/screens/Iwd/view.dart rename to lib/screens/Iwd/ViewRequisition/view.dart index 365c4f07..8a0ce26f 100644 --- a/lib/screens/Iwd/view.dart +++ b/lib/screens/Iwd/ViewRequisition/view.dart @@ -10,13 +10,13 @@ import 'package:fusion/services/service_locator.dart'; import 'package:fusion/services/storage_service.dart'; import 'package:http/http.dart'; -class view extends StatefulWidget { +class View extends StatefulWidget { @override _ViewState createState() => _ViewState(); } -class _ViewState extends State { - bool _loading1 = true; +class _ViewState extends State { + bool _loading1 = true; //integrating_api late StreamController _profileController; @@ -90,86 +90,38 @@ class _ViewState extends State { shrinkWrap: true, physics: ClampingScrollPhysics(), children: [ + Card( - elevation: 2.0, - margin: EdgeInsets.symmetric(horizontal: 50.0, vertical: 20.0), - shadowColor: Colors.black, child: Column( - children: [ - Container( - margin: EdgeInsets.only(top: 20.0), - width: 170.0, - height: 170.0, - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage('assets/unknown.jpg'), - fit: BoxFit.cover, + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextField( + decoration: const InputDecoration( + labelText: 'Enter Project ID', + suffixText: '*', + suffixStyle: TextStyle( + color: Colors.red, ), ), ), SizedBox( height: 10.0, ), - Text( - //NAME OF USER - // 'Rajat Gupta', - data.user!['first_name'] + ' ' + data.user!['last_name'], - style: TextStyle(fontSize: 20.0, color: Colors.black), - ), - SizedBox( - height: 10.0, - ), - Text( - // 'CSE', - data.profile!['department']!['name'] + - ' | ' + - data.profile!['user_type'], - style: TextStyle(fontSize: 15.0, color: Colors.black), - ), - SizedBox( - height: 10.0, - ), - ], - ), - ), - Card( - - - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: - [ - TextField( - decoration: const InputDecoration( - labelText: 'Enter Project ID', - suffixText: '*', - suffixStyle: TextStyle( - color: Colors.red, - ), + Row( + children: [ + ElevatedButton(onPressed: () {}, child: const Text('Previous')), + SizedBox( + width: 10.0, ), - ), - SizedBox( - - height: 10.0, - ), - ElevatedButton( - - onPressed: () {}, - child: Text( - 'Submit', - style: Theme.of(context).textTheme.headline6, + ElevatedButton(onPressed: () {}, child: const Text('Submit')), + ], ), - ) - - - ], ), ), - ], - ), - ); - + ], + ), + ); } -} \ No newline at end of file +} diff --git a/lib/screens/Iwd/iwd_home_page.dart b/lib/screens/Iwd/iwd_home_page.dart index fa9e1293..6ba90028 100644 --- a/lib/screens/Iwd/iwd_home_page.dart +++ b/lib/screens/Iwd/iwd_home_page.dart @@ -142,12 +142,19 @@ class _IwdHomePageState extends State { InkWell( child: myContainer("Create Project requisition"), onTap: () { - Navigator.pushNamed(context, '/iwd_home_page/project', + Navigator.pushNamed(context, '/iwd_home_page/page1', arguments: data); }, ), InkWell( - child: myContainer("Create View Requisition"), + child: myContainer("Corrigendum Page"), + onTap: () { + Navigator.pushNamed(context, '/iwd_home_page/corrigendum', + arguments: data); + }, + ), + InkWell( + child: myContainer("Veiw Project Details"), onTap: () { Navigator.pushNamed(context, '/iwd_home_page/view', arguments: data);