Queueing module implemented
parent
162b2fd22a
commit
032097487b
@ -0,0 +1,77 @@
|
|||||||
|
class PatientAppointmentJourneyModel {
|
||||||
|
int totalItemsCount;
|
||||||
|
List<Data> data;
|
||||||
|
int messageStatus;
|
||||||
|
String message;
|
||||||
|
|
||||||
|
PatientAppointmentJourneyModel(
|
||||||
|
{this.totalItemsCount, this.data, this.messageStatus, this.message});
|
||||||
|
|
||||||
|
PatientAppointmentJourneyModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
totalItemsCount = json['totalItemsCount'];
|
||||||
|
if (json['data'] != null) {
|
||||||
|
data = <Data>[];
|
||||||
|
json['data'].forEach((v) {
|
||||||
|
data.add(new Data.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
messageStatus = json['messageStatus'];
|
||||||
|
message = json['message'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['totalItemsCount'] = this.totalItemsCount;
|
||||||
|
if (this.data != null) {
|
||||||
|
data['data'] = this.data.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['messageStatus'] = this.messageStatus;
|
||||||
|
data['message'] = this.message;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
int id;
|
||||||
|
int callType;
|
||||||
|
String calledOn;
|
||||||
|
dynamic servedStartOn;
|
||||||
|
dynamic servedEndOn;
|
||||||
|
bool isAppeared;
|
||||||
|
bool isServed;
|
||||||
|
dynamic roomNo;
|
||||||
|
|
||||||
|
Data(
|
||||||
|
{this.id,
|
||||||
|
this.callType,
|
||||||
|
this.calledOn,
|
||||||
|
this.servedStartOn,
|
||||||
|
this.servedEndOn,
|
||||||
|
this.isAppeared,
|
||||||
|
this.isServed,
|
||||||
|
this.roomNo});
|
||||||
|
|
||||||
|
Data.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
callType = json['callType'];
|
||||||
|
calledOn = json['calledOn'];
|
||||||
|
servedStartOn = json['servedStartOn'];
|
||||||
|
servedEndOn = json['servedEndOn'];
|
||||||
|
isAppeared = json['isAppeared'];
|
||||||
|
isServed = json['isServed'];
|
||||||
|
roomNo = json['roomNo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['callType'] = this.callType;
|
||||||
|
data['calledOn'] = this.calledOn;
|
||||||
|
data['servedStartOn'] = this.servedStartOn;
|
||||||
|
data['servedEndOn'] = this.servedEndOn;
|
||||||
|
data['isAppeared'] = this.isAppeared;
|
||||||
|
data['isServed'] = this.isServed;
|
||||||
|
data['roomNo'] = this.roomNo;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
class GetPatientQueueNoModel {
|
||||||
|
int totalItemsCount;
|
||||||
|
Data data;
|
||||||
|
int messageStatus;
|
||||||
|
String message;
|
||||||
|
|
||||||
|
GetPatientQueueNoModel(
|
||||||
|
{this.totalItemsCount, this.data, this.messageStatus, this.message});
|
||||||
|
|
||||||
|
GetPatientQueueNoModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
totalItemsCount = json['totalItemsCount'];
|
||||||
|
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
|
||||||
|
messageStatus = json['messageStatus'];
|
||||||
|
message = json['message'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['totalItemsCount'] = this.totalItemsCount;
|
||||||
|
if (this.data != null) {
|
||||||
|
data['data'] = this.data.toJson();
|
||||||
|
}
|
||||||
|
data['messageStatus'] = this.messageStatus;
|
||||||
|
data['message'] = this.message;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
bool hasQueue;
|
||||||
|
String queueNo;
|
||||||
|
String queueNoCurServing;
|
||||||
|
String approxWaitingTimeMin;
|
||||||
|
|
||||||
|
Data(
|
||||||
|
{this.hasQueue,
|
||||||
|
this.queueNo,
|
||||||
|
this.queueNoCurServing,
|
||||||
|
this.approxWaitingTimeMin});
|
||||||
|
|
||||||
|
Data.fromJson(Map<String, dynamic> json) {
|
||||||
|
hasQueue = json['hasQueue'];
|
||||||
|
queueNo = json['queueNo'];
|
||||||
|
queueNoCurServing = json['queueNoCurServing'];
|
||||||
|
approxWaitingTimeMin = json['approxWaitingTimeMin'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['hasQueue'] = this.hasQueue;
|
||||||
|
data['queueNo'] = this.queueNo;
|
||||||
|
data['queueNoCurServing'] = this.queueNoCurServing;
|
||||||
|
data['approxWaitingTimeMin'] = this.approxWaitingTimeMin;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,140 @@
|
|||||||
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/patient_appointment_journey_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/patient_queue_no_response_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class PatientAppointmentArrivalJourney extends StatelessWidget {
|
||||||
|
ProjectViewModel projectViewModel;
|
||||||
|
PatientAppointmentJourneyModel patientAppointmentJourneyModel;
|
||||||
|
|
||||||
|
PatientAppointmentArrivalJourney({this.patientAppointmentJourneyModel});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
projectViewModel = Provider.of(context);
|
||||||
|
return AppScaffold(
|
||||||
|
appBarTitle: "Appointment Journey",
|
||||||
|
isShowAppBar: true,
|
||||||
|
isShowDecPage: false,
|
||||||
|
showNewAppBarTitle: true,
|
||||||
|
showNewAppBar: true,
|
||||||
|
backgroundColor: CustomColors.appBackgroudGrey2Color,
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
height: 110,
|
||||||
|
child: Container(
|
||||||
|
decoration: cardRadius(12),
|
||||||
|
padding: EdgeInsets.all(16),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Approximate waiting time: ",
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.5,
|
||||||
|
// fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: -0.3,
|
||||||
|
height: 13 / 10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"${projectViewModel.getPatientQueueNoModel.data.approxWaitingTimeMin} minutes",
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(fontSize: SizeConfig.textMultiplier * 1.5, fontWeight: FontWeight.bold, letterSpacing: -0.3, height: 13 / 10, color: Color(0xFFFBF2E31)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Your Queue Number",
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.4,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: -0.3,
|
||||||
|
height: 13 / 10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
projectViewModel.getPatientQueueNoModel.data.queueNo,
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(fontSize: SizeConfig.textMultiplier * 3.0, fontWeight: FontWeight.bold, letterSpacing: -0.3, height: 13 / 10, color: Color(0xFFFBF2E31)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Current Queue Number",
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: SizeConfig.textMultiplier * 1.4,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: -0.3,
|
||||||
|
height: 13 / 10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
projectViewModel.getPatientQueueNoModel.data.queueNoCurServing.isNotEmpty ? projectViewModel.getPatientQueueNoModel.data.queueNoCurServing : "-",
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: SizeConfig.textMultiplier * 3.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
letterSpacing: -0.3,
|
||||||
|
height: 13 / 10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 150,
|
||||||
|
color: Colors.red,
|
||||||
|
child: ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const ScrollPhysics(),
|
||||||
|
itemBuilder: (BuildContext context, int index) {}),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue