You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
146 lines
7.6 KiB
Dart
146 lines
7.6 KiB
Dart
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart';
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
|
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
class StatusFeedbackPage extends StatefulWidget {
|
|
@override
|
|
_StatusFeedbackPageState createState() => _StatusFeedbackPageState();
|
|
}
|
|
|
|
class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
return BaseView<FeedbackViewModel>(
|
|
onModelReady: (model) => model.getCOC(),
|
|
builder: (_, model, widget) => AppScaffold(
|
|
baseViewModel: model,
|
|
isShowDecPage: false,
|
|
body: Column(
|
|
children: [
|
|
Expanded(
|
|
child: model.cOCItemList.isNotEmpty
|
|
? Container(
|
|
margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0, bottom: 80),
|
|
child: ListView.builder(
|
|
itemCount: model.cOCItemList.length,
|
|
itemBuilder: (context, index) => InkWell(
|
|
onTap: () {
|
|
// gotodetails(model.cOCItemList[index]);
|
|
},
|
|
child: Card(
|
|
shape: cardRadius(12),
|
|
margin: EdgeInsets.all(10),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(12.0),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(projectViewModel.isArabic ? model.cOCItemList[index].statusAr : model.cOCItemList[index].status,
|
|
style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)),
|
|
Container(
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
child: Text(model.cOCItemList[index].formType,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w600,
|
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
|
|
color: Color(0xff2B353E),
|
|
letterSpacing: -0.48,
|
|
height: 18 / 12))),
|
|
myRichText(TranslationBase.of(context).number + ": ", model.cOCItemList[index].itemID.toString(), projectViewModel.isArabic),
|
|
Text(model.cOCItemList[index].cOCTitle,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w600,
|
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
|
|
color: Color(0xff2B353E),
|
|
letterSpacing: -0.48,
|
|
height: 18 / 12)),
|
|
],
|
|
),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
children: [
|
|
Text(model.cOCItemList[index].date.split(" ")[0],
|
|
style: TextStyle(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w600,
|
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
|
|
color: Color(0xff2B353E),
|
|
letterSpacing: -0.48)),
|
|
Text(model.cOCItemList[index].date.split(" ")[1],
|
|
style: TextStyle(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w600,
|
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
|
|
color: Color(0xff2B353E),
|
|
letterSpacing: -0.48)),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
)),
|
|
)
|
|
: Center(
|
|
child: Column(
|
|
children: [
|
|
SizedBox(
|
|
height: MediaQuery.of(context).size.height * 0.4,
|
|
),
|
|
Image.asset(
|
|
'assets/images/comments.png',
|
|
width: 80,
|
|
height: 80,
|
|
),
|
|
SizedBox(
|
|
height: 15,
|
|
),
|
|
Text(
|
|
TranslationBase.of(context).noSearchResult,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.48,
|
|
color: Color(0xff2B353E),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
color: Colors.white,
|
|
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
|
|
child: DefaultButton(
|
|
TranslationBase.of(context).search,
|
|
projectViewModel.isLogin ? null : () => {},
|
|
disabledColor: Colors.grey,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
gotodetails(item) {
|
|
Navigator.pushReplacement(context, FadePage(page: FeedbackDetails(items: item)));
|
|
}
|
|
}
|