|
|
|
|
@ -13,6 +13,7 @@ import 'package:mohem_flutter_app/models/get_pr_notification_body_list_model.dar
|
|
|
|
|
import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_model.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/eit_otification_body_model.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/get_address_notification_body_list.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/get_contact_notification_body_list_model.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart';
|
|
|
|
|
@ -31,6 +32,7 @@ class InfoFragment extends StatelessWidget {
|
|
|
|
|
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotificationBodyList;
|
|
|
|
|
GetContactNotificationBodyList? getContactNotificationBodyList;
|
|
|
|
|
GetPrNotificationBodyList? getPrNotificationBodyList;
|
|
|
|
|
List<GetAddressNotificationBodyList>? getAddressNotificationBodyList = [];
|
|
|
|
|
|
|
|
|
|
InfoFragment(
|
|
|
|
|
{this.workListData,
|
|
|
|
|
@ -43,7 +45,8 @@ class InfoFragment extends StatelessWidget {
|
|
|
|
|
this.getBasicDetNtfBodyList,
|
|
|
|
|
this.getAbsenceCollectionNotificationBodyList,
|
|
|
|
|
this.getContactNotificationBodyList,
|
|
|
|
|
this.getPrNotificationBodyList});
|
|
|
|
|
this.getPrNotificationBodyList,
|
|
|
|
|
this.getAddressNotificationBodyList});
|
|
|
|
|
|
|
|
|
|
double itemHeight = 0;
|
|
|
|
|
double itemWidth = 0;
|
|
|
|
|
@ -89,6 +92,7 @@ class InfoFragment extends StatelessWidget {
|
|
|
|
|
if (getBasicDetNtfBodyList?.isNotEmpty ?? false) getBasicDetNtfBodyListWidget(getBasicDetNtfBodyList ?? []).objectContainerView(title: "Basic Information"),
|
|
|
|
|
if (getAbsenceCollectionNotificationBodyList?.isNotEmpty ?? false) getAbsenceCollectionNotificationBodyListWidget(getAbsenceCollectionNotificationBodyList ?? []),
|
|
|
|
|
if (getContactNotificationBodyList != null) getContactNotificationBodyListWidget(getContactNotificationBodyList ?? GetContactNotificationBodyList()).objectContainerView(),
|
|
|
|
|
if (getAddressNotificationBodyList?.isNotEmpty ?? false) getAddressNotificationBodyListWidget(getAddressNotificationBodyList!),
|
|
|
|
|
];
|
|
|
|
|
return Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
@ -465,6 +469,36 @@ class InfoFragment extends StatelessWidget {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget getAddressNotificationBodyListWidget(List<GetAddressNotificationBodyList> getAddressNotificationBodyList) {
|
|
|
|
|
bool isOdd = false;
|
|
|
|
|
try {
|
|
|
|
|
if (getAddressNotificationBodyList.length % 2 != 0) {
|
|
|
|
|
isOdd = true;
|
|
|
|
|
getAddressNotificationBodyList.add(GetAddressNotificationBodyList(sEGMENTPROMPT: "--", sEGMENTVALUEDSP: "--"));
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
|
|
|
|
|
return GridView.builder(
|
|
|
|
|
itemCount: getAddressNotificationBodyList!.length,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder: (context, index) => ItemDetailViewGridItem(
|
|
|
|
|
index,
|
|
|
|
|
getAddressNotificationBodyList[index].sEGMENTPROMPT,
|
|
|
|
|
getAddressNotificationBodyList[index].sEGMENTVALUEDSP,
|
|
|
|
|
isNeedToShowEmptyDivider: (getAddressNotificationBodyList.length == index + 1)
|
|
|
|
|
? isOdd
|
|
|
|
|
? true
|
|
|
|
|
: false
|
|
|
|
|
: false,
|
|
|
|
|
),
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
|
crossAxisCount: 2,
|
|
|
|
|
childAspectRatio: (itemWidth / itemHeight),
|
|
|
|
|
),
|
|
|
|
|
).objectContainerView();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<Widget> getPRHeaderValues() {
|
|
|
|
|
List<Widget> pRHeaders = [];
|
|
|
|
|
getPrNotificationBodyList!.pRHeader!.forEach((element) {
|
|
|
|
|
@ -478,7 +512,7 @@ class InfoFragment extends StatelessWidget {
|
|
|
|
|
try {
|
|
|
|
|
if (data.contactNotificationBody!.length % 2 != 0) {
|
|
|
|
|
isOdd = true;
|
|
|
|
|
data.contactNotificationBody!.add(new ContactNotificationBody());
|
|
|
|
|
data.contactNotificationBody!.add(ContactNotificationBody(segmentPrompt: "--", segmentValueDsp: "--"));
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
|
|
|
|
|
|