|
|
@@ -21,6 +21,8 @@ class WebHistoryPage extends StatefulWidget {
|
|
|
class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStateMixin {
|
|
|
final HistoryFunction hisFunc = HistoryFunction();
|
|
|
late AnimationController _animationController;
|
|
|
+ late final HistoryModule historyModule = Provider.of<HistoryModule>(context, listen: false);
|
|
|
+ late final UserModule userModule = Provider.of<UserModule>(context, listen: false);
|
|
|
|
|
|
var rating = [
|
|
|
{'key': 1, 'image': "assets/image/icon/very_dissatisfied.png", 'label': 'disatisfied'.tr()},
|
|
|
@@ -34,12 +36,12 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
@override
|
|
|
void initState() {
|
|
|
// print(U.newServerVersion(1716279633));
|
|
|
- Provider.of<HistoryModule>(context, listen: false).reset();
|
|
|
- _animationController = new AnimationController(vsync: this, duration: Duration(seconds: 1));
|
|
|
+ historyModule.reset();
|
|
|
+ _animationController = AnimationController(vsync: this, duration: Duration(seconds: 1));
|
|
|
_animationController.repeat(reverse: true);
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
- hisFunc.getActiveForum(context);
|
|
|
+ hisFunc.getActiveForum();
|
|
|
});
|
|
|
// TODO: implement initState
|
|
|
super.initState();
|
|
|
@@ -53,9 +55,11 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
- return Provider.of<UserModule>(context).resetData() ? RefreshPage(() {
|
|
|
- Provider.of<UserModule>(context, listen: false).setResetData(false);
|
|
|
- hisFunc.getActiveForum(context);
|
|
|
+ final HistoryModule historyModuleListen = Provider.of<HistoryModule>(context);
|
|
|
+ final UserModule userModuleListen = Provider.of<UserModule>(context);
|
|
|
+ return userModuleListen.resetData() ? RefreshPage(() {
|
|
|
+ userModule.setResetData(false);
|
|
|
+ hisFunc.getActiveForum();
|
|
|
}) : Scaffold(
|
|
|
backgroundColor: backgroundColor,
|
|
|
appBar: PreferredSize(preferredSize: Size.fromHeight(0), child: AppBar(elevation: 0, backgroundColor: primaryColor)),
|
|
|
@@ -67,9 +71,10 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
children: [
|
|
|
Text('history'.tr(), style: TextStyle(color: textColor, fontSize: 17, fontWeight: FontWeight.w500), overflow: TextOverflow.ellipsis),
|
|
|
- Provider.of<HistoryModule>(context).multiSelectMode() ? GestureDetector(
|
|
|
+ historyModuleListen.multiSelectMode() ? GestureDetector(
|
|
|
child: Container(
|
|
|
padding: EdgeInsets.fromLTRB(16, 9, 16, 9),
|
|
|
+ decoration: BoxDecoration(color: primaryColor.withValues(alpha: 0.1), border: Border.all(color: primaryColor), borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
child: Row(
|
|
|
children: [
|
|
|
Text('delete'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
@@ -77,7 +82,6 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
U.iconsax('trash', color: primaryColor, size: 20)
|
|
|
],
|
|
|
),
|
|
|
- decoration: BoxDecoration(color: primaryColor.withValues(alpha: 0.1), border: Border.all(color: primaryColor), borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
),
|
|
|
onTap: () => hisFunc.deleteData(context),
|
|
|
) : GestureDetector(
|
|
|
@@ -102,52 +106,52 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
GestureDetector(
|
|
|
child: Container(
|
|
|
padding: EdgeInsets.symmetric(vertical: 5, horizontal: 16),
|
|
|
- child: Text('ongoing'.tr(), style: TextStyle(color: Provider.of<HistoryModule>(context).selectedFilter() == 1 ? textColor : textColor.withValues(alpha: 0.65), fontSize: 16)),
|
|
|
- decoration: BoxDecoration(color: Colors.white, border: Border(bottom: BorderSide(color: Provider.of<HistoryModule>(context).selectedFilter() == 1 ? primaryColor : primaryColor.withValues(alpha: 0.3), width: Provider.of<HistoryModule>(context).selectedFilter() == 1 ? 2 : 1))),
|
|
|
+ decoration: BoxDecoration(color: Colors.white, border: Border(bottom: BorderSide(color: historyModuleListen.selectedFilter() == 1 ? primaryColor : primaryColor.withValues(alpha: 0.3), width: historyModuleListen.selectedFilter() == 1 ? 2 : 1))),
|
|
|
+ child: Text('ongoing'.tr(), style: TextStyle(color: historyModuleListen.selectedFilter() == 1 ? textColor : textColor.withValues(alpha: 0.65), fontSize: 16)),
|
|
|
),
|
|
|
onTap: () {
|
|
|
- if (!Provider.of<HistoryModule>(context, listen: false).isLoadHistory()) {
|
|
|
- Provider.of<HistoryModule>(context, listen: false).setPressAttention(0);
|
|
|
- Provider.of<HistoryModule>(context, listen: false).setSelectedFilter(1);
|
|
|
- hisFunc.onRefresh(context);
|
|
|
+ if (!historyModule.isLoadHistory()) {
|
|
|
+ historyModule.setPressAttention(0);
|
|
|
+ historyModule.setSelectedFilter(1);
|
|
|
+ hisFunc.onRefresh();
|
|
|
}
|
|
|
},
|
|
|
),
|
|
|
GestureDetector(
|
|
|
child: Container(
|
|
|
padding: EdgeInsets.symmetric(vertical: 5, horizontal: 16),
|
|
|
- child: Text('done'.tr(), style: TextStyle(color: Provider.of<HistoryModule>(context).selectedFilter() == 0 ? textColor : textColor.withValues(alpha: 0.65), fontSize: 16)),
|
|
|
- decoration: BoxDecoration(color: Colors.white, border: Border(bottom: BorderSide(color: Provider.of<HistoryModule>(context).selectedFilter() == 0 ? primaryColor : primaryColor.withValues(alpha: 0.3), width: Provider.of<HistoryModule>(context).selectedFilter() == 0 ? 2 : 1))),
|
|
|
+ decoration: BoxDecoration(color: Colors.white, border: Border(bottom: BorderSide(color: historyModuleListen.selectedFilter() == 0 ? primaryColor : primaryColor.withValues(alpha: 0.3), width: historyModuleListen.selectedFilter() == 0 ? 2 : 1))),
|
|
|
+ child: Text('done'.tr(), style: TextStyle(color: historyModuleListen.selectedFilter() == 0 ? textColor : textColor.withValues(alpha: 0.65), fontSize: 16)),
|
|
|
),
|
|
|
onTap: () {
|
|
|
- if (!Provider.of<HistoryModule>(context, listen: false).isLoadHistory()) {
|
|
|
- Provider.of<HistoryModule>(context, listen: false).setPressAttention(0);
|
|
|
- Provider.of<HistoryModule>(context, listen: false).setSelectedFilter(0);
|
|
|
- hisFunc.onRefresh(context);
|
|
|
+ if (!historyModule.isLoadHistory()) {
|
|
|
+ historyModule.setPressAttention(0);
|
|
|
+ historyModule.setSelectedFilter(0);
|
|
|
+ hisFunc.onRefresh();
|
|
|
}
|
|
|
},
|
|
|
),
|
|
|
],
|
|
|
),
|
|
|
SizedBox(height: 20),
|
|
|
- Provider.of<HistoryModule>(context).selectedFilter() == 0 ? doneFilter() : ongoingFilter(),
|
|
|
+ historyModuleListen.selectedFilter() == 0 ? doneFilter() : ongoingFilter(),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
Expanded(
|
|
|
- child: Provider.of<UserModule>(context).user().isNotEmpty ? Container(
|
|
|
+ child: userModuleListen.user().isNotEmpty ? Container(
|
|
|
width: double.infinity,
|
|
|
padding: EdgeInsets.symmetric(horizontal: 100),
|
|
|
child: LazyLoadScrollView(
|
|
|
- onEndOfPage: () => hisFunc.getMission(context),
|
|
|
+ onEndOfPage: () => hisFunc.getMission(),
|
|
|
scrollOffset: 500,
|
|
|
child: EasyRefresh(
|
|
|
header: MaterialHeader(clamping: true, color: primaryColor),
|
|
|
- onRefresh: ()=>hisFunc.onRefresh(context),
|
|
|
- child: Provider.of<HistoryModule>(context).selectedFilter() == 0 ? doneContainer() : ongoingContainer(),
|
|
|
+ onRefresh: ()=>hisFunc.onRefresh(),
|
|
|
+ child: historyModuleListen.selectedFilter() == 0 ? doneContainer() : ongoingContainer(),
|
|
|
),
|
|
|
),
|
|
|
- ) : Provider.of<UserModule>(context).resetData() ? Container() : _timeLimit ? showButton(context) : loadingTemplate(() {if(mounted) setState(()=>_timeLimit=true);},),
|
|
|
+ ) : userModuleListen.resetData() ? Container() : _timeLimit ? showButton(context) : loadingTemplate(() {if(mounted) setState(()=>_timeLimit=true);},),
|
|
|
)
|
|
|
],
|
|
|
),
|
|
|
@@ -155,6 +159,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
}
|
|
|
|
|
|
Widget ongoingFilter() {
|
|
|
+ final HistoryModule historyModuleListen = Provider.of<HistoryModule>(context);
|
|
|
return SingleChildScrollView(
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
child: Row(
|
|
|
@@ -163,20 +168,20 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
child: Container(
|
|
|
margin: EdgeInsets.only(right: 16),
|
|
|
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
|
|
- child: Text(hisFunc.ongoingList[i]['title'], style: TextStyle(color: Provider.of<HistoryModule>(context).checkPressAttention(hisFunc.ongoingList[i]['value']) ? Colors.white : textColor, fontSize: 16)),
|
|
|
decoration: BoxDecoration(
|
|
|
- color: Provider.of<HistoryModule>(context).checkPressAttention(hisFunc.ongoingList[i]['value']) ? primaryColor : Color(0xffF2F8F7),
|
|
|
- border: Border.all(color: Provider.of<HistoryModule>(context).checkPressAttention(hisFunc.ongoingList[i]['value']) ? primaryColor : Color(0xffBEC1C1)),
|
|
|
+ color: historyModuleListen.checkPressAttention(hisFunc.ongoingList[i]['value']) ? primaryColor : Color(0xffF2F8F7),
|
|
|
+ border: Border.all(color: historyModuleListen.checkPressAttention(hisFunc.ongoingList[i]['value']) ? primaryColor : Color(0xffBEC1C1)),
|
|
|
borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
+ child: Text(hisFunc.ongoingList[i]['title'], style: TextStyle(color: historyModuleListen.checkPressAttention(hisFunc.ongoingList[i]['value']) ? Colors.white : textColor, fontSize: 16)),
|
|
|
),
|
|
|
onTap: () {
|
|
|
- if (!Provider.of<HistoryModule>(context, listen: false).isLoadHistory()) {
|
|
|
- if (Provider.of<HistoryModule>(context, listen: false).checkPressAttention(hisFunc.ongoingList[i]['value'])) {
|
|
|
- Provider.of<HistoryModule>(context, listen: false).setPressAttention(0);
|
|
|
- hisFunc.onRefresh(context);
|
|
|
+ if (!historyModule.isLoadHistory()) {
|
|
|
+ if (historyModule.checkPressAttention(hisFunc.ongoingList[i]['value'])) {
|
|
|
+ historyModule.setPressAttention(0);
|
|
|
+ hisFunc.onRefresh();
|
|
|
} else {
|
|
|
- Provider.of<HistoryModule>(context, listen: false).setPressAttention(hisFunc.ongoingList[i]['value']);
|
|
|
- hisFunc.onRefresh(context);
|
|
|
+ historyModule.setPressAttention(hisFunc.ongoingList[i]['value']);
|
|
|
+ hisFunc.onRefresh();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -187,11 +192,12 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
}
|
|
|
|
|
|
Widget ongoingContainer() {
|
|
|
+ final HistoryModule historyModuleListen = Provider.of<HistoryModule>(context);
|
|
|
return SingleChildScrollView(
|
|
|
child: Column(
|
|
|
children: [
|
|
|
U.newServerVersion(1709864293) && !U.getInternetStatus() ? Column(
|
|
|
- children: List.generate(Provider.of<HistoryModule>(context).dataPending().length, (i) {
|
|
|
+ children: List.generate(historyModuleListen.dataPending().length, (i) {
|
|
|
return GestureDetector(
|
|
|
child: Container(
|
|
|
width: double.infinity,
|
|
|
@@ -203,7 +209,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
children: [
|
|
|
- Text(convertDate(Provider.of<HistoryModule>(context).dataPending()[i]['datetimeRequest'], context.locale.toString()), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
+ Text(convertDate(historyModuleListen.dataPending()[i]['datetimeRequest'], context.locale.toString()), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
renderStatus('sending'.tr(), Color(0xff02C539).withValues(alpha: 0.2))
|
|
|
],
|
|
|
),
|
|
|
@@ -212,22 +218,22 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
SizedBox(height: 10),
|
|
|
Row(
|
|
|
children: [
|
|
|
- imageTiles(imageUrl: Provider.of<HistoryModule>(context).dataPending()[i]['image'] ?? "null"),
|
|
|
+ imageTiles(imageUrl: historyModuleListen.dataPending()[i]['image'] ?? "null"),
|
|
|
SizedBox(width: 25),
|
|
|
Expanded(
|
|
|
child: Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
- Text(Provider.of<HistoryModule>(context).dataPending()[i]['title'], style: TextStyle(color: textColor, fontWeight: FontWeight.w500), overflow: TextOverflow.ellipsis),
|
|
|
+ Text(historyModuleListen.dataPending()[i]['title'], style: TextStyle(color: textColor, fontWeight: FontWeight.w500), overflow: TextOverflow.ellipsis),
|
|
|
SizedBox(height: 10),
|
|
|
- Text(Provider.of<HistoryModule>(context).dataPending()[i][U.langColumn(context, 'sub')], style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
|
|
|
+ Text(historyModuleListen.dataPending()[i][U.langColumn(context, 'sub')], style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
|
|
|
SizedBox(height: 5),
|
|
|
- Text(Provider.of<HistoryModule>(context).dataPending()[i][U.langColumn(context, 'desc')], style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
|
|
|
+ Text(historyModuleListen.dataPending()[i][U.langColumn(context, 'desc')], style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
|
|
|
dashed(top: 10, bottom: 10),
|
|
|
Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
children: [
|
|
|
- Text('location'.tr()+': '+Provider.of<HistoryModule>(context).dataPending()[i]['location'], style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
+ Text('${'location'.tr()}: ${historyModuleListen.dataPending()[i]['location']}', style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
Row(
|
|
|
children: [
|
|
|
Container(
|
|
|
@@ -250,13 +256,13 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
),
|
|
|
onTap: () {
|
|
|
if(!U.getInternetStatus()){
|
|
|
- // navigateTo(context, MobHistoryDetailPendingPage(data: Provider.of<HistoryModule>(context, listen: false).dataPending()[i])).then((val) {
|
|
|
+ // navigateTo(context, MobHistoryDetailPendingPage(data: historyModule.dataPending()[i])).then((val) {
|
|
|
// val = val??false;
|
|
|
// if(val) hisFunc.onRefresh(context);
|
|
|
// });
|
|
|
}
|
|
|
else{
|
|
|
- hisFunc.onRefresh(context);
|
|
|
+ hisFunc.onRefresh();
|
|
|
}
|
|
|
},
|
|
|
);
|
|
|
@@ -264,7 +270,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
) : Container(),
|
|
|
|
|
|
Column(
|
|
|
- children: List.generate(Provider.of<HistoryModule>(context).dataMisi().length, (i) {
|
|
|
+ children: List.generate(historyModuleListen.dataMisi().length, (i) {
|
|
|
return GestureDetector(
|
|
|
child: Container(
|
|
|
width: double.infinity,
|
|
|
@@ -275,27 +281,25 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
children: [
|
|
|
Row(
|
|
|
children: [
|
|
|
- Text(convertDate(Provider.of<HistoryModule>(context).dataMisi()[i]['datetimeRequest'], context.locale.toString()), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
+ Text(convertDate(historyModuleListen.dataMisi()[i]['datetimeRequest'], context.locale.toString()), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
SizedBox(width: 15),
|
|
|
Expanded(
|
|
|
- child: Text('ticketNumber'.tr()+': '+Provider.of<HistoryModule>(context).dataMisi()[i]['ticketNo'], style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
+ child: Text('${'ticketNumber'.tr()}: ${historyModuleListen.dataMisi()[i]['ticketNo']}', style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
),
|
|
|
- Provider.of<HistoryModule>(context).dataMisi()[i]['currentState'] == 'DIMULAI' ? Container(
|
|
|
- child: Row(
|
|
|
- children: [
|
|
|
- Container(
|
|
|
- width: 25, height: 25,
|
|
|
- decoration: BoxDecoration(
|
|
|
- border: Border.all(color: primaryColor), borderRadius: BorderRadius.all(Radius.circular(25)),
|
|
|
- image: DecorationImage(image: AssetImage('assets/image/general/Avatar.jpg'), fit: BoxFit.cover)
|
|
|
- ),
|
|
|
+ historyModuleListen.dataMisi()[i]['currentState'] == 'DIMULAI' ? Row(
|
|
|
+ children: [
|
|
|
+ Container(
|
|
|
+ width: 25, height: 25,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ border: Border.all(color: primaryColor), borderRadius: BorderRadius.all(Radius.circular(25)),
|
|
|
+ image: DecorationImage(image: AssetImage('assets/image/general/Avatar.jpg'), fit: BoxFit.cover)
|
|
|
),
|
|
|
- SizedBox(width: 8),
|
|
|
- Text(Provider.of<HistoryModule>(context).dataMisi()[i]['servantNameStart'] + 'isWorking'.tr(), style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis)
|
|
|
- ],
|
|
|
- ),
|
|
|
+ ),
|
|
|
+ SizedBox(width: 8),
|
|
|
+ Text(historyModuleListen.dataMisi()[i]['servantNameStart'] + 'isWorking'.tr(), style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis)
|
|
|
+ ],
|
|
|
) : Container(),
|
|
|
- Provider.of<HistoryModule>(context).dataMisi()[i]['_activeHoldRequest'] != null?renderStatus('hold'.tr(), Color(0xffD3D3D3)):Provider.of<HistoryModule>(context).dataMisi()[i]['currentState'] == 'DIMULAI'?renderStatus('onProgress'.tr(), Color(0xffCCA600).withValues(alpha: 0.2)):renderStatus('queued'.tr(), Color(0xff02C539).withValues(alpha: 0.2))
|
|
|
+ historyModuleListen.dataMisi()[i]['_activeHoldRequest'] != null?renderStatus('hold'.tr(), Color(0xffD3D3D3)):historyModuleListen.dataMisi()[i]['currentState'] == 'DIMULAI'?renderStatus('onProgress'.tr(), Color(0xffCCA600).withValues(alpha: 0.2)):renderStatus('queued'.tr(), Color(0xff02C539).withValues(alpha: 0.2))
|
|
|
],
|
|
|
),
|
|
|
SizedBox(height: 10),
|
|
|
@@ -303,42 +307,40 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
SizedBox(height: 10),
|
|
|
Row(
|
|
|
children: [
|
|
|
- imageTiles(imageUrl: Provider.of<HistoryModule>(context).dataMisi()[i]['_requestImage'] ?? "null", width: 150, height: 120),
|
|
|
+ imageTiles(imageUrl: historyModuleListen.dataMisi()[i]['_requestImage'] ?? "null", width: 150, height: 120),
|
|
|
SizedBox(width: 25),
|
|
|
Expanded(
|
|
|
child: Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
- Text(Provider.of<HistoryModule>(context).dataMisi()[i][U.langColumn(context, 'requestGroupDescription')], style: TextStyle(color: textColor, fontSize: 16), overflow: TextOverflow.ellipsis),
|
|
|
+ Text(historyModuleListen.dataMisi()[i][U.langColumn(context, 'requestGroupDescription')], style: TextStyle(color: textColor, fontSize: 16), overflow: TextOverflow.ellipsis),
|
|
|
SizedBox(height: 10),
|
|
|
- Text(Provider.of<HistoryModule>(context).dataMisi()[i][U.langColumn(context, 'requestSubject')], style: TextStyle(color: textColor, fontWeight: FontWeight.w600), overflow: TextOverflow.ellipsis),
|
|
|
+ Text(historyModuleListen.dataMisi()[i][U.langColumn(context, 'requestSubject')], style: TextStyle(color: textColor, fontWeight: FontWeight.w600), overflow: TextOverflow.ellipsis),
|
|
|
SizedBox(height: 5),
|
|
|
- Text(Provider.of<HistoryModule>(context).dataMisi()[i][U.langColumn(context, '_subjectDescription')]??'', style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
|
|
|
+ Text(historyModuleListen.dataMisi()[i][U.langColumn(context, '_subjectDescription')]??'', style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
|
|
|
dashed(top: 10, bottom: 10),
|
|
|
- renderRequested(Provider.of<HistoryModule>(context).dataMisi()[i]),
|
|
|
+ renderRequested(historyModuleListen.dataMisi()[i]),
|
|
|
Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
crossAxisAlignment: CrossAxisAlignment.center ,
|
|
|
children: [
|
|
|
- Text('location'.tr()+': '+Provider.of<HistoryModule>(context).dataMisi()[i]['ipphoneExtLocation'], style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
- Provider.of<HistoryModule>(context).dataMisi()[i]['_activeHoldRequest'] != null ? Container(
|
|
|
- child: Row(
|
|
|
- children: [
|
|
|
- Container(
|
|
|
- width: 25, height: 25,
|
|
|
- decoration: BoxDecoration(image: DecorationImage(image: AssetImage('assets/image/general/Watch.png'), fit: BoxFit.cover)),
|
|
|
- ),
|
|
|
- SizedBox(width: 8),
|
|
|
- Text(Provider.of<HistoryModule>(context).dataMisi()[i]['_activeHoldRequest']['description'], style: TextStyle(color: textColor, fontSize: 14))
|
|
|
- ],
|
|
|
- ),
|
|
|
- ) : Provider.of<HistoryModule>(context).dataMisi()[i]['_hasForum'] && Provider.of<HistoryModule>(context).dataMisi()[i]['_forumMsg'] != null ? ConstrainedBox(
|
|
|
+ Text('${'location'.tr()}: ${historyModuleListen.dataMisi()[i]['ipphoneExtLocation']}', style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
+ historyModuleListen.dataMisi()[i]['_activeHoldRequest'] != null ? Row(
|
|
|
+ children: [
|
|
|
+ Container(
|
|
|
+ width: 25, height: 25,
|
|
|
+ decoration: BoxDecoration(image: DecorationImage(image: AssetImage('assets/image/general/Watch.png'), fit: BoxFit.cover)),
|
|
|
+ ),
|
|
|
+ SizedBox(width: 8),
|
|
|
+ Text(historyModuleListen.dataMisi()[i]['_activeHoldRequest']['description'], style: TextStyle(color: textColor, fontSize: 14))
|
|
|
+ ],
|
|
|
+ ) : historyModuleListen.dataMisi()[i]['_hasForum'] && historyModuleListen.dataMisi()[i]['_forumMsg'] != null ? ConstrainedBox(
|
|
|
constraints: BoxConstraints(minWidth: 10),
|
|
|
child: Row(
|
|
|
children: [
|
|
|
FadeTransition(opacity: _animationController, child: U.iconsax('messages-3', color: primaryColor)),
|
|
|
SizedBox(width: 8),
|
|
|
- Text('“${Provider.of<HistoryModule>(context).dataMisi()[i]['_forumMsg']}”', style: TextStyle(color: textColor.withValues(alpha: 0.75), fontSize: 14, fontStyle: FontStyle.italic))
|
|
|
+ Text('“${historyModuleListen.dataMisi()[i]['_forumMsg']}”', style: TextStyle(color: textColor.withValues(alpha: 0.75), fontSize: 14, fontStyle: FontStyle.italic))
|
|
|
],
|
|
|
),
|
|
|
) : Container(),
|
|
|
@@ -354,14 +356,14 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
),
|
|
|
onTap: () => navigateTo(context, WebHistoryDetailPage(index: i)).then((val) {
|
|
|
val = val??false;
|
|
|
- if(val) Provider.of<HistoryModule>(context, listen: false).cancelMisi(i);
|
|
|
+ if(val) historyModule.cancelMisi(i);
|
|
|
}),
|
|
|
);
|
|
|
}),
|
|
|
),
|
|
|
- !Provider.of<HistoryModule>(context).stopLoadHistory() || (Provider.of<HistoryModule>(context).isLoadHistory() && Provider.of<HistoryModule>(context).page() > 0)
|
|
|
- ? Container(margin: EdgeInsets.only(top: Provider.of<HistoryModule>(context).page() > 0 ? 0 : 50), child: loadingTemplateNoVoid())
|
|
|
- : Provider.of<HistoryModule>(context).dataMisi().isEmpty && Provider.of<HistoryModule>(context).dataPending().isEmpty
|
|
|
+ !historyModuleListen.stopLoadHistory() || (historyModuleListen.isLoadHistory() && historyModuleListen.page() > 0)
|
|
|
+ ? Container(margin: EdgeInsets.only(top: historyModuleListen.page() > 0 ? 0 : 50), child: loadingTemplateNoVoid())
|
|
|
+ : historyModuleListen.dataMisi().isEmpty && historyModuleListen.dataPending().isEmpty
|
|
|
? NoDataPage()
|
|
|
: Container(),
|
|
|
],
|
|
|
@@ -370,6 +372,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
}
|
|
|
|
|
|
Widget doneFilter() {
|
|
|
+ final HistoryModule historyModuleListen = Provider.of<HistoryModule>(context);
|
|
|
return Row(
|
|
|
children: List.generate(hisFunc.doneList.length, (i) {
|
|
|
return GestureDetector(
|
|
|
@@ -377,19 +380,19 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
margin: EdgeInsets.only(right: 16),
|
|
|
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
|
|
decoration: BoxDecoration(
|
|
|
- color: Provider.of<HistoryModule>(context).checkPressAttention(hisFunc.doneList[i]['value']) ? primaryColor : Color(0xffF2F8F7),
|
|
|
- border: Border.all(color: Provider.of<HistoryModule>(context).checkPressAttention(hisFunc.doneList[i]['value']) ? primaryColor : Color(0xffBEC1C1)),
|
|
|
+ color: historyModuleListen.checkPressAttention(hisFunc.doneList[i]['value']) ? primaryColor : Color(0xffF2F8F7),
|
|
|
+ border: Border.all(color: historyModuleListen.checkPressAttention(hisFunc.doneList[i]['value']) ? primaryColor : Color(0xffBEC1C1)),
|
|
|
borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
- child: Text(hisFunc.doneList[i]['title'], style: TextStyle(color: Provider.of<HistoryModule>(context).checkPressAttention(hisFunc.doneList[i]['value']) ? Colors.white : textColor, fontSize: 16)),
|
|
|
+ child: Text(hisFunc.doneList[i]['title'], style: TextStyle(color: historyModuleListen.checkPressAttention(hisFunc.doneList[i]['value']) ? Colors.white : textColor, fontSize: 16)),
|
|
|
),
|
|
|
onTap: () {
|
|
|
- if (!Provider.of<HistoryModule>(context, listen: false).isLoadHistory()) {
|
|
|
- if (Provider.of<HistoryModule>(context, listen: false).checkPressAttention(hisFunc.doneList[i]['value'])) {
|
|
|
- Provider.of<HistoryModule>(context, listen: false).setPressAttention(0);
|
|
|
- hisFunc.onRefresh(context);
|
|
|
+ if (!historyModule.isLoadHistory()) {
|
|
|
+ if (historyModule.checkPressAttention(hisFunc.doneList[i]['value'])) {
|
|
|
+ historyModule.setPressAttention(0);
|
|
|
+ hisFunc.onRefresh();
|
|
|
} else {
|
|
|
- Provider.of<HistoryModule>(context, listen: false).setPressAttention(hisFunc.doneList[i]['value']);
|
|
|
- hisFunc.onRefresh(context);
|
|
|
+ historyModule.setPressAttention(hisFunc.doneList[i]['value']);
|
|
|
+ hisFunc.onRefresh();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -399,11 +402,12 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
}
|
|
|
|
|
|
Widget doneContainer() {
|
|
|
+ final HistoryModule historyModuleListen = Provider.of<HistoryModule>(context);
|
|
|
return SingleChildScrollView(
|
|
|
child: Column(
|
|
|
children: [
|
|
|
Column(
|
|
|
- children: List.generate(Provider.of<HistoryModule>(context).dataMisi().length, (i) {
|
|
|
+ children: List.generate(historyModuleListen.dataMisi().length, (i) {
|
|
|
return GestureDetector(
|
|
|
child: Container(
|
|
|
width: double.infinity,
|
|
|
@@ -414,12 +418,12 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
children: [
|
|
|
Row(
|
|
|
children: [
|
|
|
- Text(convertDate(Provider.of<HistoryModule>(context).dataMisi()[i]['datetimeRequest'], context.locale.toString()), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
+ Text(convertDate(historyModuleListen.dataMisi()[i]['datetimeRequest'], context.locale.toString()), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
SizedBox(width: 15),
|
|
|
Expanded(
|
|
|
- child: Text('ticketNumber'.tr()+': '+Provider.of<HistoryModule>(context).dataMisi()[i]['ticketNo'], style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
+ child: Text('${'ticketNumber'.tr()}: ${historyModuleListen.dataMisi()[i]['ticketNo']}', style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
),
|
|
|
- Provider.of<HistoryModule>(context).dataMisi()[i]['currentState'] == 'DISELESAIKAN' || Provider.of<HistoryModule>(context).dataMisi()[i]['currentState'] == 'TUNTAS' ? renderStatus('stateFinish'.tr(), primaryColor.withValues(alpha: 0.4)) : renderStatus('stateCancel'.tr(), Color(0xffD81010).withValues(alpha: 0.4))
|
|
|
+ historyModuleListen.dataMisi()[i]['currentState'] == 'DISELESAIKAN' || historyModuleListen.dataMisi()[i]['currentState'] == 'TUNTAS' ? renderStatus('stateFinish'.tr(), primaryColor.withValues(alpha: 0.4)) : renderStatus('stateCancel'.tr(), Color(0xffD81010).withValues(alpha: 0.4))
|
|
|
],
|
|
|
),
|
|
|
SizedBox(height: 10),
|
|
|
@@ -427,20 +431,20 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
SizedBox(height: 10),
|
|
|
Row(
|
|
|
children: [
|
|
|
- imageTiles(imageUrl: Provider.of<HistoryModule>(context).dataMisi()[i]['_requestImage'] ?? "null", width: 150, height: 120),
|
|
|
+ imageTiles(imageUrl: historyModuleListen.dataMisi()[i]['_requestImage'] ?? "null", width: 150, height: 120),
|
|
|
SizedBox(width: 25),
|
|
|
Expanded(
|
|
|
child: Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
- Text(Provider.of<HistoryModule>(context).dataMisi()[i][U.langColumn(context, 'requestGroupDescription')], style: TextStyle(color: textColor, fontSize: 16), overflow: TextOverflow.ellipsis),
|
|
|
+ Text(historyModuleListen.dataMisi()[i][U.langColumn(context, 'requestGroupDescription')], style: TextStyle(color: textColor, fontSize: 16), overflow: TextOverflow.ellipsis),
|
|
|
SizedBox(height: 10),
|
|
|
- Text(Provider.of<HistoryModule>(context).dataMisi()[i][U.langColumn(context, 'requestSubject')], style: TextStyle(color: textColor, fontWeight: FontWeight.w600), overflow: TextOverflow.ellipsis),
|
|
|
+ Text(historyModuleListen.dataMisi()[i][U.langColumn(context, 'requestSubject')], style: TextStyle(color: textColor, fontWeight: FontWeight.w600), overflow: TextOverflow.ellipsis),
|
|
|
SizedBox(height: 5),
|
|
|
- Text(Provider.of<HistoryModule>(context).dataMisi()[i][U.langColumn(context, '_subjectDescription')]??'', style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
|
|
|
+ Text(historyModuleListen.dataMisi()[i][U.langColumn(context, '_subjectDescription')]??'', style: TextStyle(color: textColor), overflow: TextOverflow.ellipsis),
|
|
|
dashed(top: 10, bottom: 10),
|
|
|
- renderRequested(Provider.of<HistoryModule>(context).dataMisi()[i]),
|
|
|
- Text('location'.tr()+': '+Provider.of<HistoryModule>(context).dataMisi()[i]['ipphoneExtLocation'], style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
+ renderRequested(historyModuleListen.dataMisi()[i]),
|
|
|
+ Text('${'location'.tr()}: ${historyModuleListen.dataMisi()[i]['ipphoneExtLocation']}', style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
],
|
|
|
),
|
|
|
)
|
|
|
@@ -452,31 +456,31 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
children: [
|
|
|
- !Provider.of<HistoryModule>(context).dataMisi()[i]['autoResponse'] && Provider.of<HistoryModule>(context).dataMisi()[i]['servantIdentityStart'] != '#system' && (Provider.of<HistoryModule>(context).dataMisi()[i]['currentState'] == 'TUNTAS' || Provider.of<HistoryModule>(context).dataMisi()[i]['currentState'] == 'DISELESAIKAN') ? Container(
|
|
|
+ !historyModuleListen.dataMisi()[i]['autoResponse'] && historyModuleListen.dataMisi()[i]['servantIdentityStart'] != '#system' && (historyModuleListen.dataMisi()[i]['currentState'] == 'TUNTAS' || historyModuleListen.dataMisi()[i]['currentState'] == 'DISELESAIKAN') ? Container(
|
|
|
child: hisFunc.askForRate(Provider.of<HistoryModule>(context, listen: true).dataMisi()[i]) ? GestureDetector(
|
|
|
child: Container(
|
|
|
padding: EdgeInsets.symmetric(vertical: 4, horizontal: 16),
|
|
|
- child: Text('rateReq'.tr(), style: TextStyle(color: secondaryColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
decoration: BoxDecoration(color: Colors.white, border: Border.all(color: secondaryColor), borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
+ child: Text('rateReq'.tr(), style: TextStyle(color: secondaryColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
),
|
|
|
onTap: () {
|
|
|
- U.newServerVersion(1716279633) ? rateMissionNew(context, Provider.of<HistoryModule>(context, listen: false).dataMisi()[i], i) : rateMission(context, Provider.of<HistoryModule>(context, listen: false).dataMisi()[i], i);
|
|
|
+ U.newServerVersion(1716279633) ? rateMissionNew(context, historyModule.dataMisi()[i], i) : rateMission(context, historyModule.dataMisi()[i], i);
|
|
|
},
|
|
|
- ) : !hisFunc.isAutoResponse(Provider.of<HistoryModule>(context).dataMisi()[i]) ? Row(
|
|
|
+ ) : !hisFunc.isAutoResponse(historyModuleListen.dataMisi()[i]) ? Row(
|
|
|
children: [
|
|
|
- Image(image: AssetImage(rating[Provider.of<HistoryModule>(context).dataMisi()[i]['satisfactionRate'] - 1]['image'].toString()), width: 25),
|
|
|
+ Image(image: AssetImage(rating[historyModuleListen.dataMisi()[i]['satisfactionRate'] - 1]['image'].toString()), width: 25),
|
|
|
SizedBox(width: 5),
|
|
|
- Text(rating[Provider.of<HistoryModule>(context).dataMisi()[i]['satisfactionRate'] - 1]['label'].toString(), style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
+ Text(rating[historyModuleListen.dataMisi()[i]['satisfactionRate'] - 1]['label'].toString(), style: TextStyle(color: textColor, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
],
|
|
|
) : Container(),
|
|
|
- ) : message(Provider.of<HistoryModule>(context).dataMisi()[i]['_hasForum'], Provider.of<HistoryModule>(context).dataMisi()[i]['_forumMsg'] ?? "null"),
|
|
|
+ ) : message(historyModuleListen.dataMisi()[i]['_hasForum'], historyModuleListen.dataMisi()[i]['_forumMsg'] ?? "null"),
|
|
|
GestureDetector(
|
|
|
child: Container(
|
|
|
padding: EdgeInsets.symmetric(vertical: 4, horizontal: 16),
|
|
|
- child: Text('reqAgain'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
decoration: BoxDecoration(color: Colors.white, border: Border.all(color: primaryColor), borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
+ child: Text('reqAgain'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
),
|
|
|
- onTap: () => hisFunc.requestAgainAction(context, i),
|
|
|
+ onTap: () => hisFunc.requestAgainAction(i),
|
|
|
)
|
|
|
],
|
|
|
),
|
|
|
@@ -484,7 +488,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
),
|
|
|
),
|
|
|
onTap: () {
|
|
|
- if (Provider.of<HistoryModule>(context, listen: false).multiSelectMode()) {
|
|
|
+ if (historyModule.multiSelectMode()) {
|
|
|
hisFunc.selectedController(context, i);
|
|
|
} else {
|
|
|
navigateTo(context, WebHistoryDetailPage(index: i));
|
|
|
@@ -494,9 +498,9 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
);
|
|
|
})
|
|
|
),
|
|
|
- !Provider.of<HistoryModule>(context).stopLoadHistory() || (Provider.of<HistoryModule>(context).isLoadHistory() && Provider.of<HistoryModule>(context).page() > 0)
|
|
|
- ? Container(margin: EdgeInsets.only(top: Provider.of<HistoryModule>(context).page() > 0 ? 0 : 50), child: loadingTemplateNoVoid())
|
|
|
- : Provider.of<HistoryModule>(context).dataMisi().length == 0 ? NoDataPage() : Container(),
|
|
|
+ !historyModuleListen.stopLoadHistory() || (historyModuleListen.isLoadHistory() && historyModuleListen.page() > 0)
|
|
|
+ ? Container(margin: EdgeInsets.only(top: historyModuleListen.page() > 0 ? 0 : 50), child: loadingTemplateNoVoid())
|
|
|
+ : historyModuleListen.dataMisi().isEmpty ? NoDataPage() : Container(),
|
|
|
],
|
|
|
),
|
|
|
);
|
|
|
@@ -504,7 +508,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
|
|
|
Widget renderRequested(list){
|
|
|
if(list['receptionistId'] != null){
|
|
|
- var user = Provider.of<UserModule>(context, listen: false).user();
|
|
|
+ var user = userModule.user();
|
|
|
if(user['roomAttendant'] && user['userId'] != list['informantUserId'] && user['userId'] == list['receptionistId']){
|
|
|
return Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
@@ -529,14 +533,14 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
return Container();
|
|
|
}
|
|
|
|
|
|
- Widget message(bool _hasForum, String _forumMsg, {double top = 0}) {
|
|
|
- return _hasForum ? Container(
|
|
|
+ Widget message(bool hasForum, String forumMsg, {double top = 0}) {
|
|
|
+ return hasForum ? Container(
|
|
|
margin: EdgeInsets.only(top: top),
|
|
|
child: Row(
|
|
|
children: [
|
|
|
FadeTransition(opacity: _animationController, child: U.iconsax('messages-3', color: primaryColor)),
|
|
|
SizedBox(width: 8),
|
|
|
- Text('“$_forumMsg”', style: TextStyle(color: textColor.withValues(alpha: 0.75), fontSize: 14, fontStyle: FontStyle.italic), overflow: TextOverflow.ellipsis),
|
|
|
+ Text('“$forumMsg”', style: TextStyle(color: textColor.withValues(alpha: 0.75), fontSize: 14, fontStyle: FontStyle.italic), overflow: TextOverflow.ellipsis),
|
|
|
],
|
|
|
),
|
|
|
) : Container();
|
|
|
@@ -546,10 +550,10 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
return Container(
|
|
|
padding: EdgeInsets.symmetric(vertical: 3, horizontal: 10),
|
|
|
margin: EdgeInsets.only(left: 10),
|
|
|
- child: Text(text, style: TextStyle(fontSize: 12, color: textColor)),
|
|
|
decoration: BoxDecoration(
|
|
|
color: color, borderRadius: BorderRadius.all(Radius.circular(3))
|
|
|
),
|
|
|
+ child: Text(text, style: TextStyle(fontSize: 12, color: textColor)),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -633,7 +637,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
|
|
|
var res = await ApiAuthProvider() .postData('/api/requestHistories/rateSatisfy', null, data);
|
|
|
if (res != null) {
|
|
|
- Provider.of<HistoryModule>(context, listen: false).setSatisfaction(index, tempRating);
|
|
|
+ historyModule.setSatisfaction(index, tempRating);
|
|
|
navigateBack(contexts);
|
|
|
}
|
|
|
}
|
|
|
@@ -664,7 +668,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
String description = '';
|
|
|
String ratingAspect = '';
|
|
|
TextEditingController controllerOptOther = new TextEditingController();
|
|
|
- List aspectList = list['_ratingAspect'+locale[0].toUpperCase()+locale[1]] != null && list['_ratingAspect'+locale[0].toUpperCase()+locale[1]].trim() != '' ? list['_ratingAspect'+locale[0].toUpperCase()+locale[1]].split(';') : [];
|
|
|
+ List aspectList = list['_ratingAspect${locale[0].toUpperCase()}${locale[1]}'] != null && list['_ratingAspect'+locale[0].toUpperCase()+locale[1]].trim() != '' ? list['_ratingAspect'+locale[0].toUpperCase()+locale[1]].split(';') : [];
|
|
|
if(aspectList.isNotEmpty){
|
|
|
aspectList.add('OTHER_OPTION');
|
|
|
}
|
|
|
@@ -693,7 +697,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
children: [
|
|
|
- Text('ticketNumber'.tr()+': '+list['ticketNo'], style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w300)),
|
|
|
+ Text('${'ticketNumber'.tr()}: '+list['ticketNo'], style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w300)),
|
|
|
Text(convertDate(list['datetimeRequest'], context.locale.toString()), style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w300)),
|
|
|
],
|
|
|
),
|
|
|
@@ -735,7 +739,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
tempRating != 0 ? Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
- Text('whatMakesYou'.tr()+' '+description+'?', style: TextStyle(fontSize: 16)),
|
|
|
+ Text('${'whatMakesYou'.tr()} $description?', style: TextStyle(fontSize: 16)),
|
|
|
SizedBox(height: 12),
|
|
|
Wrap(
|
|
|
runSpacing: 10, spacing: 10,
|
|
|
@@ -801,7 +805,7 @@ class _WebHistoryPageState extends State<WebHistoryPage> with TickerProviderStat
|
|
|
|
|
|
var res = await ApiAuthProvider() .postData('/api/requestHistories/rateSatisfy', null, data);
|
|
|
if (res != null) {
|
|
|
- Provider.of<HistoryModule>(context, listen: false).setSatisfaction(index, tempRating);
|
|
|
+ historyModule.setSatisfaction(index, tempRating);
|
|
|
navigateBack(contexts);
|
|
|
}
|
|
|
}
|