attendence records, extra hours , rewards and punishment funnctionality have been added
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import '../../domain/models/finance_category.dart';
|
||||
|
||||
class FinanceSummaryCard extends StatelessWidget {
|
||||
final String totalAmount;
|
||||
final String dropdownValue;
|
||||
final FinanceCategory currentCategory;
|
||||
final VoidCallback onCalendarTap;
|
||||
final ValueChanged<String?> onDropdownChanged;
|
||||
final ValueChanged<FinanceCategory?> onCategoryChanged;
|
||||
|
||||
const FinanceSummaryCard({
|
||||
super.key,
|
||||
required this.totalAmount,
|
||||
required this.dropdownValue,
|
||||
this.totalAmount = "0",
|
||||
required this.currentCategory,
|
||||
required this.onCalendarTap,
|
||||
required this.onDropdownChanged,
|
||||
required this.onCategoryChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -112,8 +113,8 @@ class FinanceSummaryCard extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
child: DropdownButtonHideUnderline(
|
||||
child: DropdownButton<String>(
|
||||
value: dropdownValue,
|
||||
child: DropdownButton<FinanceCategory>(
|
||||
value: currentCategory,
|
||||
icon: const Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 35,
|
||||
@@ -121,45 +122,26 @@ class FinanceSummaryCard extends StatelessWidget {
|
||||
),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
color: Color.from(
|
||||
alpha: 1,
|
||||
red: 0,
|
||||
green: 0,
|
||||
blue: 0,
|
||||
),
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
onChanged: onDropdownChanged,
|
||||
onChanged: onCategoryChanged,
|
||||
items: const [
|
||||
DropdownMenuItem(
|
||||
value: "الكل",
|
||||
child: Directionality(
|
||||
textDirection: TextDirection.rtl,
|
||||
child: Text("الكل"),
|
||||
),
|
||||
),
|
||||
|
||||
DropdownMenuItem(
|
||||
value: "ساعات أضافية",
|
||||
child: Directionality(
|
||||
textDirection: TextDirection.rtl,
|
||||
child: Text("ساعات أضافية"),
|
||||
),
|
||||
),
|
||||
|
||||
DropdownMenuItem(
|
||||
value: "مكافئة",
|
||||
child: Directionality(
|
||||
textDirection: TextDirection.rtl,
|
||||
child: Text("مكافئة"),
|
||||
),
|
||||
value: FinanceCategory.attendance,
|
||||
child: Text("الحظور"),
|
||||
),
|
||||
DropdownMenuItem(
|
||||
value: " عقوبة",
|
||||
child: Directionality(
|
||||
textDirection: TextDirection.rtl,
|
||||
child: Text(" عقوبة"),
|
||||
),
|
||||
value: FinanceCategory.overtime,
|
||||
child: Text("ساعات أضافية"),
|
||||
),
|
||||
DropdownMenuItem(
|
||||
value: FinanceCategory.bonus,
|
||||
child: Text("مكافئة"),
|
||||
),
|
||||
DropdownMenuItem(
|
||||
value: FinanceCategory.penalty,
|
||||
child: Text("عقوبة"),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user