@@ -194,6 +194,64 @@ function _init(){
194194 }
195195 }
196196
197+ $ monitoring_simple_fields = [
198+ 'availabilityType ' ,
199+ 'participantProfile ' ,
200+ 'numberOfParticipants ' ,
201+ 'executedRevenue ' ,
202+ 'executedNumberOfCities ' ,
203+ 'executedNumberOfNeighborhoods ' ,
204+ 'executedMediationActions ' ,
205+ 'executedCommercialUnits ' ,
206+ 'executedUnitPrice ' ,
207+ 'executedArtChainLink ' ,
208+ 'executedSegmentDelivery ' ,
209+ 'executedCommunityCoauthorsDetail ' ,
210+ 'executedTransInclusionActions ' ,
211+ 'executedEnvironmentalPracticesDescription ' ,
212+ ];
213+ foreach ($ monitoring_simple_fields as $ field ) {
214+ if ($ delivery ->isMetadataRequired ($ field ) && !self ::validateSelectField ($ delivery , $ field )) {
215+ $ label = self ::getFieldLabel ($ field );
216+ $ errors ['delivery ' ][] = i::__ ("Campo ' {$ label }' obrigatório na entrega ' {$ delivery ->name }' " );
217+ }
218+ }
219+
220+ $ monitoring_json_array_fields = ['executedPaidStaffByRole ' ];
221+ foreach ($ monitoring_json_array_fields as $ field ) {
222+ if ($ delivery ->isMetadataRequired ($ field ) && !self ::validateJsonArrayField ($ delivery , $ field )) {
223+ $ label = self ::getFieldLabel ($ field );
224+ $ errors ['delivery ' ][] = i::__ ("Campo ' {$ label }' obrigatório na entrega ' {$ delivery ->name }' " );
225+ }
226+ }
227+
228+ $ monitoring_json_object_fields = [
229+ 'executedTeamCompositionGender ' ,
230+ 'executedTeamCompositionRace ' ,
231+ ];
232+ foreach ($ monitoring_json_object_fields as $ field ) {
233+ if ($ delivery ->isMetadataRequired ($ field ) && !self ::validateJsonObjectField ($ delivery , $ field )) {
234+ $ label = self ::getFieldLabel ($ field );
235+ $ errors ['delivery ' ][] = i::__ ("Campo ' {$ label }' obrigatório na entrega ' {$ delivery ->name }' " );
236+ }
237+ }
238+
239+ $ monitoring_multiselect_fields = [
240+ 'accessibilityMeasures ' ,
241+ 'priorityAudience ' ,
242+ 'executedCommunicationChannels ' ,
243+ 'executedRevenueType ' ,
244+ 'executedExpectedAccessibilityMeasures ' ,
245+ 'executedInnovationTypes ' ,
246+ 'executedDocumentationTypes ' ,
247+ ];
248+ foreach ($ monitoring_multiselect_fields as $ field ) {
249+ if ($ delivery ->isMetadataRequired ($ field ) && !self ::validateMultiselectField ($ delivery , $ field )) {
250+ $ label = self ::getFieldLabel ($ field );
251+ $ errors ['delivery ' ][] = i::__ ("Campo ' {$ label }' obrigatório na entrega ' {$ delivery ->name }' " );
252+ }
253+ }
254+
197255 }
198256 }
199257 }
@@ -383,6 +441,12 @@ function register()
383441 'default_value ' => false
384442 ]);
385443
444+ $ this ->registerOpportunityMetadata ('workplan_monitoringInformNumberOfParticipants ' , [
445+ 'label ' => i::__ ('Informar número de participantes executado ' ),
446+ 'type ' => 'boolean ' ,
447+ 'default_value ' => false
448+ ]);
449+
386450 $ this ->registerOpportunityMetadata ('workplan_monitoringReportExecutedRevenue ' , [
387451 'label ' => i::__ ('Informar receita executada ' ),
388452 'type ' => 'boolean ' ,
@@ -535,6 +599,60 @@ function register()
535599 'default_value ' => false
536600 ]);
537601
602+ $ this ->registerOpportunityMetadata ('workplan_monitoringInformRevenueType ' , [
603+ 'label ' => i::__ ('Informar tipo de receita executada ' ),
604+ 'type ' => 'boolean ' ,
605+ 'default_value ' => false
606+ ]);
607+
608+ $ this ->registerOpportunityMetadata ('workplan_monitoringInformCommunityCoauthors ' , [
609+ 'label ' => i::__ ('Informar envolvimento executado de comunidades/coletivos como coautores/coexecutores ' ),
610+ 'type ' => 'boolean ' ,
611+ 'default_value ' => false
612+ ]);
613+
614+ $ this ->registerOpportunityMetadata ('workplan_monitoringInformTransInclusion ' , [
615+ 'label ' => i::__ ('Informar estratégias executadas de inclusão Trans e Travestis ' ),
616+ 'type ' => 'boolean ' ,
617+ 'default_value ' => false
618+ ]);
619+
620+ $ this ->registerOpportunityMetadata ('workplan_monitoringInformAccessibilityPlan ' , [
621+ 'label ' => i::__ ('Informar plano de acessibilidade executado ' ),
622+ 'type ' => 'boolean ' ,
623+ 'default_value ' => false
624+ ]);
625+
626+ $ this ->registerOpportunityMetadata ('workplan_monitoringInformEnvironmentalPractices ' , [
627+ 'label ' => i::__ ('Informar práticas socioambientais executadas ' ),
628+ 'type ' => 'boolean ' ,
629+ 'default_value ' => false
630+ ]);
631+
632+ $ this ->registerOpportunityMetadata ('workplan_monitoringInformPressStrategy ' , [
633+ 'label ' => i::__ ('Informar estratégia executada de relacionamento com imprensa ' ),
634+ 'type ' => 'boolean ' ,
635+ 'default_value ' => false
636+ ]);
637+
638+ $ this ->registerOpportunityMetadata ('workplan_monitoringInformInnovation ' , [
639+ 'label ' => i::__ ('Informar ações executadas de experimentação/inovação ' ),
640+ 'type ' => 'boolean ' ,
641+ 'default_value ' => false
642+ ]);
643+
644+ $ this ->registerOpportunityMetadata ('workplan_monitoringInformDocumentationTypes ' , [
645+ 'label ' => i::__ ('Informar tipos de documentação produzida (executado) ' ),
646+ 'type ' => 'boolean ' ,
647+ 'default_value ' => false
648+ ]);
649+
650+ $ this ->registerOpportunityMetadata ('workplan_monitoringInformSegmentDelivery ' , [
651+ 'label ' => i::__ ('Informar segmento artístico-cultural executado da entrega ' ),
652+ 'type ' => 'boolean ' ,
653+ 'default_value ' => false
654+ ]);
655+
538656 // ============================================
539657 // METADADOS DE OBRIGATORIEDADE (REQUIRE)
540658 // ============================================
@@ -754,6 +872,54 @@ function register()
754872 'default_value ' => false
755873 ]);
756874
875+ $ this ->registerOpportunityMetadata ('workplan_monitoringRequireRevenueType ' , [
876+ 'label ' => i::__ ('Tipo de receita executada é obrigatório ' ),
877+ 'type ' => 'boolean ' ,
878+ 'default_value ' => false
879+ ]);
880+
881+ $ this ->registerOpportunityMetadata ('workplan_monitoringRequireCommunityCoauthorsDetail ' , [
882+ 'label ' => i::__ ('Detalhamento de coautoria/coexecução executada é obrigatório ' ),
883+ 'type ' => 'boolean ' ,
884+ 'default_value ' => false
885+ ]);
886+
887+ $ this ->registerOpportunityMetadata ('workplan_monitoringRequireTransInclusionActions ' , [
888+ 'label ' => i::__ ('Ações executadas de inclusão Trans e Travestis são obrigatórias ' ),
889+ 'type ' => 'boolean ' ,
890+ 'default_value ' => false
891+ ]);
892+
893+ $ this ->registerOpportunityMetadata ('workplan_monitoringRequireExpectedAccessibilityMeasures ' , [
894+ 'label ' => i::__ ('Medidas de acessibilidade executadas são obrigatórias ' ),
895+ 'type ' => 'boolean ' ,
896+ 'default_value ' => false
897+ ]);
898+
899+ $ this ->registerOpportunityMetadata ('workplan_monitoringRequireEnvironmentalPracticesDescription ' , [
900+ 'label ' => i::__ ('Práticas socioambientais executadas são obrigatórias ' ),
901+ 'type ' => 'boolean ' ,
902+ 'default_value ' => false
903+ ]);
904+
905+ $ this ->registerOpportunityMetadata ('workplan_monitoringRequireInnovationTypes ' , [
906+ 'label ' => i::__ ('Tipos de experimentação/inovação executados são obrigatórios ' ),
907+ 'type ' => 'boolean ' ,
908+ 'default_value ' => false
909+ ]);
910+
911+ $ this ->registerOpportunityMetadata ('workplan_monitoringRequireDocumentationTypes ' , [
912+ 'label ' => i::__ ('Tipos de documentação produzida são obrigatórios ' ),
913+ 'type ' => 'boolean ' ,
914+ 'default_value ' => false
915+ ]);
916+
917+ $ this ->registerOpportunityMetadata ('workplan_monitoringRequireSegmentDelivery ' , [
918+ 'label ' => i::__ ('Segmento artístico-cultural executado é obrigatório ' ),
919+ 'type ' => 'boolean ' ,
920+ 'default_value ' => false
921+ ]);
922+
757923 $ this ->registerOpportunityMetadata ('workplan_monitoringInformArtChainLink ' , [
758924 'label ' => i::__ ('Informar principal elo das artes acionado (executado) ' ),
759925 'type ' => 'boolean ' ,
@@ -1601,6 +1767,20 @@ public static function getFieldLabel(string $field): string {
16011767 'participantProfile ' => 'Perfil do público ' ,
16021768 'priorityAudience ' => 'Territórios prioritários ' ,
16031769 'executedRevenue ' => 'Receita executada ' ,
1770+ 'executedRevenueType ' => 'Tipo de receita executada ' ,
1771+ 'executedSegmentDelivery ' => 'Segmento artístico-cultural executado ' ,
1772+ 'executedHasCommunityCoauthors ' => 'Envolvimento executado de comunidades ' ,
1773+ 'executedCommunityCoauthorsDetail ' => 'Detalhamento executado de coautoria ' ,
1774+ 'executedHasTransInclusionStrategy ' => 'Estratégia executada de inclusão Trans/Travestis ' ,
1775+ 'executedTransInclusionActions ' => 'Ações executadas de inclusão Trans/Travestis ' ,
1776+ 'executedHasAccessibilityPlan ' => 'Plano de acessibilidade executado ' ,
1777+ 'executedExpectedAccessibilityMeasures ' => 'Medidas de acessibilidade executadas ' ,
1778+ 'executedHasEnvironmentalPractices ' => 'Práticas socioambientais executadas ' ,
1779+ 'executedEnvironmentalPracticesDescription ' => 'Descrição de práticas socioambientais executadas ' ,
1780+ 'executedHasPressStrategy ' => 'Estratégia executada de relacionamento com imprensa ' ,
1781+ 'executedHasInnovationAction ' => 'Ação executada de experimentação/inovação ' ,
1782+ 'executedInnovationTypes ' => 'Tipos de experimentação/inovação executados ' ,
1783+ 'executedDocumentationTypes ' => 'Tipos de documentação produzida ' ,
16041784 ];
16051785
16061786 return $ labels [$ field ] ?? $ field ;
0 commit comments