{"action":"created","comment":{"url":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/comments/165363396","pull_request_review_id":93284237,"id":165363396,"diff_hunk":"@@ -0,0 +1,144 @@\n+<template>\n+  <div class=\"container company-container__under\">\n+    <div class=\"panel\">\n+      <ul class=\"company__info-list\">\n+        <div v-if=\"isSiegeSocial\" class=\"company__item\">\n+          <div class=\"company__item-key\">Cet établissement est le siège social</div>\n+        </div>\n+        <div v-if=\"!isSiegeSocial\" class=\"company__item\"><div class=\"company__item-key\">Siège social :\n+          <router-link tag=\"div\" class=\"company__item-link\" :to=\"{ name: 'Etablissement', params: {siret: resultSiegeSocial.siret}}\">\n+            {{ resultSiegeSocial.nom_raison_sociale }}\n+          </router-link>\n+        </div></div>\n+        <div v-if=\"haveChildrenEtablissements\" class=\"company__item table\">\n+            <div class=\"company__item-key\">Etablissements enfants : {{ totalResultsOtherSirens }} résultats ({{ maxChildrenEtablissementsToShow }} affichés)</div>\n+            <div class=\"company__item-link\" v-if=\"!visibleChildren\" @click=\"showAllChildren\">Afficher la totalité</div>\n+            <div class=\"company__item-link\" v-if=\"visibleChildren\" @click=\"hideAllChildren\">Réduire</div>\n+          <ul>\n+            <router-link tag=\"li\"\n+                         class=\"company__item-link\"\n+                         :to=\"{ name: 'Etablissement', params: {siret: siret}}\"\n+                          v-for=\"siret in resultOtherSirens\"\n+                          :key=\"siret\">\n+              {{ siret }}\n+            </router-link>\n+          </ul>\n+        </div>\n+      </ul>\n+    </div>\n+  </div>\n+</template>\n+\n+<script>\n+import Constants from '@/constants.js'\n+\n+export default {\n+  name: 'EtablissementPanelChildren',\n+  data () {\n+    return {\n+      maxChildrenEtablissementsToShow: Constants.ETABLISSEMENT_SHOW_MAX_CHILDREN_SIRETS,\n+      visibleChildren: false\n+    }\n+  },\n+  computed: {\n+    result () {\n+      return this.$store.getters.singlePageResultEtablissement\n+    },\n+    resultSiegeSocial () {\n+      return this.$store.getters.storedSirenSiege\n+    },\n+    resultOtherSirens () {\n+      const maxResults = this.maxChildrenEtablissementsToShow\n+      return this.$store.getters.storedSirenChildren.slice(0, this.maxChildrenEtablissementsToShow)\n+    },\n+    haveChildrenEtablissements () {\n+      return this.totalResultsOtherSirens >= 1\n+    },\n+    totalResultsOtherSirens () {\n+      // Total result minus Siege Social\n+      return this.$store.getters.storedSirenTotalResults - 1\n+    },\n+    isSiegeSocial () {\n+      if (!this.result || !this.$store.getters.storedSirenSiege) {\n+        return\n+      }\n+      const siretCurrent = this.result.siret\n+      const siretSiegeSocial = this.$store.getters.storedSirenSiege.siret\n+      if (siretCurrent === siretSiegeSocial) {\n+        return true\n+      }\n+      return false\n+    }\n+  },\n+  methods: {\n+    showAllChildren () {\n+      this.maxChildrenEtablissementsToShow = this.totalResultsOtherSirens\n+      this.visibleChildren = true\n+    },\n+    hideAllChildren () {\n+      this.maxChildrenEtablissementsToShow = Constants.ETABLISSEMENT_SHOW_MAX_CHILDREN_SIRETS\n+      this.visibleChildren = false\n+    }\n+  }\n+}\n+</script>\n+\n+<style lang=\"scss\" scoped>\n+\n+  .panel {\n+    margin: 0 1em;\n+    width: 100%;\n+  }\n+\n+  .company__item {\n+    margin-bottom: 1em;\n+  }\n+\n+  .company__item-key {\n+    display: block;\n+    color: #8393a7;\n+    margin-right: 1em;\n+  }\n+\n+  .company__item-link {\n+    cursor: pointer;\n+    color: $color-blue;\n+  }\n+\n+  .table {","path":"src/components/etablissement/EtablissementPanelChildren.vue","position":108,"original_position":108,"commit_id":"9654ec31a57b75e0d1da46e7972abb04bd473491","original_commit_id":"9654ec31a57b75e0d1da46e7972abb04bd473491","user":{"login":"thimy","id":1301085,"avatar_url":"https://avatars3.githubusercontent.com/u/1301085?v=4","gravatar_id":"","url":"https://api.github.com/users/thimy","html_url":"https://github.com/thimy","followers_url":"https://api.github.com/users/thimy/followers","following_url":"https://api.github.com/users/thimy/following{/other_user}","gists_url":"https://api.github.com/users/thimy/gists{/gist_id}","starred_url":"https://api.github.com/users/thimy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thimy/subscriptions","organizations_url":"https://api.github.com/users/thimy/orgs","repos_url":"https://api.github.com/users/thimy/repos","events_url":"https://api.github.com/users/thimy/events{/privacy}","received_events_url":"https://api.github.com/users/thimy/received_events","type":"User","site_admin":false},"body":"Try using `flexbox css properties` instead of `display: table`","created_at":"2018-02-01T14:03:07Z","updated_at":"2018-02-01T14:06:17Z","html_url":"https://github.com/betagouv/sirene_as_api_front/pull/81#discussion_r165363396","pull_request_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/81","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/comments/165363396"},"html":{"href":"https://github.com/betagouv/sirene_as_api_front/pull/81#discussion_r165363396"},"pull_request":{"href":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/81"}}},"pull_request":{"url":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/81","id":166183687,"html_url":"https://github.com/betagouv/sirene_as_api_front/pull/81","diff_url":"https://github.com/betagouv/sirene_as_api_front/pull/81.diff","patch_url":"https://github.com/betagouv/sirene_as_api_front/pull/81.patch","issue_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/issues/81","number":81,"state":"open","locked":false,"title":"Added children on page Etablissement","user":{"login":"Samuelfaure","id":14159757,"avatar_url":"https://avatars2.githubusercontent.com/u/14159757?v=4","gravatar_id":"","url":"https://api.github.com/users/Samuelfaure","html_url":"https://github.com/Samuelfaure","followers_url":"https://api.github.com/users/Samuelfaure/followers","following_url":"https://api.github.com/users/Samuelfaure/following{/other_user}","gists_url":"https://api.github.com/users/Samuelfaure/gists{/gist_id}","starred_url":"https://api.github.com/users/Samuelfaure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samuelfaure/subscriptions","organizations_url":"https://api.github.com/users/Samuelfaure/orgs","repos_url":"https://api.github.com/users/Samuelfaure/repos","events_url":"https://api.github.com/users/Samuelfaure/events{/privacy}","received_events_url":"https://api.github.com/users/Samuelfaure/received_events","type":"User","site_admin":false},"body":"fix #30 \r\nChildren etablissements (with links) are on page Etablissement,d\r\nfile Etablissement.vue factorized with 2 extra components\r\n\r\n![children](https://user-images.githubusercontent.com/14159757/35609981-f1a59e7a-065f-11e8-8ca7-a1acae2f1ce4.gif)\r\n","created_at":"2018-01-31T07:24:23Z","updated_at":"2018-02-01T14:06:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03f6edc2aa7c686a86350dba4d4835d4cec9d61a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/81/commits","review_comments_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/81/comments","review_comment_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/comments{/number}","comments_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/issues/81/comments","statuses_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/statuses/9654ec31a57b75e0d1da46e7972abb04bd473491","head":{"label":"Samuelfaure:add_children","ref":"add_children","sha":"9654ec31a57b75e0d1da46e7972abb04bd473491","user":{"login":"Samuelfaure","id":14159757,"avatar_url":"https://avatars2.githubusercontent.com/u/14159757?v=4","gravatar_id":"","url":"https://api.github.com/users/Samuelfaure","html_url":"https://github.com/Samuelfaure","followers_url":"https://api.github.com/users/Samuelfaure/followers","following_url":"https://api.github.com/users/Samuelfaure/following{/other_user}","gists_url":"https://api.github.com/users/Samuelfaure/gists{/gist_id}","starred_url":"https://api.github.com/users/Samuelfaure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samuelfaure/subscriptions","organizations_url":"https://api.github.com/users/Samuelfaure/orgs","repos_url":"https://api.github.com/users/Samuelfaure/repos","events_url":"https://api.github.com/users/Samuelfaure/events{/privacy}","received_events_url":"https://api.github.com/users/Samuelfaure/received_events","type":"User","site_admin":false},"repo":{"id":98280674,"name":"sirene_as_api_front","full_name":"Samuelfaure/sirene_as_api_front","owner":{"login":"Samuelfaure","id":14159757,"avatar_url":"https://avatars2.githubusercontent.com/u/14159757?v=4","gravatar_id":"","url":"https://api.github.com/users/Samuelfaure","html_url":"https://github.com/Samuelfaure","followers_url":"https://api.github.com/users/Samuelfaure/followers","following_url":"https://api.github.com/users/Samuelfaure/following{/other_user}","gists_url":"https://api.github.com/users/Samuelfaure/gists{/gist_id}","starred_url":"https://api.github.com/users/Samuelfaure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samuelfaure/subscriptions","organizations_url":"https://api.github.com/users/Samuelfaure/orgs","repos_url":"https://api.github.com/users/Samuelfaure/repos","events_url":"https://api.github.com/users/Samuelfaure/events{/privacy}","received_events_url":"https://api.github.com/users/Samuelfaure/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Samuelfaure/sirene_as_api_front","description":"Front-end pour l'API sirene","fork":true,"url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front","forks_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/forks","keys_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/teams","hooks_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/hooks","issue_events_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/issues/events{/number}","events_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/events","assignees_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/assignees{/user}","branches_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/branches{/branch}","tags_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/tags","blobs_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/git/refs{/sha}","trees_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/statuses/{sha}","languages_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/languages","stargazers_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/stargazers","contributors_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/contributors","subscribers_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/subscribers","subscription_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/subscription","commits_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/commits{/sha}","git_commits_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/git/commits{/sha}","comments_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/comments{/number}","issue_comment_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/issues/comments{/number}","contents_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/contents/{+path}","compare_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/merges","archive_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/downloads","issues_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/issues{/number}","pulls_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/pulls{/number}","milestones_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/milestones{/number}","notifications_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/labels{/name}","releases_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/releases{/id}","deployments_url":"https://api.github.com/repos/Samuelfaure/sirene_as_api_front/deployments","created_at":"2017-07-25T08:01:23Z","updated_at":"2017-07-25T08:01:24Z","pushed_at":"2018-01-31T07:36:16Z","git_url":"git://github.com/Samuelfaure/sirene_as_api_front.git","ssh_url":"git@github.com:Samuelfaure/sirene_as_api_front.git","clone_url":"https://github.com/Samuelfaure/sirene_as_api_front.git","svn_url":"https://github.com/Samuelfaure/sirene_as_api_front","homepage":null,"size":3696,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"betagouv:master","ref":"master","sha":"fd844c88a909f1fe36ac9fd297239d451e3c6c4f","user":{"login":"betagouv","id":7874148,"avatar_url":"https://avatars0.githubusercontent.com/u/7874148?v=4","gravatar_id":"","url":"https://api.github.com/users/betagouv","html_url":"https://github.com/betagouv","followers_url":"https://api.github.com/users/betagouv/followers","following_url":"https://api.github.com/users/betagouv/following{/other_user}","gists_url":"https://api.github.com/users/betagouv/gists{/gist_id}","starred_url":"https://api.github.com/users/betagouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betagouv/subscriptions","organizations_url":"https://api.github.com/users/betagouv/orgs","repos_url":"https://api.github.com/users/betagouv/repos","events_url":"https://api.github.com/users/betagouv/events{/privacy}","received_events_url":"https://api.github.com/users/betagouv/received_events","type":"Organization","site_admin":false},"repo":{"id":94540491,"name":"sirene_as_api_front","full_name":"betagouv/sirene_as_api_front","owner":{"login":"betagouv","id":7874148,"avatar_url":"https://avatars0.githubusercontent.com/u/7874148?v=4","gravatar_id":"","url":"https://api.github.com/users/betagouv","html_url":"https://github.com/betagouv","followers_url":"https://api.github.com/users/betagouv/followers","following_url":"https://api.github.com/users/betagouv/following{/other_user}","gists_url":"https://api.github.com/users/betagouv/gists{/gist_id}","starred_url":"https://api.github.com/users/betagouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betagouv/subscriptions","organizations_url":"https://api.github.com/users/betagouv/orgs","repos_url":"https://api.github.com/users/betagouv/repos","events_url":"https://api.github.com/users/betagouv/events{/privacy}","received_events_url":"https://api.github.com/users/betagouv/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/betagouv/sirene_as_api_front","description":"Front-end pour l'API sirene","fork":false,"url":"https://api.github.com/repos/betagouv/sirene_as_api_front","forks_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/forks","keys_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/keys{/key_id}","collaborators_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/teams","hooks_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/hooks","issue_events_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/issues/events{/number}","events_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/events","assignees_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/assignees{/user}","branches_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/branches{/branch}","tags_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/tags","blobs_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/git/refs{/sha}","trees_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/git/trees{/sha}","statuses_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/statuses/{sha}","languages_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/languages","stargazers_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/stargazers","contributors_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/contributors","subscribers_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/subscribers","subscription_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/subscription","commits_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/commits{/sha}","git_commits_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/git/commits{/sha}","comments_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/comments{/number}","issue_comment_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/issues/comments{/number}","contents_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/contents/{+path}","compare_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/compare/{base}...{head}","merges_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/merges","archive_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/downloads","issues_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/issues{/number}","pulls_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls{/number}","milestones_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/milestones{/number}","notifications_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/labels{/name}","releases_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/releases{/id}","deployments_url":"https://api.github.com/repos/betagouv/sirene_as_api_front/deployments","created_at":"2017-06-16T12:10:17Z","updated_at":"2017-06-16T13:01:22Z","pushed_at":"2018-01-31T07:36:17Z","git_url":"git://github.com/betagouv/sirene_as_api_front.git","ssh_url":"git@github.com:betagouv/sirene_as_api_front.git","clone_url":"https://github.com/betagouv/sirene_as_api_front.git","svn_url":"https://github.com/betagouv/sirene_as_api_front","homepage":null,"size":3687,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":22,"license":null,"forks":3,"open_issues":22,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/81"},"html":{"href":"https://github.com/betagouv/sirene_as_api_front/pull/81"},"issue":{"href":"https://api.github.com/repos/betagouv/sirene_as_api_front/issues/81"},"comments":{"href":"https://api.github.com/repos/betagouv/sirene_as_api_front/issues/81/comments"},"review_comments":{"href":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/81/comments"},"review_comment":{"href":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/betagouv/sirene_as_api_front/pulls/81/commits"},"statuses":{"href":"https://api.github.com/repos/betagouv/sirene_as_api_front/statuses/9654ec31a57b75e0d1da46e7972abb04bd473491"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"thimy"}}