Merge branch 'development_sikander' into 'master'

Development sikander

See merge request Cloud_Solution/mohemm-flutter-app!25
faiz_marathon_signalR_critical
Sikander Saleem 2 years ago
commit b971795be9

@ -419,6 +419,8 @@
"adult": "بالغ",
"updateMember": "هل انت متأكد تريد تحديث بيانات هذا العضو؟",
"fieldIsEmpty": "'{data}' الحقل فارغ. الرجاء التحديد",
"pleaseEnterComments": "الرجاء إدخال التعليقات",
"skip": "يتخطى",
"profile": {
"reset_password": {
"label": "Reset Password",

@ -419,6 +419,8 @@
"adult": "Adult",
"updateMember": "Are You Sure You Want to Update this Member?",
"fieldIsEmpty": "'{data}' Field is empty. Please select",
"pleaseEnterComments": "Please enter comments",
"skip": "skip",
"profile": {
"reset_password": {
"label": "Reset Password",

@ -420,6 +420,8 @@ abstract class LocaleKeys {
static const adult = 'adult';
static const updateMember = 'updateMember';
static const fieldIsEmpty = 'fieldIsEmpty';
static const pleaseEnterComments = 'pleaseEnterComments';
static const skip = 'skip';
static const profile_reset_password_label = 'profile.reset_password.label';
static const profile_reset_password_username = 'profile.reset_password.username';
static const profile_reset_password_password = 'profile.reset_password.password';

@ -262,7 +262,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
border: Border.all(color: MyColors.lightGreyEDColor, width: 1),
),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisSize: MainAxisSize.min,crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,

@ -203,7 +203,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
myFab("Skip", "assets/images/skip.svg").onPress(() {
myFab(LocaleKeys.pleaseEnterComments.tr(), "assets/images/skip.svg").onPress(() {
if (AppState().requestAllList!.length - 1 > AppState().itgWorkListIndex!) {
AppState().itgWorkListIndex = AppState().itgWorkListIndex! + 1;
requestDetails = null;
@ -356,7 +356,18 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
ITGRequest? itgRequest = await WorkListApiClient().rejectITGRequest(requestType, taskId, itemId, employeeNumber, comments);
Utils.hideLoading(context);
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
// Navigator.pop(context, "delegate_reload");
AppState().workList!.removeAt(AppState().workListIndex!);
if (AppState().workList!.isEmpty) {
Navigator.pop(context, "delegate_reload");
} else {
if (AppState().workList!.length <= AppState().workListIndex!) {
Navigator.pop(context, "delegate_reload");
} else {
requestDetails = null;
getDataFromState();
}
}
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
@ -369,7 +380,18 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
ITGRequest? itgRequest = await WorkListApiClient().approveITGRequest(requestType, taskId, itemId, employeeNumber, comments);
Utils.hideLoading(context);
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
// Navigator.pop(context, "delegate_reload");
AppState().workList!.removeAt(AppState().workListIndex!);
if (AppState().workList!.isEmpty) {
Navigator.pop(context, "delegate_reload");
} else {
if (AppState().workList!.length <= AppState().workListIndex!) {
Navigator.pop(context, "delegate_reload");
} else {
requestDetails = null;
getDataFromState();
}
}
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);

@ -442,6 +442,8 @@ class _WorkListScreenState extends State<WorkListScreen> {
calculateCounter();
if (mounted) setState(() {});
}
} else {
if (mounted) setState(() {});
}
},
child: Container(

@ -307,7 +307,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
myFab("Skip", "assets/images/skip.svg").onPress(() {
myFab(LocaleKeys.pleaseEnterComments.tr(), "assets/images/skip.svg").onPress(() {
if (AppState().workList!.length - 1 > AppState().workListIndex!) {
AppState().setWorkListIndex = AppState().workListIndex! + 1;
workListData = null;
@ -481,6 +481,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
void performAction(String actionMode) {
TextEditingController textEditingController = TextEditingController();
print("actionMode:$actionMode");
showDialog(
context: context,
builder: (cxt) => AcceptRejectInputDialog(
@ -488,7 +489,6 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
notificationGetRespond: notificationNoteInput,
textEditingController: textEditingController,
onTap: (note) {
if (note.isNotEmpty && (actionMode == "APPROVED" || actionMode == "APPROVE")) {
Map<String, dynamic> payload = {
"P_ACTION_MODE": actionMode,
"P_APPROVER_INDEX": null,
@ -503,9 +503,12 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
}
],
};
if (actionMode == "APPROVED" || actionMode == "APPROVE") {
performNotificationAction(payload);
} else if (note.isNotEmpty && (actionMode != "APPROVED" || actionMode != "APPROVE")) {
performNotificationAction(payload);
} else {
Utils.showToast("Please enter comments");
Utils.showToast(LocaleKeys.pleaseEnterComments.tr());
}
},
),
@ -518,7 +521,17 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
GenericResponseModel model = await WorkListApiClient().postNotificationActions(payload);
Utils.hideLoading(context);
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
Navigator.pop(context, true);
AppState().workList!.removeAt(AppState().workListIndex!);
if (AppState().workList!.isEmpty) {
Navigator.pop(context, "delegate_reload");
} else {
if (AppState().workList!.length <= AppState().workListIndex!) {
Navigator.pop(context, "delegate_reload");
} else {
workListData = null;
getDataFromState();
}
}
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);

@ -85,7 +85,8 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: const EdgeInsets.only(bottom: 14, top: 21),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: (MediaQuery.of(context).size.width < 400) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8),
children: <Widget>[
// if (isNfcEnabled)
attendanceMethod("NFC", "assets/images/nfc.svg", isNfcEnabled, () {
@ -238,7 +239,7 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(image, color: Colors.white).expanded,
SvgPicture.asset(image, color: Colors.white, alignment: Alignment.topLeft).expanded,
title.toText17(isBold: true, color: Colors.white),
],
),

Loading…
Cancel
Save