import { IFormField , RADIO_GROUP , TEXTAREA } from '@client/forms' ; import { messages } from '@client/i18n/messages/views/sysAdmin' ; import { RadioSize } from '@opencrvs/components/lib/forms' ; import { conditionals } from '@client/forms/utils' ; export interface IUserAuditForm { fields : IFormField [ ] ; } export const userAuditForm = { fields : [ { name : 'reason' , type : RADIO_GROUP , required : true , validate : [ ] , initialValue : '' , label : messages . auditReason , size : RadioSize . LARGE , conditionals : [ conditionals . isAuditActionDeactivate ] , options : [ { label : messages . deactivateReasonNotEmployee , value : 'TERMINATED' } , { label : messages . deactivateReasonInvestigated , value : 'SUSPICIOUS' } , { label : messages . auditReasonOther , value : 'OTHER' } ] } , { name : 'reason' , type : RADIO_GROUP , required : true , validate : [ ] , initialValue : '' , label : messages . auditReason , size : RadioSize . LARGE , conditionals : [ conditionals . isAuditActionReactivate ] , options : [ { label : messages . reactivateReasonReturnedToRole , value : 'ROLE_REGAINED' } , { label : messages . reactivateReasonNoLongerInvestigated , value : 'NOT_SUSPICIOUS' } , { label : messages . auditReasonOther , value : 'OTHER' } ] } , { name : 'comment' , type : TEXTAREA , label : messages . comments , initialValue : '' , validate : [ ] , required : false , conditionals : [ conditionals . userAuditReasonSpecified ] } , { name : 'comment' , type : TEXTAREA , label : messages . comments , initialValue : '' , validate : [ ] , required : true , conditionals : [ conditionals . userAuditReasonOther ] } ] } ;