Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
161d0f2
initial commits
manavsep Feb 7, 2026
d76d92a
Added empty files for leave
Ayan-Bain Feb 7, 2026
fce821e
Added leave apply API endpoint
Ayan-Bain Feb 8, 2026
d3dec41
Added all student endpoints
Ayan-Bain Feb 15, 2026
22d23d6
Fixed proofDocumentUrl
Ayan-Bain Feb 15, 2026
5ca2e45
Fixed unsupported file type Error
Ayan-Bain Feb 16, 2026
c6271db
Hostel endpoints almost done
Ayan-Bain Feb 17, 2026
661505d
Frontend work
manavsep Feb 18, 2026
9960ef6
Frontend work
manavsep Feb 18, 2026
dcab343
Merge branch 'messrebate' of https://github.com/HABIITG/iitgHABapp in…
manavsep Feb 18, 2026
de5ffa6
Done. Integration of onedrive still doubtful.
Ayan-Bain Feb 19, 2026
4e3af9d
Leave history and authentication (frontend)
manavsep Feb 21, 2026
c50419a
Merge branch 'messrebate' of https://github.com/HABIITG/iitgHABapp in…
manavsep Feb 21, 2026
c9a6310
Authentication and Leave history
manavsep Feb 21, 2026
3346c3e
Leave history screen frontend
manavsep Feb 21, 2026
976ee07
fixed some errors
manavsep Feb 21, 2026
d141987
All endpoints working now.
Ayan-Bain Feb 21, 2026
2a20418
Merge branch 'messrebate' of https://github.com/HABIITG/iitgHABapp in…
Ayan-Bain Feb 21, 2026
3a8f79f
Merge branch 'dev' into messrebate
Xeramian Feb 22, 2026
ba66a07
allowing user to select account
Xeramian Feb 22, 2026
29e8575
Removed debug endpoints and console logs.
Ayan-Bain Mar 9, 2026
eef8a72
Backarrow debug
manavsep Mar 9, 2026
85044a9
Merge branch 'messrebate' of https://github.com/HABIITG/iitgHABapp in…
manavsep Mar 9, 2026
0b6966a
MessRebate Debugging
manavsep Mar 13, 2026
2dc2c19
Fix: Changed endpoint URL
Ayan-Bain Mar 13, 2026
992926a
My bad...
Ayan-Bain Mar 13, 2026
a321393
Fix: Leave Application Screens
manavsep Mar 15, 2026
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
664 changes: 344 additions & 320 deletions .idea/libraries/Dart_Packages.xml

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions .idea/libraries/Dart_SDK.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 27 additions & 29 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions frontend2/lib/constants/endpoint.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const String baseUrl = "https://hab.codingclub.in/api";
const String authUrl = "https://hab.codingclub.in/api";

class MessRebateEndpoints {
static const String sendApplication = '$baseUrl/leave/apply';
static const String getApplications = '$baseUrl/leave/my-applications';
}

class NotificationEndpoints {
static const String registerToken = '$baseUrl/notification/register-token';
static const String welcome = '$baseUrl/notification/welcome';
Expand All @@ -27,11 +32,11 @@ class HostelEndpoint {
class AuthEndpoints {
// For initial Microsoft login - redirects through backend
static String get getAccess =>
'https://login.microsoftonline.com/850aa78d-94e1-4bc6-9cf3-8c11b530701c/oauth2/v2.0/authorize?client_id=2cdac4f3-1fda-4348-a057-9bb2e3d184a1&response_type=code&redirect_uri=$authUrl/auth/login/redirect/mobile&scope=offline_access%20User.Read&state=12345';
'https://login.microsoftonline.com/850aa78d-94e1-4bc6-9cf3-8c11b530701c/oauth2/v2.0/authorize?client_id=2cdac4f3-1fda-4348-a057-9bb2e3d184a1&response_type=code&redirect_uri=$authUrl/auth/login/redirect/mobile&scope=offline_access%20User.Read&state=12345&prompt=select_account';

// For linking Microsoft account - uses same redirect URI as login but with state=link
static String get linkMicrosoft =>
'https://login.microsoftonline.com/850aa78d-94e1-4bc6-9cf3-8c11b530701c/oauth2/v2.0/authorize?client_id=2cdac4f3-1fda-4348-a057-9bb2e3d184a1&response_type=code&redirect_uri=$authUrl/auth/login/redirect/mobile&scope=offline_access%20User.Read&state=link';
'https://login.microsoftonline.com/850aa78d-94e1-4bc6-9cf3-8c11b530701c/oauth2/v2.0/authorize?client_id=2cdac4f3-1fda-4348-a057-9bb2e3d184a1&response_type=code&redirect_uri=$authUrl/auth/login/redirect/mobile&scope=offline_access%20User.Read&state=link&prompt=select_account';
}

class Userendpoints {
Expand Down
15 changes: 8 additions & 7 deletions frontend2/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ class _MyAppState extends State<MyApp> {

// Use `.map()` to transform the stream into a stream of ConnectivityResult
_connectivityStream = _connectivity.onConnectivityChanged.map(
(List<ConnectivityResult> results) =>
results.isNotEmpty ? results[0] : ConnectivityResult.none);
(List<ConnectivityResult> results) =>
results.isNotEmpty ? results[0] : ConnectivityResult.none);

_connectivityStream.listen((ConnectivityResult result) {
_handleConnectivityChange(result);
Expand Down Expand Up @@ -165,12 +165,13 @@ class _MyAppState extends State<MyApp> {
navigatorKey: navigatorKey,

home: widget.updateRequired
? const UpdateRequiredScreen()
: (widget.isLoggedIn
? const MainNavigationScreen()
: const LoginScreen()),
? const UpdateRequiredScreen() :
(widget.isLoggedIn
?
const MainNavigationScreen()
: const LoginScreen()),

//home: ProfileScreen(),
// home: ProfileScreen(),
builder: EasyLoading.init(),
routes: {
'/home': (context) => const MainNavigationScreen(),
Expand Down
73 changes: 73 additions & 0 deletions frontend2/lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import '../utilities/startupitem.dart';
import '../widgets/alerts_card.dart';
import '../widgets/microsoft_required_dialog.dart';
import 'mess_preference.dart';
import 'leave_application_screen.dart';

class HomeScreen extends StatefulWidget {
final void Function(int)? onNavigateToTab;
Expand Down Expand Up @@ -223,6 +224,78 @@ class _HomeScreenState extends State<HomeScreen> {
),
),
),
const SizedBox(width: 16),

//Rebate
Expanded(
child: InkWell(
borderRadius: BorderRadius.circular(18),
onTap: () async {
final prefs = await SharedPreferences.getInstance();
final hasMicrosoftLinked =
prefs.getBool('hasMicrosoftLinked') ?? false;

if (!mounted) return;

if (!hasMicrosoftLinked) {
showDialog(
context: context,
builder: (context) => const MicrosoftRequiredDialog(
featureName: 'Mess Rebate',
),
);
return;
}

Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const LeaveApplicationScreen(),
),
);
},
child: Container(
height: 90,
decoration: BoxDecoration(
// color: const Color(0xFFF6F6F6),
color: const Color(0xFFFFFFFF),
borderRadius: BorderRadius.circular(18),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 40,
height: 40,
decoration: const BoxDecoration(
color: Color(0xFF3754DB),
shape: BoxShape.circle,
),
child: Center(
child: SvgPicture.asset(
'assets/icon/messicon.svg',
colorFilter: const ColorFilter.mode(
Colors.white, BlendMode.srcIn),
width: 22,
height: 22,
),
),
),
const SizedBox(height: 8),
const Text(
"Mess Rebate",
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.w600,
fontSize: 15,
),
),
],
),
),
),
),
],
),
);
Expand Down
Loading