|
|
|
@ -75,10 +75,12 @@ class _MyDocumentsFragmentState extends State<MyDocumentsFragment> {
|
|
|
|
padding: const EdgeInsets.only(left: 21, right: 21, bottom: 21, top: 11),
|
|
|
|
padding: const EdgeInsets.only(left: 21, right: 21, bottom: 21, top: 11),
|
|
|
|
itemBuilder: (cxt, index) {
|
|
|
|
itemBuilder: (cxt, index) {
|
|
|
|
return MyDocumentItem(documentfilteredList[index], getColorByDocumentStatus(documentfilteredList[index].dOCUMENTSTATUS!)).onPress(() {
|
|
|
|
return MyDocumentItem(documentfilteredList[index], getColorByDocumentStatus(documentfilteredList[index].dOCUMENTSTATUS!)).onPress(() {
|
|
|
|
|
|
|
|
if (documentfilteredList[index].eNTITLEDTOAPPLYFLAG != 'Y') return;
|
|
|
|
Navigator.pushNamed(
|
|
|
|
Navigator.pushNamed(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
AppRoutes.addDynamicInput,
|
|
|
|
AppRoutes.addDynamicInput,
|
|
|
|
arguments: DynamicListViewParams(documentfilteredList[index].dOCUMENTTYPE!, documentfilteredList[index].fUNCTIONNAME!, selectedEmp: AppState().getUserName),
|
|
|
|
arguments: DynamicListViewParams(documentfilteredList[index].dOCUMENTTYPE!, documentfilteredList[index].fUNCTIONNAME!,
|
|
|
|
|
|
|
|
selectedEmp: AppState().getUserName, isAttachmentMandatory: true),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -123,6 +125,9 @@ class _MyDocumentsFragmentState extends State<MyDocumentsFragment> {
|
|
|
|
Color getColorByDocumentStatus(String status) {
|
|
|
|
Color getColorByDocumentStatus(String status) {
|
|
|
|
Color _color;
|
|
|
|
Color _color;
|
|
|
|
switch (status) {
|
|
|
|
switch (status) {
|
|
|
|
|
|
|
|
case "Expired":
|
|
|
|
|
|
|
|
_color = MyColors.redA3Color;
|
|
|
|
|
|
|
|
break;
|
|
|
|
case "Exist":
|
|
|
|
case "Exist":
|
|
|
|
_color = MyColors.greenColor;
|
|
|
|
_color = MyColors.greenColor;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
@ -143,7 +148,7 @@ class _MyDocumentsFragmentState extends State<MyDocumentsFragment> {
|
|
|
|
List<EmployeeDocumentsList> list = [];
|
|
|
|
List<EmployeeDocumentsList> list = [];
|
|
|
|
switch (index) {
|
|
|
|
switch (index) {
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
list = documentsList?.where((element) => element.dOCUMENTSTATUS == "Not Exist").toList() ?? [];
|
|
|
|
list = documentsList?.where((element) => element.dOCUMENTSTATUS == "Expired").toList() ?? [];
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
list = documentsList?.where((element) => element.dOCUMENTSTATUS == "Missing").toList() ?? [];
|
|
|
|
list = documentsList?.where((element) => element.dOCUMENTSTATUS == "Missing").toList() ?? [];
|
|
|
|
|