merge-requests/101/head
haroon amjad 3 years ago
parent 65e1540f97
commit 4a513c08d9

@ -3,6 +3,7 @@ import 'package:mohem_flutter_app/ui/marathon/widgets/question_card.dart';
class ApiConsts {
//static String baseUrl = "http://10.200.204.20:2801/"; // Local server
// static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server
// static String baseUrl = "https://erptstapp.srca.org.sa"; // SRCA server
static String baseUrl = "https://hmgwebservices.com"; // Live server
static String baseUrlServices = baseUrl + "/Services/"; // server
// static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server

@ -37,7 +37,7 @@ class Utils {
timeInSecForIosWeb: 1,
backgroundColor: Colors.black54,
textColor: Colors.white,
fontSize: 16.0);
fontSize: 13.0);
}
static dynamic getNotNullValue(List<dynamic> list, int index) {

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:logger/logger.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/consts.dart';
@ -37,6 +38,10 @@ bool isTablet = false;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
await EasyLocalization.ensureInitialized();
AppState().setPostParamsInitConfig();
HttpOverrides.global = MyHttpOverrides();

@ -1,41 +1,41 @@
class GetTimeCardSummaryList {
int? aBSENTDAYS;
num? aBSENTDAYS;
dynamic? aCTUALHRS;
dynamic? aPPROVEDTIMEBACKHRS;
int? aSSIGNMENTID;
int? aTTENDEDDAYS;
int? bUSINESSTRIP;
num? aSSIGNMENTID;
num? aTTENDEDDAYS;
num? bUSINESSTRIP;
dynamic? cOMPOFFHHRS;
dynamic? cOMPOFFNHRS;
dynamic? cOMPOFFWHRS;
dynamic? dESIREDSCHEDULEDHRS;
dynamic? eARLYOUTHRS;
dynamic? eXCESSHRS;
int? hALFDAYLEAVE;
num? hALFDAYLEAVE;
dynamic? lATEINHRS;
dynamic? lEAVESHOLIDAYSHRS;
dynamic? nONSCHEDULEDAYS;
dynamic? nOTANALYZEDDAYS;
int? oFFDAYS;
num? oFFDAYS;
dynamic? oNCALLHRS;
dynamic? pAIDLEAVE;
int? pERIODDAYS;
num? pERIODDAYS;
dynamic? pLANNEDOTHRS;
int? pUBLICHOLIDAY;
num? pUBLICHOLIDAY;
dynamic? sCHEDULEDHRS;
dynamic? sCHEDULEDONCALLHRS;
dynamic? sCHEDULEDPLANNEDOTHRS;
int? sCHEDULEDAYS;
num? sCHEDULEDAYS;
dynamic? sHORTAGEHRS;
dynamic? sHORTAGESCHEDULEHRS;
int? sICKLEAVE;
num? sICKLEAVE;
dynamic? tIMEBACKHRS;
dynamic? tIMEBACKBALANCE;
int? uNAUTHORIZEDLEAVE;
num? uNAUTHORIZEDLEAVE;
dynamic? uNCOVERDSHORTAGEHRS;
int? uNPAIDLEAVE;
num? uNPAIDLEAVE;
GetTimeCardSummaryList(
{this.aBSENTDAYS,

@ -196,7 +196,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.goodMorning.tr().toText14(color: MyColors.grey77Color),
LocaleKeys.welcomeBack.tr().toText14(color: MyColors.grey77Color),
(AppState().memberInformationList!.eMPLOYEENAME ?? "").toText24(isBold: true),
16.height,
Row(

@ -106,6 +106,19 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
void getData() async {
// try {
// Utils.showLoading(context);
getEitCollectionNotificationBodyList!.clear();
getAbsenceCollectionNotificationBodyList!.clear();
getPrNotificationBody = null;
getStampMsNotifications.clear();
getStampNsNotifications.clear();
getPoNotificationBody?.pOHeader!.clear();
getItemCreationNtfBody?.itemCreationHeader!.clear();
getPhonesNotificationBodyList!.clear();
getBasicDetNtfBodyList!.clear();
getAbsenceCollectionNotificationBodyList!.clear();
getContactNotificationBodyList = null;
if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") {
getUserInformation();
}
@ -688,7 +701,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
GenericResponseModel model = await WorkListApiClient().postNotificationActions(payload);
Utils.hideLoading(context);
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
animationIndex=animationIndex+1;
animationIndex = animationIndex + 1;
AppState().workList!.removeAt(AppState().workListIndex!);
if (AppState().workList!.isEmpty) {
Navigator.pop(context, "delegate_reload");
@ -725,6 +738,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getEitCollectionNotificationBodyList!.clear();
getEitCollectionNotificationBodyList = await WorkListApiClient().GetEitNotificationBody(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
@ -742,6 +756,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
memberInformationListModel = null;
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
apiCallCount--;
if (apiCallCount == 0) {
@ -759,6 +774,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getPhonesNotificationBodyList!.clear();
getPhonesNotificationBodyList = await WorkListApiClient().getPhonesNotificationBodyList(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
@ -776,6 +792,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getBasicDetNtfBodyList!.clear();
getBasicDetNtfBodyList = await WorkListApiClient().getBasicDetNtfBodyList(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
@ -793,6 +810,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getAbsenceCollectionNotificationBodyList!.clear();
getAbsenceCollectionNotificationBodyList = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
@ -916,6 +934,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getNotificationRespondAttributes.clear();
getNotificationRespondAttributes = await WorkListApiClient().notificationGetRespondAttributes(workListData!.nOTIFICATIONID!);
if (getNotificationRespondAttributes.isNotEmpty) {
notificationNoteInput = getNotificationRespondAttributes.first;
@ -936,6 +955,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
notificationButtonsList.clear();
notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!);
if (notificationButtonsList.isNotEmpty) {
isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE");

Loading…
Cancel
Save