@@ -27,74 +27,6 @@ export const configBPAApproverApplication = ({
27
27
isCommentRequired = true ;
28
28
}
29
29
30
- if ( action ?. action == "BLOCK" && action ?. state ?. state == "PENDINGAPPROVAL" ) {
31
- return {
32
- label : {
33
- heading : `WF_${ action ?. action } _APPLICATION` ,
34
- submit : `WF_${ businessService } _${ action ?. action } ` ,
35
- cancel : "BPA_CITIZEN_CANCEL_BUTTON" ,
36
- } ,
37
- form : [
38
- {
39
- body : [
40
- {
41
- label : action . isTerminateState || isRejectOrRevocate ? null : t ( assigneeLabel || `WF_ROLE_${ action . assigneeRoles ?. [ 0 ] } ` ) ,
42
- type : "dropdown" ,
43
- populators : action . isTerminateState || isRejectOrRevocate ? null : (
44
- < Dropdown
45
- option = { approvers }
46
- autoComplete = "off"
47
- optionKey = "name"
48
- id = "fieldInspector"
49
- select = { setSelectedApprover }
50
- selected = { selectedApprover }
51
- />
52
- ) ,
53
- } ,
54
- {
55
- label : action ?. action == "BLOCK" && action ?. state ?. state == "PENDINGAPPROVAL" ? t ( `BLOCK_REASON` ) :null ,
56
- type : "dropdown" ,
57
- populators : ! action ?. action == "BLOCK" || ! action ?. state ?. state == "PENDINGAPPROVAL" ? null : (
58
- < Dropdown
59
- option = { blockReasonFiltered }
60
- autoComplete = "off"
61
- optionKey = "name"
62
- id = "fieldInspector"
63
- select = { setBlockReason }
64
- selected = { selectedBlockReason }
65
- isMandatory = { true }
66
- />
67
- ) ,
68
- } ,
69
- {
70
- label : t ( "WF_COMMON_COMMENTS" ) ,
71
- type : "textarea" ,
72
- isMandatory : true ,
73
- populators : {
74
- name : "comments" ,
75
- } ,
76
- } ,
77
- {
78
- label : `${ t ( "WF_APPROVAL_UPLOAD_HEAD" ) } ` ,
79
- populators : (
80
- < UploadFile
81
- id = { "workflow-doc" }
82
- onUpload = { selectFile }
83
- onDelete = { ( ) => {
84
- setUploadedFile ( null ) ;
85
- } }
86
- message = { uploadedFile ? `1 ${ t ( `ES_PT_ACTION_FILEUPLOADED` ) } ` : t ( `CS_ACTION_NO_FILEUPLOADED` ) }
87
- accept = "image/*, .pdf, .png, .jpeg, .jpg"
88
- iserror = { error }
89
- />
90
- ) ,
91
- } ,
92
- ] ,
93
- } ,
94
- ] ,
95
- } ;
96
- }
97
-
98
30
return {
99
31
label : {
100
32
heading : `WF_${ action ?. action } _APPLICATION` ,
@@ -105,9 +37,9 @@ export const configBPAApproverApplication = ({
105
37
{
106
38
body : [
107
39
{
108
- label : action . isTerminateState || isRejectOrRevocate ? null : t ( assigneeLabel || `WF_ROLE_${ action . assigneeRoles ?. [ 0 ] } ` ) ,
40
+ label : action . isTerminateState || isRejectOrRevocate || ( action ?. action == "BLOCK" && action ?. state ?. state == "PENDINGAPPROVAL" ) || ( action ?. action == "FORWARD" && action ?. state ?. state == "FIELDINSPECTION_PENDING" ) ? null : t ( assigneeLabel || `WF_ROLE_${ action . assigneeRoles ?. [ 0 ] } ` ) ,
109
41
type : "dropdown" ,
110
- populators : action . isTerminateState || isRejectOrRevocate ? null : (
42
+ populators : ( action . isTerminateState || isRejectOrRevocate || ( action ?. action == "BLOCK" && action ?. state ?. state == "PENDINGAPPROVAL" ) || ( action ?. action == "FORWARD" && action ?. state ?. state == "FIELDINSPECTION_PENDING" ) ) ? null : (
111
43
< Dropdown
112
44
option = { approvers }
113
45
autoComplete = "off"
@@ -118,6 +50,21 @@ export const configBPAApproverApplication = ({
118
50
/>
119
51
) ,
120
52
} ,
53
+ {
54
+ label : ( action ?. action == "BLOCK" && action ?. state ?. state == "PENDINGAPPROVAL" ) ? t ( `BLOCK_REASON` ) :null ,
55
+ type : "dropdown" ,
56
+ populators : ( action ?. action == "BLOCK" && action ?. state ?. state == "PENDINGAPPROVAL" ) ? (
57
+ < Dropdown
58
+ option = { blockReasonFiltered }
59
+ autoComplete = "off"
60
+ optionKey = "name"
61
+ id = "fieldInspector"
62
+ select = { setBlockReason }
63
+ selected = { selectedBlockReason }
64
+ isMandatory = { true }
65
+ />
66
+ ) :null ,
67
+ } ,
121
68
{
122
69
label : t ( "WF_COMMON_COMMENTS" ) ,
123
70
type : "textarea" ,
0 commit comments