Skip to content

Commit

Permalink
send email done
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritik-in-Tech committed Mar 26, 2024
1 parent ad79e7e commit 333636f
Show file tree
Hide file tree
Showing 10 changed files with 321 additions and 116 deletions.
10 changes: 5 additions & 5 deletions lib/screens/professoroptions.dart/adddesigncredit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ class _AddDesignCreditsState extends State<AddDesignCredits> {
height: 25,
),
Container(
padding: const EdgeInsets.fromLTRB(5, 20, 5, 0),
height: 550,
padding: const EdgeInsets.fromLTRB(5, 20, 5, 10),
height: 600,
width: size.width > 1200 ? 700 : size.width * 0.90,
decoration: BoxDecoration(
border: Border.all(width: 1, color: Colors.amberAccent),
Expand Down Expand Up @@ -267,7 +267,7 @@ class _AddDesignCreditsState extends State<AddDesignCredits> {
),
GestureDetector(
onTap: () {
print(projectName);
// print(projectName);
addDesignCredit(
projectName,
elegibleBranches,
Expand All @@ -278,9 +278,9 @@ class _AddDesignCreditsState extends State<AddDesignCredits> {
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: Container(
height: 50,
height: 60,
width:
size.width > 1200 ? 300 : size.width * 0.45,
size.width > 1200 ? 300 : size.width * 0.65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: const Color.fromARGB(255, 12, 44, 43),
Expand Down
25 changes: 18 additions & 7 deletions lib/screens/professoroptions.dart/viewdesigncredit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ class DesignCreditContainer extends StatefulWidget {
class _DesignCreditContainerState extends State<DesignCreditContainer> {
@override
Widget build(BuildContext context) {
final Size size = MediaQuery.of(context).size;
return Container(
padding: const EdgeInsets.all(15),
// height: 250,
width: 350,
width: size.width >= 400 ? 400 : 350,
margin: const EdgeInsets.fromLTRB(0, 0, 0, 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
Expand All @@ -143,10 +144,13 @@ class _DesignCreditContainerState extends State<DesignCreditContainer> {
text: widget.projectName,
textType: 'Project-Name:',
),
// CustomText(
// text: widget.professorName,
// textType: 'Professor-Name:',
// ),
const SizedBox(
height: 10,
),
const Divider(
color: Colors.white,
height: 1,
),
const SizedBox(
height: 10,
),
Expand All @@ -157,6 +161,13 @@ class _DesignCreditContainerState extends State<DesignCreditContainer> {
const SizedBox(
height: 10,
),
const Divider(
color: Colors.white,
height: 1,
),
const SizedBox(
height: 10,
),
const Text(
'Eligible Branches:',
style: TextStyle(
Expand All @@ -178,7 +189,7 @@ class _DesignCreditContainerState extends State<DesignCreditContainer> {
height: 15,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
GestureDetector(
onTap: () {},
Expand Down Expand Up @@ -218,7 +229,7 @@ class _DesignCreditContainerState extends State<DesignCreditContainer> {
cursor: SystemMouseCursors.click,
child: Container(
height: 50,
width: 120,
width: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.blue,
Expand Down
65 changes: 50 additions & 15 deletions lib/screens/professoroptions.dart/widgets/applications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class _ApplicationsState extends State<Applications> {
children: _applications.map((entry) {
final application = entry.value;
return AllApplicationsContainer(
rollNumber:
application.userId?.rollNumber ?? '',
name: application.userId?.name ?? '',
// projectName:
// application.designCreditId?.projectName ??
Expand All @@ -109,12 +111,14 @@ class AllApplicationsContainer extends StatefulWidget {
final String name;
final String email;
final String resumeLink;
final String rollNumber;
// final String projectName;
const AllApplicationsContainer({
required this.name,
// required this.projectName,
required this.resumeLink,
required this.email,
required this.rollNumber,
super.key,
});

Expand All @@ -134,10 +138,11 @@ class _AllApplicationsContainerState extends State<AllApplicationsContainer> {

@override
Widget build(BuildContext context) {
final Size size = MediaQuery.of(context).size;
return Container(
// height: 200,
width: 350,
padding: const EdgeInsets.all(15),
width: size.width >= 400 ? 400 : 350,
padding: const EdgeInsets.all(20),
margin: const EdgeInsets.fromLTRB(0, 0, 0, 10),
decoration: BoxDecoration(
color: const Color.fromARGB(255, 12, 44, 43),
Expand All @@ -147,36 +152,66 @@ class _AllApplicationsContainerState extends State<AllApplicationsContainer> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomText(
text: widget.name,
textType: 'Applied By:',
text: widget.name.toUpperCase(),
textType: 'Applied By :',
),
SizedBox(
height: 10,
),
const Divider(
color: Colors.white,
height: 1,
),
SizedBox(
height: 10,
),
CustomText(
text: widget.rollNumber.toUpperCase(),
textType: 'Roll Number :',
),
SizedBox(
height: 10,
),
const Divider(
color: Colors.white,
height: 1,
),
SizedBox(
height: 10,
),
CustomText(
text: widget.email,
textType: 'Email-Id:',
textType: 'Email-Id :',
),
SizedBox(
height: 10,
),
const Divider(
color: Colors.white,
height: 1,
),
SizedBox(
height: 10,
),
// CustomText(
// // text: widget.projectName,
// textType: 'ProjectName:',
// ),
GestureDetector(
onTap: _openResumeLink,
child: Row(
children: [
Text(
'ResumeLink:',
'Resume :',
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w500,
),
),
const SizedBox(
width: 8,
width: 20,
),
const Icon(
Icons.link,
color: Colors.white,
size: 24,
size: 30,
),
],
),
Expand Down Expand Up @@ -204,7 +239,7 @@ class CustomText extends StatelessWidget {
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w500,
),
),
),
Expand All @@ -217,7 +252,7 @@ class CustomText extends StatelessWidget {
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 15,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w500,
),
),
),
Expand Down
53 changes: 48 additions & 5 deletions lib/screens/studentoptions/designcredits.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import 'package:flutter/widgets.dart';
import 'package:google_fonts/google_fonts.dart';

class DesignCredits extends StatefulWidget {
const DesignCredits({super.key});
final String userName;
final String userEmail;
const DesignCredits(
{required this.userEmail, required this.userName, super.key});

@override
State<DesignCredits> createState() => _DesignCreditsState();
Expand Down Expand Up @@ -76,6 +79,8 @@ class _DesignCreditsState extends State<DesignCredits> {
children: snapshot.data!.map(
(designCredit) {
return DesignCreditContainer(
userName: widget.userName,
email: widget.userEmail,
designCreditId: designCredit.sId ?? '',
desc: designCredit.description ?? '',
offeredBy: designCredit.offeredBy ?? '',
Expand All @@ -101,13 +106,17 @@ class _DesignCreditsState extends State<DesignCredits> {

class DesignCreditContainer extends StatefulWidget {
final String projectName;
final String userName;
final String email;
final String designCreditId;
final List<String> eligibleBranches;
final String professorName;
final String offeredBy;
final String desc;
const DesignCreditContainer(
{required this.offeredBy,
required this.userName,
required this.email,
required this.designCreditId,
required this.desc,
required this.professorName,
Expand All @@ -122,10 +131,11 @@ class DesignCreditContainer extends StatefulWidget {
class _DesignCreditContainerState extends State<DesignCreditContainer> {
@override
Widget build(BuildContext context) {
final Size size = MediaQuery.of(context).size;
return Container(
padding: const EdgeInsets.all(15),
// height: 250,
width: 350,
width: size.width >= 400 ? 400 : 350,
margin: const EdgeInsets.fromLTRB(0, 0, 0, 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
Expand All @@ -142,27 +152,55 @@ class _DesignCreditContainerState extends State<DesignCreditContainer> {
const SizedBox(
height: 10,
),
const Divider(
height: 1,
color: Colors.white,
),
const SizedBox(
height: 10,
),
CustomText(
text: widget.desc,
textType: 'Description:',
),
const SizedBox(
height: 10,
),
const Divider(
height: 1,
color: Colors.white,
),
const SizedBox(
height: 10,
),
CustomText(
text: widget.professorName,
textType: 'Professor-Name:',
),
const SizedBox(
height: 10,
),
const Divider(
height: 1,
color: Colors.white,
),
const SizedBox(
height: 10,
),
CustomText(
text: widget.offeredBy,
textType: 'Offered-By:',
),
const SizedBox(
height: 10,
),
const Divider(
height: 1,
color: Colors.white,
),
const SizedBox(
height: 10,
),
const Text(
'Eligible Branches:',
style: TextStyle(
Expand All @@ -185,8 +223,13 @@ class _DesignCreditContainerState extends State<DesignCreditContainer> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
ApplyDesignCredit(designCreditId: widget.designCreditId),
builder: (context) => ApplyDesignCredit(
userName: widget.userName,
email: widget.email,
projectName: widget.projectName,
prfessorName: widget.professorName,
designCreditId: widget.designCreditId,
),
),
);
},
Expand All @@ -196,7 +239,7 @@ class _DesignCreditContainerState extends State<DesignCreditContainer> {
cursor: SystemMouseCursors.click,
child: Container(
height: 40,
width: 100,
width: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.blue,
Expand Down
Loading

0 comments on commit 333636f

Please sign in to comment.