소스 검색

Taking into account when an address is fiber eligible

boutils 10 년 전
부모
커밋
1398d4564f
2개의 변경된 파일27개의 추가작업 그리고 3개의 파일을 삭제
  1. 18 2
      index.html
  2. 9 1
      js/app.js

+ 18 - 2
index.html

@@ -248,7 +248,7 @@
 
             <div
               class = "box-eligibilite-title"
-              ng-if = "results.ftth !== undefined">
+              ng-if = "results.ftth !== undefined && results.ftth.date !== true">
 
               éligibilité au pré-raccordement
 
@@ -293,11 +293,27 @@
                 ng-if = "results.ftth !== undefined">
 
                 <div
-                  ng-if        = "results.ftth"
+                  ng-if        = "results.ftth && results.ftth.date !== true"
                   style        = "margin-top: 30px;"
                   ng-bind-html = "formatDateFTTH(results.ftth.date)">
                 </div>
 
+                <div
+                  ng-if        = "results.ftth.date === true"
+                  style        = "text-align: center; font-weight: bold;">
+
+                  <i
+                    class = "fa fa-check-circle"
+                    style = "font-size: 45px; color: #1fa67a">
+                  </i>
+
+                  <br>
+
+                  Vous êtes éligible à la fibre optique, vous pouvez consulter
+                  <a href="http://www.ariase.com/fr/eligibilite/test.html" target="_blank">Ariase</a>
+                  pour souscrire un contrat auprès d'un opérateur.
+                </div>
+
                 <div ng-if = "!results.ftth.date">
 
                   Déploiement prévu ultérieurement.

+ 9 - 1
js/app.js

@@ -472,8 +472,14 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
   var computeDateFTTH = function() {
     if(!$scope.results.ftth) {return;}
 
+    // Already deployed
+    if($scope.results.ftth.PHASE_TRAV === 'Perimetre deploye FTTH MT') {
+      $scope.results.ftth.date = true;
+      return;
+    }
+
     // A date already exists
-    if($scope.results.ftth.DATE_OUV_SERVICE_REEL || $scope.results.ftth.DATE_OUV_SERVICE_PREV) {
+    else if($scope.results.ftth.DATE_OUV_SERVICE_REEL || $scope.results.ftth.DATE_OUV_SERVICE_PREV) {
       $scope.results.ftth.date = $scope.results.ftth.DATE_OUV_SERVICE_REEL || $scope.results.ftth.DATE_OUV_SERVICE_PREV;
       return;
     }
@@ -597,6 +603,8 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
         $scope.results.mimo    = parseResults($scope.results.mimo);
 
         computeDateFTTH();
+
+        console.log('results', $scope.results);
       }
       catch(e) {