bug was fixed in the holiday screen
This commit is contained in:
@@ -19,8 +19,8 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
int activeTab = 0; // 0 = السلف | 1 = الأجازات
|
||||
|
||||
final RequestService _requestService = RequestService();
|
||||
late List<LeaveRequest> _leaveRequests;
|
||||
late List<AdvanceRequest> _advanceRequests;
|
||||
List<LeaveRequest> _leaveRequests = [];
|
||||
List<AdvanceRequest> _advanceRequests = [];
|
||||
|
||||
/// ⭐ Telegram-style FAB animation
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
@@ -82,26 +82,28 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: active ? activeColor : const Color(0xFFD6D6D6),
|
||||
boxShadow: active
|
||||
? [
|
||||
BoxShadow(
|
||||
color: glowColor.withOpacity(0.6),
|
||||
blurRadius: 15,
|
||||
spreadRadius: 2,
|
||||
),
|
||||
]
|
||||
: [],
|
||||
boxShadow:
|
||||
active
|
||||
? [
|
||||
BoxShadow(
|
||||
color: glowColor.withOpacity(0.6),
|
||||
blurRadius: 15,
|
||||
spreadRadius: 2,
|
||||
),
|
||||
]
|
||||
: [],
|
||||
),
|
||||
child: active && svgPath != null
|
||||
? Center(
|
||||
child: SvgPicture.asset(
|
||||
svgPath,
|
||||
width: 18,
|
||||
height: 18,
|
||||
color: const Color(0xFFFFFFFF),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
child:
|
||||
active && svgPath != null
|
||||
? Center(
|
||||
child: SvgPicture.asset(
|
||||
svgPath,
|
||||
width: 18,
|
||||
height: 18,
|
||||
color: const Color(0xFFFFFFFF),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(label, style: const TextStyle(fontSize: 10)),
|
||||
@@ -134,9 +136,10 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: activeTab == 1
|
||||
? const Color(0xFF8EFDC2)
|
||||
: const Color(0x9EFFFFFF),
|
||||
color:
|
||||
activeTab == 1
|
||||
? const Color(0xFF8EFDC2)
|
||||
: const Color(0x9EFFFFFF),
|
||||
),
|
||||
),
|
||||
if (activeTab == 1)
|
||||
@@ -162,9 +165,10 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: activeTab == 0
|
||||
? const Color(0xFF8EFDC2)
|
||||
: const Color(0x9EFFFFFF),
|
||||
color:
|
||||
activeTab == 0
|
||||
? const Color(0xFF8EFDC2)
|
||||
: const Color(0x9EFFFFFF),
|
||||
),
|
||||
),
|
||||
if (activeTab == 0)
|
||||
@@ -187,9 +191,10 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
child: activeTab == 1
|
||||
? _buildLeaveRequestsTab()
|
||||
: _buildAdvanceRequestsTab(),
|
||||
child:
|
||||
activeTab == 1
|
||||
? _buildLeaveRequestsTab()
|
||||
: _buildAdvanceRequestsTab(),
|
||||
),
|
||||
|
||||
// -------------------------------------------------------------
|
||||
@@ -218,8 +223,7 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
const RequestAdvanceScreen(),
|
||||
builder: (context) => const RequestAdvanceScreen(),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -236,8 +240,7 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
const RequestLeaveScreen(),
|
||||
builder: (context) => const RequestLeaveScreen(),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -312,8 +315,7 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
margin: const EdgeInsets.only(bottom: 16),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 14),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 14),
|
||||
decoration: BoxDecoration(
|
||||
color: bgColor,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
@@ -328,8 +330,7 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
buildStatusCircle(
|
||||
active: isWaiting,
|
||||
label: "قيد الانتظار",
|
||||
svgPath:
|
||||
isWaiting ? "assets/images/waiting.svg" : null,
|
||||
svgPath: isWaiting ? "assets/images/waiting.svg" : null,
|
||||
activeColor: const Color(0xFFF9C8A01B),
|
||||
glowColor: const Color(0xB4FFDC69),
|
||||
),
|
||||
@@ -337,8 +338,7 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
buildStatusCircle(
|
||||
active: isApproved,
|
||||
label: "موافقة",
|
||||
svgPath:
|
||||
isApproved ? "assets/images/yes.svg" : null,
|
||||
svgPath: isApproved ? "assets/images/yes.svg" : null,
|
||||
activeColor: const Color(0xFF0A8A60),
|
||||
glowColor: const Color(0xFF00D7A3),
|
||||
),
|
||||
@@ -346,8 +346,7 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
buildStatusCircle(
|
||||
active: isDenied,
|
||||
label: "تم الرفض",
|
||||
svgPath:
|
||||
isDenied ? "assets/images/no.svg" : null,
|
||||
svgPath: isDenied ? "assets/images/no.svg" : null,
|
||||
activeColor: const Color(0xFFE63946),
|
||||
glowColor: const Color(0xFFE63946),
|
||||
),
|
||||
@@ -459,8 +458,7 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
margin: const EdgeInsets.only(bottom: 16),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 10, vertical: 14),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 14),
|
||||
decoration: BoxDecoration(
|
||||
color: bgColor,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
@@ -474,8 +472,7 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
buildStatusCircle(
|
||||
active: isWaiting,
|
||||
label: "قيد الانتظار",
|
||||
svgPath:
|
||||
isWaiting ? "assets/images/waiting.svg" : null,
|
||||
svgPath: isWaiting ? "assets/images/waiting.svg" : null,
|
||||
activeColor: const Color(0xFFF9C8A01B),
|
||||
glowColor: const Color(0xB4FFDC69),
|
||||
),
|
||||
@@ -483,8 +480,7 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
buildStatusCircle(
|
||||
active: isApproved,
|
||||
label: "موافقة",
|
||||
svgPath:
|
||||
isApproved ? "assets/images/yes.svg" : null,
|
||||
svgPath: isApproved ? "assets/images/yes.svg" : null,
|
||||
activeColor: const Color(0xFF0A8A60),
|
||||
glowColor: const Color(0xFF00D7A3),
|
||||
),
|
||||
@@ -492,8 +488,7 @@ class _HolidayScreenState extends State<HolidayScreen> {
|
||||
buildStatusCircle(
|
||||
active: isDenied,
|
||||
label: "تم الرفض",
|
||||
svgPath:
|
||||
isDenied ? "assets/images/no.svg" : null,
|
||||
svgPath: isDenied ? "assets/images/no.svg" : null,
|
||||
activeColor: const Color(0xFFE63946),
|
||||
glowColor: const Color(0xFFE63946),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user