|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
|
|
|
|
|
@ -24,7 +25,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
|
|
|
|
|
void showConfirmMessage(HomeHealthCareViewModel model, GetHHCAllPresOrdersResponseModel order) {
|
|
|
|
|
void showConfirmMessage(HomeHealthCareViewModel model, GetCMCAllOrdersResponseModel order) {
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
child: ConfirmWithMessageDialog(
|
|
|
|
|
@ -75,10 +76,10 @@ class OrdersLogDetailsPage extends StatelessWidget {
|
|
|
|
|
padding: EdgeInsets.all(21),
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
GetHHCAllPresOrdersResponseModel order = model.hhcAllPresOrders[index];
|
|
|
|
|
GetCMCAllOrdersResponseModel order = model.hhcAllPresOrders[index];
|
|
|
|
|
|
|
|
|
|
int status = order.status;
|
|
|
|
|
String _statusDisp = projectViewModel.isArabic ? order.descriptionN : order.description;
|
|
|
|
|
int status = order.statusId;
|
|
|
|
|
String _statusDisp = order.statusText;
|
|
|
|
|
Color _color;
|
|
|
|
|
if (status == 1) {
|
|
|
|
|
//pending
|
|
|
|
|
@ -148,7 +149,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
order.nearestProjectName.trim().toString(),
|
|
|
|
|
order.nearestProjectName.toString(),
|
|
|
|
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -162,11 +163,11 @@ class OrdersLogDetailsPage extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)),
|
|
|
|
|
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(order.created)),
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 12),
|
|
|
|
|
if (order.status == 1 || order.status == 2)
|
|
|
|
|
if (order.statusId == 1 || order.statusId == 2)
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
showConfirmMessage(model, order);
|
|
|
|
|
|