@@ -226,8 +226,8 @@ const fieldsInResponse = [
226226 'appeal_amount' ,
227227 'fact' ,
228228 'num_fact' ,
229- 'ifrc_staff ' ,
230- 'num_ifrc_staff ' ,
229+ 'emergency_response_unit ' ,
230+ 'num_emergency_response_unit ' ,
231231 'forecast_based_action' ,
232232 'forecast_based_action_amount' ,
233233] satisfies ( keyof PartialFormValue ) [ ] ;
@@ -696,25 +696,28 @@ export const reportSchema: FormSchema = {
696696 baseSchema = addCondition (
697697 baseSchema ,
698698 value ,
699- [ 'ifrc_staff ' , 'num_ifrc_staff ' , 'status' , 'is_covid_report' , 'dtype' ] ,
700- [ 'ifrc_staff ' , 'num_ifrc_staff ' ] ,
701- ( val ) : Pick < FormSchemaFields , 'ifrc_staff ' | 'num_ifrc_staff ' > => {
699+ [ 'emergency_response_unit ' , 'num_emergency_response_unit ' , 'status' , 'is_covid_report' , 'dtype' ] ,
700+ [ 'emergency_response_unit ' , 'num_emergency_response_unit ' ] ,
701+ ( val ) : Pick < FormSchemaFields , 'emergency_response_unit ' | 'num_emergency_response_unit ' > => {
702702 const reportType = getReportType ( val ?. status , val ?. is_covid_report , val ?. dtype ) ;
703703 if ( reportType === 'COVID' ) {
704704 return {
705- ifrc_staff : { forceValue : nullValue } ,
706- num_ifrc_staff : { forceValue : nullValue } ,
705+ emergency_response_unit : { forceValue : nullValue } ,
706+ num_emergency_response_unit : { forceValue : nullValue } ,
707707 } ;
708708 }
709- if ( isDefined ( val ?. ifrc_staff ) || isDefined ( val ?. num_ifrc_staff ) ) {
709+ if (
710+ isDefined ( val ?. emergency_response_unit )
711+ || isDefined ( val ?. num_emergency_response_unit )
712+ ) {
710713 return {
711- ifrc_staff : { required : true } ,
712- num_ifrc_staff : { required : true } ,
714+ emergency_response_unit : { required : true } ,
715+ num_emergency_response_unit : { required : true } ,
713716 } ;
714717 }
715718 return {
716- ifrc_staff : { } ,
717- num_ifrc_staff : { } ,
719+ emergency_response_unit : { } ,
720+ num_emergency_response_unit : { } ,
718721 } ;
719722 } ,
720723 ) ;
0 commit comments