Compare commits

..

No commits in common. 'eb070fcec24d5df2a0183cfcf02ad3328c81508d' and '5e18b98a2069668eafa78242c34e3f589f96ccf7' have entirely different histories.

@ -1,12 +1,9 @@
import 'package:mohem_flutter_app/ui/marathon/widgets/question_card.dart';
class ApiConsts {
// static String baseUrl = "http://10.200.204.11"; // Local server
//static String baseUrl = "http://10.200.204.20:2801/"; // Local server
// static String baseUrl = "https://erptstapp.srca.org.sa"; // SRCA server
// static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
// static String baseUrl = "https://webservices.hmg.com"; // PreProd
static String baseUrl = "https://hmgwebservices.com"; // Live server
static String baseUrlServices = baseUrl + "/Services/"; // server
// static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server

@ -183,8 +183,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
ermIndex++;
handleErmChannel(list);
} catch (ex) {
print(ex);
// Utils.hideLoading(context);
Utils.hideLoading(context);
// Utils.handleException(ex, context, null);
return;
}

@ -159,11 +159,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
});
},
children: [
RequestDetailFragment(
fields: itgRequest?.fieldGoups?[1].fields ?? [],
fieldGoups: itgRequest?.fieldGoups ?? [],
taskID: itgRequest?.fieldGoups?[0].fields?[0].value ?? "",
),
RequestDetailFragment(fields: itgRequest?.fieldGoups?[1].fields ?? []),
ApprovalLevelfragment(
wFHistory: itgRequest?.wFHistory ?? [],
voidCallback: reloadITG,

@ -4,72 +4,34 @@ import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/itg_forms_models/field_goups_model.dart';
import 'package:mohem_flutter_app/models/itg_forms_models/fields_model.dart';
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
class RequestDetailFragment extends StatelessWidget {
List<Fields> fields;
List<FieldGoups>? fieldGoups;
String taskID;
RequestDetailFragment({Key? key, this.fields = const <Fields>[], this.fieldGoups = const <FieldGoups>[], this.taskID = ""}) : super(key: key);
RequestDetailFragment({Key? key, this.fields = const <Fields>[]}) : super(key: key);
double itemHeight = 0;
double itemWidth = 0;
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
itemHeight = (size.height - kToolbarHeight - 24) / 9;
itemWidth = size.width / 2;
List<Widget> uiList = [detailView(fields)];
return Column(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: SingleChildScrollView(
child: Padding(
List<Widget> uiList = [detailView()];
return Container(
width: double.infinity,
height: double.infinity,
child: fields.isEmpty
? LocaleKeys.noDataAvailable.tr().toText16().center
: ListView(
padding: const EdgeInsets.all(21),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: double.infinity,
// height: double.infinity,
child: fields.isEmpty
? LocaleKeys.noDataAvailable.tr().toText16().center
: ListView(
shrinkWrap: true,
children: uiList,
),
),
12.height,
if (taskID.toLowerCase().contains("vida"))
Column(
children: [
fieldGoups![2].title!.toText14(),
6.height,
detailView(fieldGoups![2].fields!),
12.height,
fieldGoups![3].title!.toText14(),
6.height,
detailView(fieldGoups![3].fields!),
12.height,
fieldGoups![4].title!.toText14(),
6.height,
detailView(fieldGoups![4].fields!),
],
)
],
),
children: uiList,
),
),
),
],
);
}
Widget detailView(List<Fields> fields) {
Widget detailView() {
bool isOdd = false;
if (fields.length % 2 != 0) {
isOdd = true;
@ -83,12 +45,11 @@ class RequestDetailFragment extends StatelessWidget {
if (fields[index].value == null) {
return ItemDetailViewGridItem(
index,
fields[index].title,
fields[index].multipleValue?.join(", ") ?? "",
fields[index].title, fields[index].multipleValue?.join(", ") ?? "",
isNeedToShowEmptyDivider: (fields.length == index + 1)
? isOdd
? true
: false
? true
: false
: false,
type: fields[index].type,
);
@ -99,8 +60,8 @@ class RequestDetailFragment extends StatelessWidget {
fields[index].value ?? "",
isNeedToShowEmptyDivider: (fields.length == index + 1)
? isOdd
? true
: false
? true
: false
: false,
type: fields[index].type,
);

@ -15,7 +15,6 @@ void showMyBottomSheet(BuildContext context, {required Widget child, required Vo
topLeft: Radius.circular(25),
),
),
padding: MediaQuery.of(context).viewInsets,
clipBehavior: Clip.antiAlias,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,

Loading…
Cancel
Save