company-model.component.html 3.86 KB
Newer Older
1
2
<div class="nav-scroller bg-white shadow-sm">
  <nav class="nav nav-underline">
3
4
5
6
7
8
    <a class="nav-link" [routerLink]="['/', 'companyModels']">
      Composed Models
    </a>
    <a *ngIf="companyModel" class="nav-link active" [routerLink]="[]">
      {{ companyModel.name }}
    </a>
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
9
10
11
    <a
      *ngIf="companyModel"
      class="nav-link"
12
      [routerLink]="['/', 'companyModels', companyModel._id, 'edit']"
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
13
    >
14
15
      Edit
    </a>
16
17
18
19
20
21
22
  </nav>
</div>

<main *ngIf="companyModel" role="main" class="container">
  <app-model-info-box [featureModel]="companyModel"></app-model-info-box>

  <div class="my-3 p-3 bg-white rounded shadow-sm">
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
23
    <h6 class="border-bottom border-gray pb-2 mb-0">
24
      Composed Model {{ companyModel.name }}
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
25
    </h6>
26
27
28
29
    <app-feature-model [featureModel]="companyModel"></app-feature-model>
  </div>

  <div class="my-3 p-3 bg-white rounded shadow-sm">
30
    <h6 class="border-bottom border-gray pb-2 mb-0">Edit Composed Model</h6>
31
    <div class="text-muted pt-3">
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
32
33
34
35
      <app-feature-model-form
        [featureModel]="companyModel"
        (submitFeatureModelForm)="update($event.value)"
      ></app-feature-model-form>
36
37
38
39
40
41
42
43
    </div>
  </div>

  <div class="my-3 p-3 bg-white rounded shadow-sm">
    <h6 class="border-bottom border-gray pb-2 mb-0">Edit Author Information</h6>
    <div class="text-muted pt-3">
      <app-author-form
        [author]="companyModel.author"
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
44
45
        (submitAuthorForm)="updateAuthor($event.value)"
      ></app-author-form>
46
47
48
49
50
    </div>
  </div>

  <!-- List expert models -->
  <div class="my-3 p-3 bg-white rounded shadow-sm">
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
51
    <h6 class="border-bottom border-gray pb-2 mb-0">
52
      Selected Canvas Building Blocks
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
53
    </h6>
54

Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
55
56
57
58
59
60
61
62
63
64
65
66
67
68
    <ul
      *ngIf="selectedExpertModelList"
      class="list-group inner"
      style="margin: 5px"
    >
      <li
        *ngFor="let em of selectedExpertModelList"
        class="
          d-flex
          list-group-item
          justify-content-between
          align-items-center
        "
      >
69
70
        <span>{{ em.name }}</span>
        <span>
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
          <button
            type="button"
            (click)="mergeExpertModel(em._id)"
            class="btn btn-warning btn-xs"
          >
            Merge</button
          >&nbsp;
          <button
            (click)="viewExpertModel(em._id)"
            type="button"
            class="btn btn-dark btn-xs"
          >
            View</button
          >&nbsp;
          <button
            (click)="unselectExpertModel(em._id)"
            type="button"
            class="btn btn-danger btn-xs"
          >
            Unselect
          </button>
        </span>
93
94
95
96
97
98
      </li>
    </ul>
  </div>

  <!-- Select expert model -->
  <div class="my-3 p-3 bg-white rounded shadow-sm">
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
99
    <h6 class="border-bottom border-gray pb-2 mb-0">
100
      Select Canvas Building Block
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
101
    </h6>
102
    <div class="text-muted pt-3">
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
103
104
105
106
      <form
        [formGroup]="selectedExpertModelForm"
        (ngSubmit)="selectExpertModel()"
      >
107
        <div class="form-group row">
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
108
          <label for="expertModelSelector" class="col-sm-4 col-form-label"
109
            >Canvas Building Block</label
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
110
          >
111
          <div class="col-sm-8">
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
112
113
114
115
116
117
118
119
120
121
122
            <select
              id="expertModelSelector"
              formControlName="expertModelId"
              class="form-control"
            >
              <option
                *ngFor="let em of unselectedExpertModelList"
                [value]="em._id"
              >
                {{ em.name }}
              </option>
123
124
125
126
127
            </select>
          </div>
        </div>
        <div class="form-group row">
          <div class="col-sm-12">
Alexander Philipp Nowosad's avatar
Alexander Philipp Nowosad committed
128
129
130
131
132
            <button
              type="submit"
              class="btn btn-sm btn-dark btn-block"
              [disabled]="!selectedExpertModelForm.valid"
            >
133
              Add Canvas Building Block
134
135
136
137
138
139
140
            </button>
          </div>
        </div>
      </form>
    </div>
  </div>
</main>