瀏覽代碼

Merge branch 'v8-6345-structure-sans-produit-sur-agenda' into develop

maha bouchiba 1 年之前
父節點
當前提交
e333780bc3
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      sql/schema-extensions/002-view_federation_structures.sql

+ 3 - 2
sql/schema-extensions/002-view_federation_structures.sql

@@ -1,5 +1,4 @@
-CREATE OR REPLACE VIEW view_federation_structures
-AS
+CREATE OR REPLACE VIEW view_federation_structures AS
     SELECT o.id, o.name, o.logo_id as logoId, o.description, o.image_id as imageId, o.principalType as type,
            o.portailVisibility,
            IF(p.website is not null AND p.website != '', p.website, CONCAT('https://', p.subDomain, '.opentalent.fr')) AS website,
@@ -34,4 +33,6 @@ AS
              LEFT JOIN (SELECT DISTINCT organization_id, parent_id FROM NetworkOrganization WHERE parent_id NOT IN (32366, 13) AND (endDate IS NULL OR endDate = '0000-00-00')) n3 on n3.organization_id = n2.parent_id
              LEFT JOIN (SELECT DISTINCT organization_id, parent_id FROM NetworkOrganization WHERE parent_id NOT IN (32366, 13) AND (endDate IS NULL OR endDate = '0000-00-00')) n4 on n4.organization_id = n3.parent_id
              LEFT JOIN (SELECT DISTINCT organization_id, parent_id FROM NetworkOrganization WHERE parent_id NOT IN (32366, 13) AND (endDate IS NULL OR endDate = '0000-00-00')) n5 on n5.organization_id = n4.parent_id
+             INNER JOIN opentalent.Settings s ON s.organization_id = o.id
+    WHERE s.product IS NOT NULL AND s.product != ''
     GROUP BY o.id;