You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.3 KiB
Dart
52 lines
1.3 KiB
Dart
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:mohem_flutter_app/api/leave_balance_api_client.dart';
|
|
import 'package:mohem_flutter_app/classes/utils.dart';
|
|
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
|
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
|
|
|
class AddLeaveBalanceScreen extends StatefulWidget {
|
|
AddLeaveBalanceScreen({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
_AddLeaveBalanceScreenState createState() {
|
|
return _AddLeaveBalanceScreenState();
|
|
}
|
|
}
|
|
|
|
class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
getAbsenceAttendanceTypes();
|
|
}
|
|
|
|
void getAbsenceAttendanceTypes() async {
|
|
try {
|
|
Utils.showLoading(context);
|
|
var bac = await LeaveBalanceApiClient().getAbsenceTransactions(-999);
|
|
Utils.hideLoading(context);
|
|
setState(() {});
|
|
} catch (ex) {
|
|
Utils.hideLoading(context);
|
|
Utils.handleException(ex, context, null);
|
|
}
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: Colors.white,
|
|
appBar: AppBarWidget(
|
|
context,
|
|
title: LocaleKeys.leaveBalance.tr(),
|
|
),
|
|
);
|
|
}
|
|
}
|