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

100% Statements 75/75
100% Branches 2/2
100% Functions 3/3
100% Lines 38/38

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              1956x 9x 9x   9x 9x 1956x 1956x     9x 1956x   9x 9x 9x   9x   9x 9x 9x     9x   9x 9x 9x 978x   9x   9x 9x 9x 978x   9x 9x 1956x 610x 1956x 368x 5x 736x 5x               9x   1956x 332x  
<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>
                            <h1 *ngIf="this.phaseId === null" class="title is-4">Add New Phase</h1>
                            <h1 *ngIf="this.phaseId !== null" 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">
                            <button *ngIf="this.phaseId === null" (click)="addPhase()" class="button"
                                [disabled]="phaseForm.invalid" id="addPhase">Add new Phase</button>
                            @if (this.phaseId !== null) {
                            <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>
 
<app-signals-graphs *ngIf="phaseMiddle !== undefined" [inputZoomTime]="phaseMiddle" [inputWindowLength]="phaseDuration"
    [inputIsLive]="false" [showLegend]="true" [showSignals]="true" [displayCommandCenter]="false"></app-signals-graphs>