|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
import 'dart:developer';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import 'package:hmg_qline/constants/app_constants.dart';
|
|
|
|
import 'package:hmg_qline/constants/app_constants.dart';
|
|
|
|
@ -111,8 +113,18 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget noPatientInQueue({required String text, required String fontName}) {
|
|
|
|
Widget counterNoText(int counterNo) {
|
|
|
|
return Center(
|
|
|
|
return AppText(
|
|
|
|
|
|
|
|
"${AppStrings.counterNo}$counterNo",
|
|
|
|
|
|
|
|
fontFamily: AppStrings.fontNamePoppins,
|
|
|
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 8,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget noPatientInQueue({required String text, required String fontName, required bool isForRoomLevel, required int counterNo}) {
|
|
|
|
|
|
|
|
Widget noPatientText = Center(
|
|
|
|
child: AppText(
|
|
|
|
child: AppText(
|
|
|
|
text,
|
|
|
|
text,
|
|
|
|
fontFamily: fontName,
|
|
|
|
fontFamily: fontName,
|
|
|
|
@ -120,6 +132,14 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 9,
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 9,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
if (isForRoomLevel) {
|
|
|
|
|
|
|
|
return Column(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
children: [counterNoText(counterNo), noPatientText, const SizedBox.shrink()],
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return noPatientText;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget qamarsBirthdayWidget() {
|
|
|
|
Widget qamarsBirthdayWidget() {
|
|
|
|
@ -134,6 +154,17 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (globalConfigurationsModel.screenTypeEnum == ScreenTypeEnum.roomLevelScreen) ...[
|
|
|
|
|
|
|
|
// SizedBox(height: 20,),
|
|
|
|
|
|
|
|
// AppText(
|
|
|
|
|
|
|
|
// AppStrings.counterNo,
|
|
|
|
|
|
|
|
// fontFamily: AppStrings.fontNamePoppins,
|
|
|
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// fontSize: SizeConfig.getWidthMultiplier() * 10,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ]
|
|
|
|
|
|
|
|
|
|
|
|
Widget dataContent({required BuildContext context}) {
|
|
|
|
Widget dataContent({required BuildContext context}) {
|
|
|
|
return Consumer2(
|
|
|
|
return Consumer2(
|
|
|
|
builder: (BuildContext context, ScreenConfigViewModel screenConfigViewModel, QueuingViewModel queuingViewModel, Widget? child) {
|
|
|
|
builder: (BuildContext context, ScreenConfigViewModel screenConfigViewModel, QueuingViewModel queuingViewModel, Widget? child) {
|
|
|
|
@ -146,11 +177,25 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
fontFamily = AppStrings.fontNameCairo;
|
|
|
|
fontFamily = AppStrings.fontNameCairo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (queuingViewModel.currentTickets.isEmpty) {
|
|
|
|
if (queuingViewModel.currentTickets.isEmpty) {
|
|
|
|
widget = noPatientInQueue(text: text, fontName: fontFamily);
|
|
|
|
bool isForRoomLevel = screenConfigViewModel.globalConfigurationsModel.screenTypeEnum == ScreenTypeEnum.roomLevelScreen;
|
|
|
|
|
|
|
|
widget = noPatientInQueue(text: text, fontName: fontFamily, isForRoomLevel: isForRoomLevel, counterNo: screenConfigViewModel.globalConfigurationsModel.roomNo ?? 0);
|
|
|
|
} else if (screenConfigViewModel.globalConfigurationsModel.screenTypeEnum == ScreenTypeEnum.roomLevelScreen) {
|
|
|
|
} else if (screenConfigViewModel.globalConfigurationsModel.screenTypeEnum == ScreenTypeEnum.roomLevelScreen) {
|
|
|
|
widget = PriorityTickets(
|
|
|
|
widget = Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Column(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
counterNoText(screenConfigViewModel.globalConfigurationsModel.roomNo ?? 0),
|
|
|
|
|
|
|
|
PriorityTickets(
|
|
|
|
tickets: [queuingViewModel.currentTickets.first],
|
|
|
|
tickets: [queuingViewModel.currentTickets.first],
|
|
|
|
globalConfigurationsModel: screenConfigViewModel.globalConfigurationsModel,
|
|
|
|
globalConfigurationsModel: screenConfigViewModel.globalConfigurationsModel,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
const SizedBox.shrink()
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else if (queuingViewModel.currentTickets.length > AppConstants.thresholdForListUI) {
|
|
|
|
} else if (queuingViewModel.currentTickets.length > AppConstants.thresholdForListUI) {
|
|
|
|
widget = PriorityTicketsSidelist(
|
|
|
|
widget = PriorityTicketsSidelist(
|
|
|
|
@ -196,6 +241,7 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
builder: (BuildContext context, ScreenConfigViewModel screenConfigVM, Widget? child) {
|
|
|
|
builder: (BuildContext context, ScreenConfigViewModel screenConfigVM, Widget? child) {
|
|
|
|
return Column(
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
|
|
|
|
if (screenConfigVM.globalConfigurationsModel.screenTypeEnum != ScreenTypeEnum.roomLevelScreen) ...[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: getFlexForScreenTypes(screenConfigVM),
|
|
|
|
flex: getFlexForScreenTypes(screenConfigVM),
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
@ -212,7 +258,8 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
Expanded(flex: 10, child: dataContent(context: context)),
|
|
|
|
Expanded(flex: 10, child: dataContent(context: context)),
|
|
|
|
if (!screenConfigVM.globalConfigurationsModel.isWeatherReq && !screenConfigVM.globalConfigurationsModel.isPrayerTimeReq) ...[
|
|
|
|
if (!screenConfigVM.globalConfigurationsModel.isWeatherReq && !screenConfigVM.globalConfigurationsModel.isPrayerTimeReq) ...[
|
|
|
|
|