Skip to content

Commit b8bdf47

Browse files
[DURACOM-444] add modal for relation groups
1 parent 25a5bc0 commit b8bdf47

10 files changed

Lines changed: 1060 additions & 369 deletions
Lines changed: 9 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,4 @@
1-
@if ((formCollapsed | async) !== true) {
2-
<a
3-
class="close position-relative"
4-
ngbTooltip="{{'form.group-collapse-help' | translate}}"
5-
placement="left">
6-
<span class="fas fa-angle-up fa-fw fa-2x"
7-
aria-hidden="true"
8-
(click)="collapseForm()"></span>
9-
</a>
10-
}
11-
@if ((formCollapsed | async)) {
12-
<a
13-
class="close position-relative"
14-
ngbTooltip="{{'form.group-expand-help' | translate}}"
15-
placement="left">
16-
<span class="fas fa-angle-down fa-fw fa-2x"
17-
aria-hidden="true"
18-
(click)="expandForm()"></span>
19-
</a>
20-
}
21-
22-
<div class="pt-2" [ngClass]="{'border-top': !showErrorMessages, 'border border-danger': showErrorMessages}">
23-
@if ((formCollapsed | async) !== true) {
24-
<div class="ps-2 row" @shrinkInOut>
25-
<ds-form #formRef="formComponent"
26-
class="col-sm-12 col-md-8 col-lg-9 col-xl-10 ps-0"
27-
[formId]="formId"
28-
[formModel]="formModel"
29-
[displaySubmit]="false"
30-
[displayCancel]="false"
31-
[emitChange]="false"
32-
(dfBlur)="onBlur($event)"
33-
(dfFocus)="onFocus($event)"></ds-form>
34-
@if ((formCollapsed | async) !== true) {
35-
<div class="col p-0 m-0 d-flex justify-content-center align-items-center">
36-
<button type="button"
37-
class="btn btn-link"
38-
[dsBtnDisabled]="isMandatoryFieldEmpty()"
39-
(click)="save()">
40-
<i class="fas fa-save link-primary fa-2x"
41-
aria-hidden="true"></i>
42-
</button>
43-
<button type="button"
44-
class="btn btn-link"
45-
[dsBtnDisabled]="!editMode"
46-
(click)="delete()">
47-
<i class="fas fa-trash link-danger fa-2x"
48-
aria-hidden="true"></i>
49-
</button>
50-
<button type="button"
51-
class="btn btn-link"
52-
[dsBtnDisabled]="isMandatoryFieldEmpty()"
53-
(click)="clear()">
54-
<i class="fas fa-undo fa-2x"
55-
aria-hidden="true"></i>
56-
</button>
57-
</div>
58-
}
59-
<div class="clearfix"></div>
60-
</div>
61-
}
62-
1+
<div class="pt-2">
632
<div class="d-flex">
643
@if (!chips) {
654
<ds-loading [showMessage]="false"></ds-loading>
@@ -76,9 +15,15 @@
7615
@if (chips && chips.hasItems()) {
7716
<ds-chips
7817
[chips]="chips"
79-
[editable]="true"
18+
[editable]="!model.readOnly"
8019
[showIcons]="true"
81-
(selected)="onChipSelected($event)"></ds-chips>
20+
(selected)="onChipSelected($event)"></ds-chips>
8221
}
22+
<button type="button" class="ds-form-add-more btn btn-link"
23+
title="{{'form.add' | translate}}"
24+
[dsBtnDisabled]="model.readOnly"
25+
(click)="openModal()">
26+
<span attr.aria-label="{{'form.add' | translate}}"><i class="fas fa-plus"></i> {{'form.add' | translate}}</span>
27+
</button>
8328
</div>
8429
</div>

0 commit comments

Comments
 (0)