<ion-header>
<ion-toolbar color="primary">
  <ion-buttons slot="start">
    <ion-menu-button></ion-menu-button>
  </ion-buttons>
  <ion-title>Postulaciones</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<h2 text-capitalize style="padding-bottom: 0.5em">Por postularse</h2>
<ion-refresher slot="fixed" (ionRefresh)="refresh($event)">
  <ion-refresher-content></ion-refresher-content>
</ion-refresher>
<ng-container *ngFor="let postulation of postulations; let i = index">
  <ion-card *ngIf="!postulation.already_post">
    <ion-item>
      <ion-label>
        <h2 text-capitalize>{{ postulation.category }}</h2>
        <ion-text color="primary"><p text-wrap (click)="openMaps(postulation.lat, postulation.lng)"><b><u>{{postulation.address}}</u></b></p></ion-text>
        <p text-wrap>Referencias: {{postulation.references}}</p>
        <p text-wrap text-capitalize>{{postulations_dates[i]}}</p>
        <p text-wrap>Detalles: {{postulation.details}}</p>
        <p text-wrap>Tiempo restante: {{postulation.time_limit}} minutos</p>
      </ion-label>
      <ion-button style="height: 3em; padding-left: 0.5em;" color="secondary" (click)="addpostulation(postulation.id)">Postularse</ion-button>
    </ion-item>
  </ion-card>
</ng-container>
</ion-content>
