merge-requests/111/head
haroon amjad 3 years ago
parent 966533c793
commit ece6a68a95

@ -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,200 +184,202 @@ 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
decoration: MyDecorations.shadowDecoration, // ?
height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11, Container(
clipBehavior: Clip.antiAlias, decoration: MyDecorations.shadowDecoration,
child: Stack( height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11,
children: <Widget>[ clipBehavior: Clip.antiAlias,
Transform( child: Stack(
alignment: Alignment.center, children: <Widget>[
transform: Matrix4.rotationY( Transform(
AppState().isArabic(context) ? math.pi : 0, alignment: Alignment.center,
), transform: Matrix4.rotationY(
child: SvgPicture.asset( AppState().isArabic(context) ? math.pi : 0,
"assets/images/marathon_banner_bg.svg", ),
fit: BoxFit.fill, child: SvgPicture.asset(
width: double.infinity, "assets/images/marathon_banner_bg.svg",
), fit: BoxFit.fill,
width: double.infinity,
),
),
AppState().isArabic(context)
? Positioned(
right: -15,
top: -10,
child: Transform.rotate(
angle: 10,
child: Container(
width: isTablet ? 70 : 65,
height: isTablet ? 40 : 32,
color: MyColors.darkDigitColor,
), ),
AppState().isArabic(context) ),
? Positioned( )
right: -15, : Positioned(
top: -10, left: -20,
child: Transform.rotate( top: -10,
angle: 10, child: Transform.rotate(
child: Container( angle: 15,
width: isTablet ? 70 : 65, child: Container(
height: isTablet ? 40 : 32, width: isTablet ? 70 : 65,
color: MyColors.darkDigitColor, height: isTablet ? 40 : 32,
color: MyColors.darkDigitColor,
),
),
),
SizedBox(
width: double.infinity,
height: double.infinity,
child: Row(
children: <Widget>[
const Expanded(
flex: 3,
child: SizedBox(
width: double.infinity,
height: double.infinity,
),
),
Expanded(
flex: AppState().isArabic(context) ? 4 : 5,
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
AppState().isArabic(context) ? 0.height : 5.height,
Text(
LocaleKeys.getReadyForContest.tr(),
style: TextStyle(
fontSize: isTablet ? 20 : 11,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w600,
color: MyColors.white.withOpacity(0.83),
letterSpacing: -0.4,
), ),
), ),
) Text(
: Positioned( AppState().isArabic(context) ? provider.marathonDetailModel.titleAr ?? "" : provider.marathonDetailModel.titleEn ?? "",
left: -20, style: TextStyle(
top: -10, fontStyle: FontStyle.italic,
child: Transform.rotate( fontSize: isTablet ? 30 : 19,
angle: 15, fontWeight: FontWeight.bold,
child: Container( color: MyColors.white.withOpacity(0.83),
width: isTablet ? 70 : 65, height: 32 / 22,
height: isTablet ? 40 : 32,
color: MyColors.darkDigitColor,
), ),
), ),
), isTablet ? 10.height : 3.height,
SizedBox( BuildCountdownTimer(
width: double.infinity, timeToMarathon: DateTime.parse(provider.marathonDetailModel.startTime!).millisecondsSinceEpoch,
height: double.infinity, provider: provider,
child: Row( screenFlag: 0,
children: <Widget>[
const Expanded(
flex: 3,
child: SizedBox(
width: double.infinity,
height: double.infinity,
),
),
Expanded(
flex: AppState().isArabic(context) ? 4 : 5,
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
AppState().isArabic(context) ? 0.height : 5.height,
Text(
LocaleKeys.getReadyForContest.tr(),
style: TextStyle(
fontSize: isTablet ? 20 : 11,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w600,
color: MyColors.white.withOpacity(0.83),
letterSpacing: -0.4,
),
),
Text(
AppState().isArabic(context) ? provider.marathonDetailModel.titleAr ?? "" : provider.marathonDetailModel.titleEn ?? "",
style: TextStyle(
fontStyle: FontStyle.italic,
fontSize: isTablet ? 30 : 19,
fontWeight: FontWeight.bold,
color: MyColors.white.withOpacity(0.83),
height: 32 / 22,
),
),
isTablet ? 10.height : 3.height,
BuildCountdownTimer(
timeToMarathon: DateTime.parse(provider.marathonDetailModel.startTime!).millisecondsSinceEpoch,
provider: provider,
screenFlag: 0,
),
],
).paddingOnly(
left: AppState().isArabic(context) ? 12 : 3,
right: AppState().isArabic(context) ? 3 : 12,
)
],
),
), ),
), ],
], ).paddingOnly(
left: AppState().isArabic(context) ? 12 : 3,
right: AppState().isArabic(context) ? 3 : 12,
)
],
),
),
),
],
),
),
AppState().isArabic(context)
? Align(
alignment: Alignment.topRight,
child: SizedBox(
height: isTablet ? 30 : 20,
width: isTablet ? 45 : 35,
child: Transform.rotate(
angle: math.pi / 4.5,
child: Text(
LocaleKeys.brainMarathon.tr(),
textAlign: TextAlign.center,
maxLines: 2,
style: TextStyle(
color: MyColors.white,
fontWeight: FontWeight.bold,
fontSize: isTablet ? 8 : 6,
height: 1.2,
),
), ),
), ),
AppState().isArabic(context) ),
? Align( ).paddingOnly(top: 5)
alignment: Alignment.topRight, : Align(
child: SizedBox( alignment: Alignment.topLeft,
height: isTablet ? 30 : 20, child: SizedBox(
width: isTablet ? 45 : 35, height: isTablet ? 30 : 20,
child: Transform.rotate( width: isTablet ? 45 : 35,
angle: math.pi / 4.5, child: Transform.rotate(
child: Text( angle: -math.pi / 4.5,
LocaleKeys.brainMarathon.tr(), child: Text(
textAlign: TextAlign.center, LocaleKeys.brainMarathon.tr(),
maxLines: 2, textAlign: TextAlign.center,
style: TextStyle( maxLines: 2,
color: MyColors.white, style: TextStyle(
fontWeight: FontWeight.bold, color: MyColors.kWhiteColor,
fontSize: isTablet ? 8 : 6, fontWeight: FontWeight.bold,
height: 1.2, fontSize: isTablet ? 8 : 6,
), height: 1.2,
), ),
), ),
), ),
).paddingOnly(top: 5) ),
: Align( ).paddingOnly(top: 5),
alignment: Alignment.topLeft, !AppState().isArabic(context)
child: SizedBox( ? Positioned(
height: isTablet ? 30 : 20, right: 0,
width: isTablet ? 45 : 35, bottom: 0,
child: Transform.rotate( child: RotatedBox(
angle: -math.pi / 4.5, quarterTurns: 4,
child: Text( child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.whiteColor),
LocaleKeys.brainMarathon.tr(), ).paddingAll(isTablet ? 20 : 15),
textAlign: TextAlign.center, )
maxLines: 2, : Positioned(
style: TextStyle( bottom: 0,
color: MyColors.kWhiteColor, left: 0,
fontWeight: FontWeight.bold, child: RotatedBox(
fontSize: isTablet ? 8 : 6, quarterTurns: 2,
height: 1.2, child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.whiteColor),
), ).paddingAll(isTablet ? 20 : 15),
), ),
), ],
), ).onPress(() async {
).paddingOnly(top: 5), int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes;
!AppState().isArabic(context)
? Positioned(
right: 0,
bottom: 0,
child: RotatedBox(
quarterTurns: 4,
child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.whiteColor),
).paddingAll(isTablet ? 20 : 15),
)
: Positioned(
bottom: 0,
left: 0,
child: RotatedBox(
quarterTurns: 2,
child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.whiteColor),
).paddingAll(isTablet ? 20 : 15),
),
],
).onPress(() async {
int remainingTimeInMinutes = DateTime.parse(provider.marathonDetailModel.startTime!).difference(DateTime.now()).inMinutes;
if (remainingTimeInMinutes > 2) { if (remainingTimeInMinutes > 2) {
Utils.showLoading(context); Utils.showLoading(context);
try { try {
await provider.initializeVideoPlayer().then((_) { await provider.initializeVideoPlayer().then((_) {
Utils.hideLoading(context); Utils.hideLoading(context);
provider.startTimerForSponsorVideo(); provider.startTimerForSponsorVideo();
Navigator.pushNamed(context, AppRoutes.marathonSponsorVideoScreen); Navigator.pushNamed(context, AppRoutes.marathonSponsorVideoScreen);
}); });
} catch (e) { } catch (e) {
if (kDebugMode) { if (kDebugMode) {
print("Error in VideoPlayer: ${e.toString()}"); print("Error in VideoPlayer: ${e.toString()}");
} }
Utils.hideLoading(context); Utils.hideLoading(context);
Navigator.pushNamed(context, AppRoutes.marathonIntroScreen); Navigator.pushNamed(context, AppRoutes.marathonIntroScreen);
} }
} else { } else {
Navigator.pushNamed(context, AppRoutes.marathonIntroScreen); Navigator.pushNamed(context, AppRoutes.marathonIntroScreen);
} }
}), }),
) );
: const SizedBox(); // )
// : const SizedBox();
} }
} }

@ -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