@@ -560,13 +560,33 @@ const CippStandardAccordion = ({
560560 selectedActions = [ selectedActions ] ;
561561 }
562562
563+ // Get template name for Intune Templates
564+ let templateDisplayName = "" ;
565+ if ( standardName . startsWith ( "standards.IntuneTemplate" ) ) {
566+ // Check for TemplateList selection
567+ const templateList = _ . get ( watchedValues , `${ standardName } .TemplateList` ) ;
568+ if ( templateList && templateList . label ) {
569+ templateDisplayName = templateList . label ;
570+ }
571+
572+ // Check for TemplateList-Tags selection (takes priority)
573+ const templateListTags = _ . get ( watchedValues , `${ standardName } .TemplateList-Tags` ) ;
574+ if ( templateListTags && templateListTags . label ) {
575+ templateDisplayName = templateListTags . label ;
576+ }
577+ }
578+
579+ // For multiple standards, check the first added component
563580 const selectedTemplateName = standard . multiple
564581 ? _ . get ( watchedValues , `${ standardName } .${ standard . addedComponent ?. [ 0 ] ?. name } ` )
565582 : "" ;
566- const accordionTitle =
567- selectedTemplateName && _ . get ( selectedTemplateName , "label" )
568- ? `${ standard . label } - ${ _ . get ( selectedTemplateName , "label" ) } `
569- : standard . label ;
583+
584+ // Build accordion title with template name if available
585+ const accordionTitle = templateDisplayName
586+ ? `${ standard . label } - ${ templateDisplayName } `
587+ : selectedTemplateName && _ . get ( selectedTemplateName , "label" )
588+ ? `${ standard . label } - ${ _ . get ( selectedTemplateName , "label" ) } `
589+ : standard . label ;
570590
571591 // Get current values and check if they differ from saved values
572592 const current = _ . get ( watchedValues , standardName ) ;
@@ -809,6 +829,17 @@ const CippStandardAccordion = ({
809829 { /* Additional components take full width */ }
810830 { hasAddedComponents && (
811831 < >
832+ { /* Add catalog button for Intune Template standard - appears first */ }
833+ { standardName . startsWith ( "standards.IntuneTemplate" ) && (
834+ < Grid size = { 12 } >
835+ < Box sx = { { mb : 2 } } >
836+ < CippPolicyImportDrawer
837+ buttonText = "Browse Intune Template Catalog"
838+ mode = "Intune"
839+ />
840+ </ Box >
841+ </ Grid >
842+ ) }
812843 { standard . addedComponent ?. map ( ( component , idx ) =>
813844 component ?. condition ? (
814845 < CippFormCondition
0 commit comments