Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

10.3 KB
Raw Blame
@if (settings.length > 0) {
  <div
    class="op-scrollable-table"
    >
    <table class="op-table">
      <thead>
        <tr>
          <th class="op-table--cell op-table--cell_heading">
            {{ text.notify_me }}
          </th>
          @for (item of settings.controls; track item) {
            <th class="op-table--cell op-table--cell_heading">
              <a
                class="spot-link"
                [href]="projectLink(item.controls.project.value.href)"
              >{{ item.controls.project.value.title }}</a>
            </th>
          }
        </tr>
      </thead>
      <tbody>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">
            <h5>{{ text.notifyImmediately.title }}</h5>
            <p>{{ text.notifyImmediately.description }}</p>
          </th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell"></td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">
            {{ text.mentioned_header.title }}
          </th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell"><input type="checkbox" disabled checked /></td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">{{ text.watched_header }}</th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell"><input type="checkbox" disabled checked /></td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">
            {{ text.assignee }}
          </th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell" [formGroup]="item">
              <input
                type="checkbox"
                formControlName="assignee"
                data-qa-project-notification-type="assignee"
                [attr.data-qa-project]="item.controls.project.value.title"
                />
            </td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">
            {{ text.responsible }}
          </th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell" [formGroup]="item">
              <input
                type="checkbox"
                formControlName="responsible"
                data-qa-project-notification-type="responsible"
                [attr.data-qa-project]="item.controls.project.value.title"
                />
            </td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">
            {{ text.shared }}
          </th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell" [formGroup]="item">
              <input
                type="checkbox"
                formControlName="shared"
                data-qa-project-notification-type="shared"
                [attr.data-qa-project]="item.controls.project.value.title"
                />
            </td>
          }
        </tr>
        @if (eeAvailable) {
          <tr>
            <th class="op-table--cell op-table--cell_soft-heading">
              <h5>{{ text.dateAlerts.title }}</h5>
              <p>{{ text.dateAlerts.description }}</p>
            </th>
            @for (item of settings.controls; track item) {
              <td class="op-table--cell"></td>
            }
          </tr>
        }
        @if (eeAvailable) {
          <tr>
            <th class="op-table--cell op-table--cell_soft-heading">
              {{ text.startDate }}
            </th>
            @for (item of settings.controls; track item) {
              <td class="op-table--cell--date-alerts" [formGroup]="item">
                <select
                  formControlName="startDate"
                  class="op-reminder-settings-table-date-alerts--time form--select"
                  data-qa-project-notification-type="op-reminder-settings-start-date-alerts"
                  [attr.data-qa-project]="item.controls.project.value.title"
                  required="true"
                  >
                  @for (availableTime of availableTimes; track availableTime) {
                    <option
                      [ngValue]="availableTime.value"
                      >
                      {{availableTime.title}}
                    </option>
                  }
                </select>
              </td>
            }
          </tr>
        }
        @if (eeAvailable) {
          <tr>
            <th class="op-table--cell op-table--cell_soft-heading">
              {{ text.dueDate }}
            </th>
            @for (item of settings.controls; track item) {
              <td class="op-table--cell--date-alerts" [formGroup]="item">
                <select
                  formControlName="dueDate"
                  class="op-reminder-settings-table-date-alerts--time form--select"
                  data-qa-project-notification-type="op-reminder-settings-due-date-alerts"
                  [attr.data-qa-project]="item.controls.project.value.title"
                  required="true"
                  >
                  @for (availableTime of availableTimes; track availableTime) {
                    <option
                      [ngValue]="availableTime.value"
                      >
                      {{availableTime.title}}
                    </option>
                  }
                </select>
              </td>
            }
          </tr>
        }
        @if (eeAvailable) {
          <tr>
            <th class="op-table--cell op-table--cell_soft-heading">
              {{ text.overdue }}
            </th>
            @for (item of settings.controls; track item) {
              <td class="op-table--cell--date-alerts" [formGroup]="item">
                <select
                  formControlName="overdue"
                  class="op-reminder-settings-table-date-alerts--time form--select"
                  data-qa-project-notification-type="op-reminder-settings-overdue-alerts"
                  [attr.data-qa-project]="item.controls.project.value.title"
                  required="true"
                  >
                  @for (availableTime of availableTimesOverdue; track availableTime) {
                    <option
                      [ngValue]="availableTime.value"
                      >
                      {{availableTime.title}}
                    </option>
                  }
                </select>
              </td>
            }
          </tr>
        }
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">
            <h5>{{ text.alsoNotifyFor.title }}</h5>
            <p>{{ text.alsoNotifyFor.description }}</p>
          </th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell"></td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_created_header }}</th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell" [formGroup]="item">
              <input
                type="checkbox"
                formControlName="workPackageCreated"
                data-qa-project-notification-type="work_package_created"
                [attr.data-qa-project]="item.controls.project.value.title"
                />
            </td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_processed_header }}</th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell" [formGroup]="item">
              <input
                type="checkbox"
                formControlName="workPackageProcessed"
                data-qa-project-notification-type="work_package_processed"
                [attr.data-qa-project]="item.controls.project.value.title"
                />
            </td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_scheduled_header }}</th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell" [formGroup]="item">
              <input
                type="checkbox"
                formControlName="workPackageScheduled"
                data-qa-project-notification-type="work_package_scheduled"
                [attr.data-qa-project]="item.controls.project.value.title"
                />
            </td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_prioritized_header }}</th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell" [formGroup]="item">
              <input
                type="checkbox"
                formControlName="workPackagePrioritized"
                data-qa-project-notification-type="work_package_prioritized"
                [attr.data-qa-project]="item.controls.project.value.title"
                />
            </td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_commented_header }}</th>
          @for (item of settings.controls; track item) {
            <td class="op-table--cell" [formGroup]="item">
              <input
                type="checkbox"
                formControlName="workPackageCommented"
                data-qa-project-notification-type="work_package_commented"
                [attr.data-qa-project]="item.controls.project.value.title"
                />
            </td>
          }
        </tr>
        <tr>
          <th class="op-table--cell op-table--cell_soft-heading"></th>
          @for (item of settings.controls; track item; let index = $index) {
            <td class="op-table--cell">
              <button
                type="button"
                class="spot-link"
                (click)="removeProjectSettings(index)"
                >
                {{ text.remove_project_settings }}
              </button>
            </td>
          }
        </tr>
      </tbody>
    </table>
  </div>
}

@if (userId) {
  <op-notification-setting-inline-create [userId]="userId"
    [settings]="settings"
    (selected)="addProjectSettings($event)"
    data-test-selector="notification-setting-inline-create"
   />
}