Skip to content

About

Flutter-based leave management application with Manager and Owner roles, Supabase authentication and database integration, leave application submission, review, approval, and rejection.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Leave Approval

A leave management application built with Flutter and Supabase.

The application has two user roles: Manager and Owner. Managers can submit leave applications and view their requests, while Owners can review, approve, or reject submitted applications.

Features

  • User authentication with Supabase
  • Manager and Owner roles
  • Leave application form
  • Leave application history
  • Leave request details
  • Approve and reject leave requests
  • Form validation
  • Success and error notifications
  • Light and dark theme
  • Responsive layout

Tech Stack

  • Flutter
  • Dart
  • Supabase
  • PostgreSQL
  • Material 3

Project Structure

lib/
├── main.dart
├── app.dart
│
├── screens/
│   ├── login_screen.dart
│   ├── manager_dashboard.dart
│   ├── owner_dashboard.dart
│   └── leave_application_screen.dart
│
├── widgets/
│   ├── app_toast.dart
│   ├── gradient_background.dart
│   ├── gradient_button.dart
│   ├── leave_details_sheet.dart
│   └── leave_request_card.dart
│
└── services/
    └── supabase_service.dart

User Roles

Manager

A Manager can:

  • Log in using their account
  • Submit a leave application
  • View their submitted leave applications
  • Open an application to view its details

Owner

An Owner can:

  • Log in using their account
  • View submitted leave applications
  • Open an application to view its details
  • Approve a leave application
  • Reject a leave application

Supabase

Supabase is used for authentication and database operations.

The application uses:

  • Supabase Authentication for login
  • PostgreSQL for storing profiles and leave applications
  • User roles stored in the profiles table
  • Leave requests stored in the leave_applications table

Setup

Prerequisites

  • Flutter SDK
  • Dart SDK
  • A Supabase project

1. Clone the repository

git clone https://github.com/azmil666/leave_application.git
cd leave_application

2. Install dependencies

flutter pub get

3. Configure environment variables

Create a .env file in the project root:

SUPABASE_URL=your_supabase_url
SUPABASE_PUBLISHABLE_KEY=your_supabase_publishable_key

Do not commit the .env file to the repository.

4. Run the application

flutter run

Database

The application expects the following main tables:

profiles

Stores user information and their role.

Column Description
id User ID from Supabase Authentication
role User role (manager or owner)

leave_applications

Stores submitted leave applications, including employee details, leave dates, reason, ticket information, and application status.

Screens

Login

Users log in with their email and password. After authentication, they are taken to the dashboard corresponding to their role.

Manager Dashboard

Managers can view their leave applications and submit a new application.

Leave Application

Managers can enter their employee details, leave dates, reason, and other required information before submitting a request.

Owner Dashboard

Owners can view all submitted leave applications and approve or reject them.

Environment

The .env file is intentionally excluded from version control.

Make sure the following is included in .gitignore:

.env
.env.*

About

Flutter-based leave management application with Manager and Owner roles, Supabase authentication and database integration, leave application submission, review, approval, and rejection.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages