|
|
@@ -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;
|