<div>
  <table>
    <tr>
      <td>
        <label ng-show="batimentInfosResult.numLocal">
          {{'Local '+ batimentInfosResult.numLocal }}
        </label>
        <label ng-show="batimentInfosResult.idParcelle">
          {{' de la parcelle '+ batimentInfosResult.idParcelle }}
        </label>
      </td>
      <td>
        <label class="majicCount">
          {{' '+ (iBati+1) + '/' + batimentInfosResults.length }}
        </label>
      </td>
      <td>
        <button id="btnPrec" ng-click="BatiPrec()">
          <span
            class="glyphicon glyphicon-arrow-left"
            aria-hidden="true"
          ></span>
        </button>
        <button id="btnPrec" ng-click="BatiSuiv()">
          <span
            class="glyphicon glyphicon-arrow-right"
            aria-hidden="true"
          ></span>
        </button>
      </td>
    </tr>
  </table>
</div>

<div
  bs-active-pane="tabsLocalConsult.activeTab"
  ng-model="tabsLocalConsult.activeTab"
  bs-tabs
>
  <div
    ng-repeat="tab in tabsLocalConsult"
    ng-if="tab.authorized"
    title="{{tab.title}}"
    bs-pane
  ></div>
</div>

<div
  class="majicBatiTab"
  ng-show="tabsLocalConsult.activeTab == 0 && isBatimentAutorized "
>
  <div id="addressBatiFrame">
    <div id="adressBati">
      <label class="majic2label2">Son adresse</label>
      <div class="input-group">
        <label class="majc2address">N° voirie</label>
        <label class="majc2address">Répétition</label>
        <label class="majc2address">Libellé voie</label>
      </div>
      <div class="input-group">
        <input
          type="text"
          value="{{batimentInfosResult.numRue}}"
          placeholder="N° voirie"
          title="N° voirie"
          class="majc2address"
          ng-readonly="true"
        />
        <input
          type="text"
          value="{{batimentInfosResult.btq}}"
          placeholder="Répétition"
          title="Répétition"
          class="majc2address"
          ng-readonly="true"
        />
        <input
          type="text"
          value="{{batimentInfosResult.nomRue}}"
          placeholder="Libellé voie"
          title="{{batimentInfosResult.nomRue}}"
          class="majc2addresslibvoie"
          ng-readonly="true"
        />
      </div>

      <div class="input-group">
        <label class="majc2code">Batiment</label>
        <label class="majc2code">Escalier</label>
        <label class="majc2code">Etage</label>
        <label class="majc2code">Porte</label>
      </div>
      <div class="input-group">
        <input
          type="text"
          value="{{batimentInfosResult.bat}}"
          placeholder="Batiment"
          title=""
          class="majc2code"
          ng-readonly="true"
        />
        <input
          type="text"
          value="{{batimentInfosResult.esc}}"
          placeholder="Escalier"
          title=""
          class="majc2code"
          ng-readonly="true"
        />
        <input
          type="text"
          value="{{batimentInfosResult.etage}}"
          placeholder="Etage"
          title=""
          class="majc2code"
          ng-readonly="true"
        />
        <input
          type="text"
          value="{{batimentInfosResult.porte}}"
          placeholder="Porte"
          title=""
          class="majc2code"
          ng-readonly="true"
        />
      </div>
    </div>
    <div id="codeBati">
      <label class="majic2label2">Codes</label>
      <div class="input-group">
        <label class="majc2proprietor">CDIF</label>
        <input
          type="text"
          value="{{batimentInfosResult.cdif}}"
          placeholder="CDIF"
          title=""
          class="majc2code"
          ng-readonly="true"
        />
      </div>
      <div class="input-group">
        <label class="majc2proprietor">MAJIC</label>
        <input
          value="{{batimentInfosResult.majic}}"
          type="text"
          placeholder="MAJIC"
          title=""
          class="majc2code"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="majc2proprietor">RIVOLI</label>
        <input
          value="{{batimentInfosResult.rivoli}}"
          type="text"
          placeholder="RIVOLI"
          title=""
          class="majc2code"
          ng-disabled="true"
        />
      </div>
    </div>
  </div>

  <div id="descBatiFrame">
    <div id="descBati">
      <label class="majic2label2">Sa description</label>
      <div class="input-group">
        <label class="descBatiField">Type</label>
        <input
          type="text"
          value="{{batimentInfosResult.type}}"
          placeholder="Type"
          title="{{batimentInfosResult.type}}"
          class="descBatiField"
          ng-readonly="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiField">Nature</label>
        <input
          value="{{batimentInfosResult.nature}}"
          type="text"
          placeholder="Nature"
          title="{{batimentInfosResult.nature}}"
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiField">Année de construction</label>
        <input
          value="{{batimentInfosResult.anConst}}"
          type="text"
          placeholder="Année de construction"
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiField">Nombre de niveaux</label>
        <input
          value="{{batimentInfosResult.niveau}}"
          type="text"
          placeholder="Nombre de niveaux"
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="majc2proprietor">Occupation</label>
        <textarea
          rows="3"
          placeholder="Occupation"
          class="descBatiField"
          title=""
          ng-readonly="true"
        >
                     {{batimentInfosResult.occup}}
                 </textarea
        >
      </div>
    </div>
    <div id="descBati2">
      <div class="input-group">
        <label class="majic2label2">Construction particulière</label>
      </div>
      <div class="input-group">
        <input
          value="{{batimentInfosResult.particul}}"
          type="text"
          placeholder=""
          title=""
          class="majc2street"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="majic2label2">Ordures ménagères</label>
      </div>
      <div class="input-group">
        <label class="descBatiField">Zone de ramassage</label>
        <input
          value="{{batimentInfosResult.ramass}}"
          type="text"
          placeholder=""
          title=""
          class="majc2code"
          ng-disabled="true"
        />
        &nbsp; <label class="descBatiField">Réduction (%)</label>
        <input
          value="{{batimentInfosResult.reduc}}"
          type="text"
          placeholder=""
          title=""
          class="majc2code"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="majic2label2">Appartenance du local</label>
      </div>
      <div class="input-group">
        <label class="descBatiField">HLM/SEM</label>
        <input
          value="{{batimentInfosResult.hlm}}"
          type="text"
          placeholder=""
          title=""
          class="majc2code"
          ng-disabled="true"
        />
        &nbsp;
        <input
          type="checkbox"
          ng-checked="batimentInfosResult.pdl"
          title=""
          disabled
          ng-readonly="true"
        />
        <span class="majicCheckbox">à une PDL</span>
      </div>
      <div class="input-group">
        <label class="descBatiField">Poste/FT</label>
        <input
          value="{{batimentInfosResult.poste}}"
          type="text"
          placeholder=""
          title=""
          class="majc2code"
          ng-disabled="true"
        />
        &nbsp; <label class="descBatiField">Série-rôle</label>
        <input
          value="{{batimentInfosResult.serieRole}}"
          type="text"
          placeholder=""
          title=""
          class="majc2code"
          ng-disabled="true"
        />
      </div>
    </div>
  </div>

  <div id="caracBatiFrame">
    <div id="caraBatiCompte">
      <div class="input-group">
        <label class="majic2label2">Ses caractéristiques Comptes</label>
      </div>
      <div class="input-group">
        <label class="descBatiField">Propriétaire</label>
        <input
          value="{{batimentInfosResult.prop}}"
          type="text"
          placeholder=""
          title="{{batimentInfosResult.prop}}"
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <input
          type="checkbox"
          ng-checked="batimentInfosResult.mutation"
          title=""
          disabled
          ng-readonly="true"
        />
        <span class="majicCheckbox">Mutation</span> &nbsp;
        <label class="descBatiSmallField">Date</label>
        <input
          value="{{batimentInfosResult.dateCompte}}"
          type="text"
          placeholder=""
          title=""
          class="majc2code"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiField">Fonctionnaire logé</label>
        <input
          value="{{batimentInfosResult.fonctLoge}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
    </div>
    <div id="caraBatiLocation">
      <div class="input-group">
        <label class="majic2label2">Location</label>
      </div>
      <div class="input-group">
        <label class="descBatiField">Valeur locative</label>
        <input
          value="{{batimentInfosResult.vl}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiField">Evaluation</label>
        <input
          value="{{batimentInfosResult.eval}}"
          type="text"
          placeholder=""
          title="{{batimentInfosResult.eval}}"
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiField">Code NAF</label>
        <input
          value="{{batimentInfosResult.naf}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
    </div>
    <div id="caraBatiLoyer">
      <div class="input-group">
        <label class="majic2label2">Loyer du 48</label>
      </div>
      <div class="input-group">
        <label class="descBatiField">Catégorie</label>
        <input
          value="{{batimentInfosResult.categ}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiField">Loyer</label>
        <input
          value="{{batimentInfosResult.loyer}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiField">Taxation</label>
        <input
          value="{{batimentInfosResult.taxe}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
    </div>
  </div>
</div>

<div
  class="majicBatiTab"
  ng-show="tabsLocalConsult.activeTab == 1 && isBatimentAutorized"
>
  <div>
    <button id="btnPrec" ng-click="depPrec()">
      <span class="glyphicon glyphicon-arrow-left"></span>
    </button>
    <button id="btnPrec" ng-click="depSuiv()">
      <span class="glyphicon glyphicon-arrow-right"></span>
    </button>
  </div>
  <div id="descDepFrame">
    <div id="descDep">
      <div class="input-group">
        <label class="majic2label2">Descriptif de dépendance</label>
      </div>
      <div class="input-group">
        <label class="descBatiSmallField">N° ordre</label>
        <input
          value="{{depInfosResult.ordre}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiMidField"
          ng-disabled="true"
        />
        &nbsp; <label class="descBatiField">Localisation</label>
        <input
          value="{{depInfosResult.local}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiSmallField">Nature</label>
        <input
          value="{{depInfosResult.nature}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiMidField"
          ng-disabled="true"
        />
        &nbsp; <label class="descBatiField">Surface réelle</label>
        <input
          value="{{depInfosResult.surface}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
        <label class="descBatiSmallField">m²</label>
      </div>
    </div>
  </div>
  <div id="caraDepFrame">
    <div id="caraDep">
      <div class="input-group">
        <label class="majic2label2">Caractéristiques générales</label>
      </div>
      <div class="input-group">
        <label class="descBatiMidField">Matériaux des gros murs</label>
        <input
          value="{{depInfosResult.matMur}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiMidField">Matériaux des toitures</label>
        <input
          value="{{depInfosResult.matToit}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiMidField">Etat d'entretien</label>
        <input
          value="{{depInfosResult.entretien}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
    </div>
    <div id="confDep">
      <div class="input-group">
        <label class="majic2label2">Elements de confort</label>
      </div>
      <div class="input-group">
        <input
          type="checkbox"
          ng-checked="depInfosResult.eau"
          title=""
          disabled
          ng-readonly="true"
        />
        <label class="descBatiField">Eau</label> &nbsp;
        <input
          type="checkbox"
          ng-checked="depInfosResult.elec"
          title=""
          disabled
          ng-readonly="true"
        />
        <label class="descBatiField">Electricité</label>
      </div>
      <div class="input-group">
        <input
          type="checkbox"
          ng-checked="depInfosResult.chauff"
          title=""
          disabled
          ng-readonly="true"
        />
        <label class="descBatiField">Chauffage central</label>
      </div>
    </div>
  </div>
  <div id="coefDepFrame">
    <div id="coefDep">
      <div class="input-group">
        <label class="majic2label2">Coefficients</label>
      </div>
      <div class="input-group">
        <label class="descBatiMidField">de pondération</label>
        <input
          value="{{depInfosResult.coeffPond}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiMidField">d'entretien</label>
        <input
          value="{{depInfosResult.coeffEnt}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiMidField">de situtation particulière</label>
        <input
          value="{{depInfosResult.coeffParti}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
    </div>
    <div id="coefDep2">
      <div class="input-group">
        <label class="majic2label2">Nombre d'éléments</label>
      </div>
      <div class="input-group">
        <label class="descBatiField">Baignoires</label>
        <input
          value="{{depInfosResult.baignoire}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiSmallField"
          ng-disabled="true"
        />
        &nbsp; <label class="descBatiField">Lavabos</label>
        <input
          value="{{depInfosResult.lavabo}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiSmallField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiField">Douches</label>
        <input
          value="{{depInfosResult.douche}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiSmallField"
          ng-disabled="true"
        />
        &nbsp; <label class="descBatiField">WC</label>
        <input
          value="{{depInfosResult.wc}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiSmallField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiMidField">Equivalence superficielle</label>
        <input
          value="{{depInfosResult.equivSup}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
    </div>
  </div>
  <div id="descProDepFrame">
    <label class="majic2label2">Descriptif professionnel</label>
    <div class="input-group">
      <label class="descBatiField">N° ordre</label>
      <input
        value="{{depInfosResult.ordreProf}}"
        type="text"
        placeholder=""
        title=""
        class="descBatiField"
        ng-disabled="true"
      />
      &nbsp; <label class="descBatiMidField">Surface réelle totale</label>
      <input
        value="{{depInfosResult.surfReel}}"
        type="text"
        placeholder=""
        title=""
        class="descBatiField"
        ng-disabled="true"
      />
      <label class="descBatiSmallField">m²</label>
    </div>
  </div>
</div>

<div
  class="majicBatiTab"
  ng-show="(tabsLocalConsult.activeTab == 2  || (tabsLocalConsult.activeTab == 0 && ! isBatimentAutorized  ) ) && isExonerationAutorized"
>
  <div>
    <label ng-show="localExoInfosResult.ordre"
      >{{'N° d\'ordre d\'exonération temporaire '+ localExoInfosResult.ordre
      }}</label
    ><label ng-show="localExoInfosResult.pev"
      >{{' de la PEV '+ localExoInfosResult.pev }}</label
    >
    <button id="btnPrec" ng-click="ExoLocPrec()">
      <span class="glyphicon glyphicon-arrow-left"></span>
    </button>
    <button id="btnPrec" ng-click="ExoLocSuiv()">
      <span class="glyphicon glyphicon-arrow-right"></span>
    </button>
  </div>
  <div id="sumExoFrame">
    <div id="sumExo">
      <div class="input-group">
        <label class="majic2label2">Sommes (en centimes)</label>
      </div>
      <div class="input-group">
        <label class="descBatiLongField"
          >Montant de VL exonérée (valeur année 70)</label
        >
        <input
          value="{{localExoInfosResult.ordre}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
        &nbsp; <label class="descBatiSmallField">Fraction</label>
        <input
          value="{{localExoInfosResult.local}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiLongField"
          >Montant de VL exonérée revalorisée</label
        >
        <input
          value="{{localExoInfosResult.nature}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
        &nbsp; <label class="descBatiSmallField">Fraction</label>
        <input
          value="{{localExoInfosResult.surface}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiField"
          ng-disabled="true"
        />
      </div>
      <div class="input-group">
        <label class="descBatiLongField"
          >Revenu cadastral exonéré en valeur de l'année</label
        >
        <input
          value="{{localExoInfosResult.nature}}"
          type="text"
          placeholder=""
          title=""
          class="descBatiLongField"
          ng-disabled="true"
        />
      </div>
    </div>
  </div>
  <div id="infoExoFrame">
    <div class="input-group">
      <label class="majic2label2">Informations supplémentaires</label>
    </div>
    <div class="input-group">
      <label class="descBatiLongField"
        >Collectivité accordant l'exonération</label
      >
      <input
        value="{{localExoInfosResult.ordre}}"
        type="text"
        placeholder=""
        title=""
        class="descBatiLongField"
        ng-disabled="true"
      />
    </div>
    <div class="input-group">
      <label class="descBatiLongField">Code d'exonération temporaire</label>
      <input
        value="{{localExoInfosResult.nature}}"
        type="text"
        placeholder=""
        title=""
        class="descBatiLongField"
        ng-disabled="true"
      />
    </div>
    <div class="input-group">
      <label class="descBatiLongField">Taux d'exonération accordé</label>
      <input
        value="{{localExoInfosResult.nature}}"
        type="text"
        placeholder=""
        title=""
        class="descBatiLongField"
        ng-disabled="true"
      />
    </div>
  </div>
  <div id="dateExoFrame">
    <div class="input-group">
      <label class="majic2label2">Dates</label>
    </div>
    <div class="input-group">
      <label class="descBatiLongField">Année de début d'exonération</label>
      <input
        value="{{localExoInfosResult.ordre}}"
        type="text"
        placeholder=""
        title=""
        class="descBatiField"
        ng-disabled="true"
      />
    </div>
    <div class="input-group">
      <label class="descBatiLongField">Année de retour à imposition</label>
      <input
        value="{{localExoInfosResult.nature}}"
        type="text"
        placeholder=""
        title=""
        class="descBatiField"
        ng-disabled="true"
      />
    </div>
  </div>
</div>

<div
  class="majicBatiTab"
  ng-show="((tabsLocalConsult.activeTab == 3 && isExonerationAutorized  && isBatimentAutorized ) ||  (tabsLocalConsult.activeTab == 2 && !isExonerationAutorized  && isBatimentAutorized )
	 || (tabsLocalConsult.activeTab == 1 && isExonerationAutorized  && !isBatimentAutorized ) || (tabsLocalConsult.activeTab == 0 && !isExonerationAutorized  && !isBatimentAutorized )
        ) && isProprietairesAutorized"
>
  <majic-propconsult></majic-propconsult>
</div>
