All files / src/app/components/phase phase.component.html

100% Statements 76/76
100% Branches 8/8
100% Functions 3/3
100% Lines 42/42

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74              2006x 9x 9x   9x 9x 2006x 4x   2006x 5x       9x 2006x   9x 9x 9x   9x   9x 9x 9x     9x   9x 9x 9x 1003x   9x   9x 9x 9x 1003x   9x 9x 2006x 8x 578x   9x 425x 5x 850x 5x               9x   2006x 5x 387x    
<section class="container">
  <div class="columns is-multiline">
    <div class="column is-8 is-offset-2 profile">
      <div class="columns">
        <div class="column right has-text-centered">
          <div class="columns">
            <span>
              <button [routerLink]="['/campaigns/' + this.campaignId ]" class="button is-rounded">
                <i class="pi pi-chevron-left"></i>
                <span>Go back to campaign</span>
              </button>
            </span>
            <span>
              @if (this.phaseId === null) {
                <h1 class="title is-4">Add New Phase</h1>
              }
              @if (this.phaseId !== null) {
                <h1 class="title is-4">Edit Phase</h1>
              }
            </span>
 
          </div>
          <form [formGroup]="phaseForm">
            <div class="field">
              <label class="label" htmlFor="phaseName">Name</label>
              <div class="control has-icons-right">
                <input class="input" formControlName="phaseName" type="text" id="phaseName">
              </div>
            </div>
            <div class="field">
              <label class="label" htmlFor="phaseDescription">Description</label>
              <div class="control has-icons-right">
                <textarea class="input" formControlName="phaseDescription"
                id="phaseDescription"></textarea>
              </div>
            </div>
            <div class="field">
              <label class="label" htmlFor="phaseDateStart">Starting at</label>
              <div class="control has-icons-right">
                <p-datepicker id="phaseDateStart" formControlName="phaseDateStart" dateFormat="dd/mm/yy"
                  [minDate]="dataDateMin" [showButtonBar]="true" [showTime]="true" [showSeconds]="true" />
              </div>
            </div>
            <div class="field">
              <label class="label" htmlFor="phaseDateEnd">Ending at</label>
              <div class="control has-icons-right">
                <p-datepicker id="phaseDateEnd" formControlName="phaseDateEnd" dateFormat="dd/mm/yy"
                  [minDate]="dataDateMin" [showButtonBar]="true" [showTime]="true" [showSeconds]="true" />
              </div>
            </div>
            <div class="buttons is-flex is-justify-content-center">
              @if (this.phaseId === null) {
                <button (click)="addPhase()" class="button"
                [disabled]="phaseForm.invalid" id="addPhase">Add new Phase</button>
              }
              @else {
                <button (click)="editPhase()" class="button" [disabled]="phaseForm.invalid"
                id="editPhase">Save Phase</button>
                <button (click)="deletePhase()" class="button is-danger" [disabled]="phaseForm.invalid"
                id="deletePhase">Delete Phase</button>
              }
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</section>
 
@if (phaseMiddle !== undefined) {
  <app-signals-graphs [inputZoomTime]="phaseMiddle" [inputWindowLength]="phaseDuration"
  [inputIsLive]="false" [showLegend]="true" [showSignals]="true" [displayCommandCenter]="false"></app-signals-graphs>
}