bug fixes

main_production
WaseemAbbasi22 1 month ago
parent a0180eef77
commit 83eec2c4d5

@ -3,13 +3,13 @@ class URLs {
static const String appReleaseBuildNumber = "51"; static const String appReleaseBuildNumber = "51";
static const host1 = "https://atomsm.hmg.com"; // production url // static const host1 = "https://atomsm.hmg.com"; // production url
// static const host1 = "https://atomsmdev.hmg.com"; // local DEV url // static const host1 = "https://atomsmdev.hmg.com"; // local DEV url
// static const host1 = "https://atomsmuat.hmg.com"; // local UAT url static const host1 = "https://atomsmuat.hmg.com"; // local UAT url
// static final String _baseUrl = "$_host/mobile"; // host local UAT static final String _baseUrl = "$_host/mobile"; // host local UAT
// static final String _baseUrl = "$_host/v2/mobile"; // new V2 apis // static final String _baseUrl = "$_host/v2/mobile"; // new V2 apis
static final String _baseUrl = "$_host/v3/mobile"; // v3 for production CM,PM,TM // static final String _baseUrl = "$_host/v3/mobile"; // v3 for production CM,PM,TM
// static final String _baseUrl = "$_host/v4/mobile"; // v4 for Demo module // static final String _baseUrl = "$_host/v4/mobile"; // v4 for Demo module
// static final String _baseUrl = "$_host/v5/mobile"; // v5 for data segregation // static final String _baseUrl = "$_host/v5/mobile"; // v5 for data segregation
// static final String _baseUrl = "$_host/v6/mobile"; // for asset delivery module // static final String _baseUrl = "$_host/v6/mobile"; // for asset delivery module

@ -8,6 +8,7 @@ import 'package:test_sa/models/lookup.dart';
import 'package:test_sa/modules/asset_delivery_module/pages/attachment_view.dart'; import 'package:test_sa/modules/asset_delivery_module/pages/attachment_view.dart';
import 'package:test_sa/modules/asset_delivery_module/provider/asset_delivery_provider.dart'; import 'package:test_sa/modules/asset_delivery_module/provider/asset_delivery_provider.dart';
import 'package:test_sa/modules/asset_delivery_module/provider/attachment_type_provider.dart'; import 'package:test_sa/modules/asset_delivery_module/provider/attachment_type_provider.dart';
import 'package:test_sa/new_views/app_style/app_color.dart';
import 'package:test_sa/new_views/common_widgets/app_lazy_loading.dart'; import 'package:test_sa/new_views/common_widgets/app_lazy_loading.dart';
import 'package:test_sa/new_views/common_widgets/single_item_drop_down_menu.dart'; import 'package:test_sa/new_views/common_widgets/single_item_drop_down_menu.dart';
import 'package:test_sa/new_views/swipe_module/dialoge/acknowledge_work_dialog.dart'; import 'package:test_sa/new_views/swipe_module/dialoge/acknowledge_work_dialog.dart';
@ -67,7 +68,7 @@ class HelperFunction {
static Future<Lookup?> showAttachmentTypeBottomSheet(BuildContext context) { static Future<Lookup?> showAttachmentTypeBottomSheet(BuildContext context) {
return showModalBottomSheet<Lookup?>( return showModalBottomSheet<Lookup?>(
context: context, context: context,
isScrollControlled: true, isScrollControlled: true,backgroundColor: AppColor.bottomSheetColor(context),
shape: const RoundedRectangleBorder( shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(20)), borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
), ),

@ -25,6 +25,7 @@ import 'package:test_sa/views/widgets/item_views/info_text_widget.dart';
class AssetDeliveryPage extends StatefulWidget { class AssetDeliveryPage extends StatefulWidget {
final int? requestId; final int? requestId;
// final String? poInternal; // final String? poInternal;
// final String? poExternal; // final String? poExternal;
@ -144,7 +145,14 @@ class _AssetDeliveryPageState extends State<AssetDeliveryPage> {
], ],
), ),
16.height, 16.height,
assetDeliveryTableList(context: context, assetDeliveryProvider: provider), Selector<AssetDeliveryProvider, bool>(
selector: (_, provider) => provider.isDeliveryTableListLoading,
builder: (context, isLoading, child) {
return isLoading
? SizedBox(height: 200.toScreenHeight, child: CircularProgressIndicator(color: AppColor.loadingColor(context)).center)
: assetDeliveryTableList(context: context, assetDeliveryProvider: provider);
})
// assetDeliveryTableList(context: context, assetDeliveryProvider: provider),
], ],
), ),
); );
@ -167,7 +175,7 @@ class _AssetDeliveryPageState extends State<AssetDeliveryPage> {
// children: [ // children: [
// Checkbox( // Checkbox(
// value: dataModel!.isHMG, // value: dataModel!.isHMG,
// activeColor: AppColor.neutral120, // activeColor: AppColor.neutral120,x
// materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, // materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
// visualDensity: const VisualDensity(horizontal: -4, vertical: -3), // visualDensity: const VisualDensity(horizontal: -4, vertical: -3),
// onChanged: (value) {}, // onChanged: (value) {},

@ -65,7 +65,6 @@ class _AssetDeliveryAttachmentViewState extends State<AssetDeliveryAttachmentVie
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
log('value ${widget.attachmentType}');
return Scaffold( return Scaffold(
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: DefaultAppBar( appBar: DefaultAppBar(
@ -74,12 +73,14 @@ class _AssetDeliveryAttachmentViewState extends State<AssetDeliveryAttachmentVie
Navigator.pop(context); Navigator.pop(context);
}, },
), ),
body: widget.attachmentList.isEmpty body:
? const NoDataFound().center // widget.attachmentList.isEmpty
: Column( // ? const NoDataFound().center
// :
Column(
children: [ children: [
Flexible( Flexible(
fit: FlexFit.loose, // ✅ expands only as much as needed fit: FlexFit.loose,
child: Column( child: Column(
children: [ children: [
widget.attachmentType == 5 && !widget.viewOnly widget.attachmentType == 5 && !widget.viewOnly

@ -155,10 +155,10 @@ class _DeliveryInspectionFormViewState extends State<DeliveryInspectionFormView>
: Row( : Row(
children: [ children: [
AppFilledButton( AppFilledButton(
buttonColor: AppColor.white60, buttonColor: AppColor.primary10,
label: 'Attachments'.addTranslation, label: 'Attachments'.addTranslation,
maxWidth: true, maxWidth: true,
textColor: AppColor.black10, // textColor: AppColor.black10,
onPressed: () { onPressed: () {
HelperFunction.attachmentTap(context: context, viewOnly: true, assetDeliveryProvider: assetDeliveryProvider!, deliveryTableItemId: widget.deliveryTableModel.id); HelperFunction.attachmentTap(context: context, viewOnly: true, assetDeliveryProvider: assetDeliveryProvider!, deliveryTableItemId: widget.deliveryTableModel.id);
}).expanded, }).expanded,

@ -36,7 +36,7 @@ class EndUserAssetDetailCard extends StatelessWidget {
) )
: const SizedBox(), : const SizedBox(),
if (!isViewOnly) if (!isViewOnly)
'edit_icon'.toSvgAsset().onPress(() { 'edit_icon'.toSvgAsset(color: AppColor.icon2Color(context)).onPress(() {
if (editPress != null) { if (editPress != null) {
editPress!(); editPress!();
} }

@ -111,7 +111,7 @@ class _EndUserCostCenterLIstViewState extends State<EndUserCostCenterLIstView> {
: FooterActionButton.footerContainer( : FooterActionButton.footerContainer(
context: context, context: context,
child: AppFilledButton( child: AppFilledButton(
buttonColor: AppColor.white60, buttonColor: AppColor.primary10,
label: 'Attachments'.addTranslation, label: 'Attachments'.addTranslation,
maxWidth: true, maxWidth: true,
textColor: AppColor.black10, textColor: AppColor.black10,

@ -147,7 +147,7 @@ class _UpdateEndUserCostCenterDetailsViewState extends State<UpdateEndUserCostCe
? CircularProgressIndicator(color: AppColor.loadingColor(context)).center ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center
: ListView.separated( : ListView.separated(
itemCount: assetList.length, itemCount: assetList.length,
separatorBuilder: (_, __) => 8.height, separatorBuilder: (_, __) => 12.height,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
shrinkWrap: true, shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),

@ -93,17 +93,10 @@ class _ESignatureState extends State<ESignature> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
widget.title.tinyFont(context).paddingOnly(top: 8), InfoTextLabelWidget(label: widget.title),
(!_editable (!_editable
? "edit".toSvgAsset(width: 48).paddingOnly(top: 8) ? "edit_icon".toSvgAsset(color: AppColor.icon2Color(context))
: Container( : "done".toSvgAsset(width: 24))
width: 48.toScreenWidth,
height: 48.toScreenWidth,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(color: AppColor.neutral30)),
padding: const EdgeInsets.all(11),
margin: const EdgeInsets.only(top: 8),
child: "done".toSvgAsset(width: 26),
))
.onPress(() async { .onPress(() async {
if (_editable) { if (_editable) {
signature = await _controller!.toPngBytes(); signature = await _controller!.toPngBytes();

Loading…
Cancel
Save