Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Data to Collection Guidelines and added FAQS Successfully #189

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
202 changes: 196 additions & 6 deletions lib/new_ui/screens/guidelines_screen/guidelinesscreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,190 @@ class GuideLinesScreen extends StatefulWidget {
}

class _GuideLinesScreenState extends State<GuideLinesScreen> {

final Map<String,dynamic> uploadMap = {

"guideLines": [
{
"title": "First Time Applying for Railway Concession?",
"content": "If you've never applied for a railway concession pass, please visit the Railway Concession Desk on the ground floor of the new building."
},
{
"title": "First Time Using the TSEC App for Railway Concession and Have previous pass?",
"content": "If you're using the app for the first time and have your previous pass, follow these four easy steps:",
"points": [
"1. Apply Online using our app.", "2. Wait for your pass to be approved.", "3. Receive a notification once approved.", "4. Collect your pass from the Railway Concession Desk (Ground floor, new building)."
]
},
{
"title": "Detailed Guide",
"content": [
{
"subtitle": "Step I: Submit Your Online Application",
"subPoints": [
{
"words": "1. Open the TSEC App."
},
{
"words": "2. Navigate to the Railway Concession feature."
},
{
"image": "https://(<bottomAppBarCircled>)"
},
{
"words": "3. Tap the Apply button ."
},
{
"image": "https://(<applyButton>)"
},
{
"words": "4. Fill in the required details on the form "
},
{
"image": "https://(<railwayFormSS>)."
},
{
"words": "NOTE: Ensure accuracy, as discrepancies can lead to rejection"
},
{
"words": "5. Upload a clear photo of the front and back of your ID Card"
},
{
"image": "https://(<IDCardSectionSS>)."
},
{
"words": "6. Upload an image of your previous pass."
},
{
"image": "https://(<previousPassImage>)."
},
{
"words": "NOTE: If you don't have a previous pass or ID card, visit the Railway Concession Desk (Ground floor, new building)."
},
{
"words": "7. Submit the form. It may take a few seconds to process"
},
{
"words": "NOTE: Once submitted, you will see the following changes: "
},
{
"image": "https://<imageAfterFormFilled>."
}
]
},
{
"subtitle": "Step II: Wait for Approval",
"subPoints": [
{
"words": "1. The approval process may take a day or so. Apply before your current pass expires to avoid delays."
},
{
"words": "2. Upon approval, you will receive a notification."
},
{
"image": "https://(<notificationSS>)."
},
{
"words": "To modify your application or extend dates, visit the Railway Concession Desk (Ground floor, new building)."
}
]
},
{
"subtitle": "Step III: Concession Approval",
"subPoints": [
{
"words": "1. Once approved, you'll receive a notification and a pass number, displayed on the railway concession screen"
},
{
"image": "https://(<approveScreenSS>)."
},
{
"words": "2. Show this pass number to collect your railway slip from the Railway Concession Desk (Ground floor, new building)."
}
]
},
{
"subtitle": "Step IV: Collecting Your Railway Concession",
"subPoints": [
{
"words": "1. Show your pass number to collect the slip. You will receive a notification as an acknowledgment"
},
{
"image": "https://(<notificationSS>)."
},
{
"words": "Your interface will update as follows after collection:"
},
{
"image": "https://<collectedScreenSS>."
}
]
},
{
"subtitle": "After Collecting the Pass",
"subPoints": [
{
"words": "You will receive a reminder notification 3 days before your pass expires, prompting you to apply for a new pass. For example, if your pass is issued on July 6th and expires on August 5th, you can apply for a new pass from August 2nd. Reminders will be sent accordingly"
},
{
"image": "https://(<notificationOfReminders>)."
}
]
}
]
},
{
"title": "Used the TSEC App Before?",
"content": "Great! If you've used the TSEC App for railway concession before, it's even easier. Just open the app, update your previous pass photo, and you're done!",
"points": [
"https://<updatePhotoSS>"
]
}
],
"faq": [
{
"title": "I have never applied concession",
"content": "Visit Railway Concession Desk on the ground floor of the new building."
},
{
"title": "I have never used TSEC App have applied for concesion earlier in offline mode",
"content": "Great ! you might be having your previous pass. Upload ots photo in the form and follow the guidelines"
},
{
"title": "I have lost my previous pass OR dont have ID Card",
"content": "Visit Railway Concession Desk on the ground floor of the new building."
},
{
"title": "I am FE, Can I apply ?",
"content": "Ofcouse you can, but offline untill you dont get your login credentials of TSEC App"
},
{
"title": "I have applied, didnt receive approval yet but have filled my data wrong on App, what to do ?",
"content": "No worries, you can still Visit Railway Concession Desk on the ground floor of the new building, give your details as NAME and YEAR. Your issue will be resolved and a confirmation notification will be sent to you on the spot"
},
{
"title": "I have applied, received approval but have filled my data wrong on App, what to do ?",
"content": "No worries, you can still Visit Railway Concession Desk on the ground floor of the new building, give the pass number displayed on Railway Concession Screen. Your issue will be resolved and a confirmation notification will be sent to you on the spot"
},
{
"title": "I have applied, received approval but I could not visit Railway consession Desk in college to collect slip, what to do ?",
"content": "No worries, you can still Visit Railway Concession Desk on the ground floor of the new building, give the pass number displayed on Railway Concession Screen. Your issue will be resolved and a confirmation notification will be sent to you on the spot"
},
{
"title": "I have applied, received approval, collected Railway slip but could not remove Railway pass and its been more than 3 days now, what to do ?",
"content": "No worries, you can still Visit Railway Concession Desk on the ground floor of the new building, give the pass number displayed on Railway Concession Screen. You will be receiving a renew pass with extended date. Follow futher instructions as said by Person on desk."
},
{
"title": "My pass is expiring in 3 days, what to do?",
"content": "Since 3 days before your pass expires, you will be receiving notification reminders everyday around 7am to renew your pass. Please apply for your pass before it expires"
},
{
"title": "My pass had expired today OR few days back, can I still apply?",
"content": "Ofocurse! You can.. Follow the same procedure what you did to appky for the first time. Its easy now, just dont forget to change previous pass's photo"
}
]
};

List guideLines = [];
List faqs = [];

Expand All @@ -24,13 +208,18 @@ class _GuideLinesScreenState extends State<GuideLinesScreen> {
.doc("Guidelines")
.get()
.then((value) {
setState(() {
faqs = value.data()!['faqs'];
guideLines = value.data()!['guidelines'];
});
setState(() {
faqs = value.data()!['faq'];
guideLines = value.data()!['guideLines'];
});
});
}

uploadMapFunction(){
FirebaseFirestore.instance.collection('Guidelines').doc("Guidelines").set(uploadMap);
print("Uploaded");
}

@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
Expand Down Expand Up @@ -59,7 +248,7 @@ class _GuideLinesScreenState extends State<GuideLinesScreen> {
SizedBox(
height: size.height * 0.01,
),
ListView.builder(
/*ListView.builder(
padding: EdgeInsets.zero,
itemCount: guideLines.length,
shrinkWrap: true,
Expand Down Expand Up @@ -88,7 +277,7 @@ class _GuideLinesScreenState extends State<GuideLinesScreen> {
);
}
},
),
),*/
SizedBox(
height: size.height * 0.01,
),
Expand Down Expand Up @@ -117,6 +306,7 @@ class _GuideLinesScreenState extends State<GuideLinesScreen> {
SizedBox(
height: size.height * 0.03,
),

],
),
)
Expand Down
71 changes: 37 additions & 34 deletions lib/new_ui/screens/railway_screen/railway_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -688,38 +688,41 @@ class _RailwayConcessionScreenState
else
Positioned(bottom: 20, child: Text("You don't have any ongoing pass",
style: TextStyle(color: Colors.white),),),
Positioned(top: 20,child: Container(
width: size.width*0.75,
decoration: BoxDecoration(
color: oldDateSelectBlue,
borderRadius: BorderRadius.circular(size.width*0.05),
border: Border.all(color: Colors.white),
boxShadow: [
BoxShadow(offset: Offset.fromDirection(2),spreadRadius: 2,color: Colors.black,blurRadius: 2)
],
),
alignment: Alignment.center,
height: 60,
child: Padding(
padding: const EdgeInsets.all(10.0),
child:
(concessionDetails!.status == 'serviced')
? Text(
futurePassMessage(concessionDetails),
textAlign: TextAlign.justify,
style: const TextStyle(color: Colors.white),)
: Row(
children: [
Image.asset('assets/images/icons/box_imp.png',width: 16,),
SizedBox(width: 10.0,),
Expanded(
child: Text(
futurePassMessage(concessionDetails),
style: const TextStyle(color: Colors.white),),
)
],
),

Positioned(top: 20,child: InkWell(
onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=> GuideLinesScreen(),),),
child: Container(
width: size.width*0.75,
decoration: BoxDecoration(
color: oldDateSelectBlue,
borderRadius: BorderRadius.circular(size.width*0.05),
border: Border.all(color: Colors.white),
boxShadow: [
BoxShadow(offset: Offset.fromDirection(2),spreadRadius: 2,color: Colors.black,blurRadius: 2)
],
),
alignment: Alignment.center,
height: 60,
child: Padding(
padding: const EdgeInsets.all(10.0),
child:
(concessionDetails!.status == 'serviced')
? Text(
futurePassMessage(concessionDetails),
textAlign: TextAlign.justify,
style: const TextStyle(color: Colors.white),)
: Row(
children: [
Image.asset('assets/images/icons/box_imp.png',width: 16,),
SizedBox(width: 10.0,),
Expanded(
child: Text(
futurePassMessage(concessionDetails),
style: const TextStyle(color: Colors.white),),
)
],
),

),
),
),),
],
Expand Down Expand Up @@ -752,10 +755,10 @@ class _RailwayConcessionScreenState
children: [
if (concessionRequestData?.passCollected != null &&
concessionRequestData!.passCollected!['collected'] == "1") ...[
Text(
/*Text(
"Collected on ${DateFormat('dd/MM/yyyy').format((concessionRequestData.passCollected!['date'] as Timestamp).toDate())}",
style: TextStyle(fontSize: 10, color: Colors.white, fontWeight: FontWeight.bold),
),
),*/
] else...[
Text(
"Pass not collected Yet", style: TextStyle(fontSize: 10, color: Colors.yellow, fontWeight: FontWeight.bold),
Expand Down
Loading