Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
36 changes: 16 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# Task Management App - Life Organizer

## 1. Introduction
This repository contains the source code for the **Task Management App (Life Organizer)**, developed as a project for the **SE346** course at the University of Information Technology - VNUHCM (UIT).
# Bản update từ nhánh `priority_selector_and_tag_system`
- file1: task_viewmodel.dart
- file2: tag_selector.dart
- file3: task_detail_screen.dart

Going beyond a traditional to-do list, this application is designed to be a comprehensive personal assistant. It helps users easily organize various life contexts, such as tracking utility bills, managing grocery shopping lists, building daily habits, and handling household chores efficiently.
<img width="445" height="108" alt="image" src="https://github.com/user-attachments/assets/4763d417-a73d-484d-9ae3-b145045dc624" />

## 2. Authors
This project is built and maintained by a dedicated team of 4 members:
* [Trần Quang Hạ](https://github.com/tqha1011)
* [Nguyễn Lê Hoàng Hảo](https://github.com/hoanghaoz)
* [Nguyễn Anh Kiệt](https://github.com/anhkietbienhoa-crypto)
* [Nguyễn Trí Kiệt](https://github.com/Ender-Via)
**Nâng cấp thêm các tag: Thời gian, Trạng thái và Custom**

## 3. Tech Stack
The application is built with a focus on performance, security, and clean code principles, strictly following the **Feature-Based MVVM** architecture:
* **Frontend:** Flutter
* **Backend & Database:** Supabase (PostgreSQL, Auth, Row Level Security)
* **Code Quality & CI/CD:** GitHub Actions, SonarCloud
- **Thời gian & Trạng thái:** Chỉnh sửa sau khi tạo task tại màn hình `task_detail_screen.dart`.
- **Tag Custom:** - Tối đa 12 ký tự/tag.
- Tối đa 5 tags/nhiệm vụ.
- Các tag đã tạo sẽ được lưu nội bộ trên máy để dùng lại cho lần sau mà không cần nhập lại.

## 4. Documentation
For a deeper dive into our system design and development workflows, please explore the attached documentation:
* [Flutter App Architecture](documentation/architecture/flutter-architecture.md)
* [Database Schema & ERD](documentation/architecture/database-schema.md)
* [Git & Conventional Commits Guidelines](documentation/guidelines/conventional-commit.md)
**⚠️ Lưu ý cài đặt:**
Để sử dụng tính năng lưu tag custom, **phải thêm** package `shared_preferences`.

Mở file `pubspec.yaml`, tìm phần `dependencies` và dán dòng này vào ngay dưới `provider: ^6.1.5+1`:
```yaml
shared_preferences: ^2.3.2
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
62 changes: 60 additions & 2 deletions src/lib/features/tasks/model/task_model.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,69 @@
import 'package:flutter/material.dart';

// ─── Priority Enum ───────────────────────────────────────────
enum Priority { low, medium, high, urgent }

extension PriorityExtension on Priority {
String get label {
switch (this) {
case Priority.low:
return 'Low';
case Priority.medium:
return 'Medium';
case Priority.high:
return 'High';
case Priority.urgent:
return 'Urgent';
}
}

Color get color {
switch (this) {
case Priority.low:
return const Color(0xFF4CAF50); // xanh lá
case Priority.medium:
return const Color(0xFF2196F3); // xanh dương
case Priority.high:
return const Color(0xFFFF9800); // cam
case Priority.urgent:
return const Color(0xFFF44336); // đỏ
}
}

IconData get icon {
switch (this) {
case Priority.low:
return Icons.flag_outlined;
case Priority.medium:
return Icons.flag;
case Priority.high:
return Icons.flag;
case Priority.urgent:
return Icons.flag;
}
}
}

// ─── Tag Model ───────────────────────────────────────────────
class TagModel {
final String id;
final String name;
final Color color;

const TagModel({required this.id, required this.name, required this.color});
}

// ─── Task Model ──────────────────────────────────────────────
class TaskModel {
final String id; // ID duy nhất để làm Hero tag và gọi API sau này
final String id;
String title;
String description;
String category;
TimeOfDay startTime;
TimeOfDay endTime;
DateTime date;
Priority priority;
List<TagModel> tags;

TaskModel({
required this.id,
Expand All @@ -17,5 +73,7 @@ class TaskModel {
required this.startTime,
required this.endTime,
required this.date,
this.priority = Priority.medium,
this.tags = const [],
});
}
}
Loading