removed submit and reject tender ability every where except tender details
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
@@ -76,65 +75,52 @@ class _TenderDetailMobilePageState extends State<TenderDetailMobilePage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PopScope(
|
||||
onPopInvokedWithResult: (didPop, result) {
|
||||
if (kIsWeb) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
context.read<TenderDetailViewModel>().updateTenderApprovals(
|
||||
widget.tenderId,
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Directionality(
|
||||
textDirection: TextDirection.rtl,
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
appBar: appBar(
|
||||
context: context,
|
||||
title: TenderDetailsStrings.tenderDetailTitle,
|
||||
),
|
||||
body: Consumer<TenderDetailViewModel>(
|
||||
builder: (context, tenderViewModel, child) {
|
||||
if (tenderViewModel.isLoading) {
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: AppColors.secondary50,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (tenderViewModel.errorMessage != null) {
|
||||
return Center(child: Text(tenderViewModel.errorMessage!));
|
||||
}
|
||||
|
||||
final detail = tenderViewModel.tenderDetail;
|
||||
if (detail == null) {
|
||||
return const Center(
|
||||
child: Text(TenderDetailsStrings.tenderNoData),
|
||||
);
|
||||
}
|
||||
|
||||
return SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.0.w(),
|
||||
vertical: 16.0.h(),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TenderDetailHeader(isScreenBig: false, detail: detail),
|
||||
SizedBox(height: 24.0.h()),
|
||||
TenderDetailCard(detail: detail),
|
||||
SizedBox(height: 24.0.h()),
|
||||
TenderDetailActions(isScreenBig: false, detail: detail),
|
||||
],
|
||||
),
|
||||
),
|
||||
return Directionality(
|
||||
textDirection: TextDirection.rtl,
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
appBar: appBar(
|
||||
context: context,
|
||||
title: TenderDetailsStrings.tenderDetailTitle,
|
||||
),
|
||||
body: Consumer<TenderDetailViewModel>(
|
||||
builder: (context, tenderViewModel, child) {
|
||||
if (tenderViewModel.isLoading) {
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(color: AppColors.secondary50),
|
||||
);
|
||||
},
|
||||
),
|
||||
}
|
||||
|
||||
if (tenderViewModel.errorMessage != null) {
|
||||
return Center(child: Text(tenderViewModel.errorMessage!));
|
||||
}
|
||||
|
||||
final detail = tenderViewModel.tenderDetail;
|
||||
if (detail == null) {
|
||||
return const Center(
|
||||
child: Text(TenderDetailsStrings.tenderNoData),
|
||||
);
|
||||
}
|
||||
|
||||
return SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.0.w(),
|
||||
vertical: 16.0.h(),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TenderDetailHeader(isScreenBig: false, detail: detail),
|
||||
SizedBox(height: 24.0.h()),
|
||||
TenderDetailCard(detail: detail),
|
||||
SizedBox(height: 24.0.h()),
|
||||
TenderDetailActions(isScreenBig: false, detail: detail),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user