diff --git a/lib/new_ui/screens/railway_screen/railway_screen.dart b/lib/new_ui/screens/railway_screen/railway_screen.dart index d72d5d3e..0ccf06fd 100644 --- a/lib/new_ui/screens/railway_screen/railway_screen.dart +++ b/lib/new_ui/screens/railway_screen/railway_screen.dart @@ -461,7 +461,7 @@ class _RailwayConcessionScreenState ConcessionRequestModel? concessionRequestData = ref.watch(concessionRequestDetailProvider); String formattedDate = lastPassIssued != null ? DateFormat('dd/MM/yyyy').format(lastPassIssued!) - : ''; + : 'null'; String currState = ref.watch(concessionProvider); bool buttonTrigger(ConcessionStatus){ @@ -537,7 +537,7 @@ class _RailwayConcessionScreenState ), ), ), - + Container( width: size.width * 0.7, child: InkWell( @@ -641,7 +641,7 @@ class _RailwayConcessionScreenState "Class: ${travelClass}", style: TextStyle(fontSize: 16, color: Colors.white), ), - + if (concessionRequestData?.passCollected != null && concessionRequestData!.passCollected!['collected'] == "1") ...[ SizedBox( @@ -652,17 +652,17 @@ class _RailwayConcessionScreenState style: TextStyle(fontSize: 13, color: Colors.grey), ), ], - - + + ], ), ), - + SizedBox( height: 15, ), InkWell(onTap: ()=> Navigator.push(context, MaterialPageRoute(builder: (context)=> GuideLinesScreen(),),),child: Text("View Guidelines",style: TextStyle(color: Colors.white),),), - + ], ), )*/ @@ -674,6 +674,7 @@ class _RailwayConcessionScreenState child: Stack( alignment: Alignment.center, children: [ + if (concessionDetails!.status == "serviced") Positioned(top: 50,child: Container( width: size.width, decoration: BoxDecoration( @@ -682,7 +683,10 @@ class _RailwayConcessionScreenState borderRadius: BorderRadius.only(topLeft: Radius.circular(size.width*0.1),topRight: Radius.circular(size.width*0.1),), ), child: const SizedBox(height: 50,), - ),), + ),) + 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( @@ -690,7 +694,7 @@ class _RailwayConcessionScreenState borderRadius: BorderRadius.circular(size.width*0.05), border: Border.all(color: Colors.white), boxShadow: [ - BoxShadow(offset: Offset.fromDirection(1),spreadRadius: 2,color: Colors.black,blurRadius: 2) + BoxShadow(offset: Offset.fromDirection(2),spreadRadius: 2,color: Colors.black,blurRadius: 2) ], ), alignment: Alignment.center, @@ -702,17 +706,97 @@ class _RailwayConcessionScreenState ), Container( width: size.width, + height: size.height*0.4, decoration: const BoxDecoration( color: Colors.blue, border: Border.symmetric(vertical: BorderSide(color: Colors.white),), ), - child: Text("Center"), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10,horizontal: 20), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("Ongoing Pass", + style: TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold), + ), + SizedBox(height: 15), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("Certificate Number", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), + Text("${concessionRequestData != null ? concessionRequestData.passNum : "not assigned"}", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text("Date of Issue", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), + Text(formattedDate, style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), + ], + ) + ], + ), + const SizedBox(height: 15,), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("Travel Lane", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), + Text("${travelLane}", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("From", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), + Text("${homeStation}", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text("To", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), + Text("Bandra", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), + ], + ) + ], + ), + const SizedBox(height: 15,), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("Duration of pass", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), + Text("${duration}", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text("Class", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), + Text(travelClass == "I" ? "First Class" : "Second Class", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), + ], + ), + //const SizedBox() + ], + ), + ], + ), + ), ), ], ) - + else Container( width: size.width * 0.8,