Merge branch 'master' into development_aamir

# Conflicts:
#	lib/generated_plugin_registrant.dart
merge-requests/116/head
Aamir Muhammad 3 years ago
commit ddba673970

@ -40,7 +40,7 @@ class DateUtil {
} }
static DateTime convertSimpleStringDateToDate(String date) { static DateTime convertSimpleStringDateToDate(String date) {
return DateFormat("MM/dd/yyyy hh:mm:ss").parse(date); return DateFormat("MM/dd/yyyy hh:mm:ss a").parse(date.toUpperCase());
} }
static DateTime convertSimpleStringDateToDateddMMyyyy(String date) { static DateTime convertSimpleStringDateToDateddMMyyyy(String date) {

@ -58,7 +58,7 @@ extension WidgetExtensions on Widget {
), ),
], ],
), ),
alignment: center == true ? Alignment.center : null, alignment: center ? Alignment.center : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

@ -16,7 +16,6 @@ import 'package:image_picker_for_web/image_picker_for_web.dart';
import 'package:shared_preferences_web/shared_preferences_web.dart'; import 'package:shared_preferences_web/shared_preferences_web.dart';
import 'package:url_launcher_web/url_launcher_web.dart'; import 'package:url_launcher_web/url_launcher_web.dart';
import 'package:video_player_web/video_player_web.dart'; import 'package:video_player_web/video_player_web.dart';
//import 'package:wakelock_web/wakelock_web.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart'; import 'package:flutter_web_plugins/flutter_web_plugins.dart';
@ -32,6 +31,5 @@ void registerPlugins(Registrar registrar) {
SharedPreferencesPlugin.registerWith(registrar); SharedPreferencesPlugin.registerWith(registrar);
UrlLauncherPlugin.registerWith(registrar); UrlLauncherPlugin.registerWith(registrar);
VideoPlayerPlugin.registerWith(registrar); VideoPlayerPlugin.registerWith(registrar);
// WakelockWeb.registerWith(registrar);
registrar.registerMessageHandler(); registrar.registerMessageHandler();
} }

@ -4,7 +4,7 @@ class GetPoItemHistoryList {
String? bUYER; String? bUYER;
String? cLOSEDCODE; String? cLOSEDCODE;
String? cREATIONDATE; String? cREATIONDATE;
int? dISCOUNTPERCENTAGE; num? dISCOUNTPERCENTAGE;
int? fROMROWNUM; int? fROMROWNUM;
int? iTEMID; int? iTEMID;
num? nETPRICE; num? nETPRICE;

@ -5,7 +5,7 @@ class GetQuotationAnalysisList {
int? nOOFROWS; int? nOOFROWS;
String? qUOTBONUSQTY; String? qUOTBONUSQTY;
String? qUOTDELIVERYDATE; String? qUOTDELIVERYDATE;
int? qUOTLINETOTAL; num? qUOTLINETOTAL;
String? qUOTMFGPARTNUM; String? qUOTMFGPARTNUM;
String? qUOTNUM; String? qUOTNUM;
num? qUOTQTY; num? qUOTQTY;

@ -43,9 +43,9 @@ class _LeaveBalanceState extends State<LeaveBalance> {
void getAbsenceTransactions() async { void getAbsenceTransactions() async {
try { try {
// Utils.showLoading(context); Utils.showLoading(context);
absenceTransList = await LeaveBalanceApiClient().getAbsenceTransactions(-999, empID: selectedEmp); absenceTransList = await LeaveBalanceApiClient().getAbsenceTransactions(-999, empID: selectedEmp);
//Utils.hideLoading(context); Utils.hideLoading(context);
setState(() {}); setState(() {});
} catch (ex) { } catch (ex) {
Utils.hideLoading(context); Utils.hideLoading(context);

@ -58,9 +58,9 @@ class _LoginScreenState extends State<LoginScreen> {
void initState() { void initState() {
super.initState(); super.initState();
// checkFirebaseToken(); // checkFirebaseToken();
if (kReleaseMode) { // if (kReleaseMode) {
checkDeviceSafety(); // checkDeviceSafety();
} // }
} }
void checkDeviceSafety() async { void checkDeviceSafety() async {

@ -390,6 +390,7 @@ class MarathonProvider extends ChangeNotifier {
} }
bool checkIfPrivilegedForMarathon() { bool checkIfPrivilegedForMarathon() {
return true;
for (PrivilegeListModel element in AppState().privilegeListModel!) { for (PrivilegeListModel element in AppState().privilegeListModel!) {
if (element.serviceName == "Marathon") { if (element.serviceName == "Marathon") {
if (element.previlege != null) { if (element.previlege != null) {

@ -184,10 +184,12 @@ class MarathonBanner extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
MarathonProvider provider = context.read<MarathonProvider>(); MarathonProvider provider = context.read<MarathonProvider>();
return !provider.isPrivilegedWithMarathon return
? getUnPrivilegedMarathon(context) // !provider.isPrivilegedWithMarathon
: provider.marathonDetailModel.startTime != null // ? getUnPrivilegedMarathon(context)
? Container( // : provider.marathonDetailModel.startTime != null
// ?
Container(
decoration: MyDecorations.shadowDecoration, decoration: MyDecorations.shadowDecoration,
height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11, height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11,
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
@ -353,7 +355,6 @@ class MarathonBanner extends StatelessWidget {
child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.whiteColor), child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.whiteColor),
).paddingAll(isTablet ? 20 : 15), ).paddingAll(isTablet ? 20 : 15),
), ),
], ],
).onPress(() async { ).onPress(() async {
int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes; int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes;
@ -377,7 +378,8 @@ class MarathonBanner extends StatelessWidget {
Navigator.pushNamed(context, AppRoutes.marathonIntroScreen); Navigator.pushNamed(context, AppRoutes.marathonIntroScreen);
} }
}), }),
) );
: const SizedBox(); // )
// : const SizedBox();
} }
} }

@ -15,6 +15,7 @@ import 'package:url_launcher/url_launcher.dart';
class TeamMembers extends StatefulWidget { class TeamMembers extends StatefulWidget {
final String? selectedEmp; final String? selectedEmp;
const TeamMembers({this.selectedEmp, Key? key}) : super(key: key); const TeamMembers({this.selectedEmp, Key? key}) : super(key: key);
@override @override
@ -22,8 +23,8 @@ class TeamMembers extends StatefulWidget {
} }
class _TeamMembersState extends State<TeamMembers> { class _TeamMembersState extends State<TeamMembers> {
String searchEmpEmail =""; String searchEmpEmail = "";
String searchEmpName =""; String searchEmpName = "";
String searchEmpNo = ""; String searchEmpNo = "";
String? empId; String? empId;
@ -39,7 +40,7 @@ class _TeamMembersState extends State<TeamMembers> {
try { try {
Utils.showLoading(context); Utils.showLoading(context);
getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString()); getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString());
getEmployeeSubordinatesList = await MyTeamApiClient().employeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString(),getEmployeeSubordinates?.eMPLOYEENUMBER); getEmployeeSubordinatesList = await MyTeamApiClient().employeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString(), getEmployeeSubordinates?.eMPLOYEENUMBER);
Utils.hideLoading(context); Utils.hideLoading(context);
setState(() {}); setState(() {});
} catch (ex) { } catch (ex) {
@ -62,14 +63,12 @@ class _TeamMembersState extends State<TeamMembers> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
getEmployeeSubordinatesList.isEmpty getEmployeeSubordinatesList.isEmpty
? Container( ? Container(margin: const EdgeInsets.only(top: 100), child: Utils.getNoDataWidget(context))
margin: const EdgeInsets.only(top: 100), : ListView.separated(
child: Utils.getNoDataWidget(context)):
ListView.separated(
shrinkWrap: true, shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
padding: const EdgeInsets.only(top: 12), padding: const EdgeInsets.only(top: 12),
separatorBuilder: (BuildContext cxt,int index) => 12.height, separatorBuilder: (BuildContext cxt, int index) => 12.height,
itemCount: getEmployeeSubordinatesList.length, itemCount: getEmployeeSubordinatesList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
var phoneNumber = Uri.parse('tel:${getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER}'); var phoneNumber = Uri.parse('tel:${getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER}');
@ -81,7 +80,11 @@ class _TeamMembersState extends State<TeamMembers> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
getEmployeeSubordinatesList[index].eMPLOYEEIMAGE == null getEmployeeSubordinatesList[index].eMPLOYEEIMAGE == null
? SvgPicture.asset("assets/images/user.svg",height: 34, width: 34, ).paddingOnly(top: 4) ? SvgPicture.asset(
"assets/images/user.svg",
height: 34,
width: 34,
).paddingOnly(top: 4)
: Container( : Container(
height: 34, height: 34,
width: 34, width: 34,
@ -97,7 +100,7 @@ class _TeamMembersState extends State<TeamMembers> {
children: [ children: [
// "Present".toText13(color: MyColors.greenColor), // "Present".toText13(color: MyColors.greenColor),
"${getEmployeeSubordinatesList[index].eMPLOYEENAME}".toText16(color: MyColors.grey3AColor), "${getEmployeeSubordinatesList[index].eMPLOYEENAME}".toText16(color: MyColors.grey3AColor),
"${getEmployeeSubordinatesList[index].pOSITIONNAME}".toText10( color: MyColors.grey57Color), "${getEmployeeSubordinatesList[index].pOSITIONNAME}".toText10(color: MyColors.grey57Color),
], ],
).expanded, ).expanded,
Column( Column(
@ -106,7 +109,7 @@ class _TeamMembersState extends State<TeamMembers> {
children: [ children: [
getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER == "" getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER == ""
? SvgPicture.asset("assets/images/call-disable.svg", width: 22, height: 22) ? SvgPicture.asset("assets/images/call-disable.svg", width: 22, height: 22)
:InkWell( : InkWell(
onTap: () { onTap: () {
launchUrl(phoneNumber); launchUrl(phoneNumber);
}, },
@ -122,10 +125,11 @@ class _TeamMembersState extends State<TeamMembers> {
), ),
], ],
).paddingOnly(top: 13, bottom: 13, right: 12, left: 14).objectContainerView(radius: 10, disablePadding: true), ).paddingOnly(top: 13, bottom: 13, right: 12, left: 14).objectContainerView(radius: 10, disablePadding: true),
); ).paddingOnly(left: 16.0, right: 16.0);
}), }),
], ],
) ),
)); ),
);
} }
} }

@ -21,29 +21,30 @@ class PersonalInfo extends StatelessWidget {
title: LocaleKeys.profile_personalInformation.tr(), title: LocaleKeys.profile_personalInformation.tr(),
), ),
backgroundColor: MyColors.backgroundColor, backgroundColor: MyColors.backgroundColor,
body: SizedBox( body: ListView(
width: MediaQuery.of(context).size.width, children: [
child: Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
LocaleKeys.category.tr().toText13(color: MyColors.lightGrayColor), LocaleKeys.category.tr().toText13(color: MyColors.lightGrayColor),
(memberInformationList.eMPLOYMENTCATEGORYMEANING ?? "").toText16(), (memberInformationList.eMPLOYMENTCATEGORYMEANING ?? "").toText16(),
20.height, 12.height,
LocaleKeys.address.tr().toText13(color: MyColors.lightGrayColor), LocaleKeys.address.tr().toText13(color: MyColors.lightGrayColor),
(memberInformationList.lOCATIONNAME ?? "").toText16(), (memberInformationList.lOCATIONNAME ?? "").toText16(),
20.height, 12.height,
LocaleKeys.phoneNumber.tr().toText13(color: MyColors.lightGrayColor), LocaleKeys.phoneNumber.tr().toText13(color: MyColors.lightGrayColor),
(memberInformationList.eMPLOYEEMOBILENUMBER ?? "").toText16(), (memberInformationList.eMPLOYEEMOBILENUMBER ?? "").toText16(),
20.height, 12.height,
LocaleKeys.businessGroup.tr().toText13(color: MyColors.lightGrayColor), LocaleKeys.businessGroup.tr().toText13(color: MyColors.lightGrayColor),
(memberInformationList.bUSINESSGROUPNAME ?? "").toText16(), (memberInformationList.bUSINESSGROUPNAME ?? "").toText16(),
20.height, 12.height,
LocaleKeys.Payroll.tr().toText13(color: MyColors.lightGrayColor), LocaleKeys.Payroll.tr().toText13(color: MyColors.lightGrayColor),
(memberInformationList.pAYROLLNAME ?? "").toText16(), (memberInformationList.pAYROLLNAME ?? "").toText16(),
], ],
).objectContainerView().paddingAll(21), ).objectContainerView(center: false).paddingAll(21),
],
), ),
); );
} }

@ -1,4 +1,3 @@
import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'dart:ui'; import 'dart:ui';
@ -76,15 +75,13 @@ class _ProfileScreenState extends State<ProfileScreen> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
IconButton( CircleAvatar(
onPressed: () { radius: 18,
backgroundColor: Colors.black.withOpacity(.21),
child: const Icon(Icons.arrow_back_ios_rounded, color: Colors.white, size: 18).paddingOnly(right: 4),
).onPress(() {
Navigator.pop(context); Navigator.pop(context);
}, }),
icon: const Icon(
Icons.arrow_back_ios,
color: Colors.white,
),
),
InkWell( InkWell(
onTap: () { onTap: () {
// startImageSheet(); // startImageSheet();

@ -51,8 +51,8 @@ class ProfilePanel extends StatelessWidget {
: ClipOval( : ClipOval(
child: Image.memory( child: Image.memory(
Utils.dataFromBase64String(memberInformationList.eMPLOYEEIMAGE!), Utils.dataFromBase64String(memberInformationList.eMPLOYEEIMAGE!),
width: 75, width: 68,
height: 75, height: 68,
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
); );

@ -88,7 +88,8 @@ class _ItemHistoryScreenState extends State<ItemHistoryScreen> {
children: [ children: [
if (moItemHistoryList.isNotEmpty) loadMoItemHistoryData(), if (moItemHistoryList.isNotEmpty) loadMoItemHistoryData(),
if (poItemHistoryList.isNotEmpty) loadPoItemHistoryData(), if (poItemHistoryList.isNotEmpty) loadPoItemHistoryData(),
if (quotationAnalysisList.isNotEmpty) loadQuotationAnalysisData() if (quotationAnalysisList.isNotEmpty) loadQuotationAnalysisData(),
if (moItemHistoryList.isEmpty && poItemHistoryList.isEmpty && quotationAnalysisList.isEmpty) Utils.getNoDataWidget(context),
], ],
), ),
); );

Loading…
Cancel
Save