<div class="container">
  <div class="row">
    <div class="content-block">
      <h2 class="title">修改原因資料</h2>
      <form #editReasonData="ngForm">

        <div class="form-group">
          <label for="eventTypeId">事件類型ID</label>
          <span *ngIf="eventTypeId.invalid && (eventTypeId.dirty || eventTypeId.touched)">
            <span class="invalidMessage" *ngIf="eventTypeId?.errors.required">*請選擇事件類型ID</span>
          </span>
          <select class="form-control" id="eventTypeId" name="eventTypeId" [(ngModel)]="selectedItem.EventTypeId" #eventTypeId="ngModel" required>
            <option value="">請選擇事件類型ID</option>
            <option *ngFor="let eventTypeId of selectEventTypeId" [value]="eventTypeId.Id">{{eventTypeId.EventName}}</option>
          </select>
        </div>

        <!-- <div class="form-group">
          <label for="notPunishType">不開單類型</label>
          <span *ngIf="notPunishType.invalid && (notPunishType.dirty || notPunishType.touched)">
            <span class="invalidMessage" *ngIf="notPunishType?.errors.required">*此欄必填</span>
          </span>
          <input type="text" class="form-control" id="notPunishType" name="notPunishType" #notPunishType="ngModel" [(ngModel)]="selectedItem.NotPunishType"
            required placeholder="不開單類型">
        </div> -->

        <div class="form-group">
          <label for="notPunishReason">不開單原因</label>
          <span *ngIf="notPunishReason.invalid && (notPunishReason.dirty || notPunishReason.touched)">
            <span class="invalidMessage" *ngIf="notPunishReason?.errors.required">*此欄必填</span>
          </span>
          <input type="text" class="form-control" id="notPunishReason" name="notPunishReason" #notPunishReason="ngModel" [(ngModel)]="selectedItem.NotPunishReason"
            required placeholder="不開單原因">
        </div>
        <div class="btn-footer">
          <button type="submit" class="btn btn-danger" (click)="backPreviousPage()">
            <i class="fa fa-chevron-left" aria-hidden="true"></i> 回上一頁
          </button>
          <button type="button" class="btn btn-success" [disabled]="!editReasonData.form.valid" (click)="doEditReason()">
            送出
            <i class="fa fa-chevron-right" aria-hidden="true"></i>
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
